Changeset 183943 in webkit


Ignore:
Timestamp:
May 7, 2015, 1:45:42 PM (11 years ago)
Author:
Simon Fraser
Message:

Remove the WK1-only code path for independently composited iframes
https://bugs.webkit.org/show_bug.cgi?id=144722

Reviewed by Dean Jackson.
Source/WebCore:

In WebKit1 on Mac, we allowed iframes to be composited independently of their
parent document, relying on the fact that the frame's platform view can host
a layer-backed view. However, this ran into bugs (rdar://problem/18862298),
and triggers the assertion at the end of FrameView::updateLayoutAndStyleIfNeededRecursive(),
because the compositing update after a layout can dirty style in notifyIFramesOfCompositingChange().

Removing the WK1-only code path solves these problems. It also eliminates the need
to do compositing-specific frame overlap testing.

  • page/FrameView.cpp:

(WebCore::FrameView::setIsOverlapped): No need to do compositing-related things here.
Any iframe that gets composited will participate in the normal compositing overlap
testing in its parent frame.
(WebCore::FrameView::hasCompositedContentIncludingDescendants): Deleted.
(WebCore::FrameView::hasCompositingAncestor): Deleted.

  • page/FrameView.h:
  • rendering/RenderLayerCompositor.cpp: Replace ownerElement() checks in this file

with an isMainFrameCompositor() for readability. Some 0->nullptr.
(WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
(WebCore::RenderLayerCompositor::chromeClient):
(WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::layerTreeAsText):
(WebCore::RenderLayerCompositor::frameContentsCompositor):
(WebCore::RenderLayerCompositor::setIsInWindow):
(WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame):
(WebCore::RenderLayerCompositor::requiresCompositingForFrame): frameRenderer.requiresAcceleratedCompositing()
already bails on no content RenderView, so the shouldPropagateCompositingToEnclosingFrame() check does
nothing and is removed.
(WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer):
(WebCore::RenderLayerCompositor::requiresScrollLayer):
(WebCore::RenderLayerCompositor::documentUsesTiledBacking):
(WebCore::RenderLayerCompositor::isMainFrameCompositor):
(WebCore::RenderLayerCompositor::shouldCompositeOverflowControls):
(WebCore::RenderLayerCompositor::requiresOverhangAreasLayer):
(WebCore::RenderLayerCompositor::requiresContentShadowLayer):
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::ensureRootLayer): Main frame attaches via ChromeClient,
all other frames attach via parent frame.
(WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): This call to
scheduleSetNeedsStyleRecalc(SyntheticStyleChange) was the source of dirtying style after
layout, but is no longer needed so remove it.
(WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
(WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers):
(WebCore::RenderLayerCompositor::scrollingCoordinator):
(WebCore::RenderLayerCompositor::graphicsLayerFactory):
(WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames): Deleted.
(WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): Deleted.
(WebCore::RenderLayerCompositor::mainFrameBackingIsTiled): Deleted. This was mis-named;
it really asks whether the document uses tiled backing, but does not check for main frame.

  • rendering/RenderLayerCompositor.h:
  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::paintContents): No need to do frame overlap testing for
compositing now.

LayoutTests:

Results different from WK2, because WK1 does not make layers for scrollbars.

  • platform/mac-wk1/compositing/visible-rect/iframe-no-layers-expected.txt: Added.
Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r183942 r183943  
     12015-05-07  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Remove the WK1-only code path for independently composited iframes
     4        https://bugs.webkit.org/show_bug.cgi?id=144722
     5
     6        Reviewed by Dean Jackson.
     7       
     8        Results different from WK2, because WK1 does not make layers for scrollbars.
     9
     10        * platform/mac-wk1/compositing/visible-rect/iframe-no-layers-expected.txt: Added.
     11
    1122015-05-06  Dean Jackson  <dino@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r183942 r183943  
     12015-05-07  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Remove the WK1-only code path for independently composited iframes
     4        https://bugs.webkit.org/show_bug.cgi?id=144722
     5
     6        Reviewed by Dean Jackson.
     7
     8        In WebKit1 on Mac, we allowed iframes to be composited independently of their
     9        parent document, relying on the fact that the frame's platform view can host
     10        a layer-backed view. However, this ran into bugs (rdar://problem/18862298),
     11        and triggers the assertion at the end of FrameView::updateLayoutAndStyleIfNeededRecursive(),
     12        because the compositing update after a layout can dirty style in notifyIFramesOfCompositingChange().
     13       
     14        Removing the WK1-only code path solves these problems. It also eliminates the need
     15        to do compositing-specific frame overlap testing.
     16
     17        * page/FrameView.cpp:
     18        (WebCore::FrameView::setIsOverlapped): No need to do compositing-related things here.
     19        Any iframe that gets composited will participate in the normal compositing overlap
     20        testing in its parent frame.
     21        (WebCore::FrameView::hasCompositedContentIncludingDescendants): Deleted.
     22        (WebCore::FrameView::hasCompositingAncestor): Deleted.
     23        * page/FrameView.h:
     24        * rendering/RenderLayerCompositor.cpp: Replace ownerElement() checks in this file
     25        with an isMainFrameCompositor() for readability. Some 0->nullptr.
     26        (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
     27        (WebCore::RenderLayerCompositor::chromeClient):
     28        (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
     29        (WebCore::RenderLayerCompositor::updateCompositingLayers):
     30        (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
     31        (WebCore::RenderLayerCompositor::updateBacking):
     32        (WebCore::RenderLayerCompositor::layerTreeAsText):
     33        (WebCore::RenderLayerCompositor::frameContentsCompositor):
     34        (WebCore::RenderLayerCompositor::setIsInWindow):
     35        (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame):
     36        (WebCore::RenderLayerCompositor::requiresCompositingForFrame): frameRenderer.requiresAcceleratedCompositing()
     37        already bails on no content RenderView, so the shouldPropagateCompositingToEnclosingFrame() check does
     38        nothing and is removed.
     39        (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer):
     40        (WebCore::RenderLayerCompositor::requiresScrollLayer):
     41        (WebCore::RenderLayerCompositor::documentUsesTiledBacking):
     42        (WebCore::RenderLayerCompositor::isMainFrameCompositor):
     43        (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls):
     44        (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer):
     45        (WebCore::RenderLayerCompositor::requiresContentShadowLayer):
     46        (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
     47        (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
     48        (WebCore::RenderLayerCompositor::updateLayerForHeader):
     49        (WebCore::RenderLayerCompositor::updateLayerForFooter):
     50        (WebCore::RenderLayerCompositor::ensureRootLayer): Main frame attaches via ChromeClient,
     51        all other frames attach via parent frame.
     52        (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): This call to
     53        scheduleSetNeedsStyleRecalc(SyntheticStyleChange) was the source of dirtying style after
     54        layout, but is no longer needed so remove it.
     55        (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
     56        (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers):
     57        (WebCore::RenderLayerCompositor::scrollingCoordinator):
     58        (WebCore::RenderLayerCompositor::graphicsLayerFactory):
     59        (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames): Deleted.
     60        (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): Deleted.
     61        (WebCore::RenderLayerCompositor::mainFrameBackingIsTiled): Deleted. This was mis-named;
     62        it really asks whether the document uses tiled backing, but does not check for main frame.
     63        * rendering/RenderLayerCompositor.h:
     64        * rendering/RenderWidget.cpp:
     65        (WebCore::RenderWidget::paintContents): No need to do frame overlap testing for
     66        compositing now.
     67
    1682015-05-06  Dean Jackson  <dino@apple.com>
    269
  • trunk/Source/WebCore/page/FrameView.cpp

    r183891 r183943  
    10181018}
    10191019
    1020 bool FrameView::hasCompositedContentIncludingDescendants() const
    1021 {
    1022     for (auto* frame = m_frame.ptr(); frame; frame = frame->tree().traverseNext(m_frame.ptr())) {
    1023         RenderView* renderView = frame->contentRenderer();
    1024         if (RenderLayerCompositor* compositor = renderView ? &renderView->compositor() : nullptr) {
    1025             if (compositor->inCompositingMode())
    1026                 return true;
    1027 
    1028             if (!RenderLayerCompositor::allowsIndependentlyCompositedFrames(this))
    1029                 break;
    1030         }
    1031     }
    1032     return false;
    1033 }
    1034 
    1035 bool FrameView::hasCompositingAncestor() const
    1036 {
    1037     for (Frame* frame = this->frame().tree().parent(); frame; frame = frame->tree().parent()) {
    1038         if (FrameView* view = frame->view()) {
    1039             if (view->hasCompositedContent())
    1040                 return true;
    1041         }
    1042     }
    1043     return false;
    1044 }
    1045 
    10461020// Sometimes (for plug-ins) we need to eagerly go into compositing mode.
    10471021void FrameView::enterCompositingMode()
     
    19111885    m_isOverlapped = isOverlapped;
    19121886    updateCanBlitOnScrollRecursively();
    1913 
    1914     if (hasCompositedContentIncludingDescendants()) {
    1915         // Overlap can affect compositing tests, so if it changes, we need to trigger
    1916         // a layer update in the parent document.
    1917         if (Frame* parentFrame = frame().tree().parent()) {
    1918             if (RenderView* parentView = parentFrame->contentRenderer()) {
    1919                 RenderLayerCompositor& compositor = parentView->compositor();
    1920                 compositor.setCompositingLayersNeedRebuild();
    1921                 compositor.scheduleCompositingLayerUpdate();
    1922             }
    1923         }
    1924 
    1925         if (RenderLayerCompositor::allowsIndependentlyCompositedFrames(this)) {
    1926             // We also need to trigger reevaluation for this and all descendant frames,
    1927             // since a frame uses compositing if any ancestor is compositing.
    1928             for (auto* frame = m_frame.ptr(); frame; frame = frame->tree().traverseNext(m_frame.ptr())) {
    1929                 if (RenderView* view = frame->contentRenderer()) {
    1930                     RenderLayerCompositor& compositor = view->compositor();
    1931                     compositor.setCompositingLayersNeedRebuild();
    1932                     compositor.scheduleCompositingLayerUpdate();
    1933                 }
    1934             }
    1935         }
    1936     }
    19371887}
    19381888
  • trunk/Source/WebCore/page/FrameView.h

    r183891 r183943  
    171171
    172172    bool hasCompositedContent() const;
    173     bool hasCompositedContentIncludingDescendants() const;
    174     bool hasCompositingAncestor() const;
    175173    WEBCORE_EXPORT void enterCompositingMode();
    176174    WEBCORE_EXPORT bool isEnclosedInCompositingLayer() const;
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r183843 r183943  
    347347    forceCompositingMode = settings.forceCompositingMode() && hasAcceleratedCompositing;
    348348
    349     if (forceCompositingMode && m_renderView.document().ownerElement())
     349    if (forceCompositingMode && !isMainFrameCompositor())
    350350        forceCompositingMode = requiresCompositingForScrollableFrame();
    351351
     
    443443    Page* page = m_renderView.frameView().frame().page();
    444444    if (!page)
    445         return 0;
     445        return nullptr;
    446446    return &page->chrome().client();
    447447}
     
    644644    }
    645645   
    646     return 0;
     646    return nullptr;
    647647}
    648648
     
    760760
    761761        Frame& frame = m_renderView.frameView().frame();
    762         bool isMainFrame = !m_renderView.document().ownerElement();
     762        bool isMainFrame = isMainFrameCompositor();
    763763        LOG(Compositing, "\nUpdate %d of %s.\n", m_rootLayerUpdateCount, isMainFrame ? "main frame" : frame.tree().uniqueName().string().utf8().data());
    764764    }
     
    810810void RenderLayerCompositor::appendDocumentOverlayLayers(Vector<GraphicsLayer*>& childList)
    811811{
     812    if (!isMainFrameCompositor())
     813        return;
     814
    812815    Frame& frame = m_renderView.frameView().frame();
    813     if (!frame.isMainFrame())
    814         return;
    815 
    816816    Page* page = frame.page();
    817817    if (!page)
     
    999999
    10001000            // At this time, the ScrollingCoordinator only supports the top-level frame.
    1001             if (layer.isRootLayer() && !m_renderView.document().ownerElement()) {
     1001            if (layer.isRootLayer() && isMainFrameCompositor()) {
    10021002                updateScrollCoordinatedStatus(layer);
    10031003                if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
     
    18221822    // Dump an empty layer tree only if the only composited layer is the main frame's tiled backing,
    18231823    // so that tests expecting us to drop out of accelerated compositing when there are no layers succeed.
    1824     if (!hasAnyAdditionalCompositedLayers(rootRenderLayer()) && mainFrameBackingIsTiled() && !(layerTreeBehavior & LayerTreeAsTextIncludeTileCaches))
     1824    if (!hasAnyAdditionalCompositedLayers(rootRenderLayer()) && documentUsesTiledBacking() && !(layerTreeBehavior & LayerTreeAsTextIncludeTileCaches))
    18251825        layerTreeText = "";
    18261826
     
    18391839            return &view->compositor();
    18401840    }
    1841     return 0;
     1841    return nullptr;
    18421842}
    18431843
     
    20652065            return;
    20662066
    2067         RootLayerAttachment attachment = shouldPropagateCompositingToEnclosingFrame() ? RootLayerAttachedViaEnclosingFrame : RootLayerAttachedViaChromeClient;
     2067        RootLayerAttachment attachment = isMainFrameCompositor() ? RootLayerAttachedViaChromeClient : RootLayerAttachedViaEnclosingFrame;
    20682068        attachRootLayer(attachment);
    20692069#if PLATFORM(IOS)
     
    21282128{
    21292129    return layerHas3DContent(rootRenderLayer());
    2130 }
    2131 
    2132 bool RenderLayerCompositor::allowsIndependentlyCompositedFrames(const FrameView* view)
    2133 {
    2134 #if PLATFORM(MAC)
    2135     // frames are only independently composited in Mac pre-WebKit2.
    2136     return view->platformWidget();
    2137 #else
    2138     UNUSED_PARAM(view);
    2139 #endif
    2140     return false;
    2141 }
    2142 
    2143 bool RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame() const
    2144 {
    2145     // Parent document content needs to be able to render on top of a composited frame, so correct behavior
    2146     // is to have the parent document become composited too. However, this can cause problems on platforms that
    2147     // use native views for frames (like Mac), so disable that behavior on those platforms for now.
    2148     HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement();
    2149 
    2150     // If we are the top-level frame, don't propagate.
    2151     if (!ownerElement)
    2152         return false;
    2153 
    2154     if (!allowsIndependentlyCompositedFrames(&m_renderView.frameView()))
    2155         return true;
    2156 
    2157     RenderElement* renderer = ownerElement->renderer();
    2158     if (!is<RenderWidget>(renderer))
    2159         return false;
    2160 
    2161     // On Mac, only propagate compositing if the frame is overlapped in the parent
    2162     // document, or the parent is already compositing, or the main frame is scaled.
    2163     Page* page = this->page();
    2164     if (page && page->pageScaleFactor() != 1)
    2165         return true;
    2166    
    2167     RenderWidget& frameRenderer = downcast<RenderWidget>(*renderer);
    2168     if (frameRenderer.widget()) {
    2169         FrameView& view = downcast<FrameView>(*frameRenderer.widget());
    2170         if (view.isOverlappedIncludingAncestors() || view.hasCompositingAncestor())
    2171             return true;
    2172     }
    2173 
    2174     return false;
    21752130}
    21762131
     
    24982453    // Need this done first to determine overflow.
    24992454    ASSERT(!m_renderView.needsLayout());
    2500     HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement();
    2501     if (!ownerElement)
     2455    if (isMainFrameCompositor())
    25022456        return false;
    25032457
     
    25982552
    25992553    auto& frameRenderer = downcast<RenderWidget>(renderer);
    2600 
    26012554    if (!frameRenderer.requiresAcceleratedCompositing())
    26022555        return false;
    26032556
    26042557    m_reevaluateCompositingAfterLayout = true;
    2605 
    2606     RenderLayerCompositor* innerCompositor = frameContentsCompositor(&frameRenderer);
    2607     if (!innerCompositor || !innerCompositor->shouldPropagateCompositingToEnclosingFrame())
    2608         return false;
    26092558
    26102559    // If we can't reliably know the size of the iframe yet, don't change compositing state.
     
    26962645#if PLATFORM(IOS)
    26972646    // iOS WK1 has fixed/sticky support in the main frame via WebFixedPositionContent.
    2698     return m_renderView.frameView().frame().isMainFrame();
     2647    return isMainFrameCompositor();
    26992648#else
    27002649    return false;
     
    28402789
    28412790    // This applies when the application UI handles scrolling, in which case RenderLayerCompositor doesn't need to manage it.
    2842     if (frameView.delegatesScrolling() && frameView.frame().isMainFrame())
     2791    if (frameView.delegatesScrolling() && isMainFrameCompositor())
    28432792        return false;
    28442793
     
    29802929}
    29812930
    2982 bool RenderLayerCompositor::mainFrameBackingIsTiled() const
     2931bool RenderLayerCompositor::documentUsesTiledBacking() const
    29832932{
    29842933    RenderLayer* layer = m_renderView.layer();
     
    29932942}
    29942943
     2944bool RenderLayerCompositor::isMainFrameCompositor() const
     2945{
     2946    return m_renderView.frameView().frame().isMainFrame();
     2947}
     2948
    29952949bool RenderLayerCompositor::shouldCompositeOverflowControls() const
    29962950{
     
    30032957        return false;
    30042958
    3005     if (mainFrameBackingIsTiled())
     2959    if (documentUsesTiledBacking())
    30062960        return true;
    30072961
     
    30302984bool RenderLayerCompositor::requiresOverhangAreasLayer() const
    30312985{
    3032     // We don't want a layer if this is a subframe.
    3033     if (m_renderView.document().ownerElement())
     2986    if (!isMainFrameCompositor())
    30342987        return false;
    30352988
    30362989    // We do want a layer if we're using tiled drawing and can scroll.
    3037     if (mainFrameBackingIsTiled() && m_renderView.frameView().hasOpaqueBackground() && !m_renderView.frameView().prohibitsScrolling())
     2990    if (documentUsesTiledBacking() && m_renderView.frameView().hasOpaqueBackground() && !m_renderView.frameView().prohibitsScrolling())
    30382991        return true;
    30392992
     
    30432996bool RenderLayerCompositor::requiresContentShadowLayer() const
    30442997{
    3045     // We don't want a layer if this is a subframe.
    3046     if (m_renderView.document().ownerElement())
     2998    if (!isMainFrameCompositor())
    30472999        return false;
    30483000
     
    30563008
    30573009    // On Mac, we want a content shadow layer if we're using tiled drawing and can scroll.
    3058     if (mainFrameBackingIsTiled() && !m_renderView.frameView().prohibitsScrolling())
     3010    if (documentUsesTiledBacking() && !m_renderView.frameView().prohibitsScrolling())
    30593011        return true;
    30603012#endif
     
    30653017GraphicsLayer* RenderLayerCompositor::updateLayerForTopOverhangArea(bool wantsLayer)
    30663018{
    3067     if (m_renderView.document().ownerElement())
    3068         return 0;
     3019    if (!isMainFrameCompositor())
     3020        return nullptr;
    30693021
    30703022    if (!wantsLayer) {
     
    30733025            m_layerForTopOverhangArea = nullptr;
    30743026        }
    3075         return 0;
     3027        return nullptr;
    30763028    }
    30773029
     
    30893041GraphicsLayer* RenderLayerCompositor::updateLayerForBottomOverhangArea(bool wantsLayer)
    30903042{
    3091     if (m_renderView.document().ownerElement())
    3092         return 0;
     3043    if (!isMainFrameCompositor())
     3044        return nullptr;
    30933045
    30943046    if (!wantsLayer) {
     
    30973049            m_layerForBottomOverhangArea = nullptr;
    30983050        }
    3099         return 0;
     3051        return nullptr;
    31003052    }
    31013053
     
    31153067GraphicsLayer* RenderLayerCompositor::updateLayerForHeader(bool wantsLayer)
    31163068{
    3117     if (m_renderView.document().ownerElement())
    3118         return 0;
     3069    if (!isMainFrameCompositor())
     3070        return nullptr;
    31193071
    31203072    if (!wantsLayer) {
     
    31283080                scrollingCoordinator->frameViewRootLayerDidChange(m_renderView.frameView());
    31293081        }
    3130         return 0;
     3082        return nullptr;
    31313083    }
    31323084
     
    31563108GraphicsLayer* RenderLayerCompositor::updateLayerForFooter(bool wantsLayer)
    31573109{
    3158     if (m_renderView.document().ownerElement())
    3159         return 0;
     3110    if (!isMainFrameCompositor())
     3111        return nullptr;
    31603112
    31613113    if (!wantsLayer) {
     
    31693121                scrollingCoordinator->frameViewRootLayerDidChange(m_renderView.frameView());
    31703122        }
    3171         return 0;
     3123        return nullptr;
    31723124    }
    31733125
     
    33723324void RenderLayerCompositor::ensureRootLayer()
    33733325{
    3374     RootLayerAttachment expectedAttachment = shouldPropagateCompositingToEnclosingFrame() ? RootLayerAttachedViaEnclosingFrame : RootLayerAttachedViaChromeClient;
     3326    RootLayerAttachment expectedAttachment = isMainFrameCompositor() ? RootLayerAttachedViaChromeClient : RootLayerAttachedViaEnclosingFrame;
    33753327    if (expectedAttachment == m_rootLayerAttachment)
    33763328         return;
     
    36063558}
    36073559
    3608 // IFrames are special, because we hook compositing layers together across iframe boundaries
    3609 // when both parent and iframe content are composited. So when this frame becomes composited, we have
    3610 // to use a synthetic style change to get the iframes into RenderLayers in order to allow them to composite.
    36113560void RenderLayerCompositor::notifyIFramesOfCompositingChange()
    36123561{
    3613     Frame& frame = m_renderView.frameView().frame();
    3614     for (Frame* child = frame.tree().firstChild(); child; child = child->tree().traverseNext(&frame)) {
    3615         if (child->document() && child->document()->ownerElement())
    3616             child->document()->ownerElement()->scheduleSetNeedsStyleRecalc(SyntheticStyleChange);
    3617     }
    3618    
    3619     // Compositing also affects the answer to RenderIFrame::requiresAcceleratedCompositing(), so
     3562    // Compositing affects the answer to RenderIFrame::requiresAcceleratedCompositing(), so
    36203563    // we need to schedule a style recalc in our parent document.
    36213564    if (HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement())
     
    39923935{
    39933936    // Only the main frame should register fixed/sticky layers.
    3994     if (m_renderView.document().ownerElement())
     3937    if (!isMainFrameCompositor())
    39953938        return;
    39963939
     
    40273970{
    40283971    // Only the main frame should register fixed/sticky layers.
    4029     if (m_renderView.document().ownerElement())
     3972    if (!isMainFrameCompositor())
    40303973        return;
    40313974
     
    41164059        return page->scrollingCoordinator();
    41174060
    4118     return 0;
     4061    return nullptr;
    41194062}
    41204063
     
    41244067        return page->chrome().client().graphicsLayerFactory();
    41254068
    4126     return 0;
     4069    return nullptr;
    41274070}
    41284071
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.h

    r183775 r183943  
    228228    bool has3DContent() const;
    229229   
    230     // Most platforms connect compositing layer trees between iframes and their parent document.
    231     // Some (currently just Mac) allow iframes to do their own compositing.
    232     static bool allowsIndependentlyCompositedFrames(const FrameView*);
    233     bool shouldPropagateCompositingToEnclosingFrame() const;
    234 
    235230    static RenderLayerCompositor* frameContentsCompositor(RenderWidget*);
    236231    // Return true if the layers changed.
     
    477472#endif
    478473
    479     bool mainFrameBackingIsTiled() const;
     474    bool documentUsesTiledBacking() const;
     475    bool isMainFrameCompositor() const;
    480476
    481477private:
  • trunk/Source/WebCore/rendering/RenderWidget.cpp

    r183788 r183943  
    240240    if (is<FrameView>(*m_widget)) {
    241241        FrameView& frameView = downcast<FrameView>(*m_widget);
    242         bool runOverlapTests = !frameView.useSlowRepaintsIfNotOverlapped() || frameView.hasCompositedContentIncludingDescendants();
     242        bool runOverlapTests = !frameView.useSlowRepaintsIfNotOverlapped();
    243243        if (paintInfo.overlapTestRequests && runOverlapTests) {
    244244            ASSERT(!paintInfo.overlapTestRequests->contains(this));
Note: See TracChangeset for help on using the changeset viewer.