Reland "Menulist SELECT: Avoid updating UA shadow nodes in InsertedInto() and RemovedFrom()"
This CL relands crrev.com/c/2074840. A part of it was landed as crrev.com/746315, and this CL is the remaining. > HTMLOptionElement's InsertedInto() and RemovedFrom() called > MenuListSelectType::UpdateTextStyleAndContent(), which updates a Text > node in a UA shadow tree. It triggered a DCHECK failure about > IsSlotAssignmentRecalcForbidden(). We should not update the DOM tree > in these functions. > > This CL moves the logic of the InsertedInto() and the RemovedFrom() to > HTMLSelectElement::ChildrenChanged() and |HTMLOptGroupElement:: > ChildrenChanged()|. > > As for kAllChildrenRemoved such as |select.innerHTML=''|, > ChildrenChanged() had no ways to know removed nodes. This CL adds > ChildrenChangedAllChildrenRemovedNeedsList flag, and ContainerNode > provides a list of removed nodes if the flag is true. > > This CL also updates comments on Node::InsertedInto(), > Node::RemovedFrom(), and ContainerNode::ChildrenChanged(). Bug: 1056094 Change-Id: Icef4c9f180333a5b39d38b1950f9c5c2660c66c5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2086451Reviewed-by:Koji Ishii <kojii@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#746659}
Showing
Please register or sign in to comment