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

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

Issue 2163213007: Deprecate currentView, useCurrentView properties of SVGSVGElement and SVGViewSpec interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/core.gypi ('k') | third_party/WebKit/Source/core/svg/SVGSVGElement.idl » ('j') | 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 10ded6d7cdffa2533f11d42e047733da4873ec98..b52700b10a500affe8075a2c68c3e8aebffd22ee 100644
--- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -636,16 +636,7 @@ AffineTransform SVGSVGElement::viewBoxToViewTransform(float viewWidth, float vie
if (!m_useCurrentView || !m_viewSpec)
return SVGFitToViewBox::viewBoxToViewTransform(currentViewBoxRect(), preserveAspectRatio()->currentValue(), viewWidth, viewHeight);
- AffineTransform ctm = SVGFitToViewBox::viewBoxToViewTransform(currentViewBoxRect(), m_viewSpec->preserveAspectRatio()->currentValue(), viewWidth, viewHeight);
- SVGTransformList* transformList = m_viewSpec->transform();
- if (transformList->isEmpty())
- return ctm;
-
- AffineTransform transform;
- if (transformList->concatenate(transform))
- ctm *= transform;
-
- return ctm;
+ return SVGFitToViewBox::viewBoxToViewTransform(currentViewBoxRect(), m_viewSpec->preserveAspectRatio()->currentValue(), viewWidth, viewHeight);;
}
void SVGSVGElement::setupInitialView(const String& fragmentIdentifier, Element* anchorNode)
@@ -658,24 +649,6 @@ void SVGSVGElement::setupInitialView(const String& fragmentIdentifier, Element*
bool hadUseCurrentView = m_useCurrentView;
m_useCurrentView = false;
- if (fragmentIdentifier.startsWith("svgView(")) {
fs 2016/07/21 13:08:27 This is still in the spec AFAIK. the only thing th
foolip 2016/07/22 04:44:39 Hmm, so this gets at the same thing I'm wondering
fs 2016/07/22 08:31:38 Just of the top of my head, some simplifications w
- if (!view)
- view = currentView(); // Create the SVGViewSpec.
-
- view->inheritViewAttributesFromElement(this);
-
- if (view->parseViewSpec(fragmentIdentifier)) {
- UseCounter::count(document(), UseCounter::SVGSVGElementFragmentSVGView);
- m_useCurrentView = true;
- } else {
- view->reset();
- }
-
- if (layoutObject && (hadUseCurrentView || m_useCurrentView))
- markForLayoutAndParentResourceInvalidation(layoutObject);
- return;
- }
-
// Spec: If the SVG fragment identifier addresses a 'view' element within an SVG document (e.g., MyDrawing.svg#MyView
// or MyDrawing.svg#xpointer(id('MyView'))) then the closest ancestor 'svg' element is displayed in the viewport.
// Any view specification attributes included on the given 'view' element override the corresponding view specification
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/svg/SVGSVGElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698