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

Issue 13828004: Avoid compositing fixed-position elements if they cannot scroll (Closed)

Created:
7 years, 8 months ago by shawnsingh
Modified:
7 years, 7 months ago
CC:
blink-reviews, jchaffraix+rendering, Vangelis Kokkevis, enne (OOO), aelias_OOO_until_Jul13
Visibility:
Public.

Description

Avoid compositing fixed-position elements if they cannot scroll If there is actually no scrollable element between a fixed-position layer and its container, then there is no reason to composite the fixed-position element. In fact, it is more wasteful in memory resources and computation resources to make it composited. This patch avoids compositing in those cases. Note that if there is another reason that the fixed-position element needs to be composited, such as overlap, it will still do so. BUG=222110 R=dglazkov@chromium.org, enne@chromium.org, trchen@chromium.org, vangelis@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=149624

Patch Set 1 #

Total comments: 1

Patch Set 2 : Rebased and addressed reviewers older comments #

Total comments: 7

Patch Set 3 : addressed comments #

Patch Set 4 : simplified to hasScrollbars() #

Total comments: 11

Patch Set 5 : Updated comments and rebased to new code location #

Patch Set 6 : rebased to retry bots #

Patch Set 7 : rebased again #

Total comments: 4

Patch Set 8 : rebased #

Total comments: 10

Patch Set 9 : Rebased and addressed feedback #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+428 lines, -58 lines) Patch
M LayoutTests/compositing/geometry/fixed-position-composited-switch.html View 1 1 chunk +5 lines, -1 line 0 comments Download
M LayoutTests/compositing/geometry/fixed-position-composited-switch-expected.txt View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/compositing/layer-creation/fixed-position-change-out-of-view-in-view.html View 1 1 chunk +4 lines, -1 line 0 comments Download
M LayoutTests/compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/compositing/layer-creation/fixed-position-in-view-dynamic.html View 1 1 chunk +4 lines, -1 line 0 comments Download
A + LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-body.html View 2 chunks +30 lines, -13 lines 0 comments Download
A LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-body-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers.html View 1 chunk +75 lines, -0 lines 0 comments Download
A + LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers-expected.txt View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -3 lines 0 comments Download
A LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-body-overlap.html View 1 chunk +69 lines, -0 lines 0 comments Download
A LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-body-overlap-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +28 lines, -0 lines 0 comments Download
A LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-iframes-in-scrollable-page.html View 1 2 3 4 5 6 7 8 1 chunk +69 lines, -0 lines 0 comments Download
A LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-iframes-in-scrollable-page-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +30 lines, -0 lines 0 comments Download
M LayoutTests/compositing/layer-creation/fixed-position-out-of-view-dynamic.html View 1 1 chunk +4 lines, -1 line 0 comments Download
M LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled.html View 1 1 chunk +5 lines, -1 line 0 comments Download
M LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html View 1 1 chunk +5 lines, -1 line 0 comments Download
A LayoutTests/compositing/layer-creation/resources/fixed-position-nonscrollable-body.html View 1 2 3 4 5 6 7 8 1 chunk +52 lines, -0 lines 0 comments Download
D LayoutTests/virtual/softwarecompositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt View 1 2 3 4 5 6 7 1 chunk +0 lines, -29 lines 0 comments Download
M Source/WebKit/chromium/tests/data/fixed-position.html View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M Source/WebKit/chromium/tests/data/layer_background_color.html View 1 2 3 4 5 6 1 chunk +5 lines, -1 line 0 comments Download
M Source/core/rendering/RenderLayer.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/rendering/RenderLayerCompositor.cpp View 1 2 3 4 5 6 7 8 1 chunk +26 lines, -0 lines 1 comment Download

Messages

