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

Issue 2556243003: IntersectionObserver: compute correct intersection ratio for 0x0 elements (Closed)

Created:
4 years ago by Sami
Modified:
4 years ago
Reviewers:
szager1, foolip
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof, ojan
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

IntersectionObserver: compute correct intersection ratio for 0x0 elements When a 0x0 element is in view, its intersection ratio is defined[1] to be 1. BUG=662826 [1] https://wicg.github.io/IntersectionObserver/#update-intersection-observations-algo Committed: https://crrev.com/8296d3b0e6a755dabf607b78a259f86803699d88 Cr-Commit-Position: refs/heads/master@{#437617}

Patch Set 1 #

Total comments: 11

Patch Set 2 : Rewrite tests using testharness.js #

Patch Set 3 : Script sorting #

Total comments: 2

Patch Set 4 : Logic fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -12 lines) Patch
A third_party/WebKit/LayoutTests/intersection-observer/zero-area-element-hidden.html View 1 1 chunk +24 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/intersection-observer/zero-area-element-visible.html View 1 2 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/IntersectionObservation.cpp View 1 2 3 1 chunk +15 lines, -12 lines 0 comments Download

Messages

Total messages: 27 (17 generated)
Sami
4 years ago (2016-12-08 14:40:59 UTC) #5
foolip
One-liner LGTM % testharness.js tests. https://codereview.chromium.org/2556243003/diff/1/third_party/WebKit/LayoutTests/intersection-observer/zero-area-element-hidden.html File third_party/WebKit/LayoutTests/intersection-observer/zero-area-element-hidden.html (right): https://codereview.chromium.org/2556243003/diff/1/third_party/WebKit/LayoutTests/intersection-observer/zero-area-element-hidden.html#newcode2 third_party/WebKit/LayoutTests/intersection-observer/zero-area-element-hidden.html:2: <script src="../resources/js-test.js"></script> It looks ...
4 years ago (2016-12-08 16:28:59 UTC) #8
Z_DONOTUSE
4 years ago (2016-12-09 07:07:56 UTC) #10
Sami
Thanks for the testharness.js tip -- the tests look a lot cleaner this way. https://codereview.chromium.org/2556243003/diff/1/third_party/WebKit/LayoutTests/intersection-observer/zero-area-element-hidden.html ...
4 years ago (2016-12-09 17:24:36 UTC) #11
szager1
https://codereview.chromium.org/2556243003/diff/40001/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp File third_party/WebKit/Source/core/dom/IntersectionObservation.cpp (right): https://codereview.chromium.org/2556243003/diff/40001/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp#newcode56 third_party/WebKit/Source/core/dom/IntersectionObservation.cpp:56: newVisibleRatio = geometry.doesIntersect() ? 1 : 0; You also ...
4 years ago (2016-12-09 17:30:08 UTC) #14
Sami
https://codereview.chromium.org/2556243003/diff/40001/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp File third_party/WebKit/Source/core/dom/IntersectionObservation.cpp (right): https://codereview.chromium.org/2556243003/diff/40001/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp#newcode56 third_party/WebKit/Source/core/dom/IntersectionObservation.cpp:56: newVisibleRatio = geometry.doesIntersect() ? 1 : 0; On 2016/12/09 ...
4 years ago (2016-12-09 17:51:16 UTC) #15
szager1
lgtm, thanks.
4 years ago (2016-12-09 18:30:10 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2556243003/60001
4 years ago (2016-12-09 18:38:29 UTC) #22
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-12-09 20:16:20 UTC) #25
commit-bot: I haz the power
4 years ago (2016-12-12 14:37:12 UTC) #27
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/8296d3b0e6a755dabf607b78a259f86803699d88
Cr-Commit-Position: refs/heads/master@{#437617}

Powered by Google App Engine
This is Rietveld 408576698