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

Side by Side Diff: third_party/WebKit/LayoutTests/intersection-observer/zero-area-element-hidden.html

Issue 2556243003: IntersectionObserver: compute correct intersection ratio for 0x0 elements (Closed)
Patch Set: Logic fix Created 4 years 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/zero-area-element-visible.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/intersection-observer-helper-functions.js"></script>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5
6 <title>Ensure that a hidden zero-area element is treated correctly</title>
7
8 <div id='target' style='width: 0px; height: 0px; position: fixed; top: -1000px'< /div>"
9
10 <script>
11 'use strict';
12
13 async_test(t => {
14 let target = document.getElementById('target');
15 let entries = [];
16 new IntersectionObserver(changes => {
17 entries.push(...changes);
18 }).observe(target);
19 waitForNotification(t.step_func_done(() => {
20 // Since the element is initially assumed to be hidden, there are no entries .
21 assert_equals(entries.length, 0);
22 }));
23 });
24 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/intersection-observer/zero-area-element-visible.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698