Upstream version 7.35.139.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / rendering / compositing / RenderLayerCompositor.cpp
index 65e2694..0449701 100644 (file)
@@ -463,8 +463,6 @@ void RenderLayerCompositor::updateCompositingLayersInternal()
     if (!needCompositingRequirementsUpdate && !needHierarchyAndGeometryUpdate && !needGeometryUpdate && !needsToUpdateScrollingCoordinator)
         return;
 
-    GraphicsLayerUpdater::UpdateType updateType = m_pendingUpdateType;
-
     // Only clear the flags if we're updating the entire hierarchy.
     m_compositingLayersNeedRebuild = false;
     m_needsToUpdateLayerTreeGeometry = false;
@@ -522,7 +520,7 @@ void RenderLayerCompositor::updateCompositingLayersInternal()
 
     if (needGeometryUpdate || needHierarchyAndGeometryUpdate) {
         TRACE_EVENT0("blink_rendering", "GraphicsLayerUpdater::updateRecursive");
-        GraphicsLayerUpdater().update(*updateRoot, updateType);
+        GraphicsLayerUpdater().update(*updateRoot, GraphicsLayerUpdater::ForceUpdate);
     }
 
     if (needHierarchyAndGeometryUpdate) {
@@ -536,9 +534,15 @@ void RenderLayerCompositor::updateCompositingLayersInternal()
         // Host the document layer in the RenderView's root layer.
         if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isMainFrame()) {
             RenderVideo* video = findFullscreenVideoRenderer(m_renderView.document());
+            GraphicsLayer* backgroundLayer = fixedRootBackgroundLayer();
             if (video && video->hasCompositedLayerMapping()) {
                 childList.clear();
                 childList.append(video->compositedLayerMapping()->mainGraphicsLayer());
+                if (backgroundLayer && backgroundLayer->parent())
+                    backgroundLayer->removeFromParent();
+            } else {
+                if (backgroundLayer && !backgroundLayer->parent())
+                    rootFixedBackgroundsChanged();
             }
         }