New issue
Advanced search Search tips

Issue 613679 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 613664



Sign in to add a comment

IntersectionObserver should order notifications by time and observe() order

Project Member Reported by szager@chromium.org, May 20 2016

Issue description

When IntersectionObserver runs a callback with changes for multiple target elements, the changes should be ordered first by notification time, and then by the order in which observe() was called on the target elements.

Currently, they are sorted by time, but for notifications with identical times, the order is unstable.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b69c620b66c4953805cb94cd87ebf057e43add17

commit b69c620b66c4953805cb94cd87ebf057e43add17
Author: szager <szager@chromium.org>
Date: Thu Jun 02 06:40:55 2016

IntersectionObserver: make order of notifications deterministic.

The order of IntersectionObserverEntry objects sent to the callback
should be ordered by 1) time, and 2) order in which the target
elements were observe()'ed.

BUG= 613679 
R=ojan@chromium.org,eae@chromium.org

Review-Url: https://codereview.chromium.org/2028363002
Cr-Commit-Position: refs/heads/master@{#397317}

[add] https://crrev.com/b69c620b66c4953805cb94cd87ebf057e43add17/third_party/WebKit/LayoutTests/intersection-observer/multiple-targets-expected.txt
[add] https://crrev.com/b69c620b66c4953805cb94cd87ebf057e43add17/third_party/WebKit/LayoutTests/intersection-observer/multiple-targets.html
[modify] https://crrev.com/b69c620b66c4953805cb94cd87ebf057e43add17/third_party/WebKit/Source/core/dom/IntersectionObserver.h

Status: Fixed (was: Untriaged)

Sign in to add a comment