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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
535 | 535 |
536 EVisibility visibility() const { return static_cast<EVisibility>(inherited_f lags._visibility); } | 536 EVisibility visibility() const { return static_cast<EVisibility>(inherited_f lags._visibility); } |
537 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(no ninherited_flags.verticalAlign); } | 537 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(no ninherited_flags.verticalAlign); } |
538 const Length& verticalAlignLength() const { return m_box->verticalAlign(); } | 538 const Length& verticalAlignLength() const { return m_box->verticalAlign(); } |
539 | 539 |
540 const Length& clipLeft() const { return visual->clip.left(); } | 540 const Length& clipLeft() const { return visual->clip.left(); } |
541 const Length& clipRight() const { return visual->clip.right(); } | 541 const Length& clipRight() const { return visual->clip.right(); } |
542 const Length& clipTop() const { return visual->clip.top(); } | 542 const Length& clipTop() const { return visual->clip.top(); } |
543 const Length& clipBottom() const { return visual->clip.bottom(); } | 543 const Length& clipBottom() const { return visual->clip.bottom(); } |
544 const LengthBox& clip() const { return visual->clip; } | 544 const LengthBox& clip() const { return visual->clip; } |
545 bool hasClip() const { return visual->hasClip; } | 545 bool hasClip() const { return !visual->hasAutoClip; } |
Timothy Loh
2014/08/13 10:06:18
I would've just removed this instead of having two
| |
546 bool hasAutoClip() const { return visual->hasAutoClip; } | |
546 | 547 |
547 EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(noninher ited_flags.unicodeBidi); } | 548 EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(noninher ited_flags.unicodeBidi); } |
548 | 549 |
549 EClear clear() const { return static_cast<EClear>(noninherited_flags.clear); } | 550 EClear clear() const { return static_cast<EClear>(noninherited_flags.clear); } |
550 ETableLayout tableLayout() const { return static_cast<ETableLayout>(noninher ited_flags.tableLayout); } | 551 ETableLayout tableLayout() const { return static_cast<ETableLayout>(noninher ited_flags.tableLayout); } |
551 bool isFixedTableLayout() const { return tableLayout() == TFIXED && !logical Width().isAuto(); } | 552 bool isFixedTableLayout() const { return tableLayout() == TFIXED && !logical Width().isAuto(); } |
552 | 553 |
553 const Font& font() const; | 554 const Font& font() const; |
554 const FontMetrics& fontMetrics() const; | 555 const FontMetrics& fontMetrics() const; |
555 const FontDescription& fontDescription() const; | 556 const FontDescription& fontDescription() const; |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1092 return !hasOutline(); | 1093 return !hasOutline(); |
1093 return m_background->outline().visuallyEqual(otherStyle->m_background->o utline()); | 1094 return m_background->outline().visuallyEqual(otherStyle->m_background->o utline()); |
1094 } | 1095 } |
1095 | 1096 |
1096 void setOverflowX(EOverflow v) { noninherited_flags.overflowX = v; } | 1097 void setOverflowX(EOverflow v) { noninherited_flags.overflowX = v; } |
1097 void setOverflowY(EOverflow v) { noninherited_flags.overflowY = v; } | 1098 void setOverflowY(EOverflow v) { noninherited_flags.overflowY = v; } |
1098 void setVisibility(EVisibility v) { inherited_flags._visibility = v; } | 1099 void setVisibility(EVisibility v) { inherited_flags._visibility = v; } |
1099 void setVerticalAlign(EVerticalAlign v) { noninherited_flags.verticalAlign = v; } | 1100 void setVerticalAlign(EVerticalAlign v) { noninherited_flags.verticalAlign = v; } |
1100 void setVerticalAlignLength(const Length& length) { setVerticalAlign(LENGTH) ; SET_VAR(m_box, m_verticalAlign, length); } | 1101 void setVerticalAlignLength(const Length& length) { setVerticalAlign(LENGTH) ; SET_VAR(m_box, m_verticalAlign, length); } |
1101 | 1102 |
1102 void setHasClip(bool b = true) { SET_VAR(visual, hasClip, b); } | 1103 void setHasAutoClip() { SET_VAR(visual, hasAutoClip, true); SET_VAR(visual, clip, RenderStyle::initialClip()); } |
1103 void setClipLeft(const Length& v) { SET_VAR(visual, clip.m_left, v); } | 1104 void setClip(const LengthBox& box) { SET_VAR(visual, hasAutoClip, false); SE T_VAR(visual, clip, box); } |
1104 void setClipRight(const Length& v) { SET_VAR(visual, clip.m_right, v); } | |
1105 void setClipTop(const Length& v) { SET_VAR(visual, clip.m_top, v); } | |
1106 void setClipBottom(const Length& v) { SET_VAR(visual, clip.m_bottom, v); } | |
1107 void setClip(const Length& top, const Length& right, const Length& bottom, c onst Length& left); | |
1108 void setClip(const LengthBox& box) { SET_VAR(visual, clip, box); } | |
1109 | 1105 |
1110 void setUnicodeBidi(EUnicodeBidi b) { noninherited_flags.unicodeBidi = b; } | 1106 void setUnicodeBidi(EUnicodeBidi b) { noninherited_flags.unicodeBidi = b; } |
1111 | 1107 |
1112 void setClear(EClear v) { noninherited_flags.clear = v; } | 1108 void setClear(EClear v) { noninherited_flags.clear = v; } |
1113 void setTableLayout(ETableLayout v) { noninherited_flags.tableLayout = v; } | 1109 void setTableLayout(ETableLayout v) { noninherited_flags.tableLayout = v; } |
1114 | 1110 |
1115 bool setFontDescription(const FontDescription&); | 1111 bool setFontDescription(const FontDescription&); |
1116 // Only used for blending font sizes when animating and for text autosizing. | 1112 // Only used for blending font sizes when animating and for text autosizing. |
1117 void setFontSize(float); | 1113 void setFontSize(float); |
1118 void setFontStretch(FontStretch); | 1114 void setFontStretch(FontStretch); |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1543 bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() || hasOutline() || hasAppearance() || boxShadow() || hasFilter(); } | 1539 bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() || hasOutline() || hasAppearance() || boxShadow() || hasFilter(); } |
1544 | 1540 |
1545 // Initial values for all the properties | 1541 // Initial values for all the properties |
1546 static EBorderCollapse initialBorderCollapse() { return BSEPARATE; } | 1542 static EBorderCollapse initialBorderCollapse() { return BSEPARATE; } |
1547 static EBorderStyle initialBorderStyle() { return BNONE; } | 1543 static EBorderStyle initialBorderStyle() { return BNONE; } |
1548 static OutlineIsAuto initialOutlineStyleIsAuto() { return AUTO_OFF; } | 1544 static OutlineIsAuto initialOutlineStyleIsAuto() { return AUTO_OFF; } |
1549 static NinePieceImage initialNinePieceImage() { return NinePieceImage(); } | 1545 static NinePieceImage initialNinePieceImage() { return NinePieceImage(); } |
1550 static LengthSize initialBorderRadius() { return LengthSize(Length(0, Fixed) , Length(0, Fixed)); } | 1546 static LengthSize initialBorderRadius() { return LengthSize(Length(0, Fixed) , Length(0, Fixed)); } |
1551 static ECaptionSide initialCaptionSide() { return CAPTOP; } | 1547 static ECaptionSide initialCaptionSide() { return CAPTOP; } |
1552 static EClear initialClear() { return CNONE; } | 1548 static EClear initialClear() { return CNONE; } |
1549 static LengthBox initialClip() { return LengthBox(); } | |
1553 static TextDirection initialDirection() { return LTR; } | 1550 static TextDirection initialDirection() { return LTR; } |
1554 static WritingMode initialWritingMode() { return TopToBottomWritingMode; } | 1551 static WritingMode initialWritingMode() { return TopToBottomWritingMode; } |
1555 static TextCombine initialTextCombine() { return TextCombineNone; } | 1552 static TextCombine initialTextCombine() { return TextCombineNone; } |
1556 static TextOrientation initialTextOrientation() { return TextOrientationVert icalRight; } | 1553 static TextOrientation initialTextOrientation() { return TextOrientationVert icalRight; } |
1557 static ObjectFit initialObjectFit() { return ObjectFitFill; } | 1554 static ObjectFit initialObjectFit() { return ObjectFitFill; } |
1558 static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0, Percent), Length(50.0, Percent)); } | 1555 static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0, Percent), Length(50.0, Percent)); } |
1559 static EDisplay initialDisplay() { return INLINE; } | 1556 static EDisplay initialDisplay() { return INLINE; } |
1560 static EEmptyCell initialEmptyCells() { return SHOW; } | 1557 static EEmptyCell initialEmptyCells() { return SHOW; } |
1561 static EFloat initialFloating() { return NoFloat; } | 1558 static EFloat initialFloating() { return NoFloat; } |
1562 static EListStylePosition initialListStylePosition() { return OUTSIDE; } | 1559 static EListStylePosition initialListStylePosition() { return OUTSIDE; } |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1915 inline bool RenderStyle::hasPseudoElementStyle() const | 1912 inline bool RenderStyle::hasPseudoElementStyle() const |
1916 { | 1913 { |
1917 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; | 1914 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; |
1918 } | 1915 } |
1919 | 1916 |
1920 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&); | 1917 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&); |
1921 | 1918 |
1922 } // namespace blink | 1919 } // namespace blink |
1923 | 1920 |
1924 #endif // RenderStyle_h | 1921 #endif // RenderStyle_h |
OLD | NEW |