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

Unified Diff: Source/core/layout/style/SVGLayoutStyle.cpp

Issue 896773002: [svg2] Make 'x' and 'y' presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 10 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
« no previous file with comments | « Source/core/layout/style/SVGLayoutStyle.h ('k') | Source/core/layout/style/SVGLayoutStyleDefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/style/SVGLayoutStyle.cpp
diff --git a/Source/core/layout/style/SVGLayoutStyle.cpp b/Source/core/layout/style/SVGLayoutStyle.cpp
index 6c3062cd9996c333d23d97db3719226a54dcc9fd..fdd9c3aaeb494aa3f15922cd59a1a5dad0d08fbc 100644
--- a/Source/core/layout/style/SVGLayoutStyle.cpp
+++ b/Source/core/layout/style/SVGLayoutStyle.cpp
@@ -40,6 +40,7 @@ SVGLayoutStyle::SVGLayoutStyle()
stops = defaultStyle->stops;
misc = defaultStyle->misc;
inheritedResources = defaultStyle->inheritedResources;
+ layout = defaultStyle->layout;
resources = defaultStyle->resources;
setBitDefaults();
@@ -54,6 +55,7 @@ SVGLayoutStyle::SVGLayoutStyle(CreateDefaultType)
stops.init();
misc.init();
inheritedResources.init();
+ layout.init();
resources.init();
}
@@ -65,6 +67,7 @@ SVGLayoutStyle::SVGLayoutStyle(const SVGLayoutStyle& other)
stops = other.stops;
misc = other.misc;
inheritedResources = other.inheritedResources;
+ layout = other.layout;
resources = other.resources;
svg_inherited_flags = other.svg_inherited_flags;
@@ -82,6 +85,7 @@ bool SVGLayoutStyle::operator==(const SVGLayoutStyle& other) const
&& stops == other.stops
&& misc == other.misc
&& inheritedResources == other.inheritedResources
+ && layout == other.layout
&& resources == other.resources
&& svg_inherited_flags == other.svg_inherited_flags
&& svg_noninherited_flags == other.svg_noninherited_flags;
@@ -112,6 +116,7 @@ void SVGLayoutStyle::copyNonInheritedFrom(const SVGLayoutStyle* other)
svg_noninherited_flags = other->svg_noninherited_flags;
stops = other->stops;
misc = other->misc;
+ layout = other->layout;
resources = other->resources;
}
@@ -177,6 +182,13 @@ bool SVGLayoutStyle::diffNeedsLayoutAndPaintInvalidation(const SVGLayoutStyle* o
return true;
}
+ // The x and y properties require a re-layout.
+ if (layout.get() != other->layout.get()) {
+ if (layout->x != other->layout->x
+ || layout->y != other->layout->y)
+ return true;
+ }
+
return false;
}
« no previous file with comments | « Source/core/layout/style/SVGLayoutStyle.h ('k') | Source/core/layout/style/SVGLayoutStyleDefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698