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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2416693002: Don't expand empty rect during rect mapping (Closed)
Patch Set: Rebaseline Created 4 years, 2 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/LayoutTests/platform/win/svg/transforms/text-with-pattern-inside-transformed-html-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 91f24af7830c77cb38e2ba32e72d14cb5c2dec08..6c86ce92d863e140f42445988c3325b06ed7d0c0 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -2328,7 +2328,9 @@ bool LayoutBox::mapToVisualRectInAncestorSpace(
// for painted elements within the transform since we don't know the desired
// subpixel accumulation at this point, and the transform may include a
// scale.
- rect = LayoutRect(layer()->transform()->mapRect(enclosingIntRect(rect)));
+ FloatRect floatRect =
+ rect.isEmpty() ? FloatRect(rect) : FloatRect(enclosingIntRect(rect));
+ rect = LayoutRect(layer()->transform()->mapRect(floatRect));
}
LayoutPoint topLeft = rect.location();
if (container->isBox()) {
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/svg/transforms/text-with-pattern-inside-transformed-html-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698