DescriptionFixing crash when executing InsertOrderedList execCommand.
In applyInlineStyleToNodeRange(), a call to removeConflictingInlineStyleFromRun() can modify the start and end Nodes of InlineRunToApplyStyle.
For the crash scenario, the start node being set in removeConflictingInlineStyleFromRun() is invalid and further use of it when calling positionToComputeInlineStyleChange() causes a crash.
Thus adding a check for startAndEndAreStillInDocument() fixes the crash. However, since for the invalid scenario positionForStyleComputation shall not be set, we should check for it's validity before using the same for creating the StyleChange object.
Have added a testcase based on the simplified clusterfuzz testcase added by yoichio in http://crbug.com/343799 which verifies the crash.
BUG=343799
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168278
Patch Set 1 #
Total comments: 4
Patch Set 2 : Addressing review comments #
Total comments: 2
Patch Set 3 : Fix for crash #
Total comments: 3
Patch Set 4 : Fixing nit #
Messages
Total messages: 12 (0 generated)
|