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

Issue 2553923003: Never position a float after it has been placed. (Closed)

Created:
4 years ago by mstensho (USE GERRIT)
Modified:
4 years ago
Reviewers:
eae, szager1
CC:
chromium-reviews, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Never position a float after it has been placed. When a float is marked as "placed" (which happens in LayoutBlockFlow::placeNewFloats()), it means that it has been added to a float interval tree. It is not allowed to move a float afterwards (unless we remove and re-insert the floats somehow, e.g. by re-laying out its containing block). Otherwise, the interval tree may get out of sync with reality, and we may fail to find the reference to a FloatingObject in the interval tree when deleting a FloatingObject, so that we end up deleting the FloatingObject, but not the reference to it in the interval tree (which will remain there, pointing to a now dead object). This could happen when LayoutBlockFlow::removeFloatingObjectsBelow() was called during pagination. We sometimes need to re-lay out a line because the line or floats next to the line get pushed to the next fragmentainer. As part of that, we also need to get rid of the floats that we thought would sit beside the line, and re-position them. BUG=670927 Committed: https://crrev.com/2f08e63f7cbb8de6ad0b14c0174a75386a4a2863 Cr-Commit-Position: refs/heads/master@{#436776}

Patch Set 1 #

Patch Set 2 : Check for floatingObject->isPlaced() instead. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -2 lines) Patch
A third_party/WebKit/LayoutTests/fast/block/float/line-break-after-white-space-crash.html View 1 chunk +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h View 1 1 chunk +8 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (10 generated)
mstensho (USE GERRIT)
Simple fix for some float shenanigans I wasn't aware of. So I went ahead introduced ...
4 years ago (2016-12-06 17:02:40 UTC) #8
szager1
lgtm
4 years ago (2016-12-06 19:00:01 UTC) #9
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/2553923003/20001
4 years ago (2016-12-06 23:34:48 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-07 00:29:14 UTC) #13
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/2f08e63f7cbb8de6ad0b14c0174a75386a4a2863 Cr-Commit-Position: refs/heads/master@{#436776}
4 years ago (2016-12-07 00:32:04 UTC) #15
eae
4 years ago (2016-12-07 07:19:06 UTC) #16
Message was sent while issue was closed.
LGTM, thanks Morten!

Powered by Google App Engine
This is Rietveld 408576698