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

Unified Diff: LayoutTests/fast/borders/border-hittest-inlineFlowBox.html

Issue 1034433003: Hittest for RootInlineBox/InlineFlowBox should take care of border-radius. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 | LayoutTests/fast/borders/border-hittest-inlineFlowBox-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/borders/border-hittest-inlineFlowBox.html
diff --git a/LayoutTests/fast/borders/border-hittest-inlineFlowBox.html b/LayoutTests/fast/borders/border-hittest-inlineFlowBox.html
new file mode 100644
index 0000000000000000000000000000000000000000..cbca48d1e7c61088981ba4c77b125592a7835f72
--- /dev/null
+++ b/LayoutTests/fast/borders/border-hittest-inlineFlowBox.html
@@ -0,0 +1,63 @@
+<!doctype html>
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<style>
+span {
+ background-color: lightgray;
+ border-radius: 2em;
+ padding: 1em;
+ line-height: 4em;
+}
+
+label {
+ padding: 2em;
+ background-color: lightgreen;
+ border-radius: 2em;
+}
+
+div {
+ margin: 2em;
+}
+</style>
+</head>
+<body>
+<div>
+<span id="A">
+Two lines with <br/>a hard line break.
+</span>
+</div>
+<div>
+<span id="B">B<label id="C">C</label></span>
+</div>
+<div>
+<span id="D" style="padding: 2em;">D<label id="E" style="padding: 1em;">E</label></span>
+</div>
+<div id="console"></div>
+</body>
+<script>
+description('If this test passes, area outside border radius is body element.');
+
+var rects = document.getElementById('A').getClientRects();
+var elementInTopLeftCorner = document.elementFromPoint(rects[0].left, rects[0].top);
+shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'DIV');
+elementInTopLeftCorner = document.elementFromPoint(rects[1].left, rects[1].top);
+shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'SPAN');
+
+var rect = document.getElementById('B').getBoundingClientRect();
+elementInTopLeftCorner = document.elementFromPoint(rect.left, rect.top);
+shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'DIV');
+
+rect = document.getElementById('C').getBoundingClientRect();
+elementInTopLeftCorner = document.elementFromPoint(rect.left, rect.top);
+shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'BODY');
+
+rect = document.getElementById('D').getBoundingClientRect();
+elementInTopLeftCorner = document.elementFromPoint(rect.left, rect.top);
+shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'BODY');
+
+rect = document.getElementById('E').getBoundingClientRect();
+elementInTopLeftCorner = document.elementFromPoint(rect.left, rect.top);
+shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'SPAN');
+</script>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/borders/border-hittest-inlineFlowBox-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698