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

Issue 635533003: Don't delete nodes in the float interval tree while traversing it. (Closed)

Created:
6 years, 2 months ago by rhogan
Modified:
6 years, 2 months ago
CC:
blink-reviews, blink-reviews-rendering, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rune+blink, zoltan1
Project:
blink
Visibility:
Public.

Description

Don't delete nodes in the float interval tree while traversing it. When traversing the floated objects' interval tree in searchForOverlapsFrom() we will crash if we delete ourselves from the tree - this can happen if computedShape() is called, the shape needs to be computed, and we end up removing ourselves from ancestors' floating object lists in markShapeDependentObjectsForLayout() via RenderBox::imageChanged(). What this boils down to is ensuring that we don't mark a shape as dirty while we are in the middle of computing it. When we compute a shape RenderBox::imageChanged() will get called. This function needs to dirty the shape when we are here because of an asynchronous image; if we're here because we are computing the shape deltas for the float there is no need to dirty ourselves again. I explored a few options for determining if we are computing the shape deltas for the float. Unfortunately we can't just use isShapeDirty() because if a float is added to the render tree markShapeOutsideDependentsForLayout() will not mark any ancestors for layout until the first layout has happened. This means we could arrive in RenderBox::imageChanged() with the shape marked as dirty but still needing to re-layout its ancestors. This is a regression from https://codereview.chromium.org/131133004. Note that I've moved a couple of the shape-outside test to the http/ folder. They use url() for the image loads; which doesn't work when running on file:// urls. The image loads always fail with 'Image from origin 'file://' has been blocked from loading by Cross-Origin Resource Sharing policy: Received an invalid response. Origin 'null' is therefore not allowed access.' BUG=409508 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183485

Patch Set 1 #

Patch Set 2 : Added square.png and another test #

Total comments: 3

Patch Set 3 : Updated #

Patch Set 4 : Add correct png! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -246 lines) Patch
M LayoutTests/FlakyTests View 1 1 chunk +0 lines, -1 line 0 comments Download
A LayoutTests/fast/shapes/crash-caused-by-dirtying-a-shape-while-computing-it-requires-a-long-filename-to-crash.html View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
A + LayoutTests/fast/shapes/crash-caused-by-dirtying-a-shape-while-computing-it-requires-a-long-filename-to-crash-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
D LayoutTests/fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-image-threshold.html View 1 chunk +0 lines, -76 lines 0 comments Download
D LayoutTests/fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-image-threshold-expected.html View 1 chunk +0 lines, -58 lines 0 comments Download
D LayoutTests/fast/shapes/shape-outside-floats/shape-outside-image-shape-margin.html View 1 chunk +0 lines, -71 lines 0 comments Download
D LayoutTests/fast/shapes/shape-outside-floats/shape-outside-image-shape-margin-expected.html View 1 chunk +0 lines, -42 lines 0 comments Download
A + LayoutTests/http/tests/resources/square.png View 1 2 3 Binary file 0 comments Download
A + LayoutTests/http/tests/shapes/shape-outside-dynamic-shape-image-threshold.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/http/tests/shapes/shape-outside-dynamic-shape-image-threshold-expected.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/http/tests/shapes/shape-outside-image-shape-margin.html View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/http/tests/shapes/shape-outside-image-shape-margin-expected.html View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/http/tests/shapes/shape-outside-svg-image-shape-margin.html View 1 1 chunk +1 line, -1 line 0 comments Download
A + LayoutTests/http/tests/shapes/shape-outside-svg-image-shape-margin-expected.html View 1 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/core/rendering/RenderBox.cpp View 1 1 chunk +6 lines, -3 lines 0 comments Download
M Source/core/rendering/shapes/ShapeOutsideInfo.h View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
M Source/core/rendering/shapes/ShapeOutsideInfo.cpp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (6 generated)
rhogan
6 years, 2 months ago (2014-10-06 20:35:39 UTC) #2
Bem Jones-Bey (adobe)
lgtm, but I noticed that the shape-outside-image-shape-margin test is failing on the Linux bot. Is ...
6 years, 2 months ago (2014-10-07 05:12:19 UTC) #3
hansmuller
Thanks for sorting out the source of this problem. The solution looks fine to me.
6 years, 2 months ago (2014-10-07 14:36:04 UTC) #4
Julien - ping for review
lgtm https://codereview.chromium.org/635533003/diff/20001/LayoutTests/fast/shapes/crash-caused-by-dirtying-a-shape-while-computing-it-requires-a-long-filename-to-crash.html File LayoutTests/fast/shapes/crash-caused-by-dirtying-a-shape-while-computing-it-requires-a-long-filename-to-crash.html (right): https://codereview.chromium.org/635533003/diff/20001/LayoutTests/fast/shapes/crash-caused-by-dirtying-a-shape-while-computing-it-requires-a-long-filename-to-crash.html#newcode1 LayoutTests/fast/shapes/crash-caused-by-dirtying-a-shape-while-computing-it-requires-a-long-filename-to-crash.html:1: <div id=start><br><br></div> DOCTYPE!!!! https://codereview.chromium.org/635533003/diff/20001/Source/core/rendering/shapes/ShapeOutsideInfo.cpp File Source/core/rendering/shapes/ShapeOutsideInfo.cpp (right): https://codereview.chromium.org/635533003/diff/20001/Source/core/rendering/shapes/ShapeOutsideInfo.cpp#newcode145 ...
6 years, 2 months ago (2014-10-08 18:13:27 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/635533003/40001
6 years, 2 months ago (2014-10-09 09:39:50 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu_triggered_tests/builds/56259)
6 years, 2 months ago (2014-10-09 09:45:58 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/635533003/40001
6 years, 2 months ago (2014-10-09 14:51:22 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/28504)
6 years, 2 months ago (2014-10-09 16:00:18 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/635533003/60001
6 years, 2 months ago (2014-10-09 17:23:36 UTC) #15
commit-bot: I haz the power
6 years, 2 months ago (2014-10-09 18:54:47 UTC) #16
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as 183485

Powered by Google App Engine
This is Rietveld 408576698