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

Unified Diff: third_party/WebKit/LayoutTests/svg/text/text-bbox-empty.html

Issue 1661983002: Don't propagate bbox for empty <text> to ancestors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | third_party/WebKit/Source/core/layout/svg/LayoutSVGText.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/svg/text/text-bbox-empty.html
diff --git a/third_party/WebKit/LayoutTests/svg/text/text-bbox-empty.html b/third_party/WebKit/LayoutTests/svg/text/text-bbox-empty.html
new file mode 100644
index 0000000000000000000000000000000000000000..6cdd9ba7eff1f5b2838651729c2d5880204b4df4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/text/text-bbox-empty.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<svg height="0" font-size="100">
+ <svg id="container1">
+ <rect x="200" y="300" width="100" height="400"/>
+ <g id="container2">
+ <text transform="translate(1000, 1000)"></text>
+ </g>
+ <text> </text>
+ </svg>
+</svg>
+<script>
+test(function() {
+ var bbox = document.querySelector('#container1').getBBox();
+ assert_array_equals([bbox.x, bbox.y, bbox.width, bbox.height], [200, 300, 100, 400]);
+ var bbox = document.querySelector('#container2').getBBox();
+ assert_array_equals([bbox.x, bbox.y, bbox.width, bbox.height], [0, 0, 0, 0]);
+}, 'Empty <text> does not contribute to ancestor bounding boxes.');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/LayoutSVGText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698