| 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 return m_background->outline().width(); | 566 return m_background->outline().width(); |
| 567 } | 567 } |
| 568 bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > Bord
erStyleHidden; } | 568 bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > Bord
erStyleHidden; } |
| 569 EBorderStyle outlineStyle() const { return m_background->outline().style();
} | 569 EBorderStyle outlineStyle() const { return m_background->outline().style();
} |
| 570 OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto>
(m_background->outline().isAuto()); } | 570 OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto>
(m_background->outline().isAuto()); } |
| 571 int outlineOutsetExtent() const; | 571 int outlineOutsetExtent() const; |
| 572 | 572 |
| 573 EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_fla
gs.overflowX); } | 573 EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_fla
gs.overflowX); } |
| 574 EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_fla
gs.overflowY); } | 574 EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_fla
gs.overflowY); } |
| 575 // It's sufficient to just check one direction, since it's illegal to have v
isible on only one overflow value. | 575 // It's sufficient to just check one direction, since it's illegal to have v
isible on only one overflow value. |
| 576 bool isOverflowVisible() const { ASSERT(overflowX() != OVISIBLE || overflowX
() == overflowY()); return overflowX() == OVISIBLE; } | 576 bool isOverflowVisible() const { ASSERT(overflowX() != OverflowVisible || ov
erflowX() == overflowY()); return overflowX() == OverflowVisible; } |
| 577 bool isOverflowPaged() const { return overflowY() == OPAGEDX || overflowY()
== OPAGEDY; } | 577 bool isOverflowPaged() const { return overflowY() == OverflowPagedX || overf
lowY() == OverflowPagedY; } |
| 578 | 578 |
| 579 EVisibility visibility() const { return static_cast<EVisibility>(inherited_f
lags._visibility); } | 579 EVisibility visibility() const { return static_cast<EVisibility>(inherited_f
lags._visibility); } |
| 580 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(no
ninherited_flags.verticalAlign); } | 580 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(no
ninherited_flags.verticalAlign); } |
| 581 const Length& verticalAlignLength() const { return m_box->verticalAlign(); } | 581 const Length& getVerticalAlignLength() const { return m_box->verticalAlign()
; } |
| 582 | 582 |
| 583 const Length& clipLeft() const { return visual->clip.left(); } | 583 const Length& clipLeft() const { return visual->clip.left(); } |
| 584 const Length& clipRight() const { return visual->clip.right(); } | 584 const Length& clipRight() const { return visual->clip.right(); } |
| 585 const Length& clipTop() const { return visual->clip.top(); } | 585 const Length& clipTop() const { return visual->clip.top(); } |
| 586 const Length& clipBottom() const { return visual->clip.bottom(); } | 586 const Length& clipBottom() const { return visual->clip.bottom(); } |
| 587 const LengthBox& clip() const { return visual->clip; } | 587 const LengthBox& clip() const { return visual->clip; } |
| 588 bool hasAutoClip() const { return visual->hasAutoClip; } | 588 bool hasAutoClip() const { return visual->hasAutoClip; } |
| 589 | 589 |
| 590 EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(noninher
ited_flags.unicodeBidi); } | 590 EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(noninher
ited_flags.unicodeBidi); } |
| 591 | 591 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 const AtomicString& highlight() const { return rareInheritedData->highlight;
} | 866 const AtomicString& highlight() const { return rareInheritedData->highlight;
} |
| 867 const AtomicString& hyphenationString() const { return rareInheritedData->hy
phenationString; } | 867 const AtomicString& hyphenationString() const { return rareInheritedData->hy
phenationString; } |
| 868 const AtomicString& locale() const { return fontDescription().locale(false);
} | 868 const AtomicString& locale() const { return fontDescription().locale(false);
} |
| 869 EResize resize() const { return static_cast<EResize>(rareNonInheritedData->m
_resize); } | 869 EResize resize() const { return static_cast<EResize>(rareNonInheritedData->m
_resize); } |
| 870 bool hasInlinePaginationAxis() const | 870 bool hasInlinePaginationAxis() const |
| 871 { | 871 { |
| 872 // If the pagination axis is parallel with the writing mode inline axis,
columns may be laid | 872 // If the pagination axis is parallel with the writing mode inline axis,
columns may be laid |
| 873 // out along the inline axis, just like for regular multicol. Otherwise,
we need to lay out | 873 // out along the inline axis, just like for regular multicol. Otherwise,
we need to lay out |
| 874 // along the block axis. | 874 // along the block axis. |
| 875 if (isOverflowPaged()) | 875 if (isOverflowPaged()) |
| 876 return (overflowY() == OPAGEDX) == isHorizontalWritingMode(); | 876 return (overflowY() == OverflowPagedX) == isHorizontalWritingMode(); |
| 877 return false; | 877 return false; |
| 878 } | 878 } |
| 879 float columnWidth() const { return rareNonInheritedData->m_multiCol->m_width
; } | 879 float columnWidth() const { return rareNonInheritedData->m_multiCol->m_width
; } |
| 880 bool hasAutoColumnWidth() const { return rareNonInheritedData->m_multiCol->m
_autoWidth; } | 880 bool hasAutoColumnWidth() const { return rareNonInheritedData->m_multiCol->m
_autoWidth; } |
| 881 unsigned short columnCount() const { return rareNonInheritedData->m_multiCol
->m_count; } | 881 unsigned short columnCount() const { return rareNonInheritedData->m_multiCol
->m_count; } |
| 882 bool hasAutoColumnCount() const { return rareNonInheritedData->m_multiCol->m
_autoCount; } | 882 bool hasAutoColumnCount() const { return rareNonInheritedData->m_multiCol->m
_autoCount; } |
| 883 bool specifiesColumns() const { return !hasAutoColumnCount() || !hasAutoColu
mnWidth(); } | 883 bool specifiesColumns() const { return !hasAutoColumnCount() || !hasAutoColu
mnWidth(); } |
| 884 ColumnFill getColumnFill() const { return static_cast<ColumnFill>(rareNonInh
eritedData->m_multiCol->m_fill); } | 884 ColumnFill getColumnFill() const { return static_cast<ColumnFill>(rareNonInh
eritedData->m_multiCol->m_fill); } |
| 885 float columnGap() const { return rareNonInheritedData->m_multiCol->m_gap; } | 885 float columnGap() const { return rareNonInheritedData->m_multiCol->m_gap; } |
| 886 bool hasNormalColumnGap() const { return rareNonInheritedData->m_multiCol->m
_normalGap; } | 886 bool hasNormalColumnGap() const { return rareNonInheritedData->m_multiCol->m
_normalGap; } |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 void setOutlineFromStyle(const ComputedStyle& o) | 1150 void setOutlineFromStyle(const ComputedStyle& o) |
| 1151 { | 1151 { |
| 1152 ASSERT(!isOutlineEquivalent(&o)); | 1152 ASSERT(!isOutlineEquivalent(&o)); |
| 1153 m_background.access()->m_outline = o.m_background->m_outline; | 1153 m_background.access()->m_outline = o.m_background->m_outline; |
| 1154 } | 1154 } |
| 1155 | 1155 |
| 1156 void setOverflowX(EOverflow v) { noninherited_flags.overflowX = v; } | 1156 void setOverflowX(EOverflow v) { noninherited_flags.overflowX = v; } |
| 1157 void setOverflowY(EOverflow v) { noninherited_flags.overflowY = v; } | 1157 void setOverflowY(EOverflow v) { noninherited_flags.overflowY = v; } |
| 1158 void setVisibility(EVisibility v) { inherited_flags._visibility = v; } | 1158 void setVisibility(EVisibility v) { inherited_flags._visibility = v; } |
| 1159 void setVerticalAlign(EVerticalAlign v) { noninherited_flags.verticalAlign =
v; } | 1159 void setVerticalAlign(EVerticalAlign v) { noninherited_flags.verticalAlign =
v; } |
| 1160 void setVerticalAlignLength(const Length& length) { setVerticalAlign(LENGTH)
; SET_VAR(m_box, m_verticalAlign, length); } | 1160 void setVerticalAlignLength(const Length& length) { setVerticalAlign(Vertica
lAlignLength); SET_VAR(m_box, m_verticalAlign, length); } |
| 1161 | 1161 |
| 1162 void setHasAutoClip() { SET_VAR(visual, hasAutoClip, true); SET_VAR(visual,
clip, ComputedStyle::initialClip()); } | 1162 void setHasAutoClip() { SET_VAR(visual, hasAutoClip, true); SET_VAR(visual,
clip, ComputedStyle::initialClip()); } |
| 1163 void setClip(const LengthBox& box) { SET_VAR(visual, hasAutoClip, false); SE
T_VAR(visual, clip, box); } | 1163 void setClip(const LengthBox& box) { SET_VAR(visual, hasAutoClip, false); SE
T_VAR(visual, clip, box); } |
| 1164 | 1164 |
| 1165 void setUnicodeBidi(EUnicodeBidi b) { noninherited_flags.unicodeBidi = b; } | 1165 void setUnicodeBidi(EUnicodeBidi b) { noninherited_flags.unicodeBidi = b; } |
| 1166 | 1166 |
| 1167 void setClear(EClear v) { noninherited_flags.clear = v; } | 1167 void setClear(EClear v) { noninherited_flags.clear = v; } |
| 1168 void setTableLayout(ETableLayout v) { noninherited_flags.tableLayout = v; } | 1168 void setTableLayout(ETableLayout v) { noninherited_flags.tableLayout = v; } |
| 1169 | 1169 |
| 1170 bool setFontDescription(const FontDescription&); | 1170 bool setFontDescription(const FontDescription&); |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1660 static WritingMode initialWritingMode() { return TopToBottomWritingMode; } | 1660 static WritingMode initialWritingMode() { return TopToBottomWritingMode; } |
| 1661 static TextCombine initialTextCombine() { return TextCombineNone; } | 1661 static TextCombine initialTextCombine() { return TextCombineNone; } |
| 1662 static TextOrientation initialTextOrientation() { return TextOrientationMixe
d; } | 1662 static TextOrientation initialTextOrientation() { return TextOrientationMixe
d; } |
| 1663 static ObjectFit initialObjectFit() { return ObjectFitFill; } | 1663 static ObjectFit initialObjectFit() { return ObjectFitFill; } |
| 1664 static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0,
Percent), Length(50.0, Percent)); } | 1664 static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0,
Percent), Length(50.0, Percent)); } |
| 1665 static EDisplay initialDisplay() { return INLINE; } | 1665 static EDisplay initialDisplay() { return INLINE; } |
| 1666 static EEmptyCell initialEmptyCells() { return SHOW; } | 1666 static EEmptyCell initialEmptyCells() { return SHOW; } |
| 1667 static EFloat initialFloating() { return NoFloat; } | 1667 static EFloat initialFloating() { return NoFloat; } |
| 1668 static EListStylePosition initialListStylePosition() { return OUTSIDE; } | 1668 static EListStylePosition initialListStylePosition() { return OUTSIDE; } |
| 1669 static EListStyleType initialListStyleType() { return Disc; } | 1669 static EListStyleType initialListStyleType() { return Disc; } |
| 1670 static EOverflow initialOverflowX() { return OVISIBLE; } | 1670 static EOverflow initialOverflowX() { return OverflowVisible; } |
| 1671 static EOverflow initialOverflowY() { return OVISIBLE; } | 1671 static EOverflow initialOverflowY() { return OverflowVisible; } |
| 1672 static EBreak initialBreakAfter() { return BreakAuto; } | 1672 static EBreak initialBreakAfter() { return BreakAuto; } |
| 1673 static EBreak initialBreakBefore() { return BreakAuto; } | 1673 static EBreak initialBreakBefore() { return BreakAuto; } |
| 1674 static EBreak initialBreakInside() { return BreakAuto; } | 1674 static EBreak initialBreakInside() { return BreakAuto; } |
| 1675 static EPosition initialPosition() { return StaticPosition; } | 1675 static EPosition initialPosition() { return StaticPosition; } |
| 1676 static ETableLayout initialTableLayout() { return TAUTO; } | 1676 static ETableLayout initialTableLayout() { return TAUTO; } |
| 1677 static EUnicodeBidi initialUnicodeBidi() { return UBNormal; } | 1677 static EUnicodeBidi initialUnicodeBidi() { return UBNormal; } |
| 1678 static ETextTransform initialTextTransform() { return TTNONE; } | 1678 static ETextTransform initialTextTransform() { return TTNONE; } |
| 1679 static EVisibility initialVisibility() { return VISIBLE; } | 1679 static EVisibility initialVisibility() { return VISIBLE; } |
| 1680 static EWhiteSpace initialWhiteSpace() { return NORMAL; } | 1680 static EWhiteSpace initialWhiteSpace() { return NORMAL; } |
| 1681 static short initialHorizontalBorderSpacing() { return 0; } | 1681 static short initialHorizontalBorderSpacing() { return 0; } |
| 1682 static short initialVerticalBorderSpacing() { return 0; } | 1682 static short initialVerticalBorderSpacing() { return 0; } |
| 1683 static ECursor initialCursor() { return CURSOR_AUTO; } | 1683 static ECursor initialCursor() { return CURSOR_AUTO; } |
| 1684 static Color initialColor() { return Color::black; } | 1684 static Color initialColor() { return Color::black; } |
| 1685 static StyleImage* initialListStyleImage() { return 0; } | 1685 static StyleImage* initialListStyleImage() { return 0; } |
| 1686 static unsigned initialBorderWidth() { return 3; } | 1686 static unsigned initialBorderWidth() { return 3; } |
| 1687 static unsigned short initialColumnRuleWidth() { return 3; } | 1687 static unsigned short initialColumnRuleWidth() { return 3; } |
| 1688 static unsigned short initialOutlineWidth() { return 3; } | 1688 static unsigned short initialOutlineWidth() { return 3; } |
| 1689 static float initialLetterWordSpacing() { return 0.0f; } | 1689 static float initialLetterWordSpacing() { return 0.0f; } |
| 1690 static Length initialSize() { return Length(); } | 1690 static Length initialSize() { return Length(); } |
| 1691 static Length initialMinSize() { return Length(); } | 1691 static Length initialMinSize() { return Length(); } |
| 1692 static Length initialMaxSize() { return Length(MaxSizeNone); } | 1692 static Length initialMaxSize() { return Length(MaxSizeNone); } |
| 1693 static Length initialOffset() { return Length(); } | 1693 static Length initialOffset() { return Length(); } |
| 1694 static Length initialMargin() { return Length(Fixed); } | 1694 static Length initialMargin() { return Length(Fixed); } |
| 1695 static Length initialPadding() { return Length(Fixed); } | 1695 static Length initialPadding() { return Length(Fixed); } |
| 1696 static Length initialTextIndent() { return Length(Fixed); } | 1696 static Length initialTextIndent() { return Length(Fixed); } |
| 1697 static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine;
} | 1697 static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine;
} |
| 1698 static TextIndentType initialTextIndentType() { return TextIndentNormal; } | 1698 static TextIndentType initialTextIndentType() { return TextIndentNormal; } |
| 1699 static EVerticalAlign initialVerticalAlign() { return BASELINE; } | 1699 static EVerticalAlign initialVerticalAlign() { return VerticalAlignBaseline;
} |
| 1700 static short initialWidows() { return 1; } | 1700 static short initialWidows() { return 1; } |
| 1701 static short initialOrphans() { return 2; } | 1701 static short initialOrphans() { return 2; } |
| 1702 static Length initialLineHeight() { return Length(-100.0, Percent); } | 1702 static Length initialLineHeight() { return Length(-100.0, Percent); } |
| 1703 static ETextAlign initialTextAlign() { return TASTART; } | 1703 static ETextAlign initialTextAlign() { return TASTART; } |
| 1704 static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; } | 1704 static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; } |
| 1705 static TextJustify initialTextJustify() { return TextJustifyAuto; } | 1705 static TextJustify initialTextJustify() { return TextJustifyAuto; } |
| 1706 static TextDecoration initialTextDecoration() { return TextDecorationNone; } | 1706 static TextDecoration initialTextDecoration() { return TextDecorationNone; } |
| 1707 static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnd
erlinePositionAuto; } | 1707 static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnd
erlinePositionAuto; } |
| 1708 static TextDecorationStyle initialTextDecorationStyle() { return TextDecorat
ionStyleSolid; } | 1708 static TextDecorationStyle initialTextDecorationStyle() { return TextDecorat
ionStyleSolid; } |
| 1709 static float initialZoom() { return 1.0f; } | 1709 static float initialZoom() { return 1.0f; } |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2029 } | 2029 } |
| 2030 | 2030 |
| 2031 inline bool ComputedStyle::hasPseudoElementStyle() const | 2031 inline bool ComputedStyle::hasPseudoElementStyle() const |
| 2032 { | 2032 { |
| 2033 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; | 2033 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; |
| 2034 } | 2034 } |
| 2035 | 2035 |
| 2036 } // namespace blink | 2036 } // namespace blink |
| 2037 | 2037 |
| 2038 #endif // ComputedStyle_h | 2038 #endif // ComputedStyle_h |
| OLD | NEW |