DescriptionDon't updateRenderTree in the middle of a DOM insertion.
After [1] landed, this CL is now a revert of using a flag for postponing
scrolling, and scroll from didNotifySubtreeInsertion instead. The original
description for this fix below. The crasher was fixed by [1].
[1] https://codereview.chromium.org/783983005
The original description:
When inserting an OPTION element with the selected attribute set, we
synchronously scroll to that OPTION to make it visible. A prerequisite for
scrolling is to have the render tree up-to-date. At this point only parts
of the inserted fragment had its inDocument() flag set which caused a crash
when a nullptr was returned for the computed style of an input spinner.
Ideally, we should not scroll synchronously from the dom insertion code.
This CL moves scrolling from insertedInto() to didNotifySubtreeInsertion().
The inDocument() flags are up-to-date when didNotifySubtreeInsertion()
is called.
An ASSERT is added to Element::recalcStyle to catch other cases of calling
updateRenderTree in the middle of a dom insertion.
R=esprehn@chromium.org
BUG=438615
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=187437
Patch Set 1 #Patch Set 2 : Rebased #
Messages
Total messages: 25 (7 generated)
|