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

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

Issue 2858913002: Simplify the SVGGraphicsElement ...CTM methods (Closed)
Patch Set: Created 3 years, 8 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
Index: third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp b/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
index b6e36cdc2feffc6060d2ca9d30c7bd0867b4be70..2f3cc1d4b15afd06163531642489e7e39c75405f 100644
--- a/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
@@ -57,11 +57,7 @@ static bool IsViewportElement(const Element& element) {
AffineTransform SVGGraphicsElement::ComputeCTM(
SVGElement::CTMScope mode,
- SVGGraphicsElement::StyleUpdateStrategy style_update_strategy,
const SVGGraphicsElement* ancestor) const {
- if (style_update_strategy == kAllowStyleUpdate)
- GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets();
-
AffineTransform ctm;
bool done = false;
@@ -88,26 +84,19 @@ AffineTransform SVGGraphicsElement::ComputeCTM(
break;
}
}
-
return ctm;
}
-AffineTransform SVGGraphicsElement::GetCTM(
- StyleUpdateStrategy style_update_strategy) {
- return ComputeCTM(kNearestViewportScope, style_update_strategy);
-}
+SVGMatrixTearOff* SVGGraphicsElement::getCTM() {
+ GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
-AffineTransform SVGGraphicsElement::GetScreenCTM(
- StyleUpdateStrategy style_update_strategy) {
- return ComputeCTM(kScreenScope, style_update_strategy);
+ return SVGMatrixTearOff::Create(ComputeCTM(kNearestViewportScope));
}
-SVGMatrixTearOff* SVGGraphicsElement::getCTMFromJavascript() {
- return SVGMatrixTearOff::Create(GetCTM());
-}
+SVGMatrixTearOff* SVGGraphicsElement::getScreenCTM() {
+ GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
-SVGMatrixTearOff* SVGGraphicsElement::getScreenCTMFromJavascript() {
- return SVGMatrixTearOff::Create(GetScreenCTM());
+ return SVGMatrixTearOff::Create(ComputeCTM(kScreenScope));
}
void SVGGraphicsElement::CollectStyleForPresentationAttribute(
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGGraphicsElement.h ('k') | third_party/WebKit/Source/core/svg/SVGGraphicsElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698