| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 struct InheritedFlags { | 166 struct InheritedFlags { |
| 167 bool operator==(const InheritedFlags& other) const | 167 bool operator==(const InheritedFlags& other) const |
| 168 { | 168 { |
| 169 return (_empty_cells == other._empty_cells) | 169 return (_empty_cells == other._empty_cells) |
| 170 && (_caption_side == other._caption_side) | 170 && (_caption_side == other._caption_side) |
| 171 && (_list_style_type == other._list_style_type) | 171 && (_list_style_type == other._list_style_type) |
| 172 && (_list_style_position == other._list_style_position) | 172 && (_list_style_position == other._list_style_position) |
| 173 && (_visibility == other._visibility) | 173 && (_visibility == other._visibility) |
| 174 && (_text_align == other._text_align) | 174 && (_text_align == other._text_align) |
| 175 && (_text_transform == other._text_transform) | 175 && (_text_transform == other._text_transform) |
| 176 && (m_textUnderline == other.m_textUnderline) | 176 && (m_hasSimpleUnderline == other.m_hasSimpleUnderline) |
| 177 && (_cursor_style == other._cursor_style) | 177 && (_cursor_style == other._cursor_style) |
| 178 && (_direction == other._direction) | 178 && (_direction == other._direction) |
| 179 && (_white_space == other._white_space) | 179 && (_white_space == other._white_space) |
| 180 && (_border_collapse == other._border_collapse) | 180 && (_border_collapse == other._border_collapse) |
| 181 && (_box_direction == other._box_direction) | 181 && (_box_direction == other._box_direction) |
| 182 && (m_rtlOrdering == other.m_rtlOrdering) | 182 && (m_rtlOrdering == other.m_rtlOrdering) |
| 183 && (m_printColorAdjust == other.m_printColorAdjust) | 183 && (m_printColorAdjust == other.m_printColorAdjust) |
| 184 && (_pointerEvents == other._pointerEvents) | 184 && (_pointerEvents == other._pointerEvents) |
| 185 && (_insideLink == other._insideLink) | 185 && (_insideLink == other._insideLink) |
| 186 && (m_writingMode == other.m_writingMode); | 186 && (m_writingMode == other.m_writingMode); |
| 187 } | 187 } |
| 188 | 188 |
| 189 bool operator!=(const InheritedFlags& other) const { return !(*this == o
ther); } | 189 bool operator!=(const InheritedFlags& other) const { return !(*this == o
ther); } |
| 190 | 190 |
| 191 unsigned _empty_cells : 1; // EEmptyCell | 191 unsigned _empty_cells : 1; // EEmptyCell |
| 192 unsigned _caption_side : 2; // ECaptionSide | 192 unsigned _caption_side : 2; // ECaptionSide |
| 193 unsigned _list_style_type : 7; // EListStyleType | 193 unsigned _list_style_type : 7; // EListStyleType |
| 194 unsigned _list_style_position : 1; // EListStylePosition | 194 unsigned _list_style_position : 1; // EListStylePosition |
| 195 unsigned _visibility : 2; // EVisibility | 195 unsigned _visibility : 2; // EVisibility |
| 196 unsigned _text_align : 4; // ETextAlign | 196 unsigned _text_align : 4; // ETextAlign |
| 197 unsigned _text_transform : 2; // ETextTransform | 197 unsigned _text_transform : 2; // ETextTransform |
| 198 unsigned m_textUnderline : 1; | 198 unsigned m_hasSimpleUnderline : 1; // True if 'underline solid' is the o
nly text decoration on this element |
| 199 unsigned _cursor_style : 6; // ECursor | 199 unsigned _cursor_style : 6; // ECursor |
| 200 unsigned _direction : 1; // TextDirection | 200 unsigned _direction : 1; // TextDirection |
| 201 unsigned _white_space : 3; // EWhiteSpace | 201 unsigned _white_space : 3; // EWhiteSpace |
| 202 unsigned _border_collapse : 1; // EBorderCollapse | 202 unsigned _border_collapse : 1; // EBorderCollapse |
| 203 unsigned _box_direction : 1; // EBoxDirection (CSS3 box_direction proper
ty, flexible box layout module) | 203 unsigned _box_direction : 1; // EBoxDirection (CSS3 box_direction proper
ty, flexible box layout module) |
| 204 // 32 bits | 204 // 32 bits |
| 205 | 205 |
| 206 // non CSS2 inherited | 206 // non CSS2 inherited |
| 207 unsigned m_rtlOrdering : 1; // Order | 207 unsigned m_rtlOrdering : 1; // Order |
| 208 unsigned m_printColorAdjust : PrintColorAdjustBits; | 208 unsigned m_printColorAdjust : PrintColorAdjustBits; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 protected: | 292 protected: |
| 293 void setBitDefaults() | 293 void setBitDefaults() |
| 294 { | 294 { |
| 295 inherited_flags._empty_cells = initialEmptyCells(); | 295 inherited_flags._empty_cells = initialEmptyCells(); |
| 296 inherited_flags._caption_side = initialCaptionSide(); | 296 inherited_flags._caption_side = initialCaptionSide(); |
| 297 inherited_flags._list_style_type = initialListStyleType(); | 297 inherited_flags._list_style_type = initialListStyleType(); |
| 298 inherited_flags._list_style_position = initialListStylePosition(); | 298 inherited_flags._list_style_position = initialListStylePosition(); |
| 299 inherited_flags._visibility = initialVisibility(); | 299 inherited_flags._visibility = initialVisibility(); |
| 300 inherited_flags._text_align = initialTextAlign(); | 300 inherited_flags._text_align = initialTextAlign(); |
| 301 inherited_flags._text_transform = initialTextTransform(); | 301 inherited_flags._text_transform = initialTextTransform(); |
| 302 inherited_flags.m_textUnderline = false; | 302 inherited_flags.m_hasSimpleUnderline = false; |
| 303 inherited_flags._cursor_style = initialCursor(); | 303 inherited_flags._cursor_style = initialCursor(); |
| 304 inherited_flags._direction = initialDirection(); | 304 inherited_flags._direction = initialDirection(); |
| 305 inherited_flags._white_space = initialWhiteSpace(); | 305 inherited_flags._white_space = initialWhiteSpace(); |
| 306 inherited_flags._border_collapse = initialBorderCollapse(); | 306 inherited_flags._border_collapse = initialBorderCollapse(); |
| 307 inherited_flags.m_rtlOrdering = initialRTLOrdering(); | 307 inherited_flags.m_rtlOrdering = initialRTLOrdering(); |
| 308 inherited_flags._box_direction = initialBoxDirection(); | 308 inherited_flags._box_direction = initialBoxDirection(); |
| 309 inherited_flags.m_printColorAdjust = initialPrintColorAdjust(); | 309 inherited_flags.m_printColorAdjust = initialPrintColorAdjust(); |
| 310 inherited_flags._pointerEvents = initialPointerEvents(); | 310 inherited_flags._pointerEvents = initialPointerEvents(); |
| 311 inherited_flags._insideLink = NotInsideLink; | 311 inherited_flags._insideLink = NotInsideLink; |
| 312 inherited_flags.m_writingMode = initialWritingMode(); | 312 inherited_flags.m_writingMode = initialWritingMode(); |
| (...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 void setTextAutosizingMultiplier(float); | 1137 void setTextAutosizingMultiplier(float); |
| 1138 | 1138 |
| 1139 void setColor(const Color&); | 1139 void setColor(const Color&); |
| 1140 void setTextIndent(const Length& v) { SET_VAR(rareInheritedData, indent, v);
} | 1140 void setTextIndent(const Length& v) { SET_VAR(rareInheritedData, indent, v);
} |
| 1141 void setTextIndentLine(TextIndentLine v) { SET_VAR(rareInheritedData, m_text
IndentLine, v); } | 1141 void setTextIndentLine(TextIndentLine v) { SET_VAR(rareInheritedData, m_text
IndentLine, v); } |
| 1142 void setTextIndentType(TextIndentType v) { SET_VAR(rareInheritedData, m_text
IndentType, v); } | 1142 void setTextIndentType(TextIndentType v) { SET_VAR(rareInheritedData, m_text
IndentType, v); } |
| 1143 void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; } | 1143 void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; } |
| 1144 void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAl
ignLast, v); } | 1144 void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAl
ignLast, v); } |
| 1145 void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustif
y, v); } | 1145 void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustif
y, v); } |
| 1146 void setTextTransform(ETextTransform v) { inherited_flags._text_transform =
v; } | 1146 void setTextTransform(ETextTransform v) { inherited_flags._text_transform =
v; } |
| 1147 void applyTextDecorations(); | 1147 void applyTextDecorations(const Color& parentTextDecorationColor, bool overr
ideExistingColors); |
| 1148 void clearAppliedTextDecorations(); | 1148 void clearAppliedTextDecorations(); |
| 1149 void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v
); } | 1149 void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v
); } |
| 1150 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInherit
edData, m_textUnderlinePosition, v); } | 1150 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInherit
edData, m_textUnderlinePosition, v); } |
| 1151 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInherite
dData, m_textDecorationStyle, v); } | 1151 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInherite
dData, m_textDecorationStyle, v); } |
| 1152 void setDirection(TextDirection v) { inherited_flags._direction = v; } | 1152 void setDirection(TextDirection v) { inherited_flags._direction = v; } |
| 1153 void setSelfOrAncestorHasDirAutoAttribute(bool v) { SET_VAR(rareInheritedDat
a, m_selfOrAncestorHasDirAutoAttribute, v); } | 1153 void setSelfOrAncestorHasDirAutoAttribute(bool v) { SET_VAR(rareInheritedDat
a, m_selfOrAncestorHasDirAutoAttribute, v); } |
| 1154 void setLineHeight(const Length& specifiedLineHeight); | 1154 void setLineHeight(const Length& specifiedLineHeight); |
| 1155 bool setZoom(float); | 1155 bool setZoom(float); |
| 1156 bool setEffectiveZoom(float); | 1156 bool setEffectiveZoom(float); |
| 1157 void clearMultiCol(); | 1157 void clearMultiCol(); |
| (...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1867 | 1867 |
| 1868 StyleColor decorationColorIncludingFallback(bool visitedLink) const; | 1868 StyleColor decorationColorIncludingFallback(bool visitedLink) const; |
| 1869 Color colorIncludingFallback(int colorProperty, bool visitedLink) const; | 1869 Color colorIncludingFallback(int colorProperty, bool visitedLink) const; |
| 1870 | 1870 |
| 1871 Color stopColor() const { return svgStyle().stopColor(); } | 1871 Color stopColor() const { return svgStyle().stopColor(); } |
| 1872 Color floodColor() const { return svgStyle().floodColor(); } | 1872 Color floodColor() const { return svgStyle().floodColor(); } |
| 1873 Color lightingColor() const { return svgStyle().lightingColor(); } | 1873 Color lightingColor() const { return svgStyle().lightingColor(); } |
| 1874 | 1874 |
| 1875 void appendContent(PassOwnPtrWillBeRawPtr<ContentData>); | 1875 void appendContent(PassOwnPtrWillBeRawPtr<ContentData>); |
| 1876 void addAppliedTextDecoration(const AppliedTextDecoration&); | 1876 void addAppliedTextDecoration(const AppliedTextDecoration&); |
| 1877 void overrideTextDecorationColors(Color propagatedColor); |
| 1877 void applyMotionPathTransform(float originX, float originY, TransformationMa
trix&) const; | 1878 void applyMotionPathTransform(float originX, float originY, TransformationMa
trix&) const; |
| 1878 | 1879 |
| 1879 bool diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle& other) con
st; | 1880 bool diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle& other) con
st; |
| 1880 bool diffNeedsFullLayout(const ComputedStyle& other) const; | 1881 bool diffNeedsFullLayout(const ComputedStyle& other) const; |
| 1881 bool diffNeedsPaintInvalidationLayer(const ComputedStyle& other) const; | 1882 bool diffNeedsPaintInvalidationLayer(const ComputedStyle& other) const; |
| 1882 bool diffNeedsPaintInvalidationObject(const ComputedStyle& other) const; | 1883 bool diffNeedsPaintInvalidationObject(const ComputedStyle& other) const; |
| 1883 void updatePropertySpecificDifferences(const ComputedStyle& other, StyleDiff
erence&) const; | 1884 void updatePropertySpecificDifferences(const ComputedStyle& other, StyleDiff
erence&) const; |
| 1884 | 1885 |
| 1885 bool requireTransformOrigin(ApplyTransformOrigin applyOrigin, ApplyMotionPat
h) const; | 1886 bool requireTransformOrigin(ApplyTransformOrigin applyOrigin, ApplyMotionPat
h) const; |
| 1886 }; | 1887 }; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1991 } | 1992 } |
| 1992 | 1993 |
| 1993 inline bool ComputedStyle::hasPseudoElementStyle() const | 1994 inline bool ComputedStyle::hasPseudoElementStyle() const |
| 1994 { | 1995 { |
| 1995 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; | 1996 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; |
| 1996 } | 1997 } |
| 1997 | 1998 |
| 1998 } // namespace blink | 1999 } // namespace blink |
| 1999 | 2000 |
| 2000 #endif // ComputedStyle_h | 2001 #endif // ComputedStyle_h |
| OLD | NEW |