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

Unified Diff: LayoutTests/fast/events/hit-test-culled_inline.html

Issue 685963002: We need to account for culled inline parents of the hit-tested nodes.(Reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | LayoutTests/fast/events/hit-test-culled_inline-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/hit-test-culled_inline.html
diff --git a/LayoutTests/fast/events/hit-test-culled_inline.html b/LayoutTests/fast/events/hit-test-culled_inline.html
new file mode 100644
index 0000000000000000000000000000000000000000..1ee9100e2cfef2ecc48b1e3ba129e606dd9cee9d
--- /dev/null
+++ b/LayoutTests/fast/events/hit-test-culled_inline.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<style type="text/css">
+input, em { cursor: pointer; margin-right: 100px; }
+label, span { cursor: pointer; background: transparent; }
+</style>
+<script src="../../resources/js-test.js"></script>
+<div><label id="label" for="checkbox"><input id="checkbox" type="checkbox">Click the empty area on the left</input></label></div>
+<div><span id="span"><em id="em">Click the empty area</em><em>in middle</em></span></div>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+ description('Click event should be fired when it occurs within culled inline.');
+
+ function hitTest(id) {
+ var element = document.getElementById(id);
+ var parent = element.parentElement;
+ x = element.offsetLeft + element.offsetWidth + 10;
+ y = element.offsetTop + element.offsetHeight / 2;
+ parent.addEventListener('click', function(e) {
+ debug(parent.nodeName + ' that is a parent of ' + element.nodeName + ' is clicked.');
Rick Byers 2014/11/11 17:19:16 Thanks for the refactor, but now we've lost the ex
+ e.preventDefault();
+ });
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ }
+ if (window.eventSender) {
+ hitTest('checkbox');
Rick Byers 2014/11/11 17:19:16 you've also lost your test that verifies the check
+ hitTest('em');
+ }
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/events/hit-test-culled_inline-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698