| Index: Source/core/rendering/compositing/RenderLayerCompositor.cpp
|
| diff --git a/Source/core/rendering/compositing/RenderLayerCompositor.cpp b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
|
| index 6c27f8396f74d42896b0aa6b5a1b424e1c44b844..ac017de3809c7659384fcf52a8a4cac4cf606d1c 100644
|
| --- a/Source/core/rendering/compositing/RenderLayerCompositor.cpp
|
| +++ b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
|
| @@ -35,7 +35,6 @@
|
| #include "core/dom/FullscreenElementStack.h"
|
| #include "core/dom/NodeList.h"
|
| #include "core/dom/ScriptForbiddenScope.h"
|
| -#include "core/frame/DeprecatedScheduleStyleRecalcDuringCompositingUpdate.h"
|
| #include "core/frame/FrameView.h"
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/frame/Settings.h"
|
| @@ -148,12 +147,22 @@ void RenderLayerCompositor::setCompositingModeEnabled(bool enable)
|
|
|
| m_compositing = enable;
|
|
|
| + // RenderPart::requiresAcceleratedCompositing is used to determine self-paintingness
|
| + // and bases it's return value for frames on the m_compositing bit here.
|
| + if (HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement()) {
|
| + if (RenderPart* renderer = ownerElement->renderPart())
|
| + renderer->layer()->updateSelfPaintingLayer();
|
| + }
|
| +
|
| if (m_compositing)
|
| ensureRootLayer();
|
| else
|
| destroyRootLayer();
|
|
|
| - notifyIFramesOfCompositingChange();
|
| + // Compositing also affects the answer to RenderIFrame::requiresAcceleratedCompositing(), so
|
| + // we need to schedule a style recalc in our parent document.
|
| + if (HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement())
|
| + ownerElement->setNeedsCompositingUpdate();
|
| }
|
|
|
| void RenderLayerCompositor::enableCompositingModeIfNeeded()
|
| @@ -1262,10 +1271,9 @@ void RenderLayerCompositor::attachRootLayer(RootLayerAttachment attachment)
|
| case RootLayerAttachedViaEnclosingFrame: {
|
| HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement();
|
| ASSERT(ownerElement);
|
| - DeprecatedScheduleStyleRecalcDuringCompositingUpdate marker(ownerElement->document().lifecycle());
|
| // The layer will get hooked up via CompositedLayerMapping::updateGraphicsLayerConfiguration()
|
| // for the frame's renderer in the parent document.
|
| - ownerElement->scheduleLayerUpdate();
|
| + ownerElement->setNeedsCompositingUpdate();
|
| break;
|
| }
|
| }
|
| @@ -1287,10 +1295,8 @@ void RenderLayerCompositor::detachRootLayer()
|
| else
|
| m_rootContentLayer->removeFromParent();
|
|
|
| - if (HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement()) {
|
| - DeprecatedScheduleStyleRecalcDuringCompositingUpdate marker(ownerElement->document().lifecycle());
|
| - ownerElement->scheduleLayerUpdate();
|
| - }
|
| + if (HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement())
|
| + ownerElement->setNeedsCompositingUpdate();
|
| break;
|
| }
|
| case RootLayerAttachedViaChromeClient: {
|
| @@ -1313,33 +1319,6 @@ void RenderLayerCompositor::updateRootLayerAttachment()
|
| ensureRootLayer();
|
| }
|
|
|
| -// IFrames are special, because we hook compositing layers together across iframe boundaries
|
| -// when both parent and iframe content are composited. So when this frame becomes composited, we have
|
| -// to use a synthetic style change to get the iframes into RenderLayers in order to allow them to composite.
|
| -void RenderLayerCompositor::notifyIFramesOfCompositingChange()
|
| -{
|
| - if (!m_renderView.frameView())
|
| - return;
|
| - LocalFrame& frame = m_renderView.frameView()->frame();
|
| -
|
| - for (LocalFrame* child = frame.tree().firstChild(); child; child = child->tree().traverseNext(&frame)) {
|
| - if (!child->document())
|
| - continue; // FIXME: Can this happen?
|
| - if (HTMLFrameOwnerElement* ownerElement = child->document()->ownerElement()) {
|
| - DeprecatedScheduleStyleRecalcDuringCompositingUpdate marker(ownerElement->document().lifecycle());
|
| - ownerElement->scheduleLayerUpdate();
|
| - }
|
| - }
|
| -
|
| - // Compositing also affects the answer to RenderIFrame::requiresAcceleratedCompositing(), so
|
| - // we need to schedule a style recalc in our parent document.
|
| - if (HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement()) {
|
| - ownerElement->document().renderView()->compositor()->setNeedsToRecomputeCompositingRequirements();
|
| - DeprecatedScheduleStyleRecalcDuringCompositingUpdate marker(ownerElement->document().lifecycle());
|
| - ownerElement->scheduleLayerUpdate();
|
| - }
|
| -}
|
| -
|
| ScrollingCoordinator* RenderLayerCompositor::scrollingCoordinator() const
|
| {
|
| if (Page* page = this->page())
|
|
|