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

Issue 1817693002: Support edge-inclusive intersections in mapToVisibleRectInAncestorSpace (Closed)

Created:
4 years, 9 months ago by szager1
Modified:
4 years, 9 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, eae+blinkwatch, f(malita), fs, gyuyoung2, jbroman, jchaffraix+rendering, Justin Novosad, kinuko+watch, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney, sof, slimming-paint-reviews_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src@intersection-observer-idle-callback
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support edge-inclusive intersections in mapToVisibleRectInAncestorSpace Edge-inclusive geometry means that if two rects have a zero-area intersection -- either because they overlap at an edge or point, or because one or both of the rects is zero-area -- the zero-area intersection will be used and propagated. Previously, a zero-area intersection was always treated as not intersecting. BUG=540428 R=chrishtr@chromium.org,ojan@chromium.org,esprehn@chromium.org Committed: https://crrev.com/f790fe75a34b71516f68b7600ba11b9e9f0d6167 Cr-Commit-Position: refs/heads/master@{#383186}

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : compiler warning fix #

Total comments: 21

Patch Set 4 : Added IntersectionType flag and unit test for LayoutRect::inclusiveIntersect. #

Total comments: 15

Patch Set 5 : Address comments, add mapToVisibleRectInContainerSpace test #

Total comments: 10

Patch Set 6 : tweaks and test cases #

Patch Set 7 : Remove IntersectionObserver changes #

Patch Set 8 : Rebase onto origin/master #

Total comments: 8

