diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-03-12 14:11:15 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-03-12 14:11:15 +0100 |
commit | dd91e772430dc294e3bf478c119ef8d43c0a3358 (patch) | |
tree | 6f33ce4d5872a5691e0291eb45bf6ab373a5f567 /Source/WebKit/chromium/src/WebViewImpl.cpp | |
parent | ad0d549d4cc13433f77c1ac8f0ab379c83d93f28 (diff) | |
download | qtwebkit-dd91e772430dc294e3bf478c119ef8d43c0a3358.tar.gz |
Imported WebKit commit 3db4eb1820ac8fb03065d7ea73a4d9db1e8fea1a (http://svn.webkit.org/repository/webkit/trunk@110422)
This includes build fixes for the latest qtbase/qtdeclarative as well as the final QML2 API.
Diffstat (limited to 'Source/WebKit/chromium/src/WebViewImpl.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/WebViewImpl.cpp | 227 |
1 files changed, 126 insertions, 101 deletions
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp index 55a2052a4..52a022ce9 100644 --- a/Source/WebKit/chromium/src/WebViewImpl.cpp +++ b/Source/WebKit/chromium/src/WebViewImpl.cpp @@ -34,6 +34,7 @@ #include "AutofillPopupMenuClient.h" #include "AXObjectCache.h" #include "BackForwardListChromium.h" +#include "cc/CCProxy.h" #include "CSSStyleSelector.h" #include "CSSValueKeywords.h" #include "Chrome.h" @@ -73,6 +74,7 @@ #include "Image.h" #include "ImageBuffer.h" #include "InspectorController.h" +#include "InspectorInstrumentation.h" #include "KeyboardCodes.h" #include "KeyboardEvent.h" #include "LayerChromium.h" @@ -102,6 +104,7 @@ #include "SecurityOrigin.h" #include "SecurityPolicy.h" #include "Settings.h" +#include "SharedGraphicsContext3D.h" #include "SpeechInputClientImpl.h" #include "TextIterator.h" #include "Timer.h" @@ -123,6 +126,8 @@ #include "WebInputEventConversion.h" #include "WebKit.h" #include "platform/WebKitPlatformSupport.h" +#include "platform/WebLayer.h" +#include "platform/WebLayerTreeView.h" #include "WebMediaPlayerAction.h" #include "WebNode.h" #include "WebPlugin.h" @@ -137,7 +142,6 @@ #include "platform/WebString.h" #include "platform/WebVector.h" #include "WebViewClient.h" -#include "cc/CCProxy.h" #include <wtf/ByteArray.h> #include <wtf/CurrentTime.h> #include <wtf/MainThread.h> @@ -168,27 +172,6 @@ using namespace WebCore; using namespace std; -namespace { - -WebKit::WebGraphicsContext3D::Attributes getCompositorContextAttributes(bool threaded) -{ - // Explicitly disable antialiasing for the compositor. As of the time of - // this writing, the only platform that supported antialiasing for the - // compositor was Mac OS X, because the on-screen OpenGL context creation - // code paths on Windows and Linux didn't yet have multisampling support. - // Mac OS X essentially always behaves as though it's rendering offscreen. - // Multisampling has a heavy cost especially on devices with relatively low - // fill rate like most notebooks, and the Mac implementation would need to - // be optimized to resolve directly into the IOSurface shared between the - // GPU and browser processes. For these reasons and to avoid platform - // disparities we explicitly disable antialiasing. - WebKit::WebGraphicsContext3D::Attributes attributes; - attributes.antialias = false; - attributes.shareResources = true; - attributes.forUseOnAnotherThread = threaded; - return attributes; -} - // The following constants control parameters for automated scaling of webpages // (such as due to a double tap gesture or find in page etc.). These are // experimentally determined. @@ -197,8 +180,6 @@ static const float minScaleDifference = 0.01; static const float doubleTapZoomContentDefaultMargin = 5; static const float doubleTapZoomContentMinimumMargin = 2; -} // anonymous namespace - namespace WebKit { // Change the text zoom level by kTextSizeMultiplierRatio each time the user @@ -525,7 +506,7 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event) || (event.button == WebMouseEvent::ButtonLeft && event.modifiers & WebMouseEvent::ControlKey)) mouseContextMenu(event); -#elif OS(UNIX) +#elif OS(UNIX) || OS(ANDROID) if (event.button == WebMouseEvent::ButtonRight) mouseContextMenu(event); #endif @@ -627,8 +608,8 @@ bool WebViewImpl::gestureEvent(const WebGestureEvent& event) void WebViewImpl::startPageScaleAnimation(const IntPoint& scroll, bool useAnchor, float newScale, double durationSec) { - if (m_layerTreeHost) - m_layerTreeHost->startPageScaleAnimation(IntSize(scroll.x(), scroll.y()), useAnchor, newScale, durationSec); + if (!m_layerTreeView.isNull()) + m_layerTreeView.startPageScaleAnimation(scroll, useAnchor, newScale, durationSec); } #endif @@ -1264,6 +1245,11 @@ void WebViewImpl::didExitFullScreen() #endif } +void WebViewImpl::instrumentBeginFrame() +{ + InspectorInstrumentation::didBeginFrame(m_page.get()); +} + void WebViewImpl::animate(double frameBeginTime) { #if ENABLE(REQUEST_ANIMATION_FRAME) @@ -1276,7 +1262,7 @@ void WebViewImpl::animate(double frameBeginTime) // In composited mode, we always go through the compositor so it can apply // appropriate flow-control mechanisms. if (isAcceleratedCompositingActive()) - m_layerTreeHost->updateAnimations(frameBeginTime); + m_layerTreeView.updateAnimations(frameBeginTime); else #endif updateAnimations(frameBeginTime); @@ -1324,6 +1310,7 @@ void WebViewImpl::layout() #if USE(ACCELERATED_COMPOSITING) void WebViewImpl::doPixelReadbackToCanvas(WebCanvas* canvas, const IntRect& rect) { + ASSERT(!m_layerTreeView.isNull()); #if USE(SKIA) PlatformContextSkia context(canvas); @@ -1342,7 +1329,7 @@ void WebViewImpl::doPixelReadbackToCanvas(WebCanvas* canvas, const IntRect& rect OwnPtr<ImageBuffer> imageBuffer(ImageBuffer::create(rect.size())); RefPtr<ByteArray> pixelArray(ByteArray::create(rect.width() * rect.height() * 4)); if (imageBuffer && pixelArray) { - m_layerTreeHost->compositeAndReadback(pixelArray->data(), invertRect); + m_layerTreeView.compositeAndReadback(pixelArray->data(), invertRect); imageBuffer->putByteArray(Premultiplied, pixelArray.get(), rect.size(), IntRect(IntPoint(), rect.size()), IntPoint()); gc.save(); gc.translate(IntSize(0, bitmapHeight)); @@ -1364,7 +1351,7 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect) if (canvas) { // Clip rect to the confines of the rootLayerTexture. IntRect resizeRect(rect); - resizeRect.intersect(IntRect(IntPoint(0, 0), m_layerTreeHost->viewportSize())); + resizeRect.intersect(IntRect(IntPoint(0, 0), m_layerTreeView.viewportSize())); doPixelReadbackToCanvas(canvas, resizeRect); } #endif @@ -1394,7 +1381,7 @@ void WebViewImpl::composite(bool) { #if USE(ACCELERATED_COMPOSITING) if (CCProxy::hasImplThread()) - m_layerTreeHost->setNeedsRedraw(); + m_layerTreeView.setNeedsRedraw(); else { ASSERT(isAcceleratedCompositingActive()); if (!page()) @@ -1403,7 +1390,7 @@ void WebViewImpl::composite(bool) if (m_pageOverlays) m_pageOverlays->update(); - m_layerTreeHost->composite(); + m_layerTreeView.composite(); } #endif } @@ -1411,16 +1398,16 @@ void WebViewImpl::composite(bool) void WebViewImpl::setNeedsRedraw() { #if USE(ACCELERATED_COMPOSITING) - if (m_layerTreeHost && isAcceleratedCompositingActive()) - m_layerTreeHost->setNeedsRedraw(); + if (!m_layerTreeView.isNull() && isAcceleratedCompositingActive()) + m_layerTreeView.setNeedsRedraw(); #endif } void WebViewImpl::loseCompositorContext(int numTimes) { #if USE(ACCELERATED_COMPOSITING) - if (m_layerTreeHost) - m_layerTreeHost->loseCompositorContext(numTimes); + if (!m_layerTreeView.isNull()) + m_layerTreeView.loseCompositorContext(numTimes); #endif } @@ -2261,15 +2248,27 @@ void WebViewImpl::enableFixedLayoutMode(bool enable) #endif } -void WebViewImpl::enableAutoResizeMode(bool enable, const WebSize& minSize, const WebSize& maxSize) + +void WebViewImpl::enableAutoResizeMode(const WebSize& minSize, const WebSize& maxSize) { - m_shouldAutoResize = enable; + m_shouldAutoResize = true; m_minAutoSize = minSize; m_maxAutoSize = maxSize; - if (!mainFrameImpl() || !mainFrameImpl()->frame() || !mainFrameImpl()->frame()->view()) - return; + configureAutoResizeMode(); +} - mainFrameImpl()->frame()->view()->enableAutoSizeMode(m_shouldAutoResize, m_minAutoSize, m_maxAutoSize); +void WebViewImpl::disableAutoResizeMode() +{ + m_shouldAutoResize = false; + configureAutoResizeMode(); +} + +void WebViewImpl::enableAutoResizeMode(bool enable, const WebSize& minSize, const WebSize& maxSize) +{ + if (enable) + enableAutoResizeMode(minSize, maxSize); + else + disableAutoResizeMode(); } void WebViewImpl::setPageScaleFactorLimits(float minPageScale, float maxPageScale) @@ -2302,8 +2301,8 @@ bool WebViewImpl::computePageScaleFactorLimits() float clampedScale = clampPageScaleFactorToLimits(pageScaleFactor()); #if USE(ACCELERATED_COMPOSITING) - if (m_layerTreeHost) - m_layerTreeHost->setPageScaleFactorAndLimits(clampedScale, m_minimumPageScaleFactor, m_maximumPageScaleFactor); + if (!m_layerTreeView.isNull()) + m_layerTreeView.setPageScaleFactorAndLimits(clampedScale, m_minimumPageScaleFactor, m_maximumPageScaleFactor); #endif if (clampedScale != pageScaleFactor()) { setPageScaleFactorPreservingScrollOffset(clampedScale); @@ -2582,6 +2581,14 @@ void WebViewImpl::sendResizeEventAndRepaint() } } +void WebViewImpl::configureAutoResizeMode() +{ + if (!mainFrameImpl() || !mainFrameImpl()->frame() || !mainFrameImpl()->frame()->view()) + return; + + mainFrameImpl()->frame()->view()->enableAutoSizeMode(m_shouldAutoResize, m_minAutoSize, m_maxAutoSize); +} + unsigned long WebViewImpl::createUniqueIdentifierForRequest() { if (m_page) @@ -2929,17 +2936,12 @@ void WebViewImpl::addPageOverlay(WebPageOverlay* overlay, int zOrder) m_pageOverlays = PageOverlayList::create(this); m_pageOverlays->add(overlay, zOrder); - setRootLayerNeedsDisplay(); } void WebViewImpl::removePageOverlay(WebPageOverlay* overlay) { - if (m_pageOverlays && m_pageOverlays->remove(overlay)) { - setRootLayerNeedsDisplay(); - - if (m_pageOverlays->empty()) - m_pageOverlays = nullptr; - } + if (m_pageOverlays && m_pageOverlays->remove(overlay) && m_pageOverlays->empty()) + m_pageOverlays = nullptr; } void WebViewImpl::setOverlayLayer(WebCore::GraphicsLayer* layer) @@ -3047,29 +3049,31 @@ void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer) } m_nonCompositedContentHost->setScrollLayer(scrollLayer); } - if (m_layerTreeHost) - m_layerTreeHost->setRootLayer(layer ? layer->platformLayer() : 0); + + if (layer) + m_rootLayer = WebLayer(layer->platformLayer()); + + if (!m_layerTreeView.isNull()) + m_layerTreeView.setRootLayer(layer ? &m_rootLayer : 0); IntRect damagedRect(0, 0, m_size.width, m_size.height); if (!m_isAcceleratedCompositingActive) m_client->didInvalidateRect(damagedRect); } -void WebViewImpl::setRootLayerNeedsDisplay() +void WebViewImpl::scheduleCompositingLayerSync() { - if (m_layerTreeHost) - m_layerTreeHost->setNeedsCommit(); + m_layerTreeView.setNeedsRedraw(); } -void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect& clipRect) +void WebViewImpl::scrollRootLayerRect(const IntSize&, const IntRect&) { updateLayerTreeViewport(); - setRootLayerNeedsDisplay(); } void WebViewImpl::invalidateRootLayerRect(const IntRect& rect) { - ASSERT(m_layerTreeHost); + ASSERT(!m_layerTreeView.isNull()); if (!page()) return; @@ -3078,7 +3082,6 @@ void WebViewImpl::invalidateRootLayerRect(const IntRect& rect) IntRect dirtyRect = view->windowToContents(rect); updateLayerTreeViewport(); m_nonCompositedContentHost->invalidateRect(dirtyRect); - setRootLayerNeedsDisplay(); } NonCompositedContentHost* WebViewImpl::nonCompositedContentHost() @@ -3091,8 +3094,8 @@ void WebViewImpl::scheduleAnimation() { if (isAcceleratedCompositingActive()) { if (CCProxy::hasImplThread()) { - ASSERT(m_layerTreeHost); - m_layerTreeHost->setNeedsAnimate(); + ASSERT(!m_layerTreeView.isNull()); + m_layerTreeView.setNeedsAnimate(); } else m_client->scheduleAnimation(); } else @@ -3145,26 +3148,26 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active) m_isAcceleratedCompositingActive = false; // We need to finish all GL rendering before sending didDeactivateCompositor() to prevent // flickering when compositing turns off. - if (m_layerTreeHost) - m_layerTreeHost->finishAllRendering(); + if (!m_layerTreeView.isNull()) + m_layerTreeView.finishAllRendering(); m_client->didDeactivateCompositor(); - } else if (m_layerTreeHost) { + } else if (!m_layerTreeView.isNull()) { m_isAcceleratedCompositingActive = true; updateLayerTreeViewport(); - m_client->didActivateCompositor(m_layerTreeHost->compositorIdentifier()); + m_client->didActivateCompositor(m_layerTreeView.compositorIdentifier()); } else { TRACE_EVENT("WebViewImpl::setIsAcceleratedCompositingActive(true)", this, 0); - WebCore::CCSettings ccSettings; - ccSettings.acceleratePainting = page()->settings()->acceleratedDrawingEnabled(); - ccSettings.compositeOffscreen = settings()->compositeToTextureEnabled(); - ccSettings.showFPSCounter = settings()->showFPSCounter(); - ccSettings.showPlatformLayerTree = settings()->showPlatformLayerTree(); + WebLayerTreeView::Settings layerTreeViewSettings; + layerTreeViewSettings.acceleratePainting = page()->settings()->acceleratedDrawingEnabled(); + layerTreeViewSettings.compositeOffscreen = settings()->compositeToTextureEnabled(); + layerTreeViewSettings.showFPSCounter = settings()->showFPSCounter(); + layerTreeViewSettings.showPlatformLayerTree = settings()->showPlatformLayerTree(); - ccSettings.perTilePainting = page()->settings()->perTileDrawingEnabled(); - ccSettings.partialSwapEnabled = page()->settings()->partialSwapEnabled(); - ccSettings.threadedAnimationEnabled = page()->settings()->threadedAnimationEnabled(); + layerTreeViewSettings.perTilePainting = page()->settings()->perTileDrawingEnabled(); + layerTreeViewSettings.partialSwapEnabled = page()->settings()->partialSwapEnabled(); + layerTreeViewSettings.threadedAnimationEnabled = page()->settings()->threadedAnimationEnabled(); m_nonCompositedContentHost = NonCompositedContentHost::create(WebViewImplContentPainter::create(this)); m_nonCompositedContentHost->setShowDebugBorders(page()->settings()->showDebugBorders()); @@ -3172,17 +3175,16 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active) if (page() && page()->mainFrame()->view()) m_nonCompositedContentHost->setBackgroundColor(page()->mainFrame()->view()->documentBackgroundColor()); - m_layerTreeHost = CCLayerTreeHost::create(this, ccSettings); - if (m_layerTreeHost) { - m_layerTreeHost->setPageScaleFactorAndLimits(pageScaleFactor(), m_minimumPageScaleFactor, m_maximumPageScaleFactor); + m_layerTreeView.initialize(this, m_rootLayer, layerTreeViewSettings); + if (!m_layerTreeView.isNull()) { + m_layerTreeView.setPageScaleFactorAndLimits(pageScaleFactor(), m_minimumPageScaleFactor, m_maximumPageScaleFactor); updateLayerTreeViewport(); - m_client->didActivateCompositor(m_layerTreeHost->compositorIdentifier()); + m_client->didActivateCompositor(m_layerTreeView.compositorIdentifier()); m_isAcceleratedCompositingActive = true; m_compositorCreationFailed = false; if (m_pageOverlays) m_pageOverlays->update(); } else { - m_layerTreeHost.clear(); m_nonCompositedContentHost.clear(); m_isAcceleratedCompositingActive = false; m_client->didDeactivateCompositor(); @@ -3195,29 +3197,44 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active) #endif -PassRefPtr<GraphicsContext3D> WebViewImpl::createCompositorGraphicsContext3D() +PassOwnPtr<WebKit::WebGraphicsContext3D> WebViewImpl::createCompositorGraphicsContext3D() { - WebKit::WebGraphicsContext3D::Attributes attributes = getCompositorContextAttributes(CCProxy::hasImplThread()); - OwnPtr<WebGraphicsContext3D> webContext = adoptPtr(client()->createGraphicsContext3D(attributes, true /* renderDirectlyToHostWindow */)); + // Explicitly disable antialiasing for the compositor. As of the time of + // this writing, the only platform that supported antialiasing for the + // compositor was Mac OS X, because the on-screen OpenGL context creation + // code paths on Windows and Linux didn't yet have multisampling support. + // Mac OS X essentially always behaves as though it's rendering offscreen. + // Multisampling has a heavy cost especially on devices with relatively low + // fill rate like most notebooks, and the Mac implementation would need to + // be optimized to resolve directly into the IOSurface shared between the + // GPU and browser processes. For these reasons and to avoid platform + // disparities we explicitly disable antialiasing. + WebKit::WebGraphicsContext3D::Attributes attributes; + attributes.antialias = false; + attributes.shareResources = true; + + OwnPtr<WebGraphicsContext3D> webContext = adoptPtr(client()->createGraphicsContext3D(attributes)); if (!webContext) - return 0; + return nullptr; - return GraphicsContext3DPrivate::createGraphicsContextFromWebContext(webContext.release(), GraphicsContext3D::RenderDirectlyToHostWindow); + return webContext.release(); } -PassRefPtr<GraphicsContext3D> WebViewImpl::createLayerTreeHostContext3D() +WebKit::WebGraphicsContext3D* WebViewImpl::createContext3D() { - RefPtr<GraphicsContext3D> context; + OwnPtr<WebKit::WebGraphicsContext3D> webContext; // If we've already created an onscreen context for this view, return that. if (m_temporaryOnscreenGraphicsContext3D) - context = m_temporaryOnscreenGraphicsContext3D.release(); + webContext = m_temporaryOnscreenGraphicsContext3D.release(); else // Otherwise make a new one. - context = createCompositorGraphicsContext3D(); - return context; + webContext = createCompositorGraphicsContext3D(); + // The caller takes ownership of this object, but since there's no equivalent of PassOwnPtr<> in the WebKit API + // we return a raw pointer. + return webContext.leakPtr(); } -void WebViewImpl::applyScrollAndScale(const IntSize& scrollDelta, float pageScaleDelta) +void WebViewImpl::applyScrollAndScale(const WebSize& scrollDelta, float pageScaleDelta) { if (!mainFrameImpl() || !mainFrameImpl()->frameView()) return; @@ -3230,8 +3247,8 @@ void WebViewImpl::applyScrollAndScale(const IntSize& scrollDelta, float pageScal // in the old coordinate space, so we first need to multiply them // by the page scale delta. WebSize scrollOffset = mainFrame()->scrollOffset(); - scrollOffset.width += scrollDelta.width(); - scrollOffset.height += scrollDelta.height(); + scrollOffset.width += scrollDelta.width; + scrollOffset.height += scrollDelta.height; WebPoint scaledScrollOffset(scrollOffset.width * pageScaleDelta, scrollOffset.height * pageScaleDelta); setPageScaleFactor(pageScaleFactor() * pageScaleDelta, scaledScrollOffset); @@ -3250,7 +3267,7 @@ void WebViewImpl::didCompleteSwapBuffers() m_client->didCompleteSwapBuffers(); } -void WebViewImpl::didRecreateGraphicsContext(bool success) +void WebViewImpl::didRebindGraphicsContext(bool success) { // Switch back to software rendering mode, if necessary @@ -3277,7 +3294,7 @@ void WebViewImpl::scheduleComposite() void WebViewImpl::updateLayerTreeViewport() { - if (!page() || !m_nonCompositedContentHost || !m_layerTreeHost) + if (!page() || !m_nonCompositedContentHost || m_layerTreeView.isNull()) return; FrameView* view = page()->mainFrame()->view(); @@ -3293,18 +3310,18 @@ void WebViewImpl::updateLayerTreeViewport() layerAdjustX = -view->contentsSize().width() + view->visibleContentRect(false).width(); } m_nonCompositedContentHost->setViewport(visibleRect.size(), view->contentsSize(), scroll, pageScaleFactor(), layerAdjustX); - m_layerTreeHost->setViewportSize(visibleRect.size()); - m_layerTreeHost->setPageScaleFactorAndLimits(pageScaleFactor(), m_minimumPageScaleFactor, m_maximumPageScaleFactor); + m_layerTreeView.setViewportSize(visibleRect.size()); + m_layerTreeView.setPageScaleFactorAndLimits(pageScaleFactor(), m_minimumPageScaleFactor, m_maximumPageScaleFactor); } WebGraphicsContext3D* WebViewImpl::graphicsContext3D() { #if USE(ACCELERATED_COMPOSITING) if (m_page->settings()->acceleratedCompositingEnabled() && allowsAcceleratedCompositing()) { - if (m_layerTreeHost) { - WebGraphicsContext3D* webContext = GraphicsContext3DPrivate::extractWebGraphicsContext3D(m_layerTreeHost->context()); - if (webContext && !webContext->isContextLost()) - return webContext; + if (!m_layerTreeView.isNull()) { + WebGraphicsContext3D* context = m_layerTreeView.context(); + if (context && !context->isContextLost()) + return context; } // If we get here it means that some system needs access to the context the compositor will use but the compositor itself // hasn't requested a context or it was unable to successfully instantiate a context. @@ -3313,7 +3330,7 @@ WebGraphicsContext3D* WebViewImpl::graphicsContext3D() if (!m_temporaryOnscreenGraphicsContext3D) m_temporaryOnscreenGraphicsContext3D = createCompositorGraphicsContext3D(); - WebGraphicsContext3D* webContext = GraphicsContext3DPrivate::extractWebGraphicsContext3D(m_temporaryOnscreenGraphicsContext3D.get()); + WebGraphicsContext3D* webContext = m_temporaryOnscreenGraphicsContext3D.get(); if (webContext && !webContext->isContextLost()) return webContext; } @@ -3321,6 +3338,14 @@ WebGraphicsContext3D* WebViewImpl::graphicsContext3D() return 0; } +WebGraphicsContext3D* WebViewImpl::sharedGraphicsContext3D() +{ + if (!m_page->settings()->acceleratedCompositingEnabled() || !allowsAcceleratedCompositing()) + return 0; + + return GraphicsContext3DPrivate::extractWebGraphicsContext3D(SharedGraphicsContext3D::get()); +} + void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, bool isInitialState) { if (!page()) @@ -3338,7 +3363,7 @@ void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, bool visible = visibilityState == WebPageVisibilityStateVisible; if (!visible) m_nonCompositedContentHost->protectVisibleTileTextures(); - m_layerTreeHost->setVisible(visible); + m_layerTreeView.setVisible(visible); } #endif } |