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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 { | 151 { |
152 return (_empty_cells == other._empty_cells) | 152 return (_empty_cells == other._empty_cells) |
153 && (_caption_side == other._caption_side) | 153 && (_caption_side == other._caption_side) |
154 && (_list_style_type == other._list_style_type) | 154 && (_list_style_type == other._list_style_type) |
155 && (_list_style_position == other._list_style_position) | 155 && (_list_style_position == other._list_style_position) |
156 && (_visibility == other._visibility) | 156 && (_visibility == other._visibility) |
157 && (_text_align == other._text_align) | 157 && (_text_align == other._text_align) |
158 && (_text_transform == other._text_transform) | 158 && (_text_transform == other._text_transform) |
159 && (_text_decorations == other._text_decorations) | 159 && (_text_decorations == other._text_decorations) |
160 && (_cursor_style == other._cursor_style) | 160 && (_cursor_style == other._cursor_style) |
161 #if ENABLE(CURSOR_VISIBILITY) | |
162 && (m_cursorVisibility == other.m_cursorVisibility) | |
163 #endif | |
164 && (_direction == other._direction) | 161 && (_direction == other._direction) |
165 && (_white_space == other._white_space) | 162 && (_white_space == other._white_space) |
166 && (_border_collapse == other._border_collapse) | 163 && (_border_collapse == other._border_collapse) |
167 && (_box_direction == other._box_direction) | 164 && (_box_direction == other._box_direction) |
168 && (m_rtlOrdering == other.m_rtlOrdering) | 165 && (m_rtlOrdering == other.m_rtlOrdering) |
169 && (m_printColorAdjust == other.m_printColorAdjust) | 166 && (m_printColorAdjust == other.m_printColorAdjust) |
170 && (_pointerEvents == other._pointerEvents) | 167 && (_pointerEvents == other._pointerEvents) |
171 && (_insideLink == other._insideLink) | 168 && (_insideLink == other._insideLink) |
172 && (m_writingMode == other.m_writingMode); | 169 && (m_writingMode == other.m_writingMode); |
173 } | 170 } |
174 | 171 |
175 bool operator!=(const InheritedFlags& other) const { return !(*this == o
ther); } | 172 bool operator!=(const InheritedFlags& other) const { return !(*this == o
ther); } |
176 | 173 |
177 unsigned _empty_cells : 1; // EEmptyCell | 174 unsigned _empty_cells : 1; // EEmptyCell |
178 unsigned _caption_side : 2; // ECaptionSide | 175 unsigned _caption_side : 2; // ECaptionSide |
179 unsigned _list_style_type : 7; // EListStyleType | 176 unsigned _list_style_type : 7; // EListStyleType |
180 unsigned _list_style_position : 1; // EListStylePosition | 177 unsigned _list_style_position : 1; // EListStylePosition |
181 unsigned _visibility : 2; // EVisibility | 178 unsigned _visibility : 2; // EVisibility |
182 unsigned _text_align : 4; // ETextAlign | 179 unsigned _text_align : 4; // ETextAlign |
183 unsigned _text_transform : 2; // ETextTransform | 180 unsigned _text_transform : 2; // ETextTransform |
184 unsigned _text_decorations : ETextDecorationBits; | 181 unsigned _text_decorations : ETextDecorationBits; |
185 unsigned _cursor_style : 6; // ECursor | 182 unsigned _cursor_style : 6; // ECursor |
186 #if ENABLE(CURSOR_VISIBILITY) | |
187 unsigned m_cursorVisibility : 1; // CursorVisibility | |
188 #endif | |
189 unsigned _direction : 1; // TextDirection | 183 unsigned _direction : 1; // TextDirection |
190 unsigned _white_space : 3; // EWhiteSpace | 184 unsigned _white_space : 3; // EWhiteSpace |
191 // 32 bits | 185 // 32 bits |
192 unsigned _border_collapse : 1; // EBorderCollapse | 186 unsigned _border_collapse : 1; // EBorderCollapse |
193 unsigned _box_direction : 1; // EBoxDirection (CSS3 box_direction proper
ty, flexible box layout module) | 187 unsigned _box_direction : 1; // EBoxDirection (CSS3 box_direction proper
ty, flexible box layout module) |
194 | 188 |
195 // non CSS2 inherited | 189 // non CSS2 inherited |
196 unsigned m_rtlOrdering : 1; // Order | 190 unsigned m_rtlOrdering : 1; // Order |
197 unsigned m_printColorAdjust : PrintColorAdjustBits; | 191 unsigned m_printColorAdjust : PrintColorAdjustBits; |
198 unsigned _pointerEvents : 4; // EPointerEvents | 192 unsigned _pointerEvents : 4; // EPointerEvents |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 { | 278 { |
285 inherited_flags._empty_cells = initialEmptyCells(); | 279 inherited_flags._empty_cells = initialEmptyCells(); |
286 inherited_flags._caption_side = initialCaptionSide(); | 280 inherited_flags._caption_side = initialCaptionSide(); |
287 inherited_flags._list_style_type = initialListStyleType(); | 281 inherited_flags._list_style_type = initialListStyleType(); |
288 inherited_flags._list_style_position = initialListStylePosition(); | 282 inherited_flags._list_style_position = initialListStylePosition(); |
289 inherited_flags._visibility = initialVisibility(); | 283 inherited_flags._visibility = initialVisibility(); |
290 inherited_flags._text_align = initialTextAlign(); | 284 inherited_flags._text_align = initialTextAlign(); |
291 inherited_flags._text_transform = initialTextTransform(); | 285 inherited_flags._text_transform = initialTextTransform(); |
292 inherited_flags._text_decorations = initialTextDecoration(); | 286 inherited_flags._text_decorations = initialTextDecoration(); |
293 inherited_flags._cursor_style = initialCursor(); | 287 inherited_flags._cursor_style = initialCursor(); |
294 #if ENABLE(CURSOR_VISIBILITY) | |
295 inherited_flags.m_cursorVisibility = initialCursorVisibility(); | |
296 #endif | |
297 inherited_flags._direction = initialDirection(); | 288 inherited_flags._direction = initialDirection(); |
298 inherited_flags._white_space = initialWhiteSpace(); | 289 inherited_flags._white_space = initialWhiteSpace(); |
299 inherited_flags._border_collapse = initialBorderCollapse(); | 290 inherited_flags._border_collapse = initialBorderCollapse(); |
300 inherited_flags.m_rtlOrdering = initialRTLOrdering(); | 291 inherited_flags.m_rtlOrdering = initialRTLOrdering(); |
301 inherited_flags._box_direction = initialBoxDirection(); | 292 inherited_flags._box_direction = initialBoxDirection(); |
302 inherited_flags.m_printColorAdjust = initialPrintColorAdjust(); | 293 inherited_flags.m_printColorAdjust = initialPrintColorAdjust(); |
303 inherited_flags._pointerEvents = initialPointerEvents(); | 294 inherited_flags._pointerEvents = initialPointerEvents(); |
304 inherited_flags._insideLink = NotInsideLink; | 295 inherited_flags._insideLink = NotInsideLink; |
305 inherited_flags.m_writingMode = initialWritingMode(); | 296 inherited_flags.m_writingMode = initialWritingMode(); |
306 | 297 |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 Length paddingTop() const { return surround->padding.top(); } | 683 Length paddingTop() const { return surround->padding.top(); } |
693 Length paddingBottom() const { return surround->padding.bottom(); } | 684 Length paddingBottom() const { return surround->padding.bottom(); } |
694 Length paddingLeft() const { return surround->padding.left(); } | 685 Length paddingLeft() const { return surround->padding.left(); } |
695 Length paddingRight() const { return surround->padding.right(); } | 686 Length paddingRight() const { return surround->padding.right(); } |
696 Length paddingBefore() const { return surround->padding.before(writingMode()
); } | 687 Length paddingBefore() const { return surround->padding.before(writingMode()
); } |
697 Length paddingAfter() const { return surround->padding.after(writingMode());
} | 688 Length paddingAfter() const { return surround->padding.after(writingMode());
} |
698 Length paddingStart() const { return surround->padding.start(writingMode(),
direction()); } | 689 Length paddingStart() const { return surround->padding.start(writingMode(),
direction()); } |
699 Length paddingEnd() const { return surround->padding.end(writingMode(), dire
ction()); } | 690 Length paddingEnd() const { return surround->padding.end(writingMode(), dire
ction()); } |
700 | 691 |
701 ECursor cursor() const { return static_cast<ECursor>(inherited_flags._cursor
_style); } | 692 ECursor cursor() const { return static_cast<ECursor>(inherited_flags._cursor
_style); } |
702 #if ENABLE(CURSOR_VISIBILITY) | |
703 CursorVisibility cursorVisibility() const { return static_cast<CursorVisibil
ity>(inherited_flags.m_cursorVisibility); } | |
704 #endif | |
705 | |
706 CursorList* cursors() const { return rareInheritedData->cursorData.get(); } | 693 CursorList* cursors() const { return rareInheritedData->cursorData.get(); } |
707 | 694 |
708 EInsideLink insideLink() const { return static_cast<EInsideLink>(inherited_f
lags._insideLink); } | 695 EInsideLink insideLink() const { return static_cast<EInsideLink>(inherited_f
lags._insideLink); } |
709 bool isLink() const { return noninherited_flags.isLink(); } | 696 bool isLink() const { return noninherited_flags.isLink(); } |
710 | 697 |
711 short widows() const { return rareInheritedData->widows; } | 698 short widows() const { return rareInheritedData->widows; } |
712 short orphans() const { return rareInheritedData->orphans; } | 699 short orphans() const { return rareInheritedData->orphans; } |
713 bool hasAutoWidows() const { return rareInheritedData->m_hasAutoWidows; } | 700 bool hasAutoWidows() const { return rareInheritedData->m_hasAutoWidows; } |
714 bool hasAutoOrphans() const { return rareInheritedData->m_hasAutoOrphans; } | 701 bool hasAutoOrphans() const { return rareInheritedData->m_hasAutoOrphans; } |
715 EPageBreak pageBreakInside() const { return static_cast<EPageBreak>(noninher
ited_flags._page_break_inside); } | 702 EPageBreak pageBreakInside() const { return static_cast<EPageBreak>(noninher
ited_flags._page_break_inside); } |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 void setPaddingTop(Length v) { SET_VAR(surround, padding.m_top, v); } | 1142 void setPaddingTop(Length v) { SET_VAR(surround, padding.m_top, v); } |
1156 void setPaddingBottom(Length v) { SET_VAR(surround, padding.m_bottom, v); } | 1143 void setPaddingBottom(Length v) { SET_VAR(surround, padding.m_bottom, v); } |
1157 void setPaddingLeft(Length v) { SET_VAR(surround, padding.m_left, v); } | 1144 void setPaddingLeft(Length v) { SET_VAR(surround, padding.m_left, v); } |
1158 void setPaddingRight(Length v) { SET_VAR(surround, padding.m_right, v); } | 1145 void setPaddingRight(Length v) { SET_VAR(surround, padding.m_right, v); } |
1159 | 1146 |
1160 void setCursor(ECursor c) { inherited_flags._cursor_style = c; } | 1147 void setCursor(ECursor c) { inherited_flags._cursor_style = c; } |
1161 void addCursor(PassRefPtr<StyleImage>, const IntPoint& hotSpot = IntPoint())
; | 1148 void addCursor(PassRefPtr<StyleImage>, const IntPoint& hotSpot = IntPoint())
; |
1162 void setCursorList(PassRefPtr<CursorList>); | 1149 void setCursorList(PassRefPtr<CursorList>); |
1163 void clearCursorList(); | 1150 void clearCursorList(); |
1164 | 1151 |
1165 #if ENABLE(CURSOR_VISIBILITY) | |
1166 void setCursorVisibility(CursorVisibility c) { inherited_flags.m_cursorVisib
ility = c; } | |
1167 #endif | |
1168 | |
1169 void setInsideLink(EInsideLink insideLink) { inherited_flags._insideLink = i
nsideLink; } | 1152 void setInsideLink(EInsideLink insideLink) { inherited_flags._insideLink = i
nsideLink; } |
1170 void setIsLink(bool b) { noninherited_flags.setIsLink(b); } | 1153 void setIsLink(bool b) { noninherited_flags.setIsLink(b); } |
1171 | 1154 |
1172 PrintColorAdjust printColorAdjust() const { return static_cast<PrintColorAdj
ust>(inherited_flags.m_printColorAdjust); } | 1155 PrintColorAdjust printColorAdjust() const { return static_cast<PrintColorAdj
ust>(inherited_flags.m_printColorAdjust); } |
1173 void setPrintColorAdjust(PrintColorAdjust value) { inherited_flags.m_printCo
lorAdjust = value; } | 1156 void setPrintColorAdjust(PrintColorAdjust value) { inherited_flags.m_printCo
lorAdjust = value; } |
1174 | 1157 |
1175 bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); } | 1158 bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); } |
1176 void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_b
ox, m_zIndex, 0); } | 1159 void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_b
ox, m_zIndex, 0); } |
1177 int zIndex() const { return m_box->zIndex(); } | 1160 int zIndex() const { return m_box->zIndex(); } |
1178 void setZIndex(int v) { SET_VAR(m_box, m_hasAutoZIndex, false); SET_VAR(m_bo
x, m_zIndex, v); } | 1161 void setZIndex(int v) { SET_VAR(m_box, m_hasAutoZIndex, false); SET_VAR(m_bo
x, m_zIndex, v); } |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1513 static EPageBreak initialPageBreak() { return PBAUTO; } | 1496 static EPageBreak initialPageBreak() { return PBAUTO; } |
1514 static EPosition initialPosition() { return StaticPosition; } | 1497 static EPosition initialPosition() { return StaticPosition; } |
1515 static ETableLayout initialTableLayout() { return TAUTO; } | 1498 static ETableLayout initialTableLayout() { return TAUTO; } |
1516 static EUnicodeBidi initialUnicodeBidi() { return UBNormal; } | 1499 static EUnicodeBidi initialUnicodeBidi() { return UBNormal; } |
1517 static ETextTransform initialTextTransform() { return TTNONE; } | 1500 static ETextTransform initialTextTransform() { return TTNONE; } |
1518 static EVisibility initialVisibility() { return VISIBLE; } | 1501 static EVisibility initialVisibility() { return VISIBLE; } |
1519 static EWhiteSpace initialWhiteSpace() { return NORMAL; } | 1502 static EWhiteSpace initialWhiteSpace() { return NORMAL; } |
1520 static short initialHorizontalBorderSpacing() { return 0; } | 1503 static short initialHorizontalBorderSpacing() { return 0; } |
1521 static short initialVerticalBorderSpacing() { return 0; } | 1504 static short initialVerticalBorderSpacing() { return 0; } |
1522 static ECursor initialCursor() { return CURSOR_AUTO; } | 1505 static ECursor initialCursor() { return CURSOR_AUTO; } |
1523 #if ENABLE(CURSOR_VISIBILITY) | |
1524 static CursorVisibility initialCursorVisibility() { return CursorVisibilityA
uto; } | |
1525 #endif | |
1526 static Color initialColor() { return Color::black; } | 1506 static Color initialColor() { return Color::black; } |
1527 static StyleImage* initialListStyleImage() { return 0; } | 1507 static StyleImage* initialListStyleImage() { return 0; } |
1528 static unsigned initialBorderWidth() { return 3; } | 1508 static unsigned initialBorderWidth() { return 3; } |
1529 static unsigned short initialColumnRuleWidth() { return 3; } | 1509 static unsigned short initialColumnRuleWidth() { return 3; } |
1530 static unsigned short initialOutlineWidth() { return 3; } | 1510 static unsigned short initialOutlineWidth() { return 3; } |
1531 static int initialLetterWordSpacing() { return 0; } | 1511 static int initialLetterWordSpacing() { return 0; } |
1532 static Length initialSize() { return Length(); } | 1512 static Length initialSize() { return Length(); } |
1533 static Length initialMinSize() { return Length(Fixed); } | 1513 static Length initialMinSize() { return Length(Fixed); } |
1534 static Length initialMaxSize() { return Length(Undefined); } | 1514 static Length initialMaxSize() { return Length(Undefined); } |
1535 static Length initialOffset() { return Length(); } | 1515 static Length initialOffset() { return Length(); } |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation)) | 1781 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation)) |
1802 return false; | 1782 return false; |
1803 | 1783 |
1804 rareInheritedData.access()->m_textOrientation = textOrientation; | 1784 rareInheritedData.access()->m_textOrientation = textOrientation; |
1805 return true; | 1785 return true; |
1806 } | 1786 } |
1807 | 1787 |
1808 } // namespace WebCore | 1788 } // namespace WebCore |
1809 | 1789 |
1810 #endif // RenderStyle_h | 1790 #endif // RenderStyle_h |
OLD | NEW |