| 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 23 matching lines...) Expand all Loading... |
| 34 #include "core/rendering/style/DataRef.h" | 34 #include "core/rendering/style/DataRef.h" |
| 35 #include "core/rendering/style/LineClampValue.h" | 35 #include "core/rendering/style/LineClampValue.h" |
| 36 #include "core/rendering/style/NinePieceImage.h" | 36 #include "core/rendering/style/NinePieceImage.h" |
| 37 #include "core/rendering/style/OutlineValue.h" | 37 #include "core/rendering/style/OutlineValue.h" |
| 38 #include "core/rendering/style/RenderStyleConstants.h" | 38 #include "core/rendering/style/RenderStyleConstants.h" |
| 39 #include "core/rendering/style/SVGRenderStyle.h" | 39 #include "core/rendering/style/SVGRenderStyle.h" |
| 40 #include "core/rendering/style/ShapeValue.h" | 40 #include "core/rendering/style/ShapeValue.h" |
| 41 #include "core/rendering/style/StyleBackgroundData.h" | 41 #include "core/rendering/style/StyleBackgroundData.h" |
| 42 #include "core/rendering/style/StyleBoxData.h" | 42 #include "core/rendering/style/StyleBoxData.h" |
| 43 #include "core/rendering/style/StyleDeprecatedFlexibleBoxData.h" | 43 #include "core/rendering/style/StyleDeprecatedFlexibleBoxData.h" |
| 44 #include "core/rendering/style/StyleDifference.h" |
| 44 #include "core/rendering/style/StyleFilterData.h" | 45 #include "core/rendering/style/StyleFilterData.h" |
| 45 #include "core/rendering/style/StyleFlexibleBoxData.h" | 46 #include "core/rendering/style/StyleFlexibleBoxData.h" |
| 46 #include "core/rendering/style/StyleGridData.h" | 47 #include "core/rendering/style/StyleGridData.h" |
| 47 #include "core/rendering/style/StyleGridItemData.h" | 48 #include "core/rendering/style/StyleGridItemData.h" |
| 48 #include "core/rendering/style/StyleMarqueeData.h" | 49 #include "core/rendering/style/StyleMarqueeData.h" |
| 49 #include "core/rendering/style/StyleMultiColData.h" | 50 #include "core/rendering/style/StyleMultiColData.h" |
| 50 #include "core/rendering/style/StyleRareInheritedData.h" | 51 #include "core/rendering/style/StyleRareInheritedData.h" |
| 51 #include "core/rendering/style/StyleRareNonInheritedData.h" | 52 #include "core/rendering/style/StyleRareNonInheritedData.h" |
| 52 #include "core/rendering/style/StyleReflection.h" | 53 #include "core/rendering/style/StyleReflection.h" |
| 53 #include "core/rendering/style/StyleSurroundData.h" | 54 #include "core/rendering/style/StyleSurroundData.h" |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 public: | 354 public: |
| 354 static PassRefPtr<RenderStyle> create(); | 355 static PassRefPtr<RenderStyle> create(); |
| 355 static PassRefPtr<RenderStyle> createDefaultStyle(); | 356 static PassRefPtr<RenderStyle> createDefaultStyle(); |
| 356 static PassRefPtr<RenderStyle> createAnonymousStyleWithDisplay(const RenderS
tyle* parentStyle, EDisplay); | 357 static PassRefPtr<RenderStyle> createAnonymousStyleWithDisplay(const RenderS
tyle* parentStyle, EDisplay); |
| 357 static PassRefPtr<RenderStyle> clone(const RenderStyle*); | 358 static PassRefPtr<RenderStyle> clone(const RenderStyle*); |
| 358 | 359 |
| 359 // Computes how the style change should be propagated down the tree. | 360 // Computes how the style change should be propagated down the tree. |
| 360 static StyleRecalcChange stylePropagationDiff(const RenderStyle* oldStyle, c
onst RenderStyle* newStyle); | 361 static StyleRecalcChange stylePropagationDiff(const RenderStyle* oldStyle, c
onst RenderStyle* newStyle); |
| 361 | 362 |
| 362 // Computes how much visual invalidation the style change causes: layout, re
paint or recomposite. | 363 // Computes how much visual invalidation the style change causes: layout, re
paint or recomposite. |
| 363 StyleDifference visualInvalidationDiff(const RenderStyle&, unsigned& changed
ContextSensitiveProperties) const; | 364 StyleDifference visualInvalidationDiff(const RenderStyle&) const; |
| 364 | 365 |
| 365 enum IsAtShadowBoundary { | 366 enum IsAtShadowBoundary { |
| 366 AtShadowBoundary, | 367 AtShadowBoundary, |
| 367 NotAtShadowBoundary, | 368 NotAtShadowBoundary, |
| 368 }; | 369 }; |
| 369 | 370 |
| 370 void inheritFrom(const RenderStyle* inheritParent, IsAtShadowBoundary = NotA
tShadowBoundary); | 371 void inheritFrom(const RenderStyle* inheritParent, IsAtShadowBoundary = NotA
tShadowBoundary); |
| 371 void copyNonInheritedFrom(const RenderStyle*); | 372 void copyNonInheritedFrom(const RenderStyle*); |
| 372 | 373 |
| 373 PseudoId styleType() const { return static_cast<PseudoId>(noninherited_flags
._styleType); } | 374 PseudoId styleType() const { return static_cast<PseudoId>(noninherited_flags
._styleType); } |
| (...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 StyleColor visitedLinkTextFillColor() const { return rareInheritedData->visi
tedLinkTextFillColor(); } | 1772 StyleColor visitedLinkTextFillColor() const { return rareInheritedData->visi
tedLinkTextFillColor(); } |
| 1772 StyleColor visitedLinkTextStrokeColor() const { return rareInheritedData->vi
sitedLinkTextStrokeColor(); } | 1773 StyleColor visitedLinkTextStrokeColor() const { return rareInheritedData->vi
sitedLinkTextStrokeColor(); } |
| 1773 | 1774 |
| 1774 Color colorIncludingFallback(int colorProperty, bool visitedLink) const; | 1775 Color colorIncludingFallback(int colorProperty, bool visitedLink) const; |
| 1775 | 1776 |
| 1776 Color stopColor() const { return svgStyle()->stopColor(); } | 1777 Color stopColor() const { return svgStyle()->stopColor(); } |
| 1777 Color floodColor() const { return svgStyle()->floodColor(); } | 1778 Color floodColor() const { return svgStyle()->floodColor(); } |
| 1778 Color lightingColor() const { return svgStyle()->lightingColor(); } | 1779 Color lightingColor() const { return svgStyle()->lightingColor(); } |
| 1779 | 1780 |
| 1780 void appendContent(PassOwnPtr<ContentData>); | 1781 void appendContent(PassOwnPtr<ContentData>); |
| 1781 StyleDifference repaintOnlyDiff(const RenderStyle& other, unsigned& changedC
ontextSensitiveProperties) const; | 1782 |
| 1783 bool diffNeedsLayoutAndRepaintLayer(const RenderStyle& other) const; |
| 1784 bool diffNeedsLayoutAndRepaintSelf(const RenderStyle& other) const; |
| 1785 bool diffNeedsLayoutOnly(const RenderStyle& other) const; |
| 1786 bool diffNeedsRepaintLayerOnly(const RenderStyle& other) const; |
| 1787 bool diffNeedsRepaintOnly(const RenderStyle& other) const; |
| 1788 bool diffNeedsRecompositeLayerOnly(const RenderStyle& other) const; |
| 1789 void addContextSensitiveDiffFlags(const RenderStyle& other, StyleDifference&
) const; |
| 1782 }; | 1790 }; |
| 1783 | 1791 |
| 1784 inline int adjustForAbsoluteZoom(int value, float zoomFactor) | 1792 inline int adjustForAbsoluteZoom(int value, float zoomFactor) |
| 1785 { | 1793 { |
| 1786 if (zoomFactor == 1) | 1794 if (zoomFactor == 1) |
| 1787 return value; | 1795 return value; |
| 1788 // Needed because computeLengthInt truncates (rather than rounds) when scali
ng up. | 1796 // Needed because computeLengthInt truncates (rather than rounds) when scali
ng up. |
| 1789 if (zoomFactor > 1) { | 1797 if (zoomFactor > 1) { |
| 1790 if (value < 0) | 1798 if (value < 0) |
| 1791 value--; | 1799 value--; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1868 inline bool RenderStyle::hasPseudoElementStyle() const | 1876 inline bool RenderStyle::hasPseudoElementStyle() const |
| 1869 { | 1877 { |
| 1870 return noninherited_flags._pseudoBits & PSEUDO_ELEMENT_MASK; | 1878 return noninherited_flags._pseudoBits & PSEUDO_ELEMENT_MASK; |
| 1871 } | 1879 } |
| 1872 | 1880 |
| 1873 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect
::Radii&); | 1881 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect
::Radii&); |
| 1874 | 1882 |
| 1875 } // namespace WebCore | 1883 } // namespace WebCore |
| 1876 | 1884 |
| 1877 #endif // RenderStyle_h | 1885 #endif // RenderStyle_h |
| OLD | NEW |