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

Issue 1490063002: Implement Paint Containment (Closed)

Created:
5 years ago by leviw_travelin_and_unemployed
Modified:
5 years ago
Reviewers:
chrishtr, ojan, pdr., Tab Atkins
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-paint_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, dshwang, rwlbuis, slimming-paint-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement Paint Containment Paint containment acts as a containing block for all objects, including fixed. It also clips them. It's also a formatting context and a stacking context. The approach in this patch differs from the spec in one very notable way: it does not mess with the computed style of the overflow property. This is a conscious decision I hope to work with Tab to address. Paint Containment description from spec: https://drafts.csswg.org/css-containment/#containment-paint Intent to implement: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/9W80Kw-z3ss BUG=561713 Committed: https://crrev.com/472398196d9109be16d13f3af4e8c423ce45d2e3 Cr-Commit-Position: refs/heads/master@{#365178}

Patch Set 1 #

Patch Set 2 : Get tracking correct #

Patch Set 3 : Add some tests #

Patch Set 4 : Add tests #

Patch Set 5 : Add comment to js test #

Patch Set 6 : Change to no longer update overflow #

Patch Set 7 : remove unnecessary adjustStyleForContainment declaration #

Total comments: 11

Patch Set 8 : Rename layer method, add inline tests, address comments, bribe chrishtr, lather, rinse, repeat. #

Total comments: 4

Patch Set 9 : Add test and rename method #

Patch Set 10 : Rebase #

Total comments: 2

Patch Set 11 : Add additional tests and rename method #

Patch Set 12 : Rebase #

Patch Set 13 : additional rename, fix search/replace #

Total comments: 1

Patch Set 14 : Add containsPaint check #

Patch Set 15 : Add missing semicolon #

Patch Set 16 : Fix include patch #

Patch Set 17 : Rebased #

