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

Unified Diff: LayoutTests/compositing/overflow/selection-gaps.html

Issue 303253004: Allow proper highlighting on universal overflow scroll. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/compositing/overflow/selection-gaps.html
diff --git a/LayoutTests/compositing/overflow/selection-gaps.html b/LayoutTests/compositing/overflow/selection-gaps.html
new file mode 100644
index 0000000000000000000000000000000000000000..3a1133bfb14850d7d1e3bbd7f6cafc508e727f21
--- /dev/null
+++ b/LayoutTests/compositing/overflow/selection-gaps.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
Ian Vollick 2014/05/31 01:17:36 You can skip the html, head and body.
hartmanng 2014/06/02 20:23:58 Done.
+<head>
+<style>
+ .container {
+ height: 500px;
+ width: 300px;
+ overflow: scroll;
+ }
+
+ .scrolled {
+ height: 50px;
+ width: 100px;
+ background: orange;
+ margin: 15px;
+ transform: translateZ(0);
+ }
+</style>
+<script>
+ if (window.internals)
+ window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
+
+ function doTest()
Ian Vollick 2014/05/31 01:17:36 nit: I find this a little cuter. onload = functio
hartmanng 2014/06/02 20:23:58 Done.
+ {
+ var selection = getSelection();
+
+ var range = document.createRange();
+ range.selectNode(document.getElementById("selection"));
+ selection.addRange(range);
+ }
+
+ window.onload = doTest;
+</script>
+</head>
+<body>
+
+This test passes if the highlighted area includes the gaps between scrolled children.
+
+<div class="container">
+ <div class="scrolled">Lorem Ipsum</div>
+ <div class="scrolled">Lorem Ipsum</div>
+ <div class="scrolled" id="selection">Lorem Ipsum</div>
+ <div class="scrolled">Lorem Ipsum</div>
+ <div class="scrolled">Lorem Ipsum</div>
+ <div class="scrolled">Lorem Ipsum</div>
+ <div class="scrolled">Lorem Ipsum</div>
+ <div class="scrolled">Lorem Ipsum</div>
+ <div class="scrolled">Lorem Ipsum</div>
+ <div class="scrolled">Lorem Ipsum</div>
+</div>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698