| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 struct InheritedFlags { | 131 struct InheritedFlags { |
| 132 bool operator==(const InheritedFlags& other) const | 132 bool operator==(const InheritedFlags& other) const |
| 133 { | 133 { |
| 134 return (_empty_cells == other._empty_cells) | 134 return (_empty_cells == other._empty_cells) |
| 135 && (_caption_side == other._caption_side) | 135 && (_caption_side == other._caption_side) |
| 136 && (_list_style_type == other._list_style_type) | 136 && (_list_style_type == other._list_style_type) |
| 137 && (_list_style_position == other._list_style_position) | 137 && (_list_style_position == other._list_style_position) |
| 138 && (_visibility == other._visibility) | 138 && (_visibility == other._visibility) |
| 139 && (_text_align == other._text_align) | 139 && (_text_align == other._text_align) |
| 140 && (m_textUnderline == other.m_textUnderline) | 140 && (m_textUnderline == other.m_textUnderline) |
| 141 && (_cursor_style == other._cursor_style) | |
| 142 && (_direction == other._direction) | 141 && (_direction == other._direction) |
| 143 && (_white_space == other._white_space) | 142 && (_white_space == other._white_space) |
| 144 && (m_rtlOrdering == other.m_rtlOrdering) | 143 && (m_rtlOrdering == other.m_rtlOrdering) |
| 145 && (_pointerEvents == other._pointerEvents); | 144 && (_pointerEvents == other._pointerEvents); |
| 146 } | 145 } |
| 147 | 146 |
| 148 bool operator!=(const InheritedFlags& other) const { return !(*this == o
ther); } | 147 bool operator!=(const InheritedFlags& other) const { return !(*this == o
ther); } |
| 149 | 148 |
| 150 unsigned _empty_cells : 1; // EEmptyCell | 149 unsigned _empty_cells : 1; // EEmptyCell |
| 151 unsigned _caption_side : 2; // ECaptionSide | 150 unsigned _caption_side : 2; // ECaptionSide |
| 152 unsigned _list_style_type : 7; // EListStyleType | 151 unsigned _list_style_type : 7; // EListStyleType |
| 153 unsigned _list_style_position : 1; // EListStylePosition | 152 unsigned _list_style_position : 1; // EListStylePosition |
| 154 unsigned _visibility : 2; // EVisibility | 153 unsigned _visibility : 2; // EVisibility |
| 155 unsigned _text_align : 4; // ETextAlign | 154 unsigned _text_align : 4; // ETextAlign |
| 156 unsigned m_textUnderline : 1; | 155 unsigned m_textUnderline : 1; |
| 157 unsigned _cursor_style : 6; // ECursor | |
| 158 unsigned _direction : 1; // TextDirection | 156 unsigned _direction : 1; // TextDirection |
| 159 unsigned _white_space : 3; // EWhiteSpace | 157 unsigned _white_space : 3; // EWhiteSpace |
| 160 // 32 bits | 158 // 32 bits |
| 161 | 159 |
| 162 // non CSS2 inherited | 160 // non CSS2 inherited |
| 163 unsigned m_rtlOrdering : 1; // Order | 161 unsigned m_rtlOrdering : 1; // Order |
| 164 unsigned _pointerEvents : 4; // EPointerEvents | 162 unsigned _pointerEvents : 4; // EPointerEvents |
| 165 } inherited_flags; | 163 } inherited_flags; |
| 166 | 164 |
| 167 // don't inherit | 165 // don't inherit |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 protected: | 234 protected: |
| 237 void setBitDefaults() | 235 void setBitDefaults() |
| 238 { | 236 { |
| 239 inherited_flags._empty_cells = initialEmptyCells(); | 237 inherited_flags._empty_cells = initialEmptyCells(); |
| 240 inherited_flags._caption_side = initialCaptionSide(); | 238 inherited_flags._caption_side = initialCaptionSide(); |
| 241 inherited_flags._list_style_type = initialListStyleType(); | 239 inherited_flags._list_style_type = initialListStyleType(); |
| 242 inherited_flags._list_style_position = initialListStylePosition(); | 240 inherited_flags._list_style_position = initialListStylePosition(); |
| 243 inherited_flags._visibility = initialVisibility(); | 241 inherited_flags._visibility = initialVisibility(); |
| 244 inherited_flags._text_align = initialTextAlign(); | 242 inherited_flags._text_align = initialTextAlign(); |
| 245 inherited_flags.m_textUnderline = false; | 243 inherited_flags.m_textUnderline = false; |
| 246 inherited_flags._cursor_style = initialCursor(); | |
| 247 inherited_flags._direction = initialDirection(); | 244 inherited_flags._direction = initialDirection(); |
| 248 inherited_flags._white_space = initialWhiteSpace(); | 245 inherited_flags._white_space = initialWhiteSpace(); |
| 249 inherited_flags.m_rtlOrdering = initialRTLOrdering(); | 246 inherited_flags.m_rtlOrdering = initialRTLOrdering(); |
| 250 inherited_flags._pointerEvents = initialPointerEvents(); | 247 inherited_flags._pointerEvents = initialPointerEvents(); |
| 251 | 248 |
| 252 noninherited_flags.effectiveDisplay = noninherited_flags.originalDisplay
= initialDisplay(); | 249 noninherited_flags.effectiveDisplay = noninherited_flags.originalDisplay
= initialDisplay(); |
| 253 noninherited_flags.overflowX = initialOverflowX(); | 250 noninherited_flags.overflowX = initialOverflowX(); |
| 254 noninherited_flags.overflowY = initialOverflowY(); | 251 noninherited_flags.overflowY = initialOverflowY(); |
| 255 noninherited_flags.verticalAlign = initialVerticalAlign(); | 252 noninherited_flags.verticalAlign = initialVerticalAlign(); |
| 256 noninherited_flags.position = initialPosition(); | 253 noninherited_flags.position = initialPosition(); |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 const LengthBox& paddingBox() const { return surround->padding; } | 582 const LengthBox& paddingBox() const { return surround->padding; } |
| 586 const Length& paddingTop() const { return surround->padding.top(); } | 583 const Length& paddingTop() const { return surround->padding.top(); } |
| 587 const Length& paddingBottom() const { return surround->padding.bottom(); } | 584 const Length& paddingBottom() const { return surround->padding.bottom(); } |
| 588 const Length& paddingLeft() const { return surround->padding.left(); } | 585 const Length& paddingLeft() const { return surround->padding.left(); } |
| 589 const Length& paddingRight() const { return surround->padding.right(); } | 586 const Length& paddingRight() const { return surround->padding.right(); } |
| 590 const Length& paddingBefore() const { return surround->padding.before(); } | 587 const Length& paddingBefore() const { return surround->padding.before(); } |
| 591 const Length& paddingAfter() const { return surround->padding.after(); } | 588 const Length& paddingAfter() const { return surround->padding.after(); } |
| 592 const Length& paddingStart() const { return surround->padding.start(directio
n()); } | 589 const Length& paddingStart() const { return surround->padding.start(directio
n()); } |
| 593 const Length& paddingEnd() const { return surround->padding.end(direction())
; } | 590 const Length& paddingEnd() const { return surround->padding.end(direction())
; } |
| 594 | 591 |
| 595 ECursor cursor() const { return static_cast<ECursor>(inherited_flags._cursor
_style); } | |
| 596 CursorList* cursors() const { return rareInheritedData->cursorData.get(); } | |
| 597 | |
| 598 bool isLink() const { return noninherited_flags.isLink; } | 592 bool isLink() const { return noninherited_flags.isLink; } |
| 599 | 593 |
| 600 short widows() const { return rareInheritedData->widows; } | 594 short widows() const { return rareInheritedData->widows; } |
| 601 short orphans() const { return rareInheritedData->orphans; } | 595 short orphans() const { return rareInheritedData->orphans; } |
| 602 bool hasAutoWidows() const { return rareInheritedData->m_hasAutoWidows; } | 596 bool hasAutoWidows() const { return rareInheritedData->m_hasAutoWidows; } |
| 603 bool hasAutoOrphans() const { return rareInheritedData->m_hasAutoOrphans; } | 597 bool hasAutoOrphans() const { return rareInheritedData->m_hasAutoOrphans; } |
| 604 EPageBreak pageBreakInside() const { return static_cast<EPageBreak>(noninher
ited_flags.pageBreakInside); } | 598 EPageBreak pageBreakInside() const { return static_cast<EPageBreak>(noninher
ited_flags.pageBreakInside); } |
| 605 EPageBreak pageBreakBefore() const { return static_cast<EPageBreak>(noninher
ited_flags.pageBreakBefore); } | 599 EPageBreak pageBreakBefore() const { return static_cast<EPageBreak>(noninher
ited_flags.pageBreakBefore); } |
| 606 EPageBreak pageBreakAfter() const { return static_cast<EPageBreak>(noninheri
ted_flags.pageBreakAfter); } | 600 EPageBreak pageBreakAfter() const { return static_cast<EPageBreak>(noninheri
ted_flags.pageBreakAfter); } |
| 607 | 601 |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 void setMarginStart(const Length&); | 916 void setMarginStart(const Length&); |
| 923 void setMarginEnd(const Length&); | 917 void setMarginEnd(const Length&); |
| 924 | 918 |
| 925 void resetPadding() { SET_VAR(surround, padding, LengthBox(Auto)); } | 919 void resetPadding() { SET_VAR(surround, padding, LengthBox(Auto)); } |
| 926 void setPaddingBox(const LengthBox& b) { SET_VAR(surround, padding, b); } | 920 void setPaddingBox(const LengthBox& b) { SET_VAR(surround, padding, b); } |
| 927 void setPaddingTop(const Length& v) { SET_VAR(surround, padding.m_top, v); } | 921 void setPaddingTop(const Length& v) { SET_VAR(surround, padding.m_top, v); } |
| 928 void setPaddingBottom(const Length& v) { SET_VAR(surround, padding.m_bottom,
v); } | 922 void setPaddingBottom(const Length& v) { SET_VAR(surround, padding.m_bottom,
v); } |
| 929 void setPaddingLeft(const Length& v) { SET_VAR(surround, padding.m_left, v);
} | 923 void setPaddingLeft(const Length& v) { SET_VAR(surround, padding.m_left, v);
} |
| 930 void setPaddingRight(const Length& v) { SET_VAR(surround, padding.m_right, v
); } | 924 void setPaddingRight(const Length& v) { SET_VAR(surround, padding.m_right, v
); } |
| 931 | 925 |
| 932 void setCursor(ECursor c) { inherited_flags._cursor_style = c; } | |
| 933 void addCursor(PassRefPtr<StyleImage>, const IntPoint& hotSpot = IntPoint())
; | |
| 934 void setCursorList(PassRefPtr<CursorList>); | |
| 935 void clearCursorList(); | |
| 936 | |
| 937 void setIsLink(bool b) { noninherited_flags.isLink = b; } | 926 void setIsLink(bool b) { noninherited_flags.isLink = b; } |
| 938 | 927 |
| 939 bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); } | 928 bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); } |
| 940 void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_b
ox, m_zIndex, 0); } | 929 void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_b
ox, m_zIndex, 0); } |
| 941 unsigned zIndex() const { return m_box->zIndex(); } | 930 unsigned zIndex() const { return m_box->zIndex(); } |
| 942 void setZIndex(unsigned v) { SET_VAR(m_box, m_hasAutoZIndex, false); SET_VAR
(m_box, m_zIndex, v); } | 931 void setZIndex(unsigned v) { SET_VAR(m_box, m_hasAutoZIndex, false); SET_VAR
(m_box, m_zIndex, v); } |
| 943 | 932 |
| 944 void setHasAutoWidows() { SET_VAR(rareInheritedData, m_hasAutoWidows, true);
SET_VAR(rareInheritedData, widows, initialWidows()); } | 933 void setHasAutoWidows() { SET_VAR(rareInheritedData, m_hasAutoWidows, true);
SET_VAR(rareInheritedData, widows, initialWidows()); } |
| 945 void setWidows(short w) { SET_VAR(rareInheritedData, m_hasAutoWidows, false)
; SET_VAR(rareInheritedData, widows, w); } | 934 void setWidows(short w) { SET_VAR(rareInheritedData, m_hasAutoWidows, false)
; SET_VAR(rareInheritedData, widows, w); } |
| 946 | 935 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1118 static EOverflow initialOverflowX() { return OVISIBLE; } | 1107 static EOverflow initialOverflowX() { return OVISIBLE; } |
| 1119 static EOverflow initialOverflowY() { return OVISIBLE; } | 1108 static EOverflow initialOverflowY() { return OVISIBLE; } |
| 1120 static EPageBreak initialPageBreak() { return PBAUTO; } | 1109 static EPageBreak initialPageBreak() { return PBAUTO; } |
| 1121 static EPosition initialPosition() { return StaticPosition; } | 1110 static EPosition initialPosition() { return StaticPosition; } |
| 1122 static ETableLayout initialTableLayout() { return TAUTO; } | 1111 static ETableLayout initialTableLayout() { return TAUTO; } |
| 1123 static EUnicodeBidi initialUnicodeBidi() { return UBNormal; } | 1112 static EUnicodeBidi initialUnicodeBidi() { return UBNormal; } |
| 1124 static EVisibility initialVisibility() { return VISIBLE; } | 1113 static EVisibility initialVisibility() { return VISIBLE; } |
| 1125 static EWhiteSpace initialWhiteSpace() { return NORMAL; } | 1114 static EWhiteSpace initialWhiteSpace() { return NORMAL; } |
| 1126 static short initialHorizontalBorderSpacing() { return 0; } | 1115 static short initialHorizontalBorderSpacing() { return 0; } |
| 1127 static short initialVerticalBorderSpacing() { return 0; } | 1116 static short initialVerticalBorderSpacing() { return 0; } |
| 1128 static ECursor initialCursor() { return CURSOR_AUTO; } | |
| 1129 static Color initialColor() { return Color::black; } | 1117 static Color initialColor() { return Color::black; } |
| 1130 static StyleImage* initialListStyleImage() { return 0; } | 1118 static StyleImage* initialListStyleImage() { return 0; } |
| 1131 static unsigned initialBorderWidth() { return 3; } | 1119 static unsigned initialBorderWidth() { return 3; } |
| 1132 static unsigned short initialColumnRuleWidth() { return 3; } | 1120 static unsigned short initialColumnRuleWidth() { return 3; } |
| 1133 static unsigned short initialOutlineWidth() { return 3; } | 1121 static unsigned short initialOutlineWidth() { return 3; } |
| 1134 static float initialLetterWordSpacing() { return 0.0f; } | 1122 static float initialLetterWordSpacing() { return 0.0f; } |
| 1135 static Length initialSize() { return Length(); } | 1123 static Length initialSize() { return Length(); } |
| 1136 static Length initialMinSize() { return Length(Fixed); } | 1124 static Length initialMinSize() { return Length(Fixed); } |
| 1137 static Length initialMaxSize() { return Length(MaxSizeNone); } | 1125 static Length initialMaxSize() { return Length(MaxSizeNone); } |
| 1138 static Length initialOffset() { return Length(); } | 1126 static Length initialOffset() { return Length(); } |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 | 1290 |
| 1303 rareInheritedData.access()->m_textOrientation = textOrientation; | 1291 rareInheritedData.access()->m_textOrientation = textOrientation; |
| 1304 return true; | 1292 return true; |
| 1305 } | 1293 } |
| 1306 | 1294 |
| 1307 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect
::Radii&); | 1295 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect
::Radii&); |
| 1308 | 1296 |
| 1309 } // namespace blink | 1297 } // namespace blink |
| 1310 | 1298 |
| 1311 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_RENDERSTYLE_H_ | 1299 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_RENDERSTYLE_H_ |
| OLD | NEW |