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

Issue 2875163002: Use floating_object's parent object to check for overhanging floats. (Closed)

Created:
3 years, 7 months ago by Gleb Lanbin
Modified:
3 years, 7 months ago
Reviewers:
eae
CC:
chromium-reviews, pdr+renderingwatchlist_chromium.org, zoltan1, blink-reviews-layout_chromium.org, szager+layoutwatch_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use floating_object's parent object to check for overhanging floats. This fixes the "Double-painting of floats" issue caught on this page http://www.alz.org/what-is-dementia.asp?gclid=Cj0KEQjw0IvIBRDF0Yzq4qGE4IwBEiQATMQlMcdGdUB3bX7An9ifdWLx8RUy7o6FlVy5rx_NB7i_CwAaAiQh8P8HAQ 1) On that page a floating iframe overhangs over several parents and gets copied by AddOverhangingFloats to the block with self-painting layer. Once the float reaches the block with self-painting layer boundary its ShouldPaint flag gets flipped. 2) Because the float is wrapped inside of anonymous block during the composition step UpdateAncestorShouldPaintFloatingObject uses a not-direct parent of the float. As a result IsOverhangingFloat returns a wrong result and flips ShouldPaint flag for the FloatingObject associated with the float's layout object which is already marked for paint by another FloatingObject created in step 1. BUG=717755 Review-Url: https://codereview.chromium.org/2875163002 Cr-Commit-Position: refs/heads/master@{#471337} Committed: https://chromium.googlesource.com/chromium/src/+/bd5ed3446133bfe50bc9e0194c1fe8d271e8fcf0

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -15 lines) Patch
M third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp View 1 chunk +17 lines, -15 lines 0 comments Download

Messages

Total messages: 18 (13 generated)
Gleb Lanbin
I didn't add any tests because 1) we already have multiple tests that cover floating ...
3 years, 7 months ago (2017-05-12 04:10:43 UTC) #11
eae
OK, LGTM
3 years, 7 months ago (2017-05-12 16:41:58 UTC) #12
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/2875163002/20001
3 years, 7 months ago (2017-05-12 16:42:48 UTC) #14
commit-bot: I haz the power
Committed patchset #1 (id:20001) as https://chromium.googlesource.com/chromium/src/+/bd5ed3446133bfe50bc9e0194c1fe8d271e8fcf0
3 years, 7 months ago (2017-05-12 16:49:53 UTC) #17
chrishtr
3 years, 7 months ago (2017-05-12 17:01:14 UTC) #18
Message was sent while issue was closed.
On 2017/05/12 at 04:10:43, glebl wrote:
> I didn't add any tests because 1) we already have multiple tests that cover
floating iframes(compositing/iframes/floating-self-painting-frame-complex.html,
compositing/iframes/floating-self-painting-frame.html etc.) 2) I think it's
pointless to test that newly introduced DCHECK because the approach where we
copy FloatingObjects between ancestors and share ShouldPaint flag looks very
error prone to me. Hopefully it will go away with LayoutNG.

Are you referring to the DCHECK in PaintController? Testing that DCHECK is not
so useful, but there is an underlying bug in floats that
was not exhibited by any layout test. It would be very useful to have a reduced
version of the page exhibiting this bug to go with this
patch.

Powered by Google App Engine
This is Rietveld 408576698