Bug 1346121. In ScrollFrameHelper::DecideScrollableLayer we should check for a displayport again after we call MaybeCreateDisplayPort. r=botond
authorTimothy Nikkel <tnikkel@gmail.com>
Sat, 18 Mar 2017 16:22:11 -0500
changeset 348365 b316fdd7d8fcdf83210bebe6b81f24cce64fc648
parent 348364 145f874ee97afa9d1ee5ed1a47accda22adc5707
child 348366 27e7cecf46420ac66d14134954c6d10e4a157911
push id39126
push userarchaeopteryx@coole-files.de
push dateSun, 19 Mar 2017 15:37:50 +0000
treeherderautoland@53392221fe78 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1346121
milestone55.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 1346121. In ScrollFrameHelper::DecideScrollableLayer we should check for a displayport again after we call MaybeCreateDisplayPort. r=botond Just like its name says, MaybeCreateDisplayPort might have created a displayport.
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -3604,17 +3604,19 @@ ScrollFrameHelper::DecideScrollableLayer
       } else {
         // Make the displayport base equal to the dirty rect restricted to
         // the scrollport and the root composition bounds, relative to the
         // scrollport.
         displayportBase = aDirtyRect->Intersect(mScrollPort);
 
         // Only restrict to the root composition bounds if necessary,
         // as the required coordinate transformation is expensive.
-        if (wasUsingDisplayPort) {
+        // Note that we call HasDisplayPort again instead of using
+        // wasUsingDisplayPort because we might have just created a display port.
+        if (nsLayoutUtils::HasDisplayPort(content)) {
           const nsPresContext* rootPresContext =
             pc->GetToplevelContentDocumentPresContext();
           if (!rootPresContext) {
             rootPresContext = pc->GetRootPresContext();
           }
           if (rootPresContext) {
             const nsIPresShell* const rootPresShell = rootPresContext->PresShell();
             nsIFrame* rootFrame = rootPresShell->GetRootScrollFrame();