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

Side by Side Diff: LayoutTests/fast/loader/scroll-restore-target-pseudo.html

Issue 1165233002: Apply :target styling even if fragment scrolling was skipped. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <script src="../../resources/run-after-layout-and-paint.js"></script>
4 <style>
5 #frag {
6 background-color: #ccc;
7 display: block;
8 height: 100px;
9 position: absolute;
10 top: 150px;
11 width: 100px;
12 }
13 #frag:target {
14 width: 200px;
15 }
16 </style>
17 <p>
18 Tests that a :target pseudo selector is correctly applied, even when history
19 scroll restoration suppresses scrolling to the fragment.
20 </p>
21 <div id="console"></div>
22 <a id="frag" name="frag"></a>
23 <script>
24
25 jsTestIsAsync = true;
26 if (location.hash == "") {
27 runAfterLayoutAndPaint(function() {
28 location.hash = 'frag';
29 location.reload();
30 });
31 } else {
32 runAfterLayoutAndPaint(function() {
33 shouldBe(String(document.querySelector("#frag").clientWidth), '200');
34 history.back();
35 finishJSTest();
36 });
37 }
38
39 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/loader/scroll-restore-target-pseudo-expected.txt » ('j') | Source/core/frame/FrameView.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698