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

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

Issue 2537223006: Cleanup after removal of the SVGViewSpec interface (Closed)
Patch Set: SVGViewSpec& Created 4 years 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/svg/SVGFitToViewBox.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGFitToViewBox.cpp b/third_party/WebKit/Source/core/svg/SVGFitToViewBox.cpp
index f4234dee81b8875c7cd63a6bf3b7f0d7bd37bea6..35200bae3d3a9bde67364eb2800548187fa58331 100644
--- a/third_party/WebKit/Source/core/svg/SVGFitToViewBox.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGFitToViewBox.cpp
@@ -21,13 +21,10 @@
#include "core/svg/SVGFitToViewBox.h"
-#include "core/dom/Attribute.h"
-#include "core/svg/SVGDocumentExtensions.h"
#include "core/svg/SVGElement.h"
-#include "core/svg/SVGParserUtilities.h"
+#include "core/svg/SVGParsingError.h"
#include "platform/geometry/FloatRect.h"
#include "platform/transforms/AffineTransform.h"
-#include "wtf/text/StringImpl.h"
namespace blink {
@@ -56,17 +53,14 @@ SVGParsingError SVGAnimatedViewBoxRect::setBaseValueAsString(
return parseStatus;
}
-SVGFitToViewBox::SVGFitToViewBox(SVGElement* element,
- PropertyMapPolicy propertyMapPolicy)
+SVGFitToViewBox::SVGFitToViewBox(SVGElement* element)
: m_viewBox(SVGAnimatedViewBoxRect::create(element)),
m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create(
element,
SVGNames::preserveAspectRatioAttr)) {
- ASSERT(element);
- if (propertyMapPolicy == PropertyMapPolicyAdd) {
- element->addToPropertyMap(m_viewBox);
- element->addToPropertyMap(m_preserveAspectRatio);
- }
+ DCHECK(element);
+ element->addToPropertyMap(m_viewBox);
+ element->addToPropertyMap(m_preserveAspectRatio);
}
DEFINE_TRACE(SVGFitToViewBox) {
@@ -93,9 +87,4 @@ bool SVGFitToViewBox::isKnownAttribute(const QualifiedName& attrName) {
attrName == SVGNames::preserveAspectRatioAttr;
}
-void SVGFitToViewBox::updateViewBox(const FloatRect& rect) {
- ASSERT(m_viewBox);
- m_viewBox->baseValue()->setValue(rect);
-}
-
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGFitToViewBox.h ('k') | third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698