Closed Bug 1348746 Opened 3 years ago Closed 3 years ago
stylo: don't eagerly style new children from bindings if the pres shell hasn't been initialized yet
Bug 1348746 - stylo: Only eagerly style newly appended children from bindings when the pres shell has been initialized.
59 bytes, text/x-review-board-request
One case where bug 1345695 shows that we incorrectly resolve style on an element when disallow lazy restyling is dom/html/crashtests/580507-1.xhtml. The test (probably incorrectly) is an unstyled XML document (it's missing an xmlns="http://www.w3.org/1999/html" that would make it an XHTML document). The pretty printing binding is loaded before the pres shell is initialized, but we still style the contents of the document due to the AutoStyleNewChildren that is on the stack when attaching the binding. What's worse is that immediately after we attach the binding to the root element, we append some more content, but because the pres shell hasn't been initialized, PresShell::ContentAppended decides not to tell the RestyleManager. This means we end up with an unstyled subtree under a styled element. We should just skip eagerly styling the new content from the binding if we haven't initialized our PresShell yet. https://treeherder.mozilla.org/#/jobs?repo=try&revision=62161858567f0d6e37978f9a191ec5772eeaffd5
Comment on attachment 8849020 [details] Bug 1348746 - stylo: Only eagerly style newly appended children from bindings when the pres shell has been initialized. https://reviewboard.mozilla.org/r/121868/#review124120
Attachment #8849020 - Flags: review?(bobbyholley) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/c5fe6750a883 stylo: Only eagerly style newly appended children from bindings when the pres shell has been initialized. r=bholley
You need to log in before you can comment on or make changes to this bug.