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

Issue 2647533002: Force compositing inputs to be clean for getBoundingClientRect (Closed)

Created:
3 years, 11 months ago by smcgruer
Modified:
3 years, 10 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Force compositing inputs to be clean for location-related Element APIs After layout, the location of position:sticky elements and their descendants will be incorrect until compositing inputs have been cleaned. In most cases this is not an issue since Blink will run a full lifecycle after page change, including compositing. However if the user modifies layout during a script and then calls a location-based API without yielding, compositing inputs would still be dirty. This patch corrects that behavior by ensuring that compositing inputs are clean for location-related APIs. BUG=672457 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2647533002 Cr-Commit-Position: refs/heads/master@{#447158} Committed: https://chromium.googlesource.com/chromium/src/+/2c04a7850056a21b6c1dcb6d63451c4a0f11e707

Patch Set 1 #

Total comments: 5

Patch Set 2 : Fix style nit #

Patch Set 3 : For discussion; only do compositing update when in sticky subtree #

Total comments: 4

Patch Set 4 : Return to non-conditional approach #

Patch Set 5 : Only force compositing input update if we're in the active document #

Total comments: 2

Patch Set 6 : Add tests, address reviewer comments #

Patch Set 7 : Add LayoutTests to validate post-layout behavior #

Total comments: 12

Patch Set 8 : Address reviewer comments, fix HTMLElement::offset*ForBinding #

Patch Set 9 : Partial response to reviewer comments, uploading for feedback #

Total comments: 2

Patch Set 10 : Finish new ElementTest test, address reviewer comments #

Total comments: 8

Patch Set 11 : Address reviewer comments, fix bug with constraints cache invalidation #

Patch Set 12 : Rebase #

Patch Set 13 : Remove extraneous whitespace #

Total comments: 6

Patch Set 14 : Rebase #

Messages

Total messages: 72 (23 generated)
smcgruer
I suspect this may be overkill for the purpose of getting the compositing inputs updated ...
3 years, 11 months ago (2017-01-18 20:30:51 UTC) #2
flackr
Good CL for discussion. One thing we could do to limit the perf impact is ...
3 years, 11 months ago (2017-01-18 21:11:10 UTC) #5
smcgruer
https://codereview.chromium.org/2647533002/diff/1/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2647533002/diff/1/third_party/WebKit/Source/core/dom/Element.cpp#newcode1123 third_party/WebKit/Source/core/dom/Element.cpp:1123: FrameView* view = document().view(); On 2017/01/18 21:11:10, flackr wrote: ...
3 years, 11 months ago (2017-01-18 21:17:14 UTC) #6
flackr
https://codereview.chromium.org/2647533002/diff/1/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2647533002/diff/1/third_party/WebKit/Source/core/dom/Element.cpp#newcode1125 third_party/WebKit/Source/core/dom/Element.cpp:1125: view->updateLifecycleToCompositingCleanPlusScrolling(); On 2017/01/18 21:17:13, smcgruer wrote: > On 2017/01/18 ...
3 years, 11 months ago (2017-01-18 21:38:05 UTC) #7
chrishtr
On 2017/01/18 at 21:11:10, flackr wrote: > Good CL for discussion. One thing we could ...
3 years, 11 months ago (2017-01-18 23:27:14 UTC) #8
chrishtr
On 2017/01/18 at 21:11:10, flackr wrote: > Good CL for discussion. One thing we could ...
3 years, 11 months ago (2017-01-18 23:28:00 UTC) #9
smcgruer
One example of how we could detect being in a position:sticky subtree (code is quite ...
3 years, 11 months ago (2017-01-19 20:06:03 UTC) #10
smcgruer
Note: A similar approach is needed in at least FrameSelection::revealSelection for issue 677035. There I ...
3 years, 11 months ago (2017-01-19 20:49:41 UTC) #11
chrishtr
https://codereview.chromium.org/2647533002/diff/40001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2647533002/diff/40001/third_party/WebKit/Source/core/dom/Element.cpp#newcode1132 third_party/WebKit/Source/core/dom/Element.cpp:1132: view->updateLifecycleToCompositingCleanPlusScrolling(); Hmm. I think this will be incorrect if ...
3 years, 11 months ago (2017-01-19 21:29:20 UTC) #12
smcgruer
https://codereview.chromium.org/2647533002/diff/40001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2647533002/diff/40001/third_party/WebKit/Source/core/dom/Element.cpp#newcode1132 third_party/WebKit/Source/core/dom/Element.cpp:1132: view->updateLifecycleToCompositingCleanPlusScrolling(); On 2017/01/19 21:29:19, chrishtr wrote: > Hmm. I ...
3 years, 11 months ago (2017-01-20 01:40:41 UTC) #13
flackr
https://codereview.chromium.org/2647533002/diff/40001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2647533002/diff/40001/third_party/WebKit/Source/core/dom/Element.cpp#newcode1132 third_party/WebKit/Source/core/dom/Element.cpp:1132: view->updateLifecycleToCompositingCleanPlusScrolling(); On 2017/01/20 01:40:41, smcgruer wrote: > On 2017/01/19 ...
3 years, 11 months ago (2017-01-20 02:19:42 UTC) #14
smcgruer
Current version does fail fast/dom/forced-layout-only-in-document.html, havent checked why yet (a task for tomorrow!) https://codereview.chromium.org/2647533002/diff/40001/third_party/WebKit/Source/core/dom/Element.cpp File ...
3 years, 11 months ago (2017-01-20 02:32:29 UTC) #15
flackr
Please add some tests. Also, we should ensure the other common methods which depend on ...
3 years, 11 months ago (2017-01-20 02:47:02 UTC) #18
smcgruer
https://codereview.chromium.org/2647533002/diff/80001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2647533002/diff/80001/third_party/WebKit/Source/core/dom/Element.cpp#newcode1130 third_party/WebKit/Source/core/dom/Element.cpp:1130: view->updateLifecycleToCompositingCleanPlusScrolling(); On 2017/01/20 02:47:02, flackr wrote: > maybe we ...
3 years, 11 months ago (2017-01-20 16:07:09 UTC) #21
smcgruer
Note: I still need to add some tests that actually scroll and make sure that ...
3 years, 11 months ago (2017-01-20 16:08:46 UTC) #22
chrishtr
On 2017/01/20 at 16:07:09, smcgruer wrote: > https://codereview.chromium.org/2647533002/diff/80001/third_party/WebKit/Source/core/dom/Element.cpp > File third_party/WebKit/Source/core/dom/Element.cpp (right): > > https://codereview.chromium.org/2647533002/diff/80001/third_party/WebKit/Source/core/dom/Element.cpp#newcode1130 ...
3 years, 11 months ago (2017-01-20 16:28:21 UTC) #23
smcgruer
On 2017/01/20 16:28:21, chrishtr wrote: > On 2017/01/20 at 16:07:09, smcgruer wrote: > > > ...
3 years, 11 months ago (2017-01-20 22:13:42 UTC) #24
smcgruer
LayoutTests added. PTAL.
3 years, 11 months ago (2017-01-23 16:16:24 UTC) #26
flackr
Looking good, just a few test suggestions. https://codereview.chromium.org/2647533002/diff/110001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-layout.html File third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-layout.html (right): https://codereview.chromium.org/2647533002/diff/110001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-layout.html#newcode54 third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-layout.html:54: scroller.append(document.createElement('div')); Can ...
3 years, 11 months ago (2017-01-23 16:43:50 UTC) #27
smcgruer
https://codereview.chromium.org/2647533002/diff/110001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-layout.html File third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-layout.html (right): https://codereview.chromium.org/2647533002/diff/110001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-layout.html#newcode54 third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-layout.html:54: scroller.append(document.createElement('div')); On 2017/01/23 16:43:50, flackr wrote: > Can we ...
3 years, 11 months ago (2017-01-24 15:26:31 UTC) #28
flackr
https://codereview.chromium.org/2647533002/diff/110001/third_party/WebKit/Source/core/dom/ElementTest.cpp File third_party/WebKit/Source/core/dom/ElementTest.cpp (right): https://codereview.chromium.org/2647533002/diff/110001/third_party/WebKit/Source/core/dom/ElementTest.cpp#newcode90 third_party/WebKit/Source/core/dom/ElementTest.cpp:90: document.body()->offsetLeft(); On 2017/01/24 15:26:30, smcgruer wrote: > On 2017/01/23 ...
3 years, 11 months ago (2017-01-24 17:00:21 UTC) #29
flackr
https://codereview.chromium.org/2647533002/diff/110001/third_party/WebKit/Source/core/dom/ElementTest.cpp File third_party/WebKit/Source/core/dom/ElementTest.cpp (right): https://codereview.chromium.org/2647533002/diff/110001/third_party/WebKit/Source/core/dom/ElementTest.cpp#newcode90 third_party/WebKit/Source/core/dom/ElementTest.cpp:90: document.body()->offsetLeft(); On 2017/01/24 17:00:21, flackr wrote: > On 2017/01/24 ...
3 years, 11 months ago (2017-01-24 18:20:55 UTC) #30
smcgruer
https://codereview.chromium.org/2647533002/diff/110001/third_party/WebKit/Source/core/dom/ElementTest.cpp File third_party/WebKit/Source/core/dom/ElementTest.cpp (right): https://codereview.chromium.org/2647533002/diff/110001/third_party/WebKit/Source/core/dom/ElementTest.cpp#newcode90 third_party/WebKit/Source/core/dom/ElementTest.cpp:90: document.body()->offsetLeft(); On 2017/01/24 18:20:54, flackr wrote: > On 2017/01/24 ...
3 years, 11 months ago (2017-01-24 20:09:42 UTC) #31
flackr
https://codereview.chromium.org/2647533002/diff/110001/third_party/WebKit/Source/core/dom/ElementTest.cpp File third_party/WebKit/Source/core/dom/ElementTest.cpp (right): https://codereview.chromium.org/2647533002/diff/110001/third_party/WebKit/Source/core/dom/ElementTest.cpp#newcode90 third_party/WebKit/Source/core/dom/ElementTest.cpp:90: document.body()->offsetLeft(); On 2017/01/24 20:09:42, smcgruer wrote: > On 2017/01/24 ...
3 years, 11 months ago (2017-01-24 20:22:28 UTC) #32
smcgruer
https://codereview.chromium.org/2647533002/diff/150001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html File third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html (right): https://codereview.chromium.org/2647533002/diff/150001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html#newcode54 third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html:54: sticky.scrollIntoView(); On 2017/01/24 20:22:28, flackr wrote: > Did we ...
3 years, 11 months ago (2017-01-24 22:20:01 UTC) #33
flackr
https://codereview.chromium.org/2647533002/diff/170001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html File third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html (right): https://codereview.chromium.org/2647533002/diff/170001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html#newcode58 third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html:58: scroller.append(newDiv); nit: insert it before the sticky element here ...
3 years, 11 months ago (2017-01-24 22:47:16 UTC) #34
smcgruer
https://codereview.chromium.org/2647533002/diff/170001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html File third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html (right): https://codereview.chromium.org/2647533002/diff/170001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html#newcode58 third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html:58: scroller.append(newDiv); On 2017/01/24 22:47:15, flackr wrote: > nit: insert ...
3 years, 11 months ago (2017-01-25 20:51:57 UTC) #36
chrishtr
https://codereview.chromium.org/2647533002/diff/230001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2647533002/diff/230001/third_party/WebKit/Source/core/dom/Element.cpp#newcode4129 third_party/WebKit/Source/core/dom/Element.cpp:4129: document().updateStyleAndLayoutIgnorePendingStylesheets(); Previously it was updateStyleAndLayoutIgnorePendingStylesheetsForNode(this) instead. Why the change?
3 years, 11 months ago (2017-01-25 21:36:28 UTC) #37
smcgruer
https://codereview.chromium.org/2647533002/diff/230001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2647533002/diff/230001/third_party/WebKit/Source/core/dom/Element.cpp#newcode4129 third_party/WebKit/Source/core/dom/Element.cpp:4129: document().updateStyleAndLayoutIgnorePendingStylesheets(); On 2017/01/25 21:36:28, chrishtr wrote: > Previously it ...
3 years, 11 months ago (2017-01-25 21:39:05 UTC) #38
flackr
https://codereview.chromium.org/2647533002/diff/230001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html File third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html (right): https://codereview.chromium.org/2647533002/diff/230001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html#newcode105 third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html:105: assert_equals(scroller.scrollTop, 195); Shouldn't this be 220 (150px paddingBefore + ...
3 years, 11 months ago (2017-01-25 21:48:18 UTC) #39
smcgruer
https://codereview.chromium.org/2647533002/diff/230001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html File third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html (right): https://codereview.chromium.org/2647533002/diff/230001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html#newcode105 third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html:105: assert_equals(scroller.scrollTop, 195); On 2017/01/25 21:48:18, flackr wrote: > Shouldn't ...
3 years, 11 months ago (2017-01-25 21:50:19 UTC) #40
flackr
LGTM https://codereview.chromium.org/2647533002/diff/230001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html File third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html (right): https://codereview.chromium.org/2647533002/diff/230001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html#newcode105 third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html:105: assert_equals(scroller.scrollTop, 195); On 2017/01/25 21:50:19, smcgruer wrote: > ...
3 years, 11 months ago (2017-01-25 21:53:27 UTC) #41
chrishtr
https://codereview.chromium.org/2647533002/diff/230001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2647533002/diff/230001/third_party/WebKit/Source/core/dom/Element.cpp#newcode4129 third_party/WebKit/Source/core/dom/Element.cpp:4129: document().updateStyleAndLayoutIgnorePendingStylesheets(); On 2017/01/25 at 21:39:05, smcgruer wrote: > On ...
3 years, 11 months ago (2017-01-25 22:18:56 UTC) #42
chrishtr
(defer to flackr on rest of review)
3 years, 11 months ago (2017-01-25 22:19:04 UTC) #43
smcgruer
flackr has LGTM'd, but I still need an LGTM from someone with Blink OWNERS.
3 years, 11 months ago (2017-01-25 23:30:02 UTC) #44
chrishtr
lgtm
3 years, 11 months ago (2017-01-26 00:42:33 UTC) #45
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/2647533002/230001
3 years, 11 months ago (2017-01-26 03:04:18 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/371303)
3 years, 11 months ago (2017-01-26 04:48:09 UTC) #49
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/2647533002/230001
3 years, 11 months ago (2017-01-26 11:17:19 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/371469)
3 years, 11 months ago (2017-01-26 12:47:05 UTC) #53
smcgruer
Ok, seems this patch changes something relating to animations, in such a way that only ...
3 years, 10 months ago (2017-01-26 15:04:55 UTC) #54
smcgruer
Found the root cause. InspectorAnimationAgent::animationPlayStateChanged will not trigger an 'animationCancelled' event if it has ever ...
3 years, 10 months ago (2017-01-26 16:22:08 UTC) #56
smcgruer
FYI with the following diff the test passes, though of course I don't know the ...
3 years, 10 months ago (2017-01-26 16:24:34 UTC) #57
smcgruer
It appears that samli@ is no longer active in Chromium. Adding a few other people ...
3 years, 10 months ago (2017-01-27 13:05:36 UTC) #59
samli
On 2017/01/26 at 16:24:34, smcgruer wrote: > FYI with the following diff the test passes, ...
3 years, 10 months ago (2017-01-28 00:16:13 UTC) #60
suzyh_UTC10 (ex-contributor)
On 2017/01/27 at 13:05:36, smcgruer wrote: > It appears that samli@ is no longer active ...
3 years, 10 months ago (2017-01-30 20:05:59 UTC) #61
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/2647533002/250001
3 years, 10 months ago (2017-01-31 01:44:50 UTC) #68
commit-bot: I haz the power
Committed patchset #14 (id:250001) as https://chromium.googlesource.com/chromium/src/+/2c04a7850056a21b6c1dcb6d63451c4a0f11e707
3 years, 10 months ago (2017-01-31 01:50:30 UTC) #71
johnme
3 years, 10 months ago (2017-02-01 13:00:09 UTC) #72
Message was sent while issue was closed.
A revert of this CL (patchset #14 id:250001) has been created in
https://codereview.chromium.org/2667003003/ by johnme@chromium.org.

The reason for reverting is: transitions/unprefixed-transform-origin.html has
failed on almost every build of WebKit Mac10.11 (dbg) and WebKit Linux Trusty
(dbg) since this patch landed.

Each time it's because the transitionend event fails to fire for property
-webkit-transform-origin-z.

https://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=tr....

Powered by Google App Engine
This is Rietveld 408576698