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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp

Issue 2512493003: Avoid special handling of LayoutSVGForeignObject about its paint offset (Closed)
Patch Set: - Created 4 years, 1 month 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/layout/svg/LayoutSVGForeignObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp
index f3417a6c3cd280c1df0482f9054b06d3cbdfd990..0457225f9d5283208d32a8a9ad263c9349ea93e9 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp
@@ -90,10 +90,10 @@ void LayoutSVGForeignObject::layout() {
// Cache viewport boundaries
SVGLengthContext lengthContext(foreign);
FloatPoint viewportLocation(
- lengthContext.valueForLength(styleRef().svgStyle().x(), styleRef(),
- SVGLengthMode::Width),
- lengthContext.valueForLength(styleRef().svgStyle().y(), styleRef(),
- SVGLengthMode::Height));
+ roundf(lengthContext.valueForLength(styleRef().svgStyle().x(), styleRef(),
+ SVGLengthMode::Width)),
+ roundf(lengthContext.valueForLength(styleRef().svgStyle().y(), styleRef(),
+ SVGLengthMode::Height)));
m_viewport = FloatRect(
viewportLocation,
FloatSize(lengthContext.valueForLength(styleRef().width(), styleRef(),
@@ -108,10 +108,7 @@ void LayoutSVGForeignObject::layout() {
// would pull this information from ComputedStyle - in SVG those properties
// are ignored for non <svg> elements, so we mimic what happens when
// specifying them through CSS.
-
- // FIXME: Investigate in location rounding issues - only affects
- // LayoutSVGForeignObject & LayoutSVGText
- setLocation(roundedIntPoint(viewportLocation));
+ setLocation(LayoutPoint(viewportLocation));
bool layoutChanged = everHadLayout() && selfNeedsLayout();
LayoutBlock::layout();

Powered by Google App Engine
This is Rietveld 408576698