| OLD | NEW |
| 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 19 matching lines...) Expand all Loading... |
| 30 #include "core/rendering/style/RenderStyleConstants.h" | 30 #include "core/rendering/style/RenderStyleConstants.h" |
| 31 #include "core/rendering/style/ShadowList.h" | 31 #include "core/rendering/style/ShadowList.h" |
| 32 #include "core/rendering/style/StyleImage.h" | 32 #include "core/rendering/style/StyleImage.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 struct SameSizeAsStyleRareInheritedData : public RefCounted<SameSizeAsStyleRareI
nheritedData> { | 36 struct SameSizeAsStyleRareInheritedData : public RefCounted<SameSizeAsStyleRareI
nheritedData> { |
| 37 void* styleImage; | 37 void* styleImage; |
| 38 Color firstColor; | 38 Color firstColor; |
| 39 float firstFloat; | 39 float firstFloat; |
| 40 Color colors[5]; | 40 Color colors[2]; |
| 41 void* ownPtrs[1]; | 41 void* ownPtrs[1]; |
| 42 AtomicString atomicStrings[4]; | 42 AtomicString atomicStrings[4]; |
| 43 void* refPtrs[3]; | 43 void* refPtrs[3]; |
| 44 Length lengths[1]; | 44 Length lengths[1]; |
| 45 float secondFloat; | 45 float secondFloat; |
| 46 unsigned m_bitfields[2]; | 46 unsigned m_bitfields[2]; |
| 47 short pagedMediaShorts[2]; | 47 short pagedMediaShorts[2]; |
| 48 unsigned unsigneds[1]; | 48 unsigned unsigneds[1]; |
| 49 short hyphenationShorts[3]; | 49 short hyphenationShorts[3]; |
| 50 | 50 |
| 51 Color touchColors; | 51 Color touchColors; |
| 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()) |
| 60 , m_effectiveZoom(RenderStyle::initialZoom()) | 60 , m_effectiveZoom(RenderStyle::initialZoom()) |
| 61 , widows(RenderStyle::initialWidows()) | 61 , widows(RenderStyle::initialWidows()) |
| 62 , orphans(RenderStyle::initialOrphans()) | 62 , orphans(RenderStyle::initialOrphans()) |
| 63 , m_hasAutoWidows(true) | 63 , m_hasAutoWidows(true) |
| 64 , m_hasAutoOrphans(true) | 64 , m_hasAutoOrphans(true) |
| 65 , m_textStrokeColorIsCurrentColor(true) | 65 , m_textStrokeColorIsCurrentColor(true) |
| 66 , m_textFillColorIsCurrentColor(true) | 66 , m_textFillColorIsCurrentColor(true) |
| 67 , m_textEmphasisColorIsCurrentColor(true) | 67 , m_textEmphasisColorIsCurrentColor(true) |
| 68 , m_visitedLinkTextStrokeColorIsCurrentColor(true) | |
| 69 , m_visitedLinkTextFillColorIsCurrentColor(true) | |
| 70 , m_visitedLinkTextEmphasisColorIsCurrentColor(true) | |
| 71 , userModify(READ_ONLY) | 68 , userModify(READ_ONLY) |
| 72 , wordBreak(RenderStyle::initialWordBreak()) | 69 , wordBreak(RenderStyle::initialWordBreak()) |
| 73 , overflowWrap(RenderStyle::initialOverflowWrap()) | 70 , overflowWrap(RenderStyle::initialOverflowWrap()) |
| 74 , lineBreak(LineBreakAuto) | 71 , lineBreak(LineBreakAuto) |
| 75 , resize(RenderStyle::initialResize()) | 72 , resize(RenderStyle::initialResize()) |
| 76 , userSelect(RenderStyle::initialUserSelect()) | 73 , userSelect(RenderStyle::initialUserSelect()) |
| 77 , speak(SpeakNormal) | 74 , speak(SpeakNormal) |
| 78 , hyphens(HyphensManual) | 75 , hyphens(HyphensManual) |
| 79 , textEmphasisFill(TextEmphasisFillFilled) | 76 , textEmphasisFill(TextEmphasisFillFilled) |
| 80 , textEmphasisMark(TextEmphasisMarkNone) | 77 , textEmphasisMark(TextEmphasisMarkNone) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 97 { | 94 { |
| 98 } | 95 } |
| 99 | 96 |
| 100 StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o) | 97 StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o) |
| 101 : RefCounted<StyleRareInheritedData>() | 98 : RefCounted<StyleRareInheritedData>() |
| 102 , listStyleImage(o.listStyleImage) | 99 , listStyleImage(o.listStyleImage) |
| 103 , m_textStrokeColor(o.m_textStrokeColor) | 100 , m_textStrokeColor(o.m_textStrokeColor) |
| 104 , textStrokeWidth(o.textStrokeWidth) | 101 , textStrokeWidth(o.textStrokeWidth) |
| 105 , m_textFillColor(o.m_textFillColor) | 102 , m_textFillColor(o.m_textFillColor) |
| 106 , m_textEmphasisColor(o.m_textEmphasisColor) | 103 , m_textEmphasisColor(o.m_textEmphasisColor) |
| 107 , m_visitedLinkTextStrokeColor(o.m_visitedLinkTextStrokeColor) | |
| 108 , m_visitedLinkTextFillColor(o.m_visitedLinkTextFillColor) | |
| 109 , m_visitedLinkTextEmphasisColor(o.m_visitedLinkTextEmphasisColor) | |
| 110 , textShadow(o.textShadow) | 104 , textShadow(o.textShadow) |
| 111 , highlight(o.highlight) | 105 , highlight(o.highlight) |
| 112 , cursorData(o.cursorData) | 106 , cursorData(o.cursorData) |
| 113 , indent(o.indent) | 107 , indent(o.indent) |
| 114 , m_effectiveZoom(o.m_effectiveZoom) | 108 , m_effectiveZoom(o.m_effectiveZoom) |
| 115 , widows(o.widows) | 109 , widows(o.widows) |
| 116 , orphans(o.orphans) | 110 , orphans(o.orphans) |
| 117 , m_hasAutoWidows(o.m_hasAutoWidows) | 111 , m_hasAutoWidows(o.m_hasAutoWidows) |
| 118 , m_hasAutoOrphans(o.m_hasAutoOrphans) | 112 , m_hasAutoOrphans(o.m_hasAutoOrphans) |
| 119 , m_textStrokeColorIsCurrentColor(o.m_textStrokeColorIsCurrentColor) | 113 , m_textStrokeColorIsCurrentColor(o.m_textStrokeColorIsCurrentColor) |
| 120 , m_textFillColorIsCurrentColor(o.m_textFillColorIsCurrentColor) | 114 , m_textFillColorIsCurrentColor(o.m_textFillColorIsCurrentColor) |
| 121 , m_textEmphasisColorIsCurrentColor(o.m_textEmphasisColorIsCurrentColor) | 115 , m_textEmphasisColorIsCurrentColor(o.m_textEmphasisColorIsCurrentColor) |
| 122 , m_visitedLinkTextStrokeColorIsCurrentColor(o.m_visitedLinkTextStrokeColorI
sCurrentColor) | |
| 123 , m_visitedLinkTextFillColorIsCurrentColor(o.m_visitedLinkTextFillColorIsCur
rentColor) | |
| 124 , m_visitedLinkTextEmphasisColorIsCurrentColor(o.m_visitedLinkTextEmphasisCo
lorIsCurrentColor) | |
| 125 , userModify(o.userModify) | 116 , userModify(o.userModify) |
| 126 , wordBreak(o.wordBreak) | 117 , wordBreak(o.wordBreak) |
| 127 , overflowWrap(o.overflowWrap) | 118 , overflowWrap(o.overflowWrap) |
| 128 , lineBreak(o.lineBreak) | 119 , lineBreak(o.lineBreak) |
| 129 , resize(o.resize) | 120 , resize(o.resize) |
| 130 , userSelect(o.userSelect) | 121 , userSelect(o.userSelect) |
| 131 , speak(o.speak) | 122 , speak(o.speak) |
| 132 , hyphens(o.hyphens) | 123 , hyphens(o.hyphens) |
| 133 , textEmphasisFill(o.textEmphasisFill) | 124 , textEmphasisFill(o.textEmphasisFill) |
| 134 , textEmphasisMark(o.textEmphasisMark) | 125 , textEmphasisMark(o.textEmphasisMark) |
| (...skipping 23 matching lines...) Expand all Loading... |
| 158 StyleRareInheritedData::~StyleRareInheritedData() | 149 StyleRareInheritedData::~StyleRareInheritedData() |
| 159 { | 150 { |
| 160 } | 151 } |
| 161 | 152 |
| 162 bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const | 153 bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const |
| 163 { | 154 { |
| 164 return m_textStrokeColor == o.m_textStrokeColor | 155 return m_textStrokeColor == o.m_textStrokeColor |
| 165 && textStrokeWidth == o.textStrokeWidth | 156 && textStrokeWidth == o.textStrokeWidth |
| 166 && m_textFillColor == o.m_textFillColor | 157 && m_textFillColor == o.m_textFillColor |
| 167 && m_textEmphasisColor == o.m_textEmphasisColor | 158 && m_textEmphasisColor == o.m_textEmphasisColor |
| 168 && m_visitedLinkTextStrokeColor == o.m_visitedLinkTextStrokeColor | |
| 169 && m_visitedLinkTextFillColor == o.m_visitedLinkTextFillColor | |
| 170 && m_visitedLinkTextEmphasisColor == o.m_visitedLinkTextEmphasisColor | |
| 171 && tapHighlightColor == o.tapHighlightColor | 159 && tapHighlightColor == o.tapHighlightColor |
| 172 && shadowDataEquivalent(o) | 160 && shadowDataEquivalent(o) |
| 173 && highlight == o.highlight | 161 && highlight == o.highlight |
| 174 && dataEquivalent(cursorData.get(), o.cursorData.get()) | 162 && dataEquivalent(cursorData.get(), o.cursorData.get()) |
| 175 && indent == o.indent | 163 && indent == o.indent |
| 176 && m_effectiveZoom == o.m_effectiveZoom | 164 && m_effectiveZoom == o.m_effectiveZoom |
| 177 && widows == o.widows | 165 && widows == o.widows |
| 178 && orphans == o.orphans | 166 && orphans == o.orphans |
| 179 && m_hasAutoWidows == o.m_hasAutoWidows | 167 && m_hasAutoWidows == o.m_hasAutoWidows |
| 180 && m_hasAutoOrphans == o.m_hasAutoOrphans | 168 && m_hasAutoOrphans == o.m_hasAutoOrphans |
| 181 && m_textStrokeColorIsCurrentColor == o.m_textStrokeColorIsCurrentColor | 169 && m_textStrokeColorIsCurrentColor == o.m_textStrokeColorIsCurrentColor |
| 182 && m_textFillColorIsCurrentColor == o.m_textFillColorIsCurrentColor | 170 && m_textFillColorIsCurrentColor == o.m_textFillColorIsCurrentColor |
| 183 && m_textEmphasisColorIsCurrentColor == o.m_textEmphasisColorIsCurrentCo
lor | 171 && m_textEmphasisColorIsCurrentColor == o.m_textEmphasisColorIsCurrentCo
lor |
| 184 && m_visitedLinkTextStrokeColorIsCurrentColor == o.m_visitedLinkTextStro
keColorIsCurrentColor | |
| 185 && m_visitedLinkTextFillColorIsCurrentColor == o.m_visitedLinkTextFillCo
lorIsCurrentColor | |
| 186 && m_visitedLinkTextEmphasisColorIsCurrentColor == o.m_visitedLinkTextEm
phasisColorIsCurrentColor | |
| 187 && userModify == o.userModify | 172 && userModify == o.userModify |
| 188 && wordBreak == o.wordBreak | 173 && wordBreak == o.wordBreak |
| 189 && overflowWrap == o.overflowWrap | 174 && overflowWrap == o.overflowWrap |
| 190 && lineBreak == o.lineBreak | 175 && lineBreak == o.lineBreak |
| 191 && resize == o.resize | 176 && resize == o.resize |
| 192 && userSelect == o.userSelect | 177 && userSelect == o.userSelect |
| 193 && speak == o.speak | 178 && speak == o.speak |
| 194 && hyphens == o.hyphens | 179 && hyphens == o.hyphens |
| 195 && hyphenationLimitBefore == o.hyphenationLimitBefore | 180 && hyphenationLimitBefore == o.hyphenationLimitBefore |
| 196 && hyphenationLimitAfter == o.hyphenationLimitAfter | 181 && hyphenationLimitAfter == o.hyphenationLimitAfter |
| (...skipping 24 matching lines...) Expand all Loading... |
| 221 { | 206 { |
| 222 return dataEquivalent(textShadow.get(), o.textShadow.get()); | 207 return dataEquivalent(textShadow.get(), o.textShadow.get()); |
| 223 } | 208 } |
| 224 | 209 |
| 225 bool StyleRareInheritedData::quotesDataEquivalent(const StyleRareInheritedData&
o) const | 210 bool StyleRareInheritedData::quotesDataEquivalent(const StyleRareInheritedData&
o) const |
| 226 { | 211 { |
| 227 return dataEquivalent(quotes, o.quotes); | 212 return dataEquivalent(quotes, o.quotes); |
| 228 } | 213 } |
| 229 | 214 |
| 230 } // namespace blink | 215 } // namespace blink |
| OLD | NEW |