Total messages: 48 (0 generated)
shawnsingh
Not for review yet. I just ported the WebKit version of this patch to Blink. ...
7 years, 8 months ago (2013-04-10 01:15:04 UTC) #1
trchen
https://codereview.chromium.org/13828004/diff/1/Source/WebCore/rendering/RenderLayerCompositor.cpp File Source/WebCore/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/13828004/diff/1/Source/WebCore/rendering/RenderLayerCompositor.cpp#newcode1988 Source/WebCore/rendering/RenderLayerCompositor.cpp:1988: noScrollableAncestor = false; I'm concerned about the platforms that ...
7 years, 8 months ago (2013-04-10 01:24:03 UTC) #2
shawnsingh
Can you please explain the example you think may go wrong? I'm not seeing any ...
7 years, 8 months ago (2013-04-10 01:55:47 UTC) #3
trchen
On 2013/04/10 01:55:47, shawnsingh wrote: > Can you please explain the example you think may ...
7 years, 8 months ago (2013-04-10 02:05:52 UTC) #4
shawnsingh
I see the problem. We have to think carefully about how to resolve this. Chrome ...
7 years, 8 months ago (2013-04-10 02:33:28 UTC) #5
trchen
On 2013/04/10 02:33:28, shawnsingh wrote: > I see the problem. We have to think carefully ...
7 years, 8 months ago (2013-04-10 02:54:47 UTC) #6
shawnsingh
Reviewers, PTAL trchen@ and I talked at the end of last week, and we agreed ...
7 years, 8 months ago (2013-04-15 23:58:26 UTC) #7
vangelis
https://codereview.chromium.org/13828004/diff/7001/Source/WebCore/rendering/RenderLayerCompositor.cpp File Source/WebCore/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/13828004/diff/7001/Source/WebCore/rendering/RenderLayerCompositor.cpp#newcode1939 Source/WebCore/rendering/RenderLayerCompositor.cpp:1939: if (container == m_renderView && m_renderView->frameView() && (m_renderView->frameView()->isScrollable())) Because ...
7 years, 8 months ago (2013-04-16 06:54:23 UTC) #8
vangelis
On 2013/04/15 23:58:26, shawnsingh wrote: > Reviewers, PTAL > > trchen@ and I talked at ...
7 years, 8 months ago (2013-04-16 06:55:34 UTC) #9
trchen
On 2013/04/16 06:55:34, vangelis wrote: > On 2013/04/15 23:58:26, shawnsingh wrote: > > Reviewers, PTAL ...
7 years, 8 months ago (2013-04-16 19:32:59 UTC) #10
trchen
https://codereview.chromium.org/13828004/diff/7001/Source/WebCore/rendering/RenderLayerCompositor.cpp File Source/WebCore/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/13828004/diff/7001/Source/WebCore/rendering/RenderLayerCompositor.cpp#newcode1944 Source/WebCore/rendering/RenderLayerCompositor.cpp:1944: if (ancestor->hasHorizontalScrollbar() || ancestor->hasVerticalScrollbar()) On 2013/04/16 06:54:23, vangelis wrote: ...
7 years, 8 months ago (2013-04-16 19:36:21 UTC) #11
jamesr
On 2013/04/16 19:36:21, trchen wrote: > https://codereview.chromium.org/13828004/diff/7001/Source/WebCore/rendering/RenderLayerCompositor.cpp > File Source/WebCore/rendering/RenderLayerCompositor.cpp (right): > > https://codereview.chromium.org/13828004/diff/7001/Source/WebCore/rendering/RenderLayerCompositor.cpp#newcode1944 > ...
7 years, 8 months ago (2013-04-16 19:41:41 UTC) #12
trchen
On 2013/04/16 19:41:41, jamesr wrote: > On 2013/04/16 19:36:21, trchen wrote: > > > https://codereview.chromium.org/13828004/diff/7001/Source/WebCore/rendering/RenderLayerCompositor.cpp ...
7 years, 8 months ago (2013-04-16 19:49:01 UTC) #13
jamesr
On 2013/04/16 19:49:01, trchen wrote: > On 2013/04/16 19:41:41, jamesr wrote: > > On 2013/04/16 ...
7 years, 8 months ago (2013-04-16 19:52:23 UTC) #14
shawnsingh
Thanks for reviewing - responses below. The goal of this patch is to avoid compositing ...
7 years, 8 months ago (2013-04-16 20:20:06 UTC) #15
shawnsingh
New patch uploaded, PTAL. Thanks!
7 years, 8 months ago (2013-04-16 21:55:43 UTC) #16
shawnsingh
On 2013/04/16 21:55:43, shawnsingh wrote: > New patch uploaded, PTAL. Thanks! vangelis@ and trchen@ do ...
7 years, 8 months ago (2013-04-17 18:37:08 UTC) #17
vangelis
Just a comment on the implementation. Happy with the rest of it! https://codereview.chromium.org/13828004/diff/15002/Source/WebCore/rendering/RenderLayerCompositor.cpp File Source/WebCore/rendering/RenderLayerCompositor.cpp ...
7 years, 8 months ago (2013-04-17 19:53:15 UTC) #18
shawnsingh
I'll add a comment to clarify this in the patch. https://codereview.chromium.org/13828004/diff/15002/Source/WebCore/rendering/RenderLayerCompositor.cpp File Source/WebCore/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/13828004/diff/15002/Source/WebCore/rendering/RenderLayerCompositor.cpp#newcode1944 ...
7 years, 8 months ago (2013-04-17 20:15:57 UTC) #19
trchen
https://codereview.chromium.org/13828004/diff/15002/Source/WebCore/rendering/RenderLayerCompositor.cpp File Source/WebCore/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/13828004/diff/15002/Source/WebCore/rendering/RenderLayerCompositor.cpp#newcode1939 Source/WebCore/rendering/RenderLayerCompositor.cpp:1939: if (m_renderView->frameView() && (m_renderView->frameView()->isScrollable())) Do we have to check ...
7 years, 8 months ago (2013-04-17 20:38:14 UTC) #20
shawnsingh
responses below - please let me know if you still want me to change those, ...
7 years, 8 months ago (2013-04-17 20:57:36 UTC) #21
trchen
lgtm https://codereview.chromium.org/13828004/diff/15002/Source/WebCore/rendering/RenderLayerCompositor.cpp File Source/WebCore/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/13828004/diff/15002/Source/WebCore/rendering/RenderLayerCompositor.cpp#newcode1939 Source/WebCore/rendering/RenderLayerCompositor.cpp:1939: if (m_renderView->frameView() && (m_renderView->frameView()->isScrollable())) On 2013/04/17 20:57:36, shawnsingh ...
7 years, 8 months ago (2013-04-17 21:03:03 UTC) #22
vangelis
https://codereview.chromium.org/13828004/diff/15002/Source/WebCore/rendering/RenderLayerCompositor.cpp File Source/WebCore/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/13828004/diff/15002/Source/WebCore/rendering/RenderLayerCompositor.cpp#newcode1939 Source/WebCore/rendering/RenderLayerCompositor.cpp:1939: if (m_renderView->frameView() && (m_renderView->frameView()->isScrollable())) On 2013/04/17 21:03:03, trchen wrote: ...
7 years, 8 months ago (2013-04-17 22:05:29 UTC) #23
shawnsingh
jamesr@, vangelis@ PTAL -- same patch as previous with clearer comments. I think this patch ...
7 years, 8 months ago (2013-04-17 23:51:05 UTC) #24
Vangelis Kokkevis
lgtm
7 years, 8 months ago (2013-04-18 07:34:47 UTC) #25
trchen
On 2013/04/17 22:05:29, vangelis wrote: > https://codereview.chromium.org/13828004/diff/15002/Source/WebCore/rendering/RenderLayerCompositor.cpp > File Source/WebCore/rendering/RenderLayerCompositor.cpp (right): > > https://codereview.chromium.org/13828004/diff/15002/Source/WebCore/rendering/RenderLayerCompositor.cpp#newcode1939 > ...
7 years, 8 months ago (2013-04-19 07:49:58 UTC) #26
vangelis
On 2013/04/19 07:49:58, trchen wrote: > On 2013/04/17 22:05:29, vangelis wrote: > > > https://codereview.chromium.org/13828004/diff/15002/Source/WebCore/rendering/RenderLayerCompositor.cpp ...
7 years, 8 months ago (2013-04-19 17:07:40 UTC) #27
trchen
On 2013/04/19 17:07:40, vangelis wrote: > On 2013/04/19 07:49:58, trchen wrote: > > On 2013/04/17 ...
7 years, 8 months ago (2013-04-19 18:50:09 UTC) #28
shawnsingh
jamesr - can you please give OWNERS review? Its pretty clear to me (cross sectioning ...
7 years, 8 months ago (2013-04-20 00:09:09 UTC) #29
jamesr
https://codereview.chromium.org/13828004/diff/39001/Source/core/rendering/RenderLayerCompositor.cpp File Source/core/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/13828004/diff/39001/Source/core/rendering/RenderLayerCompositor.cpp#newcode1948 Source/core/rendering/RenderLayerCompositor.cpp:1948: while (ancestor && noScrollableAncestor) { this seems too slow. ...
7 years, 8 months ago (2013-04-20 01:24:10 UTC) #30
shawnsingh
Thanks for review, responses below https://codereview.chromium.org/13828004/diff/39001/Source/core/rendering/RenderLayerCompositor.cpp File Source/core/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/13828004/diff/39001/Source/core/rendering/RenderLayerCompositor.cpp#newcode1948 Source/core/rendering/RenderLayerCompositor.cpp:1948: while (ancestor && noScrollableAncestor) ...
7 years, 8 months ago (2013-04-21 00:22:21 UTC) #31
shawnsingh
jamesr@ - I ran some quick numbers. The conclusion is that this patch is elegantly ...
7 years, 8 months ago (2013-04-23 21:34:18 UTC) #32
shawnsingh
Still waiting for review please - thanks. Performance concerns are addressed in comment #32.
7 years, 8 months ago (2013-04-24 17:47:45 UTC) #33
shawnsingh
Still waiting for review. Performance concerns are addressed in comment #32. We really should get ...
7 years, 7 months ago (2013-04-29 14:35:32 UTC) #34
Tom Hudson
https://codereview.chromium.org/13828004/diff/47001/Source/core/rendering/RenderLayerCompositor.cpp File Source/core/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/13828004/diff/47001/Source/core/rendering/RenderLayerCompositor.cpp#newcode1937 Source/core/rendering/RenderLayerCompositor.cpp:1937: RenderLayer* ancestor = layer->parent(); Naive question: this function assumes ...
7 years, 7 months ago (2013-04-29 14:50:24 UTC) #35
shawnsingh
https://codereview.chromium.org/13828004/diff/47001/Source/core/rendering/RenderLayerCompositor.cpp File Source/core/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/13828004/diff/47001/Source/core/rendering/RenderLayerCompositor.cpp#newcode1937 Source/core/rendering/RenderLayerCompositor.cpp:1937: RenderLayer* ancestor = layer->parent(); On 2013/04/29 14:50:24, Tom Hudson ...
7 years, 7 months ago (2013-04-29 15:57:13 UTC) #36
jamesr
On 2013/04/29 14:35:32, shawnsingh wrote: > Still waiting for review. Performance concerns are addressed in ...
7 years, 7 months ago (2013-04-29 23:20:05 UTC) #37
shawnsingh
vollick@ could you please review this? I think your review can help boost OWNERS comfort ...
7 years, 7 months ago (2013-04-29 23:38:02 UTC) #38
Ian Vollick
Do we need to modify things like RenderLayer::updateScrollableAreaSet to rerun this check when layers (or ...
7 years, 7 months ago (2013-04-30 00:22:21 UTC) #39
enne (OOO)
https://codereview.chromium.org/13828004/diff/47001/LayoutTests/compositing/geometry/fixed-position-composited-switch.html File LayoutTests/compositing/geometry/fixed-position-composited-switch.html (right): https://codereview.chromium.org/13828004/diff/47001/LayoutTests/compositing/geometry/fixed-position-composited-switch.html#newcode61 LayoutTests/compositing/geometry/fixed-position-composited-switch.html:61: <body style="height: 4000px;"> I think this could be more ...
7 years, 7 months ago (2013-04-30 01:51:35 UTC) #40
shawnsingh
Thanks for the reviews! A few responses below. I'm working on another patch to address ...
7 years, 7 months ago (2013-04-30 20:53:51 UTC) #41
shawnsingh
https://codereview.chromium.org/13828004/diff/47001/LayoutTests/compositing/geometry/fixed-position-composited-switch.html File LayoutTests/compositing/geometry/fixed-position-composited-switch.html (right): https://codereview.chromium.org/13828004/diff/47001/LayoutTests/compositing/geometry/fixed-position-composited-switch.html#newcode61 LayoutTests/compositing/geometry/fixed-position-composited-switch.html:61: <body style="height: 4000px;"> On 2013/04/30 01:51:35, enne wrote: > ...
7 years, 7 months ago (2013-04-30 22:49:44 UTC) #42
shawnsingh
PTAL - addressed all feedback except the overflow-y: scroll suggestion (see comment #42) - added ...
7 years, 7 months ago (2013-05-01 00:40:48 UTC) #43
shawnsingh
PTAL - Branch point is less than 5 days away. I still need to land ...
7 years, 7 months ago (2013-05-01 22:45:44 UTC) #44
enne (OOO)
lgtm https://codereview.chromium.org/13828004/diff/61001/Source/core/rendering/RenderLayerCompositor.cpp File Source/core/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/13828004/diff/61001/Source/core/rendering/RenderLayerCompositor.cpp#newcode1979 Source/core/rendering/RenderLayerCompositor.cpp:1979: hasScrollableAncestor = true; Thanks, this is way clearer.
7 years, 7 months ago (2013-05-02 01:04:06 UTC) #45
shawnsingh
Hi Dimitri - would you please be willing to give an OWNERS review for 10 ...
7 years, 7 months ago (2013-05-02 21:04:53 UTC) #46
dglazkov
LGTM to Source/WebKit/chromium/tests changes.
7 years, 7 months ago (2013-05-02 21:28:52 UTC) #47
shawnsingh
7 years, 7 months ago (2013-05-03 00:14:03 UTC) #48
Message was sent while issue was closed.
Committed patchset #9 manually as r149624 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698