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

Issue 2642763009: Fix paint and rect mapping issues for stacked float under stacked inline (Closed)

Created:
3 years, 11 months ago by Xianzhu
Modified:
3 years, 11 months ago
Reviewers:
chrishtr
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, eae+blinkwatch, jchaffraix+rendering, kinuko+watch, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix paint and rect mapping issues for stacked float under stacked inline Previously we skipped all inline ancestors until the containing block for floating objects. This was wrong for stacked float with stacked inline containers. TEST=paint/invalidation/compositing/stacked-float-under-composited-inline.html TEST=*.*FloatUnder*Inline CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -43 lines) Patch
A third_party/WebKit/LayoutTests/paint/invalidation/compositing/stacked-float-under-composited-inline.html View 1 chunk +12 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/compositing/stacked-float-under-composited-inline-expected.html View 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/compositing/stacked-float-under-composited-inline-expected.txt View 1 chunk +31 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.h View 2 chunks +11 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.cpp View 3 chunks +13 lines, -8 lines 1 comment Download
M third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp View 4 chunks +113 lines, -5 lines 1 comment Download
M third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp View 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp View 1 chunk +29 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/GraphicsLayerUpdater.cpp View 1 chunk +8 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintInvalidator.cpp View 4 chunks +12 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h View 1 chunk +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp View 2 chunks +11 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp View 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/LayoutGeometryMapTest.cpp View 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/web/tests/data/rgm_stacked_float_under_inline.html View 1 chunk +8 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 11 (6 generated)
Xianzhu
3 years, 11 months ago (2017-01-20 17:25:21 UTC) #7
chrishtr
https://codereview.chromium.org/2642763009/diff/1/third_party/WebKit/Source/core/layout/LayoutObject.cpp File third_party/WebKit/Source/core/layout/LayoutObject.cpp (right): https://codereview.chromium.org/2642763009/diff/1/third_party/WebKit/Source/core/layout/LayoutObject.cpp#newcode2493 third_party/WebKit/Source/core/layout/LayoutObject.cpp:2493: } ASSERT_NOT_REACHED() https://codereview.chromium.org/2642763009/diff/1/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp File third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp (right): https://codereview.chromium.org/2642763009/diff/1/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp#newcode241 third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp:241: EXPECT_EQ(container, ...
3 years, 11 months ago (2017-01-21 02:15:00 UTC) #8
Xianzhu
On 2017/01/21 02:15:00, chrishtr wrote: > https://codereview.chromium.org/2642763009/diff/1/third_party/WebKit/Source/core/layout/LayoutObject.cpp > File third_party/WebKit/Source/core/layout/LayoutObject.cpp (right): > > https://codereview.chromium.org/2642763009/diff/1/third_party/WebKit/Source/core/layout/LayoutObject.cpp#newcode2493 > ...
3 years, 11 months ago (2017-01-21 20:18:27 UTC) #9
chrishtr
On 2017/01/21 at 20:18:27, wangxianzhu wrote: > On 2017/01/21 02:15:00, chrishtr wrote: > > https://codereview.chromium.org/2642763009/diff/1/third_party/WebKit/Source/core/layout/LayoutObject.cpp ...
3 years, 11 months ago (2017-01-23 22:37:45 UTC) #10
Xianzhu
3 years, 11 months ago (2017-01-23 22:46:33 UTC) #11
Message was sent while issue was closed.
On 2017/01/23 22:37:45, chrishtr wrote:
> On 2017/01/21 at 20:18:27, wangxianzhu wrote:
> > On 2017/01/21 02:15:00, chrishtr wrote:
> > >
>
https://codereview.chromium.org/2642763009/diff/1/third_party/WebKit/Source/c...
> > > File third_party/WebKit/Source/core/layout/LayoutObject.cpp (right):
> > > 
> > >
>
https://codereview.chromium.org/2642763009/diff/1/third_party/WebKit/Source/c...
> > > third_party/WebKit/Source/core/layout/LayoutObject.cpp:2493: }
> > > ASSERT_NOT_REACHED()
> > > 
> > >
>
https://codereview.chromium.org/2642763009/diff/1/third_party/WebKit/Source/c...
> > > File third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp (right):
> > > 
> > >
>
https://codereview.chromium.org/2642763009/diff/1/third_party/WebKit/Source/c...
> > > third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp:241:
> > > EXPECT_EQ(container, floating->containingBlock());
> > > Can you explain to me why containingBlock disagrees with
> > > container here?
> > 
> > At first I thought the answer was obvious, but after I read the spec and
> tested on FireFox, I found that this is a great question, and the basic idea
of
> this CL seems totally wrong.
> > 
> > This is the issue that this CL was to 'fix':
> > 
> >   <span style="position: relative; top: 50px; left: 50px">
> >     <div style="float: left; position: relative">Float</div>
> >   </span>
> > 
> > Now we paint the float with 50,50 offset. Before
> https://codereview.chromium.org/2575423003/, we also apply 50,50 offset to the
> float during geometry mapping. After
> https://codereview.chromium.org/2575423003/, we invalidate paint and paint in
> different ways. According to how we are painting, I thought the span
establishes
> "containing block" (our "container") for the float.
> > 
> > However, according to the spec, the relative-positioned span should not
affect
> positioning of the float. FireFox conforms to the spec.
> > 
> > Now I think the current LayoutObject::container() is correct to return
> containingBlock for floats. We should fix painting code instead. We should
undo
> the offset of the painting layer containing the float if the painting layer's
> layout object is not the containing block of the float.
> 
> Ok. Discarding this CL then right?

Yes. Replaced by https://codereview.chromium.org/2647383004/ and
https://codereview.chromium.org/2650873002/.

Powered by Google App Engine
This is Rietveld 408576698