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

Unified Diff: LayoutTests/fast/text/selection-with-inline-padding.html

Issue 331303004: Fix selection rect calculation for inline elements with padding (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 6 years, 6 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
Index: LayoutTests/fast/text/selection-with-inline-padding.html
diff --git a/LayoutTests/fast/text/selection-with-inline-padding.html b/LayoutTests/fast/text/selection-with-inline-padding.html
new file mode 100644
index 0000000000000000000000000000000000000000..56c2a6c19b206dbcb3fd1d9576ce98a6b60b96fb
--- /dev/null
+++ b/LayoutTests/fast/text/selection-with-inline-padding.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test paddings and selection for inline elements</title>
+ <style>
+ p > b, pre > b { padding: 10px; }
+ </style>
+ </head>
+ <body>
+ <p>
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.<br>
+ <b id="test">Sed dictum erat sit amet pharetra pretium.</b><br>
+ Nullam a est vitae orci tempus tincidunt nec at dolor.
+ </p>
+ <p>
+ Tests that selections do not include padding in the Y direction for
+ inline elements where it should be ignored.
+ </p>
+ <script>
+ var node = document.getElementById('test').firstChild;
+ var range = document.createRange();
+ range.setStart(node, 5);
+ range.setEnd(node, node.length - 5);
+ window.getSelection().addRange(range);
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698