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

Unified Diff: third_party/WebKit/LayoutTests/svg/hittest/empty-container.html

Issue 2234173002: Skip hit testing containers with invalid bounding boxes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address reviewer comments Created 4 years, 4 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/LayoutSVGContainer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/svg/hittest/empty-container.html
diff --git a/third_party/WebKit/LayoutTests/svg/hittest/empty-container.html b/third_party/WebKit/LayoutTests/svg/hittest/empty-container.html
new file mode 100644
index 0000000000000000000000000000000000000000..6df26ab1ddcc6672a10774b50d4f591ce0af019c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/hittest/empty-container.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<title>Hit testing an empty container should not crash.</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+ * {
+ margin: 0;
+ }
+ svg {
+ pointer-events: bounding-box;
+ }
+</style>
+<svg id="svg" width="200" height="200">
+ <g></g>
+</svg>
+<script>
+ test(function() {
+ var checkOrigin = document.elementFromPoint(0, 0);
+ assert_equals(checkOrigin, svg, "element @ 0, 0");
+
+ var checkPoint = document.elementFromPoint(50, 50);
+ assert_equals(checkPoint, svg, "element @ 50, 50");
+ });
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698