Bug 1429088, Bug 1429125: Add a comment about why we can't remove the XUL check, at least yet. r=me
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 10 Jan 2018 05:49:21 +0100
changeset 452816 5b6bf3714f4eb4c3a7e6f00558211e7b84db9866
parent 452815 2e705f777acd03e4af83f15a6eedd85cee9c3438
child 452817 f466c92f42bf5ba5d081af0cfd4ff13067264fc5
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1429088, 1429125
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1429088, Bug 1429125: Add a comment about why we can't remove the XUL check, at least yet. r=me MozReview-Commit-ID: wzzzGQpXVV
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -7212,16 +7212,20 @@ nsCSSFrameConstructor::CheckBitsForLazyF
 // Returns true if this operation can be lazy, false if not.
 //
 // FIXME(emilio, bug 1410020): This function assumes that the flattened tree
 // parent of all the appended children is the same, which, afaict, is not
 // necessarily true.
 //
 // But we disable lazy frame construction for shadow trees... We should fix
 // that, too.
+//
+// NOTE(emilio): The IsXULElement check is pretty unfortunate, but there's tons
+// of browser chrome code that rely on XBL bindings getting synchronously loaded
+// as soon as the elements get inserted in the DOM.
 bool
 nsCSSFrameConstructor::MaybeConstructLazily(Operation aOperation,
                                             nsIContent* aContainer,
                                             nsIContent* aChild)
 {
   if (!aContainer || aContainer->IsInNativeAnonymousSubtree() ||
       aContainer->IsXULElement()) {
     return false;