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

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

Issue 2115803002: Clean up naming in ComputedStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/style/SVGComputedStyle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/SVGComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/SVGComputedStyle.cpp b/third_party/WebKit/Source/core/style/SVGComputedStyle.cpp
index 35be21707f76ed749c2ba59a24e98fc38fc29988..1034cbcb90a6331a44cd31bdc9c9fbbc4787c701 100644
--- a/third_party/WebKit/Source/core/style/SVGComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/SVGComputedStyle.cpp
@@ -80,23 +80,25 @@ SVGComputedStyle::~SVGComputedStyle()
bool SVGComputedStyle::operator==(const SVGComputedStyle& other) const
{
+ return inheritedEqual(other)
+ && nonInheritedEqual(other);
+}
+
+bool SVGComputedStyle::inheritedEqual(const SVGComputedStyle& other) const
+{
return fill == other.fill
&& stroke == other.stroke
- && stops == other.stops
- && misc == other.misc
&& inheritedResources == other.inheritedResources
- && geometry == other.geometry
- && resources == other.resources
- && svg_inherited_flags == other.svg_inherited_flags
- && svg_noninherited_flags == other.svg_noninherited_flags;
+ && svg_inherited_flags == other.svg_inherited_flags;
}
-bool SVGComputedStyle::inheritedNotEqual(const SVGComputedStyle* other) const
+bool SVGComputedStyle::nonInheritedEqual(const SVGComputedStyle& other) const
{
- return fill != other->fill
- || stroke != other->stroke
- || inheritedResources != other->inheritedResources
- || svg_inherited_flags != other->svg_inherited_flags;
+ return stops == other.stops
+ && misc == other.misc
+ && geometry == other.geometry
+ && resources == other.resources
+ && svg_noninherited_flags == other.svg_noninherited_flags;
}
void SVGComputedStyle::inheritFrom(const SVGComputedStyle* svgInheritParent)
« no previous file with comments | « third_party/WebKit/Source/core/style/SVGComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698