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

Unified Diff: third_party/WebKit/Source/core/svg/SVGSVGElement.cpp

Issue 1601093007: Simplify SVGSVGElement::collectStyleForPresentationAttribute (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | 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/svg/SVGSVGElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
index 99a5b38f94380981543fa6f435ba48c503dab16f..8396da82d84b5625cb78d835e502096fc425e1a2 100644
--- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -263,9 +263,8 @@ void SVGSVGElement::collectStyleForPresentationAttribute(const QualifiedName& na
void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName)
{
bool updateRelativeLengthsOrViewBox = false;
- bool widthChanged = attrName == SVGNames::widthAttr;
- bool heightChanged = attrName == SVGNames::heightAttr;
- if (widthChanged || heightChanged
+ bool widthOrHeightChanged = attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr;
+ if (widthOrHeightChanged
|| attrName == SVGNames::xAttr
|| attrName == SVGNames::yAttr) {
updateRelativeLengthsOrViewBox = true;
@@ -279,7 +278,7 @@ void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName)
// FIXME: For width/height animated as XML attributes on SVG
// roots, there is an attribute synchronization missing. See
// http://crbug.com/364807
- if (widthChanged || heightChanged) {
+ if (widthOrHeightChanged) {
LayoutObject* layoutObject = this->layoutObject();
if (layoutObject && layoutObject->isSVGRoot()) {
invalidateSVGPresentationAttributeStyle();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698