| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 struct InheritedFlags { | 167 struct InheritedFlags { |
| 168 bool operator==(const InheritedFlags& other) const | 168 bool operator==(const InheritedFlags& other) const |
| 169 { | 169 { |
| 170 return (_empty_cells == other._empty_cells) | 170 return (_empty_cells == other._empty_cells) |
| 171 && (_caption_side == other._caption_side) | 171 && (_caption_side == other._caption_side) |
| 172 && (_list_style_type == other._list_style_type) | 172 && (_list_style_type == other._list_style_type) |
| 173 && (_list_style_position == other._list_style_position) | 173 && (_list_style_position == other._list_style_position) |
| 174 && (_visibility == other._visibility) | 174 && (_visibility == other._visibility) |
| 175 && (_text_align == other._text_align) | 175 && (_text_align == other._text_align) |
| 176 && (_text_transform == other._text_transform) | 176 && (_text_transform == other._text_transform) |
| 177 && (m_textUnderline == other.m_textUnderline) | 177 && (m_hasSimpleUnderline == other.m_hasSimpleUnderline) |
| 178 && (_cursor_style == other._cursor_style) | 178 && (_cursor_style == other._cursor_style) |
| 179 && (_direction == other._direction) | 179 && (_direction == other._direction) |
| 180 && (_white_space == other._white_space) | 180 && (_white_space == other._white_space) |
| 181 && (_border_collapse == other._border_collapse) | 181 && (_border_collapse == other._border_collapse) |
| 182 && (_box_direction == other._box_direction) | 182 && (_box_direction == other._box_direction) |
| 183 && (m_rtlOrdering == other.m_rtlOrdering) | 183 && (m_rtlOrdering == other.m_rtlOrdering) |
| 184 && (m_printColorAdjust == other.m_printColorAdjust) | 184 && (m_printColorAdjust == other.m_printColorAdjust) |
| 185 && (_pointerEvents == other._pointerEvents) | 185 && (_pointerEvents == other._pointerEvents) |
| 186 && (_insideLink == other._insideLink) | 186 && (_insideLink == other._insideLink) |
| 187 && (m_writingMode == other.m_writingMode); | 187 && (m_writingMode == other.m_writingMode); |
| 188 } | 188 } |
| 189 | 189 |
| 190 bool operator!=(const InheritedFlags& other) const { return !(*this == o
ther); } | 190 bool operator!=(const InheritedFlags& other) const { return !(*this == o
ther); } |
| 191 | 191 |
| 192 unsigned _empty_cells : 1; // EEmptyCell | 192 unsigned _empty_cells : 1; // EEmptyCell |
| 193 unsigned _caption_side : 2; // ECaptionSide | 193 unsigned _caption_side : 2; // ECaptionSide |
| 194 unsigned _list_style_type : 7; // EListStyleType | 194 unsigned _list_style_type : 7; // EListStyleType |
| 195 unsigned _list_style_position : 1; // EListStylePosition | 195 unsigned _list_style_position : 1; // EListStylePosition |
| 196 unsigned _visibility : 2; // EVisibility | 196 unsigned _visibility : 2; // EVisibility |
| 197 unsigned _text_align : 4; // ETextAlign | 197 unsigned _text_align : 4; // ETextAlign |
| 198 unsigned _text_transform : 2; // ETextTransform | 198 unsigned _text_transform : 2; // ETextTransform |
| 199 unsigned m_textUnderline : 1; | 199 unsigned m_hasSimpleUnderline : 1; // True if 'underline solid' is the o
nly text decoration on this element |
| 200 unsigned _cursor_style : 6; // ECursor | 200 unsigned _cursor_style : 6; // ECursor |
| 201 unsigned _direction : 1; // TextDirection | 201 unsigned _direction : 1; // TextDirection |
| 202 unsigned _white_space : 3; // EWhiteSpace | 202 unsigned _white_space : 3; // EWhiteSpace |
| 203 unsigned _border_collapse : 1; // EBorderCollapse | 203 unsigned _border_collapse : 1; // EBorderCollapse |
| 204 unsigned _box_direction : 1; // EBoxDirection (CSS3 box_direction proper
ty, flexible box layout module) | 204 unsigned _box_direction : 1; // EBoxDirection (CSS3 box_direction proper
ty, flexible box layout module) |
| 205 // 32 bits | 205 // 32 bits |
| 206 | 206 |
| 207 // non CSS2 inherited | 207 // non CSS2 inherited |
| 208 unsigned m_rtlOrdering : 1; // Order | 208 unsigned m_rtlOrdering : 1; // Order |
| 209 unsigned m_printColorAdjust : PrintColorAdjustBits; | 209 unsigned m_printColorAdjust : PrintColorAdjustBits; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 protected: | 294 protected: |
| 295 void setBitDefaults() | 295 void setBitDefaults() |
| 296 { | 296 { |
| 297 inherited_flags._empty_cells = initialEmptyCells(); | 297 inherited_flags._empty_cells = initialEmptyCells(); |
| 298 inherited_flags._caption_side = initialCaptionSide(); | 298 inherited_flags._caption_side = initialCaptionSide(); |
| 299 inherited_flags._list_style_type = initialListStyleType(); | 299 inherited_flags._list_style_type = initialListStyleType(); |
| 300 inherited_flags._list_style_position = initialListStylePosition(); | 300 inherited_flags._list_style_position = initialListStylePosition(); |
| 301 inherited_flags._visibility = initialVisibility(); | 301 inherited_flags._visibility = initialVisibility(); |
| 302 inherited_flags._text_align = initialTextAlign(); | 302 inherited_flags._text_align = initialTextAlign(); |
| 303 inherited_flags._text_transform = initialTextTransform(); | 303 inherited_flags._text_transform = initialTextTransform(); |
| 304 inherited_flags.m_textUnderline = false; | 304 inherited_flags.m_hasSimpleUnderline = false; |
| 305 inherited_flags._cursor_style = initialCursor(); | 305 inherited_flags._cursor_style = initialCursor(); |
| 306 inherited_flags._direction = initialDirection(); | 306 inherited_flags._direction = initialDirection(); |
| 307 inherited_flags._white_space = initialWhiteSpace(); | 307 inherited_flags._white_space = initialWhiteSpace(); |
| 308 inherited_flags._border_collapse = initialBorderCollapse(); | 308 inherited_flags._border_collapse = initialBorderCollapse(); |
| 309 inherited_flags.m_rtlOrdering = initialRTLOrdering(); | 309 inherited_flags.m_rtlOrdering = initialRTLOrdering(); |
| 310 inherited_flags._box_direction = initialBoxDirection(); | 310 inherited_flags._box_direction = initialBoxDirection(); |
| 311 inherited_flags.m_printColorAdjust = initialPrintColorAdjust(); | 311 inherited_flags.m_printColorAdjust = initialPrintColorAdjust(); |
| 312 inherited_flags._pointerEvents = initialPointerEvents(); | 312 inherited_flags._pointerEvents = initialPointerEvents(); |
| 313 inherited_flags._insideLink = NotInsideLink; | 313 inherited_flags._insideLink = NotInsideLink; |
| 314 inherited_flags.m_writingMode = initialWritingMode(); | 314 inherited_flags.m_writingMode = initialWritingMode(); |
| (...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1148 void setTextAutosizingMultiplier(float); | 1148 void setTextAutosizingMultiplier(float); |
| 1149 | 1149 |
| 1150 void setColor(const Color&); | 1150 void setColor(const Color&); |
| 1151 void setTextIndent(const Length& v) { SET_VAR(rareInheritedData, indent, v);
} | 1151 void setTextIndent(const Length& v) { SET_VAR(rareInheritedData, indent, v);
} |
| 1152 void setTextIndentLine(TextIndentLine v) { SET_VAR(rareInheritedData, m_text
IndentLine, v); } | 1152 void setTextIndentLine(TextIndentLine v) { SET_VAR(rareInheritedData, m_text
IndentLine, v); } |
| 1153 void setTextIndentType(TextIndentType v) { SET_VAR(rareInheritedData, m_text
IndentType, v); } | 1153 void setTextIndentType(TextIndentType v) { SET_VAR(rareInheritedData, m_text
IndentType, v); } |
| 1154 void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; } | 1154 void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; } |
| 1155 void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAl
ignLast, v); } | 1155 void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAl
ignLast, v); } |
| 1156 void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustif
y, v); } | 1156 void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustif
y, v); } |
| 1157 void setTextTransform(ETextTransform v) { inherited_flags._text_transform =
v; } | 1157 void setTextTransform(ETextTransform v) { inherited_flags._text_transform =
v; } |
| 1158 void applyTextDecorations(); | 1158 void applyTextDecorations(const Color& parentTextDecorationColor, bool overr
ideExistingColors); |
| 1159 void clearAppliedTextDecorations(); | 1159 void clearAppliedTextDecorations(); |
| 1160 void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v
); } | 1160 void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v
); } |
| 1161 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInherit
edData, m_textUnderlinePosition, v); } | 1161 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInherit
edData, m_textUnderlinePosition, v); } |
| 1162 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInherite
dData, m_textDecorationStyle, v); } | 1162 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInherite
dData, m_textDecorationStyle, v); } |
| 1163 void setDirection(TextDirection v) { inherited_flags._direction = v; } | 1163 void setDirection(TextDirection v) { inherited_flags._direction = v; } |
| 1164 void setSelfOrAncestorHasDirAutoAttribute(bool v) { SET_VAR(rareInheritedDat
a, m_selfOrAncestorHasDirAutoAttribute, v); } | 1164 void setSelfOrAncestorHasDirAutoAttribute(bool v) { SET_VAR(rareInheritedDat
a, m_selfOrAncestorHasDirAutoAttribute, v); } |
| 1165 void setLineHeight(const Length& specifiedLineHeight); | 1165 void setLineHeight(const Length& specifiedLineHeight); |
| 1166 bool setZoom(float); | 1166 bool setZoom(float); |
| 1167 bool setEffectiveZoom(float); | 1167 bool setEffectiveZoom(float); |
| 1168 void clearMultiCol(); | 1168 void clearMultiCol(); |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1881 | 1881 |
| 1882 StyleColor decorationColorIncludingFallback(bool visitedLink) const; | 1882 StyleColor decorationColorIncludingFallback(bool visitedLink) const; |
| 1883 Color colorIncludingFallback(int colorProperty, bool visitedLink) const; | 1883 Color colorIncludingFallback(int colorProperty, bool visitedLink) const; |
| 1884 | 1884 |
| 1885 Color stopColor() const { return svgStyle().stopColor(); } | 1885 Color stopColor() const { return svgStyle().stopColor(); } |
| 1886 Color floodColor() const { return svgStyle().floodColor(); } | 1886 Color floodColor() const { return svgStyle().floodColor(); } |
| 1887 Color lightingColor() const { return svgStyle().lightingColor(); } | 1887 Color lightingColor() const { return svgStyle().lightingColor(); } |
| 1888 | 1888 |
| 1889 void appendContent(PassOwnPtrWillBeRawPtr<ContentData>); | 1889 void appendContent(PassOwnPtrWillBeRawPtr<ContentData>); |
| 1890 void addAppliedTextDecoration(const AppliedTextDecoration&); | 1890 void addAppliedTextDecoration(const AppliedTextDecoration&); |
| 1891 void overrideTextDecorationColors(Color propagatedColor); |
| 1891 void applyMotionPathTransform(float originX, float originY, TransformationMa
trix&) const; | 1892 void applyMotionPathTransform(float originX, float originY, TransformationMa
trix&) const; |
| 1892 | 1893 |
| 1893 bool diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle& other) con
st; | 1894 bool diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle& other) con
st; |
| 1894 bool diffNeedsFullLayout(const ComputedStyle& other) const; | 1895 bool diffNeedsFullLayout(const ComputedStyle& other) const; |
| 1895 bool diffNeedsPaintInvalidationLayer(const ComputedStyle& other) const; | 1896 bool diffNeedsPaintInvalidationLayer(const ComputedStyle& other) const; |
| 1896 bool diffNeedsPaintInvalidationObject(const ComputedStyle& other) const; | 1897 bool diffNeedsPaintInvalidationObject(const ComputedStyle& other) const; |
| 1897 void updatePropertySpecificDifferences(const ComputedStyle& other, StyleDiff
erence&) const; | 1898 void updatePropertySpecificDifferences(const ComputedStyle& other, StyleDiff
erence&) const; |
| 1898 | 1899 |
| 1899 bool requireTransformOrigin(ApplyTransformOrigin applyOrigin, ApplyMotionPat
h) const; | 1900 bool requireTransformOrigin(ApplyTransformOrigin applyOrigin, ApplyMotionPat
h) const; |
| 1900 }; | 1901 }; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2005 } | 2006 } |
| 2006 | 2007 |
| 2007 inline bool ComputedStyle::hasPseudoElementStyle() const | 2008 inline bool ComputedStyle::hasPseudoElementStyle() const |
| 2008 { | 2009 { |
| 2009 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; | 2010 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; |
| 2010 } | 2011 } |
| 2011 | 2012 |
| 2012 } // namespace blink | 2013 } // namespace blink |
| 2013 | 2014 |
| 2014 #endif // ComputedStyle_h | 2015 #endif // ComputedStyle_h |
| OLD | NEW |