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

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

Issue 933663002: Make use of new method for setting lengths in presentation style. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/svg/SVGImageElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGSVGElement.cpp
diff --git a/Source/core/svg/SVGSVGElement.cpp b/Source/core/svg/SVGSVGElement.cpp
index 878c47ad9c2d01254c655bcade4129a9a51e10a0..13b528a4fa2ae27fc6d5aa377a0449050dc3fa55 100644
--- a/Source/core/svg/SVGSVGElement.cpp
+++ b/Source/core/svg/SVGSVGElement.cpp
@@ -265,15 +265,10 @@ void SVGSVGElement::collectStyleForPresentationAttribute(const QualifiedName& na
} else if (property == m_y) {
addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyY, *m_y->currentValue());
} else if (isOutermostSVGSVGElement() && (property == m_width || property == m_height)) {
fs 2015/02/16 17:34:32 I guess this (isOutermostSVGSVGElement predicate)
Erik Dahlström (inactive) 2015/02/17 08:06:26 Yes, but I think it's best to do that in another C
- RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create(LengthModeOther);
- TrackExceptionState exceptionState;
- length->setValueAsString(value, exceptionState);
- if (!exceptionState.hadException()) {
- if (property == m_width)
- addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, value);
- else if (property == m_height)
- addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, value);
- }
+ if (property == m_width)
+ addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, *m_width->currentValue());
+ else if (property == m_height)
+ addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, *m_height->currentValue());
} else {
SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, style);
}
« no previous file with comments | « Source/core/svg/SVGImageElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698