Patch Set 9 : more tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -80 lines) Patch
M third_party/WebKit/Source/core/layout/LayoutBox.h View 1 2 3 4 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 6 chunks +20 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutFlowThread.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutFlowThread.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutInline.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutInline.cpp View 1 2 3 4 5 2 chunks +9 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.h View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.cpp View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp View 1 2 3 4 5 6 7 8 2 chunks +64 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableCell.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableCell.cpp View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutView.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutView.cpp View 1 2 3 4 5 6 7 8 3 chunks +15 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/layout/PaintInvalidationState.h View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp View 1 2 3 4 2 chunks +8 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp View 1 2 3 4 1 chunk +10 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/geometry/LayoutRect.h View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/geometry/LayoutRect.cpp View 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/geometry/LayoutRectTest.cpp View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 30 (6 generated)
szager1
4 years, 9 months ago (2016-03-18 23:48:43 UTC) #1
szager1
ping
4 years, 9 months ago (2016-03-21 18:15:12 UTC) #2
chrishtr
https://codereview.chromium.org/1817693002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBox.h File third_party/WebKit/Source/core/layout/LayoutBox.h (right): https://codereview.chromium.org/1817693002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBox.h#newcode642 third_party/WebKit/Source/core/layout/LayoutBox.h:642: bool mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect&, const PaintInvalidationState*, bool edgeInclusive) ...
4 years, 9 months ago (2016-03-21 22:14:50 UTC) #3
ojan
eae/leviw might be the best reviewers for this. If you all have any time, we're ...
4 years, 9 months ago (2016-03-21 22:23:05 UTC) #5
eae
The functionality and inclusiveIntersects method make sense to me. I'm afraid I'm not a fan ...
4 years, 9 months ago (2016-03-22 00:13:50 UTC) #6
szager1
https://codereview.chromium.org/1817693002/diff/40001/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp File third_party/WebKit/Source/core/dom/IntersectionObservation.cpp (right): https://codereview.chromium.org/1817693002/diff/40001/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp#newcode42 third_party/WebKit/Source/core/dom/IntersectionObservation.cpp:42: geometry.doesIntersect = true; On 2016/03/21 22:23:05, ojan wrote: > ...
4 years, 9 months ago (2016-03-22 00:55:49 UTC) #7
ojan
https://codereview.chromium.org/1817693002/diff/40001/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp File third_party/WebKit/Source/core/dom/IntersectionObservation.cpp (right): https://codereview.chromium.org/1817693002/diff/40001/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp#newcode179 third_party/WebKit/Source/core/dom/IntersectionObservation.cpp:179: geometry.intersectionRect = LayoutRect(); On 2016/03/22 at 00:55:48, szager1 wrote: ...
4 years, 9 months ago (2016-03-22 04:24:47 UTC) #8
chrishtr
On 2016/03/22 at 04:24:47, ojan wrote: > https://codereview.chromium.org/1817693002/diff/40001/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp > File third_party/WebKit/Source/core/dom/IntersectionObservation.cpp (right): > > https://codereview.chromium.org/1817693002/diff/40001/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp#newcode179 ...
4 years, 9 months ago (2016-03-22 15:04:16 UTC) #9
chrishtr
On 2016/03/22 at 15:04:16, chrishtr wrote: > On 2016/03/22 at 04:24:47, ojan wrote: > > ...
4 years, 9 months ago (2016-03-22 15:04:35 UTC) #10
ojan
On 2016/03/22 at 15:04:35, chrishtr wrote: > On 2016/03/22 at 15:04:16, chrishtr wrote: > > ...
4 years, 9 months ago (2016-03-22 16:49:41 UTC) #11
chrishtr
https://codereview.chromium.org/1817693002/diff/60001/third_party/WebKit/Source/core/layout/LayoutObject.h File third_party/WebKit/Source/core/layout/LayoutObject.h (right): https://codereview.chromium.org/1817693002/diff/60001/third_party/WebKit/Source/core/layout/LayoutObject.h#newcode1153 third_party/WebKit/Source/core/layout/LayoutObject.h:1153: // resulting rect is zero-area. "intersection" might lead to ...
4 years, 9 months ago (2016-03-22 17:25:49 UTC) #12
eae
LGTM based on in person discussions https://codereview.chromium.org/1817693002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBox.cpp File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/1817693002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode992 third_party/WebKit/Source/core/layout/LayoutBox.cpp:992: doesIntersect = !rect.isEmpty(); ...
4 years, 9 months ago (2016-03-22 17:54:16 UTC) #13
szager1
https://codereview.chromium.org/1817693002/diff/60001/third_party/WebKit/Source/core/layout/LayoutObject.h File third_party/WebKit/Source/core/layout/LayoutObject.h (right): https://codereview.chromium.org/1817693002/diff/60001/third_party/WebKit/Source/core/layout/LayoutObject.h#newcode1153 third_party/WebKit/Source/core/layout/LayoutObject.h:1153: // resulting rect is zero-area. On 2016/03/22 17:25:49, chrishtr ...
4 years, 9 months ago (2016-03-22 18:33:35 UTC) #14
chrishtr
On 2016/03/22 at 18:33:35, szager wrote: > https://codereview.chromium.org/1817693002/diff/60001/third_party/WebKit/Source/core/layout/LayoutObject.h > File third_party/WebKit/Source/core/layout/LayoutObject.h (right): > > https://codereview.chromium.org/1817693002/diff/60001/third_party/WebKit/Source/core/layout/LayoutObject.h#newcode1153 ...
4 years, 9 months ago (2016-03-22 18:44:17 UTC) #15
szager1
https://codereview.chromium.org/1817693002/diff/60001/third_party/WebKit/Source/core/layout/LayoutObject.h File third_party/WebKit/Source/core/layout/LayoutObject.h (right): https://codereview.chromium.org/1817693002/diff/60001/third_party/WebKit/Source/core/layout/LayoutObject.h#newcode1154 third_party/WebKit/Source/core/layout/LayoutObject.h:1154: virtual bool mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect&, const PaintInvalidationState*, int ...
4 years, 9 months ago (2016-03-22 19:42:25 UTC) #16
chrishtr
https://codereview.chromium.org/1817693002/diff/80001/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp File third_party/WebKit/Source/core/dom/IntersectionObservation.cpp (right): https://codereview.chromium.org/1817693002/diff/80001/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp#newcode37 third_party/WebKit/Source/core/dom/IntersectionObservation.cpp:37: void IntersectionObservation::initializeGeometry(IntersectionGeometry& geometry) const Prefer to remove changes to ...
4 years, 9 months ago (2016-03-22 19:54:26 UTC) #17
szager1
https://codereview.chromium.org/1817693002/diff/80001/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp File third_party/WebKit/Source/core/dom/IntersectionObservation.cpp (right): https://codereview.chromium.org/1817693002/diff/80001/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp#newcode37 third_party/WebKit/Source/core/dom/IntersectionObservation.cpp:37: void IntersectionObservation::initializeGeometry(IntersectionGeometry& geometry) const On 2016/03/22 19:54:26, chrishtr wrote: ...
4 years, 9 months ago (2016-03-23 23:26:59 UTC) #18
szager1
Added another test case that exercises the LayoutView code, removed the IntersectionObserver bits, and updated ...
4 years, 9 months ago (2016-03-24 19:15:10 UTC) #20
chrishtr
https://codereview.chromium.org/1817693002/diff/80001/third_party/WebKit/Source/core/layout/LayoutBox.h File third_party/WebKit/Source/core/layout/LayoutBox.h (right): https://codereview.chromium.org/1817693002/diff/80001/third_party/WebKit/Source/core/layout/LayoutBox.h#newcode846 third_party/WebKit/Source/core/layout/LayoutBox.h:846: // Returns true if the rect actually intersects the ...
4 years, 9 months ago (2016-03-24 21:18:43 UTC) #21
szager1
https://codereview.chromium.org/1817693002/diff/140001/third_party/WebKit/Source/core/layout/LayoutObject.cpp File third_party/WebKit/Source/core/layout/LayoutObject.cpp (right): https://codereview.chromium.org/1817693002/diff/140001/third_party/WebKit/Source/core/layout/LayoutObject.cpp#newcode1641 third_party/WebKit/Source/core/layout/LayoutObject.cpp:1641: bool LayoutObject::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState, ...
4 years, 9 months ago (2016-03-24 21:52:28 UTC) #22
chrishtr
lgtm
4 years, 9 months ago (2016-03-24 21:58:49 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1817693002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1817693002/160001
4 years, 9 months ago (2016-03-24 21:59:23 UTC) #26
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 9 months ago (2016-03-24 23:33:39 UTC) #28
commit-bot: I haz the power
4 years, 9 months ago (2016-03-24 23:35:28 UTC) #30
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/f790fe75a34b71516f68b7600ba11b9e9f0d6167
Cr-Commit-Position: refs/heads/master@{#383186}

Powered by Google App Engine
This is Rietveld 408576698