Bug 1363864 - Add MozBeforeInitialXULLayout event. r=smaug
authorZibi Braniecki <zbraniecki@mozilla.com>
Fri, 15 Dec 2017 16:50:51 -0600
changeset 448497 16471f5143c7a96a75814ab1e6c8366a43959c34
parent 448462 7521d3eb77f9a54c9b84f37e1042804ce707dc15
child 448498 4fc9f54cdc1dd173e3de3788443c64e5cae4be34
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1363864
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 1363864 - Add MozBeforeInitialXULLayout event. r=smaug MozReview-Commit-ID: FPWIyAR1ocq
dom/xul/XULDocument.cpp
--- a/dom/xul/XULDocument.cpp
+++ b/dom/xul/XULDocument.cpp
@@ -3020,16 +3020,22 @@ XULDocument::DoneWalking()
                 xulWin->GetDocShell(getter_AddRefs(xulWinShell));
                 if (SameCOMIdentity(xulWinShell, item)) {
                     // We're the chrome document!  Apply our chrome flags now.
                     xulWin->ApplyChromeFlags();
                 }
             }
         }
 
+        nsContentUtils::DispatchTrustedEvent(this,
+                static_cast<nsIDocument*>(this),
+                NS_LITERAL_STRING("MozBeforeInitialXULLayout"),
+                true,
+                false);
+
         StartLayout();
 
         if (mIsWritingFastLoad && IsChromeURI(mDocumentURI))
             nsXULPrototypeCache::GetInstance()->WritePrototype(mMasterPrototype);
 
         NS_ASSERTION(mDelayFrameLoaderInitialization,
                      "mDelayFrameLoaderInitialization should be true!");
         mDelayFrameLoaderInitialization = false;