Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(806)

Unified Diff: Source/core/rendering/style/SVGRenderStyle.h

Issue 14907011: Support 'paint-order' from SVG2. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix review issues and add paint-order for text too Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/style/SVGRenderStyle.h
diff --git a/Source/core/rendering/style/SVGRenderStyle.h b/Source/core/rendering/style/SVGRenderStyle.h
index 625e33f9165af4c755c34e17b766b275c818227a..5eb4d095477813536eb6aa6bc6a8bb590d48c038 100644
--- a/Source/core/rendering/style/SVGRenderStyle.h
+++ b/Source/core/rendering/style/SVGRenderStyle.h
@@ -94,6 +94,7 @@ public:
static String initialMarkerMidResource() { return String(); }
static String initialMarkerEndResource() { return String(); }
static EMaskType initialMaskType() { return MT_LUMINANCE; }
+ static EPaintOrder initialPaintOrder() { return PO_NORMAL; }
static SVGLength initialBaselineShiftValue()
{
@@ -142,6 +143,7 @@ public:
void setGlyphOrientationHorizontal(EGlyphOrientation val) { svg_inherited_flags._glyphOrientationHorizontal = val; }
void setGlyphOrientationVertical(EGlyphOrientation val) { svg_inherited_flags._glyphOrientationVertical = val; }
void setMaskType(EMaskType val) { svg_noninherited_flags.f.maskType = val; }
+ void setPaintOrder(EPaintOrder val) { svg_inherited_flags._paintOrder = (int)val; }
void setFillOpacity(float obj)
{
@@ -346,6 +348,8 @@ public:
String markerMidResource() const { return inheritedResources->markerMid; }
String markerEndResource() const { return inheritedResources->markerEnd; }
EMaskType maskType() const { return (EMaskType) svg_noninherited_flags.f.maskType; }
+ EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags._paintOrder; }
+ EPaintOrderType paintOrderType(unsigned index) const;
const SVGPaint::SVGPaintType& visitedLinkFillPaintType() const { return fill->visitedLinkPaintType; }
const Color& visitedLinkFillPaintColor() const { return fill->visitedLinkPaintColor; }
@@ -380,7 +384,8 @@ protected:
&& (_colorInterpolationFilters == other._colorInterpolationFilters)
&& (_writingMode == other._writingMode)
&& (_glyphOrientationHorizontal == other._glyphOrientationHorizontal)
- && (_glyphOrientationVertical == other._glyphOrientationVertical);
+ && (_glyphOrientationVertical == other._glyphOrientationVertical)
+ && (_paintOrder == other._paintOrder);
}
bool operator!=(const InheritedFlags& other) const
@@ -400,6 +405,7 @@ protected:
unsigned _writingMode : 3; // SVGWritingMode
unsigned _glyphOrientationHorizontal : 3; // EGlyphOrientation
unsigned _glyphOrientationVertical : 3; // EGlyphOrientation
+ unsigned _paintOrder : 6; // EPaintOrder
} svg_inherited_flags;
// don't inherit
@@ -455,6 +461,7 @@ private:
svg_inherited_flags._writingMode = initialWritingMode();
svg_inherited_flags._glyphOrientationHorizontal = initialGlyphOrientationHorizontal();
svg_inherited_flags._glyphOrientationVertical = initialGlyphOrientationVertical();
+ svg_inherited_flags._paintOrder = initialPaintOrder();
svg_noninherited_flags._niflags = 0;
svg_noninherited_flags.f._alignmentBaseline = initialAlignmentBaseline();

Powered by Google App Engine
This is Rietveld 408576698