Bug 1429125: Enable lazy frame construction in the browser chrome, but not XUL yet. r?heycam draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 10 Jan 2018 04:54:26 +0100
changeset 718329 71782fbe770fed4c66b03396a340ed66cf65244c
parent 718328 a627844e9e31815d6a7a5b96907ff91d265acedb
child 745447 a908c6f70ddc8f874761e7b218816919b0d5a739
push id94887
push userbmo:emilio@crisal.io
push dateWed, 10 Jan 2018 03:55:56 +0000
reviewersheycam
bugs1429125
milestone59.0a1
Bug 1429125: Enable lazy frame construction in the browser chrome, but not XUL yet. r?heycam MozReview-Commit-ID: 3dwQ9J5nFcS
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -7217,18 +7217,18 @@ nsCSSFrameConstructor::CheckBitsForLazyF
 //
 // But we disable lazy frame construction for shadow trees... We should fix
 // that, too.
 bool
 nsCSSFrameConstructor::MaybeConstructLazily(Operation aOperation,
                                             nsIContent* aContainer,
                                             nsIContent* aChild)
 {
-  if (mPresShell->GetPresContext()->IsChrome() || !aContainer ||
-      aContainer->IsInNativeAnonymousSubtree() || aContainer->IsXULElement()) {
+  if (!aContainer || aContainer->IsInNativeAnonymousSubtree() ||
+      aContainer->IsXULElement()) {
     return false;
   }
 
   if (aOperation == CONTENTINSERT) {
     if (aChild->IsRootOfAnonymousSubtree() || aChild->IsXULElement()) {
       return false;
     }
   } else { // CONTENTAPPEND