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

Issue 1330633003: Intersection Observer first draft

Created:
5 years, 3 months ago by MikeB
Modified:
5 years, 3 months ago
Reviewers:
Ian Vollick, esprehn, adamk, ojan
CC:
blink-reviews, blink-reviews-bindings_chromium.org, blink-reviews-dom_chromium.org, blink-reviews-rendering, dglazkov+blink, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rwlbuis, sof, szager+layoutwatch_chromium.org, vivekg_samsung, vivekg, zoltan1, igrigorik, liberato (no reviews please)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Include new files as well. #

Total comments: 9

Patch Set 3 : Move intersectionObservers loop into LayoutView #

Patch Set 4 : Add LayoutTests #

Patch Set 5 : Fix segfault on null input. #

Total comments: 28

Patch Set 6 : Some code review comments. #

Patch Set 7 : Re-base after move for third_party/WebKit #

Patch Set 8 : Lost newline in merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+712 lines, -13 lines) Patch
A third_party/WebKit/LayoutTests/fast/dom/intersection-observer.html View 1 2 3 4 5 6 1 chunk +61 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/intersection-observer-expected.txt View 1 2 3 4 5 6 7 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/bindings/core/v8/V8IntersectionObserverCallback.h View 1 2 3 4 5 6 1 chunk +42 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/bindings/core/v8/V8IntersectionObserverCallback.cpp View 1 2 3 4 5 6 3 chunks +9 lines, -10 lines 0 comments Download
A third_party/WebKit/Source/bindings/core/v8/custom/V8IntersectionObserverCustom.cpp View 1 2 3 4 5 6 1 chunk +53 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/custom.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/v8.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 4 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 4 5 6 5 chunks +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 5 chunks +44 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.h View 1 2 3 4 5 6 4 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 3 4 5 6 1 chunk +23 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/IntersectionObserver.h View 1 2 3 4 5 6 1 chunk +59 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/IntersectionObserver.cpp View 1 2 3 4 5 6 1 chunk +123 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/IntersectionObserver.idl View 1 2 3 4 5 6 1 chunk +18 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/IntersectionObserverCallback.h View 1 2 3 4 5 6 1 chunk +30 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/IntersectionObserverEntry.h View 1 2 3 4 5 6 1 chunk +45 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/IntersectionObserverEntry.cpp View 1 2 3 4 5 6 1 chunk +37 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/IntersectionObserverEntry.idl View 1 2 3 4 5 6 1 chunk +15 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/core/dom/IntersectionObserverInit.idl View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Node.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.h View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 3 4 5 6 1 chunk +21 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.cpp View 1 2 3 4 5 6 3 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutView.h View 1 2 3 4 5 6 3 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutView.cpp View 1 2 3 4 5 6 2 chunks +32 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
MikeB
This wasn't based on https://codereview.chromium.org/1246173002/ or https://codereview.chromium.org/1179223002/ so it may need to be changed some, ...
5 years, 3 months ago (2015-09-03 22:56:46 UTC) #2
liberato (no reviews please)
this is really exciting stuff! thanks for adding me to the CL. mainly i have ...
5 years, 3 months ago (2015-09-04 15:07:46 UTC) #3
MikeB
https://codereview.chromium.org/1330633003/diff/20001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/1330633003/diff/20001/Source/core/frame/FrameView.cpp#newcode1131 Source/core/frame/FrameView.cpp:1131: if (FrameView* parent = parentFrameView()) { On 2015/09/04 15:07:46, ...
5 years, 3 months ago (2015-09-04 17:59:34 UTC) #4
ojan
This looks close to me. Adam, since a lot of this is a clone of ...
5 years, 3 months ago (2015-09-21 03:49:09 UTC) #6
adamk
https://codereview.chromium.org/1330633003/diff/80001/Source/bindings/core/v8/V8IntersectionObserverCallback.h File Source/bindings/core/v8/V8IntersectionObserverCallback.h (right): https://codereview.chromium.org/1330633003/diff/80001/Source/bindings/core/v8/V8IntersectionObserverCallback.h#newcode18 Source/bindings/core/v8/V8IntersectionObserverCallback.h:18: class V8IntersectionObserverCallback final : public IntersectionObserverCallback, public ActiveDOMCallback { ...
5 years, 3 months ago (2015-09-21 23:52:07 UTC) #7
MikeB
5 years, 3 months ago (2015-09-24 19:04:04 UTC) #8
https://codereview.chromium.org/1330633003/diff/80001/LayoutTests/fast/dom/in...
File LayoutTests/fast/dom/intersection-observer.html (right):