Patch Set 18 : fix merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+313 lines, -62 lines) Patch
A third_party/WebKit/LayoutTests/fast/css/containment/paint-containment-as-formatting-context.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +24 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/css/containment/paint-containment-as-formatting-context-expected.txt View 1 2 3 4 5 6 7 8 9 10 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/containment/paint-containment-with-absolute-position.html View 1 2 3 4 5 6 7 1 chunk +23 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/css/containment/paint-containment-with-absolute-position-expected.html View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/containment/paint-containment-with-box-shadow.html View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/css/containment/paint-containment-with-box-shadow-expected.html View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/containment/paint-containment-with-fixed-position.html View 1 2 3 4 5 6 7 1 chunk +23 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/css/containment/paint-containment-with-fixed-position-expected.html View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/containment/paint-containment-with-transformed-descendant.html View 1 2 3 4 5 6 7 9 10 11 1 chunk +22 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/css/containment/paint-containment-with-transformed-descendant-expected.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A third_party/WebKit/LayoutTests/hittesting/paint-containment-hittest.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +63 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/hittesting/paint-containment-hittest-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlock.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutInline.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutInline.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
A third_party/WebKit/Source/core/layout/PaintContainmentTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +55 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/BoxClipper.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +20 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp View 1 2 3 4 5 9 10 11 4 chunks +8 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 45 (19 generated)
leviw_travelin_and_unemployed
PTAL. Here's a picture of a seal to help with your review: http://imgur.com/tuulpgK
5 years ago (2015-12-09 00:52:51 UTC) #3
chrishtr
https://codereview.chromium.org/1490063002/diff/120001/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp File third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp (right): https://codereview.chromium.org/1490063002/diff/120001/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp#newcode203 third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp:203: || style.containsPaint())) Does this work with inline elements? https://codereview.chromium.org/1490063002/diff/120001/third_party/WebKit/Source/core/layout/LayoutBox.cpp ...
5 years ago (2015-12-09 01:41:46 UTC) #4
leviw_travelin_and_unemployed
PTAL, homeslice. https://codereview.chromium.org/1490063002/diff/120001/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp File third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp (right): https://codereview.chromium.org/1490063002/diff/120001/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp#newcode203 third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp:203: || style.containsPaint())) On 2015/12/09 at 01:41:46, chrishtr ...
5 years ago (2015-12-09 21:09:24 UTC) #5
chrishtr
Could you make some unittest-style layout tests or c++ tests? Example for inspiration: https://codereview.chromium.org/1513663002/diff/20001/third_party/WebKit/LayoutTests/hittesting/inner-border-radius-hittest.html https://codereview.chromium.org/1490063002/diff/120001/third_party/WebKit/Source/core/layout/LayoutObject.h ...
5 years ago (2015-12-09 23:34:58 UTC) #6
ojan
https://codereview.chromium.org/1490063002/diff/140001/third_party/WebKit/Source/core/layout/LayoutInline.cpp File third_party/WebKit/Source/core/layout/LayoutInline.cpp (right): https://codereview.chromium.org/1490063002/diff/140001/third_party/WebKit/Source/core/layout/LayoutInline.cpp#newcode1143 third_party/WebKit/Source/core/layout/LayoutInline.cpp:1143: || style()->hasCompositorProxy() || style()->containsPaint() ? NormalPaintLayer : NoPaintLayer; Is ...
5 years ago (2015-12-10 02:21:41 UTC) #7
leviw_travelin_and_unemployed
On 2015/12/10 at 02:21:41, ojan wrote: > https://codereview.chromium.org/1490063002/diff/140001/third_party/WebKit/Source/core/layout/LayoutInline.cpp > File third_party/WebKit/Source/core/layout/LayoutInline.cpp (right): > > https://codereview.chromium.org/1490063002/diff/140001/third_party/WebKit/Source/core/layout/LayoutInline.cpp#newcode1143 ...
5 years ago (2015-12-10 02:45:06 UTC) #8
chrishtr
https://codereview.chromium.org/1490063002/diff/140001/third_party/WebKit/Source/core/layout/LayoutInline.cpp File third_party/WebKit/Source/core/layout/LayoutInline.cpp (right): https://codereview.chromium.org/1490063002/diff/140001/third_party/WebKit/Source/core/layout/LayoutInline.cpp#newcode1143 third_party/WebKit/Source/core/layout/LayoutInline.cpp:1143: || style()->hasCompositorProxy() || style()->containsPaint() ? NormalPaintLayer : NoPaintLayer; On ...
5 years ago (2015-12-10 16:10:52 UTC) #9
leviw_travelin_and_unemployed
On 2015/12/10 at 16:10:52, chrishtr wrote: > https://codereview.chromium.org/1490063002/diff/140001/third_party/WebKit/Source/core/layout/LayoutInline.cpp > File third_party/WebKit/Source/core/layout/LayoutInline.cpp (right): > > https://codereview.chromium.org/1490063002/diff/140001/third_party/WebKit/Source/core/layout/LayoutInline.cpp#newcode1143 ...
5 years ago (2015-12-10 21:56:19 UTC) #10
leviw_travelin_and_unemployed
PTAL https://codereview.chromium.org/1490063002/diff/180001/third_party/WebKit/LayoutTests/fast/css/containment/paint-containment-hittest.html File third_party/WebKit/LayoutTests/fast/css/containment/paint-containment-hittest.html (right): https://codereview.chromium.org/1490063002/diff/180001/third_party/WebKit/LayoutTests/fast/css/containment/paint-containment-hittest.html#newcode15 third_party/WebKit/LayoutTests/fast/css/containment/paint-containment-hittest.html:15: function test() { Chrishtr: Is this kinda what ...
5 years ago (2015-12-10 23:17:39 UTC) #11
chrishtr
More tests to add: 1. z-index doesn't escape 2. formatting context 3. clipping and scrolling ...
5 years ago (2015-12-10 23:31:16 UTC) #12
chrishtr
On 2015/12/10 at 23:31:16, chrishtr wrote: > More tests to add: > > 1. z-index ...
5 years ago (2015-12-11 19:12:57 UTC) #13
leviw_travelin_and_unemployed
PTAL On 2015/12/11 at 19:12:57, chrishtr wrote: > On 2015/12/10 at 23:31:16, chrishtr wrote: > ...
5 years ago (2015-12-11 23:27:36 UTC) #14
chrishtr
lgtm https://codereview.chromium.org/1490063002/diff/240001/third_party/WebKit/Source/core/layout/PaintContainmentTest.cpp File third_party/WebKit/Source/core/layout/PaintContainmentTest.cpp (right): https://codereview.chromium.org/1490063002/diff/240001/third_party/WebKit/Source/core/layout/PaintContainmentTest.cpp#newcode21 third_party/WebKit/Source/core/layout/PaintContainmentTest.cpp:21: EXPECT_TRUE(obj.hasClipRelatedProperty()); EXPECT_TRUE(obj.style()->containsPaint())
5 years ago (2015-12-11 23:39:19 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1490063002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1490063002/260001
5 years ago (2015-12-12 00:39:01 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/154623)
5 years ago (2015-12-12 00:58:34 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1490063002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1490063002/280001
5 years ago (2015-12-12 01:23:10 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/154651)
5 years ago (2015-12-12 02:56:43 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1490063002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1490063002/300001
5 years ago (2015-12-14 20:22:07 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/107646) mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, ...
5 years ago (2015-12-14 20:25:48 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1490063002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1490063002/320001
5 years ago (2015-12-14 20:33:28 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/70284)
5 years ago (2015-12-14 20:57:07 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1490063002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1490063002/340001
5 years ago (2015-12-14 22:21:06 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/143210)
5 years ago (2015-12-15 03:51:42 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1490063002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1490063002/340001
5 years ago (2015-12-15 05:32:26 UTC) #42
commit-bot: I haz the power
Committed patchset #18 (id:340001)
5 years ago (2015-12-15 06:20:22 UTC) #43
commit-bot: I haz the power
5 years ago (2015-12-15 06:21:31 UTC) #45
Message was sent while issue was closed.
Patchset 18 (id:??) landed as
https://crrev.com/472398196d9109be16d13f3af4e8c423ce45d2e3
Cr-Commit-Position: refs/heads/master@{#365178}

Powered by Google App Engine
This is Rietveld 408576698