Bug 1021420 - Ensure that scrollable layers get a view ID created for them. r=tnikkel
authorMarkus Stange <mstange@themasta.com>
Tue, 10 Jun 2014 22:29:32 +0200
changeset 201813 4e8c7d93078afc21f78e3f74bc0fbb052828aa97
parent 201812 48dc31fc0fc48b150b11a9141187717349fc7de0
child 201814 f96e57dc850406da08d6e3d7298eb38bef0de563
push id6561
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 21:23:20 +0000
treeherdermozilla-aurora@428d4d3c8588 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs1021420
milestone33.0a1
Bug 1021420 - Ensure that scrollable layers get a view ID created for them. r=tnikkel
layout/base/nsDisplayList.cpp
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -3627,22 +3627,17 @@ nsDisplaySubDocument::BuildLayer(nsDispl
     nsRect displayport, criticalDisplayport;
     ViewID scrollId = FrameMetrics::NULL_SCROLL_ID;
     if (rootScrollFrame) {
       nsIContent* content = rootScrollFrame->GetContent();
       if (content) {
         usingDisplayport = nsLayoutUtils::GetDisplayPort(content, &displayport);
         usingCriticalDisplayport =
           nsLayoutUtils::GetCriticalDisplayPort(content, &criticalDisplayport);
-
-        if (isRootContentDocument) {
-          scrollId = nsLayoutUtils::FindOrCreateIDFor(content);
-        } else {
-          nsLayoutUtils::FindIDFor(content, &scrollId);
-        }
+        scrollId = nsLayoutUtils::FindOrCreateIDFor(content);
       }
     }
 
     nsRect viewport = mFrame->GetRect() -
                       mFrame->GetPosition() +
                       mFrame->GetOffsetToCrossDoc(ReferenceFrame());
 
     container->SetScrollHandoffParentId(mScrollParentId);