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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 public: | 353 public: |
354 static PassRefPtr<RenderStyle> create(); | 354 static PassRefPtr<RenderStyle> create(); |
355 static PassRefPtr<RenderStyle> createDefaultStyle(); | 355 static PassRefPtr<RenderStyle> createDefaultStyle(); |
356 static PassRefPtr<RenderStyle> createAnonymousStyleWithDisplay(const RenderS
tyle* parentStyle, EDisplay); | 356 static PassRefPtr<RenderStyle> createAnonymousStyleWithDisplay(const RenderS
tyle* parentStyle, EDisplay); |
357 static PassRefPtr<RenderStyle> clone(const RenderStyle*); | 357 static PassRefPtr<RenderStyle> clone(const RenderStyle*); |
358 | 358 |
359 // Computes how the style change should be propagated down the tree. | 359 // Computes how the style change should be propagated down the tree. |
360 static StyleRecalcChange stylePropagationDiff(const RenderStyle* oldStyle, c
onst RenderStyle* newStyle); | 360 static StyleRecalcChange stylePropagationDiff(const RenderStyle* oldStyle, c
onst RenderStyle* newStyle); |
361 | 361 |
362 // Computes how much visual invalidation the style change causes: layout, re
paint or recomposite. | 362 // Computes how much visual invalidation the style change causes: layout, re
paint or recomposite. |
363 StyleDifference visualInvalidationDiff(const RenderStyle*, unsigned& changed
ContextSensitiveProperties) const; | 363 StyleDifference visualInvalidationDiff(const RenderStyle&, unsigned& changed
ContextSensitiveProperties) const; |
364 | 364 |
365 enum IsAtShadowBoundary { | 365 enum IsAtShadowBoundary { |
366 AtShadowBoundary, | 366 AtShadowBoundary, |
367 NotAtShadowBoundary, | 367 NotAtShadowBoundary, |
368 }; | 368 }; |
369 | 369 |
370 void inheritFrom(const RenderStyle* inheritParent, IsAtShadowBoundary = NotA
tShadowBoundary); | 370 void inheritFrom(const RenderStyle* inheritParent, IsAtShadowBoundary = NotA
tShadowBoundary); |
371 void copyNonInheritedFrom(const RenderStyle*); | 371 void copyNonInheritedFrom(const RenderStyle*); |
372 | 372 |
373 PseudoId styleType() const { return static_cast<PseudoId>(noninherited_flags
._styleType); } | 373 PseudoId styleType() const { return static_cast<PseudoId>(noninherited_flags
._styleType); } |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 bool columnRuleIsTransparent() const { return rareNonInheritedData->m_multiC
ol->m_rule.isTransparent(); } | 855 bool columnRuleIsTransparent() const { return rareNonInheritedData->m_multiC
ol->m_rule.isTransparent(); } |
856 ColumnSpan columnSpan() const { return static_cast<ColumnSpan>(rareNonInheri
tedData->m_multiCol->m_columnSpan); } | 856 ColumnSpan columnSpan() const { return static_cast<ColumnSpan>(rareNonInheri
tedData->m_multiCol->m_columnSpan); } |
857 EPageBreak columnBreakBefore() const { return static_cast<EPageBreak>(rareNo
nInheritedData->m_multiCol->m_breakBefore); } | 857 EPageBreak columnBreakBefore() const { return static_cast<EPageBreak>(rareNo
nInheritedData->m_multiCol->m_breakBefore); } |
858 EPageBreak columnBreakInside() const { return static_cast<EPageBreak>(rareNo
nInheritedData->m_multiCol->m_breakInside); } | 858 EPageBreak columnBreakInside() const { return static_cast<EPageBreak>(rareNo
nInheritedData->m_multiCol->m_breakInside); } |
859 EPageBreak columnBreakAfter() const { return static_cast<EPageBreak>(rareNon
InheritedData->m_multiCol->m_breakAfter); } | 859 EPageBreak columnBreakAfter() const { return static_cast<EPageBreak>(rareNon
InheritedData->m_multiCol->m_breakAfter); } |
860 const TransformOperations& transform() const { return rareNonInheritedData->
m_transform->m_operations; } | 860 const TransformOperations& transform() const { return rareNonInheritedData->
m_transform->m_operations; } |
861 const Length& transformOriginX() const { return rareNonInheritedData->m_tran
sform->m_x; } | 861 const Length& transformOriginX() const { return rareNonInheritedData->m_tran
sform->m_x; } |
862 const Length& transformOriginY() const { return rareNonInheritedData->m_tran
sform->m_y; } | 862 const Length& transformOriginY() const { return rareNonInheritedData->m_tran
sform->m_y; } |
863 float transformOriginZ() const { return rareNonInheritedData->m_transform->m
_z; } | 863 float transformOriginZ() const { return rareNonInheritedData->m_transform->m
_z; } |
864 bool hasTransform() const { return !rareNonInheritedData->m_transform->m_ope
rations.operations().isEmpty(); } | 864 bool hasTransform() const { return !rareNonInheritedData->m_transform->m_ope
rations.operations().isEmpty(); } |
865 bool transformDataEquivalent(const RenderStyle* otherStyle) const { return r
areNonInheritedData->m_transform == otherStyle->rareNonInheritedData->m_transfor
m; } | 865 bool transformDataEquivalent(const RenderStyle& otherStyle) const { return r
areNonInheritedData->m_transform == otherStyle.rareNonInheritedData->m_transform
; } |
866 | 866 |
867 TextEmphasisFill textEmphasisFill() const { return static_cast<TextEmphasisF
ill>(rareInheritedData->textEmphasisFill); } | 867 TextEmphasisFill textEmphasisFill() const { return static_cast<TextEmphasisF
ill>(rareInheritedData->textEmphasisFill); } |
868 TextEmphasisMark textEmphasisMark() const; | 868 TextEmphasisMark textEmphasisMark() const; |
869 const AtomicString& textEmphasisCustomMark() const { return rareInheritedDat
a->textEmphasisCustomMark; } | 869 const AtomicString& textEmphasisCustomMark() const { return rareInheritedDat
a->textEmphasisCustomMark; } |
870 TextEmphasisPosition textEmphasisPosition() const { return static_cast<TextE
mphasisPosition>(rareInheritedData->textEmphasisPosition); } | 870 TextEmphasisPosition textEmphasisPosition() const { return static_cast<TextE
mphasisPosition>(rareInheritedData->textEmphasisPosition); } |
871 const AtomicString& textEmphasisMarkString() const; | 871 const AtomicString& textEmphasisMarkString() const; |
872 | 872 |
873 RubyPosition rubyPosition() const { return static_cast<RubyPosition>(rareInh
eritedData->m_rubyPosition); } | 873 RubyPosition rubyPosition() const { return static_cast<RubyPosition>(rareInh
eritedData->m_rubyPosition); } |
874 | 874 |
875 TextOrientation textOrientation() const { return static_cast<TextOrientation
>(rareInheritedData->m_textOrientation); } | 875 TextOrientation textOrientation() const { return static_cast<TextOrientation
>(rareInheritedData->m_textOrientation); } |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1765 StyleColor visitedLinkTextFillColor() const { return rareInheritedData->visi
tedLinkTextFillColor(); } | 1765 StyleColor visitedLinkTextFillColor() const { return rareInheritedData->visi
tedLinkTextFillColor(); } |
1766 StyleColor visitedLinkTextStrokeColor() const { return rareInheritedData->vi
sitedLinkTextStrokeColor(); } | 1766 StyleColor visitedLinkTextStrokeColor() const { return rareInheritedData->vi
sitedLinkTextStrokeColor(); } |
1767 | 1767 |
1768 Color colorIncludingFallback(int colorProperty, bool visitedLink) const; | 1768 Color colorIncludingFallback(int colorProperty, bool visitedLink) const; |
1769 | 1769 |
1770 Color stopColor() const { return svgStyle()->stopColor(); } | 1770 Color stopColor() const { return svgStyle()->stopColor(); } |
1771 Color floodColor() const { return svgStyle()->floodColor(); } | 1771 Color floodColor() const { return svgStyle()->floodColor(); } |
1772 Color lightingColor() const { return svgStyle()->lightingColor(); } | 1772 Color lightingColor() const { return svgStyle()->lightingColor(); } |
1773 | 1773 |
1774 void appendContent(PassOwnPtr<ContentData>); | 1774 void appendContent(PassOwnPtr<ContentData>); |
1775 StyleDifference repaintOnlyDiff(const RenderStyle* other, unsigned& changedC
ontextSensitiveProperties) const; | 1775 StyleDifference repaintOnlyDiff(const RenderStyle& other, unsigned& changedC
ontextSensitiveProperties) const; |
1776 }; | 1776 }; |
1777 | 1777 |
1778 inline int adjustForAbsoluteZoom(int value, float zoomFactor) | 1778 inline int adjustForAbsoluteZoom(int value, float zoomFactor) |
1779 { | 1779 { |
1780 if (zoomFactor == 1) | 1780 if (zoomFactor == 1) |
1781 return value; | 1781 return value; |
1782 // Needed because computeLengthInt truncates (rather than rounds) when scali
ng up. | 1782 // Needed because computeLengthInt truncates (rather than rounds) when scali
ng up. |
1783 if (zoomFactor > 1) { | 1783 if (zoomFactor > 1) { |
1784 if (value < 0) | 1784 if (value < 0) |
1785 value--; | 1785 value--; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1862 inline bool RenderStyle::hasPseudoElementStyle() const | 1862 inline bool RenderStyle::hasPseudoElementStyle() const |
1863 { | 1863 { |
1864 return noninherited_flags._pseudoBits & PSEUDO_ELEMENT_MASK; | 1864 return noninherited_flags._pseudoBits & PSEUDO_ELEMENT_MASK; |
1865 } | 1865 } |
1866 | 1866 |
1867 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect
::Radii&); | 1867 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect
::Radii&); |
1868 | 1868 |
1869 } // namespace WebCore | 1869 } // namespace WebCore |
1870 | 1870 |
1871 #endif // RenderStyle_h | 1871 #endif // RenderStyle_h |
OLD | NEW |