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

Side by Side Diff: third_party/WebKit/LayoutTests/intersection-observer/client-rect.html

Issue 2046113002: IntersectionObserver: use border bounding box for target rect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/intersection-observer/client-rect-expected.txt » ('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/js-test.js"></script>
3 <script src="../resources/intersection-observer-helper-functions.js"></script>
4 <iframe id="iframe" srcdoc="<div id='target'><div style='width:1000px;height:100 0px'></div></div>"></iframe>
5 <script>
6 description("Ensure that change.boundingClientRect matches change.target.getBoun dingClientRect() for a clipped element with overflow inside an iframe.");
7
8 var iframe = document.getElementById("iframe");
9 var entries = [];
10 var target;
11
12 iframe.onload = function() {
13 target = iframe.contentDocument.getElementById("target");
14 new IntersectionObserver((changes) => {
15 entries.push(...changes);
16 }).observe(target);
17 waitForNotification(step0);
18 };
19
20 function step0() {
21 shouldBeEqualToNumber("entries.length", 1);
22 if (entries.length > 0) {
23 shouldBe("entries[0].boundingClientRect.top", "target.getBoundingClientRect( ).top");
24 shouldBe("entries[0].boundingClientRect.left", "target.getBoundingClientRect ().left");
25 shouldBe("entries[0].boundingClientRect.width", "target.getBoundingClientRec t().width");
26 shouldBe("entries[0].boundingClientRect.height", "target.getBoundingClientRe ct().height");
27 }
28 finishJSTest();
29 }
30 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/intersection-observer/client-rect-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698