Chromium Code Reviews| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 return (_empty_cells == other._empty_cells) | 135 return (_empty_cells == other._empty_cells) |
| 136 && (_caption_side == other._caption_side) | 136 && (_caption_side == other._caption_side) |
| 137 && (_list_style_type == other._list_style_type) | 137 && (_list_style_type == other._list_style_type) |
| 138 && (_list_style_position == other._list_style_position) | 138 && (_list_style_position == other._list_style_position) |
| 139 && (_visibility == other._visibility) | 139 && (_visibility == other._visibility) |
| 140 && (_text_align == other._text_align) | 140 && (_text_align == other._text_align) |
| 141 && (m_textUnderline == other.m_textUnderline) | 141 && (m_textUnderline == other.m_textUnderline) |
| 142 && (_cursor_style == other._cursor_style) | 142 && (_cursor_style == other._cursor_style) |
| 143 && (_direction == other._direction) | 143 && (_direction == other._direction) |
| 144 && (_white_space == other._white_space) | 144 && (_white_space == other._white_space) |
| 145 && (_border_collapse == other._border_collapse) | |
| 146 && (m_rtlOrdering == other.m_rtlOrdering) | 145 && (m_rtlOrdering == other.m_rtlOrdering) |
| 147 && (m_printColorAdjust == other.m_printColorAdjust) | 146 && (m_printColorAdjust == other.m_printColorAdjust) |
| 148 && (_pointerEvents == other._pointerEvents); | 147 && (_pointerEvents == other._pointerEvents); |
| 149 } | 148 } |
| 150 | 149 |
| 151 bool operator!=(const InheritedFlags& other) const { return !(*this == o ther); } | 150 bool operator!=(const InheritedFlags& other) const { return !(*this == o ther); } |
| 152 | 151 |
| 153 unsigned _empty_cells : 1; // EEmptyCell | 152 unsigned _empty_cells : 1; // EEmptyCell |
| 154 unsigned _caption_side : 2; // ECaptionSide | 153 unsigned _caption_side : 2; // ECaptionSide |
| 155 unsigned _list_style_type : 7; // EListStyleType | 154 unsigned _list_style_type : 7; // EListStyleType |
| 156 unsigned _list_style_position : 1; // EListStylePosition | 155 unsigned _list_style_position : 1; // EListStylePosition |
| 157 unsigned _visibility : 2; // EVisibility | 156 unsigned _visibility : 2; // EVisibility |
| 158 unsigned _text_align : 4; // ETextAlign | 157 unsigned _text_align : 4; // ETextAlign |
| 159 unsigned m_textUnderline : 1; | 158 unsigned m_textUnderline : 1; |
| 160 unsigned _cursor_style : 6; // ECursor | 159 unsigned _cursor_style : 6; // ECursor |
| 161 unsigned _direction : 1; // TextDirection | 160 unsigned _direction : 1; // TextDirection |
| 162 unsigned _white_space : 3; // EWhiteSpace | 161 unsigned _white_space : 3; // EWhiteSpace |
| 163 unsigned _border_collapse : 1; // EBorderCollapse | |
| 164 // 32 bits | 162 // 32 bits |
| 165 | 163 |
| 166 // non CSS2 inherited | 164 // non CSS2 inherited |
| 167 unsigned m_rtlOrdering : 1; // Order | 165 unsigned m_rtlOrdering : 1; // Order |
| 168 unsigned m_printColorAdjust : PrintColorAdjustBits; | 166 unsigned m_printColorAdjust : PrintColorAdjustBits; |
| 169 unsigned _pointerEvents : 4; // EPointerEvents | 167 unsigned _pointerEvents : 4; // EPointerEvents |
| 170 } inherited_flags; | 168 } inherited_flags; |
| 171 | 169 |
| 172 // don't inherit | 170 // don't inherit |
| 173 struct NonInheritedFlags { | 171 struct NonInheritedFlags { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 244 inherited_flags._empty_cells = initialEmptyCells(); | 242 inherited_flags._empty_cells = initialEmptyCells(); |
| 245 inherited_flags._caption_side = initialCaptionSide(); | 243 inherited_flags._caption_side = initialCaptionSide(); |
| 246 inherited_flags._list_style_type = initialListStyleType(); | 244 inherited_flags._list_style_type = initialListStyleType(); |
| 247 inherited_flags._list_style_position = initialListStylePosition(); | 245 inherited_flags._list_style_position = initialListStylePosition(); |
| 248 inherited_flags._visibility = initialVisibility(); | 246 inherited_flags._visibility = initialVisibility(); |
| 249 inherited_flags._text_align = initialTextAlign(); | 247 inherited_flags._text_align = initialTextAlign(); |
| 250 inherited_flags.m_textUnderline = false; | 248 inherited_flags.m_textUnderline = false; |
| 251 inherited_flags._cursor_style = initialCursor(); | 249 inherited_flags._cursor_style = initialCursor(); |
| 252 inherited_flags._direction = initialDirection(); | 250 inherited_flags._direction = initialDirection(); |
| 253 inherited_flags._white_space = initialWhiteSpace(); | 251 inherited_flags._white_space = initialWhiteSpace(); |
| 254 inherited_flags._border_collapse = initialBorderCollapse(); | |
| 255 inherited_flags.m_rtlOrdering = initialRTLOrdering(); | 252 inherited_flags.m_rtlOrdering = initialRTLOrdering(); |
| 256 inherited_flags.m_printColorAdjust = initialPrintColorAdjust(); | 253 inherited_flags.m_printColorAdjust = initialPrintColorAdjust(); |
|
ojan
2014/11/28 22:29:13
If you're looking for more to delete, this can pro
| |
| 257 inherited_flags._pointerEvents = initialPointerEvents(); | 254 inherited_flags._pointerEvents = initialPointerEvents(); |
| 258 | 255 |
| 259 noninherited_flags.effectiveDisplay = noninherited_flags.originalDisplay = initialDisplay(); | 256 noninherited_flags.effectiveDisplay = noninherited_flags.originalDisplay = initialDisplay(); |
| 260 noninherited_flags.overflowX = initialOverflowX(); | 257 noninherited_flags.overflowX = initialOverflowX(); |
| 261 noninherited_flags.overflowY = initialOverflowY(); | 258 noninherited_flags.overflowY = initialOverflowY(); |
| 262 noninherited_flags.verticalAlign = initialVerticalAlign(); | 259 noninherited_flags.verticalAlign = initialVerticalAlign(); |
| 263 noninherited_flags.position = initialPosition(); | 260 noninherited_flags.position = initialPosition(); |
| 264 noninherited_flags.tableLayout = initialTableLayout(); | 261 noninherited_flags.tableLayout = initialTableLayout(); |
| 265 noninherited_flags.unicodeBidi = initialUnicodeBidi(); | 262 noninherited_flags.unicodeBidi = initialUnicodeBidi(); |
| 266 noninherited_flags.pageBreakBefore = initialPageBreak(); | 263 noninherited_flags.pageBreakBefore = initialPageBreak(); |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 592 FillLayer& accessMaskLayers() { return rareNonInheritedData.access()->m_mask ; } | 589 FillLayer& accessMaskLayers() { return rareNonInheritedData.access()->m_mask ; } |
| 593 const FillLayer& maskLayers() const { return rareNonInheritedData->m_mask; } | 590 const FillLayer& maskLayers() const { return rareNonInheritedData->m_mask; } |
| 594 | 591 |
| 595 const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_ maskBoxImage; } | 592 const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_ maskBoxImage; } |
| 596 StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_mask BoxImage.image(); } | 593 StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_mask BoxImage.image(); } |
| 597 const LengthBox& maskBoxImageSlices() const { return rareNonInheritedData->m _maskBoxImage.imageSlices(); } | 594 const LengthBox& maskBoxImageSlices() const { return rareNonInheritedData->m _maskBoxImage.imageSlices(); } |
| 598 bool maskBoxImageSlicesFill() const { return rareNonInheritedData->m_maskBox Image.fill(); } | 595 bool maskBoxImageSlicesFill() const { return rareNonInheritedData->m_maskBox Image.fill(); } |
| 599 const BorderImageLengthBox& maskBoxImageWidth() const { return rareNonInheri tedData->m_maskBoxImage.borderSlices(); } | 596 const BorderImageLengthBox& maskBoxImageWidth() const { return rareNonInheri tedData->m_maskBoxImage.borderSlices(); } |
| 600 const BorderImageLengthBox& maskBoxImageOutset() const { return rareNonInher itedData->m_maskBoxImage.outset(); } | 597 const BorderImageLengthBox& maskBoxImageOutset() const { return rareNonInher itedData->m_maskBoxImage.outset(); } |
| 601 | 598 |
| 602 EBorderCollapse borderCollapse() const { return static_cast<EBorderCollapse> (inherited_flags._border_collapse); } | |
| 603 short horizontalBorderSpacing() const; | 599 short horizontalBorderSpacing() const; |
| 604 short verticalBorderSpacing() const; | 600 short verticalBorderSpacing() const; |
| 605 EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(inherited_fla gs._empty_cells); } | 601 EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(inherited_fla gs._empty_cells); } |
| 606 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherite d_flags._caption_side); } | 602 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherite d_flags._caption_side); } |
| 607 | 603 |
| 608 EListStyleType listStyleType() const { return static_cast<EListStyleType>(in herited_flags._list_style_type); } | 604 EListStyleType listStyleType() const { return static_cast<EListStyleType>(in herited_flags._list_style_type); } |
| 609 StyleImage* listStyleImage() const; | 605 StyleImage* listStyleImage() const; |
| 610 EListStylePosition listStylePosition() const { return static_cast<EListStyle Position>(inherited_flags._list_style_position); } | 606 EListStylePosition listStylePosition() const { return static_cast<EListStyle Position>(inherited_flags._list_style_position); } |
| 611 | 607 |
| 612 const Length& marginTop() const { return surround->margin.top(); } | 608 const Length& marginTop() const { return surround->margin.top(); } |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 986 rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices); | 982 rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices); |
| 987 } | 983 } |
| 988 void setMaskBoxImageOutset(const BorderImageLengthBox& outset) | 984 void setMaskBoxImageOutset(const BorderImageLengthBox& outset) |
| 989 { | 985 { |
| 990 rareNonInheritedData.access()->m_maskBoxImage.setOutset(outset); | 986 rareNonInheritedData.access()->m_maskBoxImage.setOutset(outset); |
| 991 } | 987 } |
| 992 void setMaskXPosition(const Length& length) { SET_VAR(rareNonInheritedData, m_mask.m_xPosition, length); } | 988 void setMaskXPosition(const Length& length) { SET_VAR(rareNonInheritedData, m_mask.m_xPosition, length); } |
| 993 void setMaskYPosition(const Length& length) { SET_VAR(rareNonInheritedData, m_mask.m_yPosition, length); } | 989 void setMaskYPosition(const Length& length) { SET_VAR(rareNonInheritedData, m_mask.m_yPosition, length); } |
| 994 void setMaskSize(const LengthSize& s) { SET_VAR(rareNonInheritedData, m_mask .m_sizeLength, s); } | 990 void setMaskSize(const LengthSize& s) { SET_VAR(rareNonInheritedData, m_mask .m_sizeLength, s); } |
| 995 | 991 |
| 996 void setBorderCollapse(EBorderCollapse collapse) { inherited_flags._border_c ollapse = collapse; } | |
| 997 void setHorizontalBorderSpacing(short); | 992 void setHorizontalBorderSpacing(short); |
| 998 void setVerticalBorderSpacing(short); | 993 void setVerticalBorderSpacing(short); |
| 999 void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; } | 994 void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; } |
| 1000 void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; } | 995 void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; } |
| 1001 | 996 |
| 1002 void setHasAspectRatio(bool b) { SET_VAR(rareNonInheritedData, m_hasAspectRa tio, b); } | 997 void setHasAspectRatio(bool b) { SET_VAR(rareNonInheritedData, m_hasAspectRa tio, b); } |
| 1003 void setAspectRatioDenominator(float v) { SET_VAR(rareNonInheritedData, m_as pectRatioDenominator, v); } | 998 void setAspectRatioDenominator(float v) { SET_VAR(rareNonInheritedData, m_as pectRatioDenominator, v); } |
| 1004 void setAspectRatioNumerator(float v) { SET_VAR(rareNonInheritedData, m_aspe ctRatioNumerator, v); } | 999 void setAspectRatioNumerator(float v) { SET_VAR(rareNonInheritedData, m_aspe ctRatioNumerator, v); } |
| 1005 | 1000 |
| 1006 void setListStyleType(EListStyleType v) { inherited_flags._list_style_type = v; } | 1001 void setListStyleType(EListStyleType v) { inherited_flags._list_style_type = v; } |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1203 | 1198 |
| 1204 void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInhe ritance = true; } | 1199 void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInhe ritance = true; } |
| 1205 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex plicitInheritance; } | 1200 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex plicitInheritance; } |
| 1206 | 1201 |
| 1207 void setHasCurrentColor() { noninherited_flags.currentColor = true; } | 1202 void setHasCurrentColor() { noninherited_flags.currentColor = true; } |
| 1208 bool hasCurrentColor() const { return noninherited_flags.currentColor; } | 1203 bool hasCurrentColor() const { return noninherited_flags.currentColor; } |
| 1209 | 1204 |
| 1210 bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() || hasOutline() || boxShadow() || hasFilter(); } | 1205 bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() || hasOutline() || boxShadow() || hasFilter(); } |
| 1211 | 1206 |
| 1212 // Initial values for all the properties | 1207 // Initial values for all the properties |
| 1213 static EBorderCollapse initialBorderCollapse() { return BSEPARATE; } | |
| 1214 static EBorderStyle initialBorderStyle() { return BNONE; } | 1208 static EBorderStyle initialBorderStyle() { return BNONE; } |
| 1215 static OutlineIsAuto initialOutlineStyleIsAuto() { return AUTO_OFF; } | 1209 static OutlineIsAuto initialOutlineStyleIsAuto() { return AUTO_OFF; } |
| 1216 static NinePieceImage initialNinePieceImage() { return NinePieceImage(); } | 1210 static NinePieceImage initialNinePieceImage() { return NinePieceImage(); } |
| 1217 static LengthSize initialBorderRadius() { return LengthSize(Length(0, Fixed) , Length(0, Fixed)); } | 1211 static LengthSize initialBorderRadius() { return LengthSize(Length(0, Fixed) , Length(0, Fixed)); } |
| 1218 static ECaptionSide initialCaptionSide() { return CAPTOP; } | 1212 static ECaptionSide initialCaptionSide() { return CAPTOP; } |
| 1219 static LengthBox initialClip() { return LengthBox(); } | 1213 static LengthBox initialClip() { return LengthBox(); } |
| 1220 static TextDirection initialDirection() { return LTR; } | 1214 static TextDirection initialDirection() { return LTR; } |
| 1221 static TextOrientation initialTextOrientation() { return TextOrientationVert icalRight; } | 1215 static TextOrientation initialTextOrientation() { return TextOrientationVert icalRight; } |
| 1222 static ObjectFit initialObjectFit() { return ObjectFitFill; } | 1216 static ObjectFit initialObjectFit() { return ObjectFitFill; } |
| 1223 static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0, Percent), Length(50.0, Percent)); } | 1217 static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0, Percent), Length(50.0, Percent)); } |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1418 | 1412 |
| 1419 rareInheritedData.access()->m_textOrientation = textOrientation; | 1413 rareInheritedData.access()->m_textOrientation = textOrientation; |
| 1420 return true; | 1414 return true; |
| 1421 } | 1415 } |
| 1422 | 1416 |
| 1423 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&); | 1417 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&); |
| 1424 | 1418 |
| 1425 } // namespace blink | 1419 } // namespace blink |
| 1426 | 1420 |
| 1427 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_RENDERSTYLE_H_ | 1421 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_RENDERSTYLE_H_ |
| OLD | NEW |