https://codereview.chromium.org/1330633003/diff/80001/LayoutTests/fast/dom/in...
LayoutTests/fast/dom/intersection-observer.html:4: <body>
On 2015/09/21 03:49:08, ojan wrote:
> Nit: No need for the body element

Done.

https://codereview.chromium.org/1330633003/diff/80001/LayoutTests/fast/dom/in...
LayoutTests/fast/dom/intersection-observer.html:56: var config = { entryTypes:
['mark', 'measure'] };
On 2015/09/21 03:49:08, ojan wrote:
> I think this is probably leftover from the test case you ported this from?
> 
> Which brings up a question actually, should passing in a dict with invalid
> fields throw? I think the answer is no, but I'm not sure.

Done.

https://codereview.chromium.org/1330633003/diff/80001/Source/core/dom/Interse...
File Source/core/dom/IntersectionObserver.cpp (right):

https://codereview.chromium.org/1330633003/diff/80001/Source/core/dom/Interse...
Source/core/dom/IntersectionObserver.cpp:56: if (target)
On 2015/09/21 03:49:09, ojan wrote:
> How can target be null?

RefPtrWillBeWeakMember will become WeakMember when Oilpan is enabled. In that
case, it can become null if the referenced object is GC'ed.

https://codereview.chromium.org/1330633003/diff/80001/Source/core/dom/Interse...
File Source/core/dom/IntersectionObserver.idl (right):

https://codereview.chromium.org/1330633003/diff/80001/Source/core/dom/Interse...
Source/core/dom/IntersectionObserver.idl:8: // https://
On 2015/09/21 03:49:09, ojan wrote:
> ?

Done.

https://codereview.chromium.org/1330633003/diff/80001/Source/core/dom/Interse...
Source/core/dom/IntersectionObserver.idl:16: sequence
<IntersectionObserverEntry> takeRecords();
On 2015/09/21 03:49:09, ojan wrote:
> Nit: no space after "sequence".

Done.

https://codereview.chromium.org/1330633003/diff/80001/Source/core/dom/Interse...
File Source/core/dom/IntersectionObserverEntry.idl (right):

https://codereview.chromium.org/1330633003/diff/80001/Source/core/dom/Interse...
Source/core/dom/IntersectionObserverEntry.idl:5: // https://
On 2015/09/21 03:49:09, ojan wrote:
> ?

Done.

https://codereview.chromium.org/1330633003/diff/80001/Source/core/dom/Interse...
Source/core/dom/IntersectionObserverEntry.idl:11: readonly attribute
ClientRectList quads;
On 2015/09/21 03:49:09, ojan wrote:
> I know this was after you uploaded the patch, but we changes this from quads
to
> boundingClientRect.

Done.

https://codereview.chromium.org/1330633003/diff/80001/Source/core/frame/Frame...
File Source/core/frame/FrameView.cpp (right):

https://codereview.chromium.org/1330633003/diff/80001/Source/core/frame/Frame...
Source/core/frame/FrameView.cpp:1133: if (!m_clippedBounds.isEmpty()) {
On 2015/09/21 03:49:09, ojan wrote:
> Nit: no curlies

Done.

https://codereview.chromium.org/1330633003/diff/80001/Source/core/layout/Layo...
File Source/core/layout/LayoutObject.cpp (right):

https://codereview.chromium.org/1330633003/diff/80001/Source/core/layout/Layo...
Source/core/layout/LayoutObject.cpp:2490: if (view() &&
hasIntersectionObserver()) {
On 2015/09/21 03:49:09, ojan wrote:
> Ditto nits about curlies here and below

Done.

https://codereview.chromium.org/1330633003/diff/80001/Source/core/layout/Layo...
File Source/core/layout/LayoutView.cpp (right):

https://codereview.chromium.org/1330633003/diff/80001/Source/core/layout/Layo...
Source/core/layout/LayoutView.cpp:1029: LayoutObject* layoutObect = obj.key;
On 2015/09/21 03:49:09, ojan wrote:
> Typo: layoutObect

Done.

Powered by Google App Engine
This is Rietveld 408576698