Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: Source/core/rendering/style/StyleRareInheritedData.cpp

Issue 20061003: Move isValid/isCurrentColor from Color to StyleColor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 15 matching lines...) Expand all
26 #include "core/rendering/style/QuotesData.h" 26 #include "core/rendering/style/QuotesData.h"
27 #include "core/rendering/style/RenderStyle.h" 27 #include "core/rendering/style/RenderStyle.h"
28 #include "core/rendering/style/RenderStyleConstants.h" 28 #include "core/rendering/style/RenderStyleConstants.h"
29 #include "core/rendering/style/ShadowData.h" 29 #include "core/rendering/style/ShadowData.h"
30 #include "core/rendering/style/StyleImage.h" 30 #include "core/rendering/style/StyleImage.h"
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 struct SameSizeAsStyleRareInheritedData : public RefCounted<SameSizeAsStyleRareI nheritedData> { 34 struct SameSizeAsStyleRareInheritedData : public RefCounted<SameSizeAsStyleRareI nheritedData> {
35 void* styleImage; 35 void* styleImage;
36 Color firstColor; 36 StyleColor firstColor;
37 float firstFloat; 37 float firstFloat;
38 Color colors[5]; 38 StyleColor colors[5];
39 void* ownPtrs[1]; 39 void* ownPtrs[1];
40 AtomicString atomicStrings[5]; 40 AtomicString atomicStrings[5];
41 void* refPtrs[2]; 41 void* refPtrs[2];
42 Length lengths[1]; 42 Length lengths[1];
43 float secondFloat; 43 float secondFloat;
44 unsigned m_bitfields[2]; 44 unsigned m_bitfields[2];
45 short pagedMediaShorts[2]; 45 short pagedMediaShorts[2];
46 unsigned unsigneds[1]; 46 unsigned unsigneds[1];
47 short hyphenationShorts[3]; 47 short hyphenationShorts[3];
48 48
49 Color touchColors; 49 StyleColor touchColors;
50 50
51 void* variableDataRefs[1]; 51 void* variableDataRefs[1];
52 }; 52 };
53 53
54 COMPILE_ASSERT(sizeof(StyleRareInheritedData) == sizeof(SameSizeAsStyleRareInher itedData), StyleRareInheritedData_should_bit_pack); 54 COMPILE_ASSERT(sizeof(StyleRareInheritedData) == sizeof(SameSizeAsStyleRareInher itedData), StyleRareInheritedData_should_bit_pack);
55 55
56 StyleRareInheritedData::StyleRareInheritedData() 56 StyleRareInheritedData::StyleRareInheritedData()
57 : listStyleImage(RenderStyle::initialListStyleImage()) 57 : listStyleImage(RenderStyle::initialListStyleImage())
58 , textStrokeWidth(RenderStyle::initialTextStrokeWidth()) 58 , textStrokeWidth(RenderStyle::initialTextStrokeWidth())
59 , indent(RenderStyle::initialTextIndent()) 59 , indent(RenderStyle::initialTextIndent())
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 bool StyleRareInheritedData::shadowDataEquivalent(const StyleRareInheritedData& o) const 227 bool StyleRareInheritedData::shadowDataEquivalent(const StyleRareInheritedData& o) const
228 { 228 {
229 if ((!textShadow && o.textShadow) || (textShadow && !o.textShadow)) 229 if ((!textShadow && o.textShadow) || (textShadow && !o.textShadow))
230 return false; 230 return false;
231 if (textShadow && o.textShadow && (*textShadow != *o.textShadow)) 231 if (textShadow && o.textShadow && (*textShadow != *o.textShadow))
232 return false; 232 return false;
233 return true; 233 return true;
234 } 234 }
235 235
236 } // namespace WebCore 236 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698