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

Unified Diff: third_party/WebKit/Source/core/style/SVGComputedStyle.h

Issue 1439793003: SVG: Promote d to a property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CSSPropertyParser Created 5 years, 1 month 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: third_party/WebKit/Source/core/style/SVGComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/SVGComputedStyle.h b/third_party/WebKit/Source/core/style/SVGComputedStyle.h
index f8925f1c3a6dd041bab6ccb4265330117ddca37f..348ef800df82c02d1635597b6dcac9305647b9ef 100644
--- a/third_party/WebKit/Source/core/style/SVGComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/SVGComputedStyle.h
@@ -90,6 +90,7 @@ public:
static const AtomicString& initialMarkerEndResource() { return nullAtom; }
static EMaskType initialMaskType() { return MT_LUMINANCE; }
static EPaintOrder initialPaintOrder() { return PaintOrderNormal; }
+ static const SVGPathByteStream* initialD() { return nullptr; }
fs 2015/11/26 12:51:40 It feels like having a "template" - empty path obj
Eric Willigers 2015/12/10 23:52:52 I like the template empty path object, but who sho
fs 2015/12/11 13:01:58 It looks like you handled this in the way at least
static Length initialCx() { return Length(Fixed); }
static Length initialCy() { return Length(Fixed); }
static Length initialX() { return Length(Fixed); }
@@ -115,6 +116,15 @@ public:
void setTextAnchor(ETextAnchor val) { svg_inherited_flags.textAnchor = val; }
void setMaskType(EMaskType val) { svg_noninherited_flags.f.maskType = val; }
void setPaintOrder(EPaintOrder val) { svg_inherited_flags.paintOrder = (int)val; }
+ void setD(const SVGPathByteStream* d)
+ {
+ if (d) {
+ if (!layout->d || !(*layout->d == *d))
+ layout.access()->d = d->copy();
+ } else if (layout->d) {
+ layout.access()->d->clear();
+ }
+ }
void setCx(const Length& obj)
{
if (!(layout->cx == obj))
@@ -333,6 +343,7 @@ public:
const Color& floodColor() const { return misc->floodColor; }
const Color& lightingColor() const { return misc->lightingColor; }
const Length& baselineShiftValue() const { return misc->baselineShiftValue; }
+ const SVGPathByteStream* d() const { return layout->d.get(); }
const Length& cx() const { return layout->cx; }
const Length& cy() const { return layout->cy; }
const Length& x() const { return layout->x; }

Powered by Google App Engine
This is Rietveld 408576698