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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/loader/clamping-preserves-fragment-anchor.html

Issue 2474813002: Clamping shouldn't clear the fragment anchor. (Closed)
Patch Set: address review comments Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/loader/fragment-anchor-cleared-after-load.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <style>
5
6 body { height: 1400px; }
7 body.shrink { height: 1000px; }
8
9 #anchor {
10 display: block;
11 position: absolute;
12 width: 100px;
13 height: 100px;
14 background-color: #fdd;
15 left: 200px;
16 top: 600px;
17 }
18
19 </style>
20 <a id="anchor" name="foo"></a>
21 <script>
22
23 test(function(t) {
24 location.hash = "#foo";
25 assert_equals(scrollY, 600);
26 document.body.className = "shrink";
27 document.body.offsetHeight; // Force layout.
28 anchor.style.top = "200px";
29 assert_equals(scrollY, 200);
30 }, "Preserve fragment anchor if clamping occurs during load.");
31
32 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/loader/fragment-anchor-cleared-after-load.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698