DescriptionAdding stylesheet candidates should not crash when the parser reorders the tree
The HTML parsing rules means nodes may get re-ordered. In the testcase the table
element is being seen in "in table mode", but the link inside it defaults to
"in body" mode. So the link ends up being inserted in the body and before
the style element in the table. DocumentOrderedList::parserAdd expects a new
node in the list to appear in the document after the last in the current list,
so calling that will trigger the ASSERT. Instead only call parserAdd when
the new node has no next sibling, if it has call DocumentOrderedList::add
which will find the correct position in the list.
BUG=334691
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=188181
Patch Set 1 #Patch Set 2 : Add a test #
Total comments: 1
Messages
Total messages: 6 (2 generated)
|