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

Unified Diff: third_party/WebKit/LayoutTests/fast/scrolling/hashtag-autoscroll.html

Issue 2339653003: Enable the scroll of empty elements by setting the rect's size to 1. (Closed)
Patch Set: Rebase and format Created 4 years, 3 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/LayoutBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/scrolling/hashtag-autoscroll.html
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/hashtag-autoscroll.html b/third_party/WebKit/LayoutTests/fast/scrolling/hashtag-autoscroll.html
new file mode 100644
index 0000000000000000000000000000000000000000..2ee462791fc0a260051a69c358eb352fe5e5da4b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/hashtag-autoscroll.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<div style="overflow-x:hidden">
bokan 2016/09/14 21:43:15 Is this div needed?
sunyunjia 2016/09/14 23:58:39 Yes. This div hasOverflowClip(), making it goto if
bokan 2016/09/15 13:15:21 Got it, thanks.
+ <div id="click" ><a href="#anchor">Click me should jump to the anchor</a></div>
+ <div style="height: 2000px"></div>
+ <a id="anchor"></a>
+ <p>Text</p>
+ <div style="height: 2000px"></div>
+</div>
+<script>
+test(function() {
+ if (!window.eventSender)
+ return;
+ var click = document.getElementById("click");
+ var x = click.offsetLeft + 5;
+ var y = click.offsetTop + 5;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ assert_not_equals(window.scrollY, 0);
+}, "Tests that when the anchor's layoutbox is empty, we can still jump to it by hashtag");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698