Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1333)

Unified Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 348833005: [DO NOT COMMIT] Random hacks to unblock work on replication. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More random hacks, including also dcheng's https://codereview.chromium.org/346403002 Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/modules/geolocation/GeolocationController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/compositing/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/compositing/RenderLayerCompositor.cpp b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
index dbeb8cb0d51b8fec9fd98d72404518add54fad48..56edac1a0a3b21513894b5b42d6ad5a97a520e10 100644
--- a/Source/core/rendering/compositing/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
@@ -137,7 +137,8 @@ bool RenderLayerCompositor::rootShouldAlwaysComposite() const
{
if (!m_hasAcceleratedCompositing)
return false;
- return m_renderView.frame()->isMainFrame() || m_compositingReasonFinder.requiresCompositingForScrollableFrame();
+ return m_renderView.frame()->isMainFrame() || m_renderView.frame()->isLocalRoot() ||
+ m_compositingReasonFinder.requiresCompositingForScrollableFrame();
}
void RenderLayerCompositor::updateAcceleratedCompositingSettings()
@@ -250,10 +251,10 @@ void RenderLayerCompositor::applyOverlayFullscreenVideoAdjustment()
if (!m_rootContentLayer)
return;
- bool isMainFrame = m_renderView.frame()->isMainFrame();
+ bool isLocalRoot = m_renderView.frame()->isLocalRoot();
RenderVideo* video = findFullscreenVideoRenderer(m_renderView.document());
if (!video || !video->hasCompositedLayerMapping()) {
- if (isMainFrame) {
+ if (isLocalRoot) {
GraphicsLayer* backgroundLayer = fixedRootBackgroundLayer();
if (backgroundLayer && !backgroundLayer->parent())
rootFixedBackgroundsChanged();
@@ -268,7 +269,7 @@ void RenderLayerCompositor::applyOverlayFullscreenVideoAdjustment()
videoLayer->setPosition(IntPoint());
// Only steal fullscreen video layer and clear all other layers if we are the main frame.
- if (!isMainFrame)
+ if (!isLocalRoot)
return;
m_rootContentLayer->removeAllChildren();
@@ -357,7 +358,7 @@ void RenderLayerCompositor::updateIfNeeded()
}
// Inform the inspector that the layer tree has changed.
- if (m_renderView.frame()->isMainFrame())
+ if (m_renderView.frame()->isLocalRoot())
InspectorInstrumentation::layerTreeDidChange(m_renderView.frame());
}
@@ -388,7 +389,7 @@ bool RenderLayerCompositor::allocateOrClearCompositedLayerMapping(RenderLayer* l
compositedLayerMappingChanged = true;
// At this time, the ScrollingCooridnator only supports the top-level frame.
- if (layer->isRootLayer() && m_renderView.frame()->isMainFrame()) {
+ if (layer->isRootLayer() && m_renderView.frame()->isLocalRoot()) {
if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->frameViewRootLayerDidChange(m_renderView.frameView());
}
@@ -544,7 +545,7 @@ void RenderLayerCompositor::frameViewDidScroll()
bool scrollingCoordinatorHandlesOffset = false;
if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator()) {
if (Settings* settings = m_renderView.document().settings()) {
- if (m_renderView.frame()->isMainFrame() || settings->compositedScrollingForFramesEnabled())
+ if (m_renderView.frame()->isLocalRoot() || settings->compositedScrollingForFramesEnabled())
scrollingCoordinatorHandlesOffset = scrollingCoordinator->scrollableAreaScrollLayerDidChange(frameView);
}
}
@@ -730,7 +731,7 @@ void RenderLayerCompositor::setIsInWindow(bool isInWindow)
if (m_rootLayerAttachment != RootLayerUnattached)
return;
- RootLayerAttachment attachment = m_renderView.frame()->isMainFrame() ? RootLayerAttachedViaChromeClient : RootLayerAttachedViaEnclosingFrame;
+ RootLayerAttachment attachment = m_renderView.frame()->isLocalRoot() ? RootLayerAttachedViaChromeClient : RootLayerAttachedViaEnclosingFrame;
attachRootLayer(attachment);
} else {
if (m_rootLayerAttachment == RootLayerUnattached)
@@ -952,7 +953,7 @@ bool RenderLayerCompositor::requiresScrollCornerLayer() const
void RenderLayerCompositor::updateOverflowControlsLayers()
{
#if USE(RUBBER_BANDING)
- if (m_renderView.frame()->isMainFrame()) {
+ if (m_renderView.frame()->isLocalRoot()) {
if (!m_layerForOverhangShadow) {
m_layerForOverhangShadow = GraphicsLayer::create(graphicsLayerFactory(), this);
OverscrollTheme::theme()->setUpOverhangShadowLayer(m_layerForOverhangShadow.get());
@@ -1018,7 +1019,7 @@ void RenderLayerCompositor::updateOverflowControlsLayers()
void RenderLayerCompositor::ensureRootLayer()
{
- RootLayerAttachment expectedAttachment = m_renderView.frame()->isMainFrame() ? RootLayerAttachedViaChromeClient : RootLayerAttachedViaEnclosingFrame;
+ RootLayerAttachment expectedAttachment = m_renderView.frame()->isLocalRoot() ? RootLayerAttachedViaChromeClient : RootLayerAttachedViaEnclosingFrame;
if (expectedAttachment == m_rootLayerAttachment)
return;
@@ -1042,7 +1043,7 @@ void RenderLayerCompositor::ensureRootLayer()
// Create a clipping layer if this is an iframe or settings require to clip.
m_containerLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
- bool containerMasksToBounds = !m_renderView.frame()->isMainFrame();
+ bool containerMasksToBounds = !m_renderView.frame()->isLocalRoot();
if (Settings* settings = m_renderView.document().settings()) {
if (settings->mainFrameClipsContent())
containerMasksToBounds = true;
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/modules/geolocation/GeolocationController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698