New issue
Advanced search Search tips

Issue 683576 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug



Sign in to add a comment

Stacked float under stacked inline is painted at wrong offset

Project Member Reported by wangxianzhu@chromium.org, Jan 21 2017

Issue description

<span style="position: relative; top: 100px; left: 100px">ABC
  <div style="float: left; position: relative; background: blue; width: 100px; height: 100px"></div>
</span>

We paint the float with a 100,100 offset which is incorrect. The span doesn't establish containing block for the float so should not affect positioning of the float.

Before https://codereview.chromium.org/2575423003/ (in M57) we were always wrong in paint invalidation and paint, so though the offset was wrong, there was no corrupted rendering. With the CL we invalidate paint and paint the float at different places. We need to fix this bug for M57.
 
Labels: ReleaseBlock-Stable
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/43437042d29fc936bb50f73cbe29907135936f47

commit 43437042d29fc936bb50f73cbe29907135936f47
Author: wangxianzhu <wangxianzhu@chromium.org>
Date: Tue Jan 24 01:56:22 2017

Float layer should ignore offsets from ancestor inline layers under containing block

- When calculating layer location, we should traverse containers
  instead of parents, because containers instead of parents affect
  locations of children. This ensures we get correct location for
  floating layer.

- When calculating layer offset in an ancestor, for a float layer,
  we should skip inline ancestors below the containing block.

BUG= 683576 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2647383004
Cr-Commit-Position: refs/heads/master@{#445592}

[add] https://crrev.com/43437042d29fc936bb50f73cbe29907135936f47/third_party/WebKit/LayoutTests/paint/invalidation/compositing/composited-float-under-composited-inline-expected.html
[add] https://crrev.com/43437042d29fc936bb50f73cbe29907135936f47/third_party/WebKit/LayoutTests/paint/invalidation/compositing/composited-float-under-composited-inline-expected.txt
[add] https://crrev.com/43437042d29fc936bb50f73cbe29907135936f47/third_party/WebKit/LayoutTests/paint/invalidation/compositing/composited-float-under-composited-inline.html
[add] https://crrev.com/43437042d29fc936bb50f73cbe29907135936f47/third_party/WebKit/LayoutTests/paint/invalidation/compositing/stacked-float-under-composited-inline-expected.html
[add] https://crrev.com/43437042d29fc936bb50f73cbe29907135936f47/third_party/WebKit/LayoutTests/paint/invalidation/compositing/stacked-float-under-composited-inline-expected.txt
[add] https://crrev.com/43437042d29fc936bb50f73cbe29907135936f47/third_party/WebKit/LayoutTests/paint/invalidation/compositing/stacked-float-under-composited-inline.html
[modify] https://crrev.com/43437042d29fc936bb50f73cbe29907135936f47/third_party/WebKit/Source/core/paint/PaintLayer.cpp
[modify] https://crrev.com/43437042d29fc936bb50f73cbe29907135936f47/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp

Labels: Merge-Request-57
Project Member

Comment 4 by sheriffbot@chromium.org, Jan 25 2017

Labels: -Merge-Request-57 Hotlist-Merge-Approved Merge-Approved-57
Your change meets the bar and is auto-approved for M57. Please go ahead and merge the CL to branch 2987 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 5 by bugdroid1@chromium.org, Jan 25 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0978e4af69ab13578b22b75539038263a3e8df3a

commit 0978e4af69ab13578b22b75539038263a3e8df3a
Author: wangxianzhu <wangxianzhu@chromium.org>
Date: Wed Jan 25 18:03:25 2017

Float layer should ignore offsets from ancestor inline layers under containing block

- When calculating layer location, we should traverse containers
  instead of parents, because containers instead of parents affect
  locations of children. This ensures we get correct location for
  floating layer.

- When calculating layer offset in an ancestor, for a float layer,
  we should skip inline ancestors below the containing block.

BUG= 683576 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
TBR=wangxianzhu@chromium.org
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2647383004
Cr-Original-Commit-Position: refs/heads/master@{#445592}
Review-Url: https://codereview.chromium.org/2650273004
Cr-Commit-Position: refs/branch-heads/2987@{#88}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[add] https://crrev.com/0978e4af69ab13578b22b75539038263a3e8df3a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/composited-float-under-composited-inline-expected.html
[add] https://crrev.com/0978e4af69ab13578b22b75539038263a3e8df3a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/composited-float-under-composited-inline-expected.txt
[add] https://crrev.com/0978e4af69ab13578b22b75539038263a3e8df3a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/composited-float-under-composited-inline.html
[add] https://crrev.com/0978e4af69ab13578b22b75539038263a3e8df3a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/stacked-float-under-composited-inline-expected.html
[add] https://crrev.com/0978e4af69ab13578b22b75539038263a3e8df3a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/stacked-float-under-composited-inline-expected.txt
[add] https://crrev.com/0978e4af69ab13578b22b75539038263a3e8df3a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/stacked-float-under-composited-inline.html
[modify] https://crrev.com/0978e4af69ab13578b22b75539038263a3e8df3a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
[modify] https://crrev.com/0978e4af69ab13578b22b75539038263a3e8df3a/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp

Status: Fixed (was: Assigned)
Project Member

Comment 7 by bugdroid1@chromium.org, Jan 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d8e6e751f1e8982648cb06bf74889544a5733d04

commit d8e6e751f1e8982648cb06bf74889544a5733d04
Author: wangxianzhu <wangxianzhu@chromium.org>
Date: Fri Jan 27 03:23:07 2017

Refactor PaintLayer location and offset calculation especially for floats

This is a follow-up of https://codereview.chromium.org/2647383004/
to cleanup the logic.

Add PaintLayer::containingLayer() (based on the previous
containgLayerForOutOfFlowPositioned()) to return the containing
layer for any layer and use it during location and offset
calculation.

BTW, this also fixes a hidden bug about layer location of float and
multicol spanner in scrolled containing block which is not the
parent layer.

BUG= 683576 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2650873002
Cr-Commit-Position: refs/heads/master@{#446568}

[modify] https://crrev.com/d8e6e751f1e8982648cb06bf74889544a5733d04/third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp
[modify] https://crrev.com/d8e6e751f1e8982648cb06bf74889544a5733d04/third_party/WebKit/Source/core/layout/LayoutObject.h
[modify] https://crrev.com/d8e6e751f1e8982648cb06bf74889544a5733d04/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
[modify] https://crrev.com/d8e6e751f1e8982648cb06bf74889544a5733d04/third_party/WebKit/Source/core/layout/compositing/GraphicsLayerUpdater.cpp
[modify] https://crrev.com/d8e6e751f1e8982648cb06bf74889544a5733d04/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
[modify] https://crrev.com/d8e6e751f1e8982648cb06bf74889544a5733d04/third_party/WebKit/Source/core/paint/PaintLayer.cpp
[modify] https://crrev.com/d8e6e751f1e8982648cb06bf74889544a5733d04/third_party/WebKit/Source/core/paint/PaintLayer.h
[modify] https://crrev.com/d8e6e751f1e8982648cb06bf74889544a5733d04/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp

Sign in to add a comment