Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 #include "AutofillPopupMenuClient.h" | 52 #include "AutofillPopupMenuClient.h" |
| 53 #include "BatteryClientImpl.h" | 53 #include "BatteryClientImpl.h" |
| 54 #include "CSSValueKeywords.h" | 54 #include "CSSValueKeywords.h" |
| 55 #include "CompositionUnderlineVectorBuilder.h" | 55 #include "CompositionUnderlineVectorBuilder.h" |
| 56 #include "ContextFeaturesClientImpl.h" | 56 #include "ContextFeaturesClientImpl.h" |
| 57 #include "DeviceOrientationClientProxy.h" | 57 #include "DeviceOrientationClientProxy.h" |
| 58 #include "GeolocationClientProxy.h" | 58 #include "GeolocationClientProxy.h" |
| 59 #include "GraphicsLayerFactoryChromium.h" | 59 #include "GraphicsLayerFactoryChromium.h" |
| 60 #include "HTMLNames.h" | 60 #include "HTMLNames.h" |
| 61 #include "LinkHighlight.h" | 61 #include "LinkHighlight.h" |
| 62 #include "NonCompositedContentHost.h" | |
| 63 #include "PageWidgetDelegate.h" | 62 #include "PageWidgetDelegate.h" |
| 64 #include "PrerendererClientImpl.h" | 63 #include "PrerendererClientImpl.h" |
| 65 #include "SpeechInputClientImpl.h" | 64 #include "SpeechInputClientImpl.h" |
| 66 #include "SpeechRecognitionClientProxy.h" | 65 #include "SpeechRecognitionClientProxy.h" |
| 67 #include "TextFieldDecoratorImpl.h" | 66 #include "TextFieldDecoratorImpl.h" |
| 68 #include "ValidationMessageClientImpl.h" | 67 #include "ValidationMessageClientImpl.h" |
| 69 #include "ViewportAnchor.h" | 68 #include "ViewportAnchor.h" |
| 70 #include "WebAccessibilityObject.h" | 69 #include "WebAccessibilityObject.h" |
| 71 #include "WebActiveWheelFlingParameters.h" | 70 #include "WebActiveWheelFlingParameters.h" |
| 72 #include "WebAutofillClient.h" | 71 #include "WebAutofillClient.h" |
| (...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1763 if (m_continuousPaintingEnabled) { | 1762 if (m_continuousPaintingEnabled) { |
| 1764 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO verlays.get()); | 1763 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO verlays.get()); |
| 1765 m_client->scheduleAnimation(); | 1764 m_client->scheduleAnimation(); |
| 1766 } | 1765 } |
| 1767 } | 1766 } |
| 1768 | 1767 |
| 1769 void WebViewImpl::layout() | 1768 void WebViewImpl::layout() |
| 1770 { | 1769 { |
| 1771 TRACE_EVENT0("webkit", "WebViewImpl::layout"); | 1770 TRACE_EVENT0("webkit", "WebViewImpl::layout"); |
| 1772 PageWidgetDelegate::layout(m_page.get()); | 1771 PageWidgetDelegate::layout(m_page.get()); |
| 1772 if (m_layerTreeView) | |
| 1773 m_layerTreeView->setBackgroundColor(backgroundColor()); | |
| 1773 | 1774 |
| 1774 if (m_linkHighlight) | 1775 if (m_linkHighlight) |
| 1775 m_linkHighlight->updateGeometry(); | 1776 m_linkHighlight->updateGeometry(); |
| 1776 } | 1777 } |
| 1777 | 1778 |
| 1778 void WebViewImpl::enterForceCompositingMode(bool enter) | 1779 void WebViewImpl::enterForceCompositingMode(bool enter) |
| 1779 { | 1780 { |
| 1780 if (page()->settings()->forceCompositingMode() == enter) | 1781 if (page()->settings()->forceCompositingMode() == enter) |
| 1781 return; | 1782 return; |
| 1782 | 1783 |
| (...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2906 { | 2907 { |
| 2907 if (!page()) | 2908 if (!page()) |
| 2908 return; | 2909 return; |
| 2909 | 2910 |
| 2910 Frame* frame = page()->mainFrame(); | 2911 Frame* frame = page()->mainFrame(); |
| 2911 if (!frame || !frame->view()) | 2912 if (!frame || !frame->view()) |
| 2912 return; | 2913 return; |
| 2913 | 2914 |
| 2914 frame->view()->setUseFixedLayout(enable); | 2915 frame->view()->setUseFixedLayout(enable); |
| 2915 | 2916 |
| 2916 // Also notify the base layer, which RenderLayerCompositor does not see. | 2917 if (m_isAcceleratedCompositingActive) |
| 2917 if (m_nonCompositedContentHost) | |
| 2918 updateLayerTreeViewport(); | 2918 updateLayerTreeViewport(); |
| 2919 } | 2919 } |
| 2920 | 2920 |
| 2921 | 2921 |
| 2922 void WebViewImpl::enableAutoResizeMode(const WebSize& minSize, const WebSize& ma xSize) | 2922 void WebViewImpl::enableAutoResizeMode(const WebSize& minSize, const WebSize& ma xSize) |
| 2923 { | 2923 { |
| 2924 m_shouldAutoResize = true; | 2924 m_shouldAutoResize = true; |
| 2925 m_minAutoSize = minSize; | 2925 m_minAutoSize = minSize; |
| 2926 m_maxAutoSize = maxSize; | 2926 m_maxAutoSize = maxSize; |
| 2927 configureAutoResizeMode(); | 2927 configureAutoResizeMode(); |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3511 { | 3511 { |
| 3512 // Set any existing frames to be transparent. | 3512 // Set any existing frames to be transparent. |
| 3513 Frame* frame = m_page->mainFrame(); | 3513 Frame* frame = m_page->mainFrame(); |
| 3514 while (frame) { | 3514 while (frame) { |
| 3515 frame->view()->setTransparent(isTransparent); | 3515 frame->view()->setTransparent(isTransparent); |
| 3516 frame = frame->tree()->traverseNext(); | 3516 frame = frame->tree()->traverseNext(); |
| 3517 } | 3517 } |
| 3518 | 3518 |
| 3519 // Future frames check this to know whether to be transparent. | 3519 // Future frames check this to know whether to be transparent. |
| 3520 m_isTransparent = isTransparent; | 3520 m_isTransparent = isTransparent; |
| 3521 | |
| 3522 if (m_nonCompositedContentHost) | |
| 3523 m_nonCompositedContentHost->setOpaque(!isTransparent); | |
| 3524 } | 3521 } |
| 3525 | 3522 |
| 3526 bool WebViewImpl::isTransparent() const | 3523 bool WebViewImpl::isTransparent() const |
| 3527 { | 3524 { |
| 3528 return m_isTransparent; | 3525 return m_isTransparent; |
| 3529 } | 3526 } |
| 3530 | 3527 |
| 3531 void WebViewImpl::setIsActive(bool active) | 3528 void WebViewImpl::setIsActive(bool active) |
| 3532 { | 3529 { |
| 3533 if (page() && page()->focusController()) | 3530 if (page() && page()->focusController()) |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3608 if (m_layerTreeView) | 3605 if (m_layerTreeView) |
| 3609 m_layerTreeView->didStopFlinging(); | 3606 m_layerTreeView->didStopFlinging(); |
| 3610 resetSavedScrollAndScaleState(); | 3607 resetSavedScrollAndScaleState(); |
| 3611 } | 3608 } |
| 3612 | 3609 |
| 3613 void WebViewImpl::layoutUpdated(WebFrameImpl* webframe) | 3610 void WebViewImpl::layoutUpdated(WebFrameImpl* webframe) |
| 3614 { | 3611 { |
| 3615 if (!m_client || webframe != mainFrameImpl()) | 3612 if (!m_client || webframe != mainFrameImpl()) |
| 3616 return; | 3613 return; |
| 3617 | 3614 |
| 3615 if (m_layerTreeViewCommitsDeferred) { | |
| 3616 // If we receive an invalidation from WebKit while in deferred commit mo de, | |
|
jamesr
2013/05/28 18:27:50
update the comment since this function isn't about
| |
| 3617 // that means it's time to start producing frames again so un-defer. | |
| 3618 if (m_layerTreeView) | |
| 3619 m_layerTreeView->setDeferCommits(false); | |
| 3620 m_layerTreeViewCommitsDeferred = false; | |
| 3621 } | |
| 3622 | |
| 3618 if (m_shouldAutoResize && mainFrameImpl()->frame() && mainFrameImpl()->frame ()->view()) { | 3623 if (m_shouldAutoResize && mainFrameImpl()->frame() && mainFrameImpl()->frame ()->view()) { |
| 3619 WebSize frameSize = mainFrameImpl()->frame()->view()->frameRect().size() ; | 3624 WebSize frameSize = mainFrameImpl()->frame()->view()->frameRect().size() ; |
| 3620 if (frameSize != m_size) { | 3625 if (frameSize != m_size) { |
| 3621 m_size = frameSize; | 3626 m_size = frameSize; |
| 3622 m_client->didAutoResize(m_size); | 3627 m_client->didAutoResize(m_size); |
| 3623 sendResizeEventAndRepaint(); | 3628 sendResizeEventAndRepaint(); |
| 3624 } | 3629 } |
| 3625 } | 3630 } |
| 3626 | 3631 |
| 3627 if (m_pageScaleConstraintsSet.constraintsDirty()) | 3632 if (m_pageScaleConstraintsSet.constraintsDirty()) |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3800 } | 3805 } |
| 3801 | 3806 |
| 3802 void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer) | 3807 void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer) |
| 3803 { | 3808 { |
| 3804 suppressInvalidations(true); | 3809 suppressInvalidations(true); |
| 3805 | 3810 |
| 3806 m_rootGraphicsLayer = layer; | 3811 m_rootGraphicsLayer = layer; |
| 3807 m_rootLayer = layer ? layer->platformLayer() : 0; | 3812 m_rootLayer = layer ? layer->platformLayer() : 0; |
| 3808 | 3813 |
| 3809 setIsAcceleratedCompositingActive(layer); | 3814 setIsAcceleratedCompositingActive(layer); |
| 3810 if (m_nonCompositedContentHost) { | |
| 3811 GraphicsLayer* scrollLayer = 0; | |
| 3812 if (layer) { | |
| 3813 Document* document = page()->mainFrame()->document(); | |
| 3814 RenderView* renderView = document->renderView(); | |
| 3815 RenderLayerCompositor* compositor = renderView->compositor(); | |
| 3816 scrollLayer = compositor->scrollLayer(); | |
| 3817 } | |
| 3818 m_nonCompositedContentHost->setScrollLayer(scrollLayer); | |
| 3819 } | |
| 3820 | 3815 |
| 3821 if (m_layerTreeView) { | 3816 if (m_layerTreeView) { |
| 3822 if (m_rootLayer) | 3817 if (m_rootLayer) |
| 3823 m_layerTreeView->setRootLayer(*m_rootLayer); | 3818 m_layerTreeView->setRootLayer(*m_rootLayer); |
| 3824 else | 3819 else |
| 3825 m_layerTreeView->clearRootLayer(); | 3820 m_layerTreeView->clearRootLayer(); |
| 3826 } | 3821 } |
| 3827 | 3822 |
| 3828 suppressInvalidations(false); | 3823 suppressInvalidations(false); |
| 3829 } | 3824 } |
| 3830 | 3825 |
| 3831 void WebViewImpl::scheduleCompositingLayerSync() | 3826 void WebViewImpl::scheduleCompositingLayerSync() |
| 3832 { | 3827 { |
| 3833 m_layerTreeView->setNeedsRedraw(); | 3828 m_layerTreeView->setNeedsRedraw(); |
| 3834 } | 3829 } |
| 3835 | 3830 |
| 3836 void WebViewImpl::scrollRootLayerRect(const IntSize&, const IntRect&) | 3831 void WebViewImpl::scrollRootLayerRect(const IntSize&, const IntRect&) |
| 3837 { | 3832 { |
| 3838 updateLayerTreeViewport(); | 3833 updateLayerTreeViewport(); |
| 3839 } | 3834 } |
| 3840 | 3835 |
| 3841 void WebViewImpl::invalidateRect(const IntRect& rect) | 3836 void WebViewImpl::invalidateRect(const IntRect& rect) |
| 3842 { | 3837 { |
| 3843 if (m_layerTreeViewCommitsDeferred) { | |
| 3844 // If we receive an invalidation from WebKit while in deferred commit mo de, | |
| 3845 // that means it's time to start producing frames again so un-defer. | |
| 3846 if (m_layerTreeView) | |
| 3847 m_layerTreeView->setDeferCommits(false); | |
| 3848 m_layerTreeViewCommitsDeferred = false; | |
| 3849 } | |
| 3850 if (m_isAcceleratedCompositingActive) { | 3838 if (m_isAcceleratedCompositingActive) { |
| 3851 ASSERT(m_layerTreeView); | 3839 ASSERT(m_layerTreeView); |
| 3852 | |
| 3853 if (!page()) | |
| 3854 return; | |
| 3855 | |
| 3856 FrameView* view = page()->mainFrame()->view(); | |
| 3857 IntRect dirtyRect = view->windowToContents(rect); | |
| 3858 updateLayerTreeViewport(); | 3840 updateLayerTreeViewport(); |
| 3859 m_nonCompositedContentHost->invalidateRect(dirtyRect); | |
| 3860 } else if (m_client) | 3841 } else if (m_client) |
| 3861 m_client->didInvalidateRect(rect); | 3842 m_client->didInvalidateRect(rect); |
| 3862 } | 3843 } |
| 3863 | 3844 |
| 3864 NonCompositedContentHost* WebViewImpl::nonCompositedContentHost() | |
| 3865 { | |
| 3866 return m_nonCompositedContentHost.get(); | |
| 3867 } | |
| 3868 | |
| 3869 void WebViewImpl::setBackgroundColor(const WebCore::Color& color) | |
| 3870 { | |
| 3871 WebCore::Color documentBackgroundColor = color.isValid() ? color : WebCore:: Color::white; | |
| 3872 WebColor webDocumentBackgroundColor = documentBackgroundColor.rgb(); | |
| 3873 m_nonCompositedContentHost->setBackgroundColor(documentBackgroundColor); | |
| 3874 m_layerTreeView->setBackgroundColor(webDocumentBackgroundColor); | |
| 3875 } | |
| 3876 | |
| 3877 WebCore::GraphicsLayerFactory* WebViewImpl::graphicsLayerFactory() const | 3845 WebCore::GraphicsLayerFactory* WebViewImpl::graphicsLayerFactory() const |
| 3878 { | 3846 { |
| 3879 return m_graphicsLayerFactory.get(); | 3847 return m_graphicsLayerFactory.get(); |
| 3880 } | 3848 } |
| 3881 | 3849 |
| 3882 void WebViewImpl::registerForAnimations(WebLayer* layer) | 3850 void WebViewImpl::registerForAnimations(WebLayer* layer) |
| 3883 { | 3851 { |
| 3884 if (m_layerTreeView) | 3852 if (m_layerTreeView) |
| 3885 m_layerTreeView->registerForAnimations(layer); | 3853 m_layerTreeView->registerForAnimations(layer); |
| 3886 } | 3854 } |
| 3887 | 3855 |
| 3888 WebCore::GraphicsLayer* WebViewImpl::rootGraphicsLayer() | 3856 WebCore::GraphicsLayer* WebViewImpl::rootGraphicsLayer() |
| 3889 { | 3857 { |
| 3890 return m_rootGraphicsLayer; | 3858 return m_rootGraphicsLayer; |
| 3891 } | 3859 } |
| 3892 | 3860 |
| 3893 void WebViewImpl::scheduleAnimation() | 3861 void WebViewImpl::scheduleAnimation() |
| 3894 { | 3862 { |
| 3895 if (isAcceleratedCompositingActive()) { | 3863 if (isAcceleratedCompositingActive()) { |
| 3896 if (Platform::current()->isThreadedCompositingEnabled()) { | 3864 if (Platform::current()->isThreadedCompositingEnabled()) { |
| 3897 ASSERT(m_layerTreeView); | 3865 ASSERT(m_layerTreeView); |
| 3898 m_layerTreeView->setNeedsAnimate(); | 3866 m_layerTreeView->setNeedsAnimate(); |
| 3899 } else | 3867 } else |
| 3900 m_client->scheduleAnimation(); | 3868 m_client->scheduleAnimation(); |
| 3901 } else | 3869 } else |
| 3902 m_client->scheduleAnimation(); | 3870 m_client->scheduleAnimation(); |
| 3903 } | 3871 } |
| 3904 | 3872 |
| 3905 void WebViewImpl::paintRootLayer(GraphicsContext& context, const IntRect& conten tRect) | |
| 3906 { | |
| 3907 double paintStart = currentTime(); | |
| 3908 if (!page()) | |
| 3909 return; | |
| 3910 FrameView* view = page()->mainFrame()->view(); | |
| 3911 context.setUseHighResMarkers(page()->deviceScaleFactor() > 1.5f); | |
| 3912 view->paintContents(&context, contentRect); | |
| 3913 double paintEnd = currentTime(); | |
| 3914 double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintE nd - paintStart); | |
| 3915 WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelRootPaint DurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30); | |
| 3916 WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelRootPaint MegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30); | |
| 3917 | |
| 3918 setBackgroundColor(view->documentBackgroundColor()); | |
| 3919 } | |
| 3920 | |
| 3921 void WebViewImpl::setIsAcceleratedCompositingActive(bool active) | 3873 void WebViewImpl::setIsAcceleratedCompositingActive(bool active) |
| 3922 { | 3874 { |
| 3923 WebKit::Platform::current()->histogramEnumeration("GPU.setIsAcceleratedCompo sitingActive", active * 2 + m_isAcceleratedCompositingActive, 4); | 3875 WebKit::Platform::current()->histogramEnumeration("GPU.setIsAcceleratedCompo sitingActive", active * 2 + m_isAcceleratedCompositingActive, 4); |
| 3924 | 3876 |
| 3925 if (m_isAcceleratedCompositingActive == active) | 3877 if (m_isAcceleratedCompositingActive == active) |
| 3926 return; | 3878 return; |
| 3927 | 3879 |
| 3928 if (!active) { | 3880 if (!active) { |
| 3929 m_isAcceleratedCompositingActive = false; | 3881 m_isAcceleratedCompositingActive = false; |
| 3930 // We need to finish all GL rendering before sending didDeactivateCompos itor() to prevent | 3882 // We need to finish all GL rendering before sending didDeactivateCompos itor() to prevent |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 3943 m_layerTreeViewCommitsDeferred = true; | 3895 m_layerTreeViewCommitsDeferred = true; |
| 3944 } | 3896 } |
| 3945 } else if (m_layerTreeView) { | 3897 } else if (m_layerTreeView) { |
| 3946 m_isAcceleratedCompositingActive = true; | 3898 m_isAcceleratedCompositingActive = true; |
| 3947 updateLayerTreeViewport(); | 3899 updateLayerTreeViewport(); |
| 3948 | 3900 |
| 3949 m_client->didActivateCompositor(m_inputHandlerIdentifier); | 3901 m_client->didActivateCompositor(m_inputHandlerIdentifier); |
| 3950 } else { | 3902 } else { |
| 3951 TRACE_EVENT0("webkit", "WebViewImpl::setIsAcceleratedCompositingActive(t rue)"); | 3903 TRACE_EVENT0("webkit", "WebViewImpl::setIsAcceleratedCompositingActive(t rue)"); |
| 3952 | 3904 |
| 3953 m_nonCompositedContentHost = NonCompositedContentHost::create(this, grap hicsLayerFactory()); | |
| 3954 m_nonCompositedContentHost->setShowDebugBorders(page()->settings()->show DebugBorders()); | |
| 3955 m_nonCompositedContentHost->setOpaque(!isTransparent()); | |
| 3956 | |
| 3957 m_client->initializeLayerTreeView(); | 3905 m_client->initializeLayerTreeView(); |
| 3958 m_layerTreeView = m_client->layerTreeView(); | 3906 m_layerTreeView = m_client->layerTreeView(); |
| 3959 if (m_layerTreeView) { | 3907 if (m_layerTreeView) { |
| 3960 m_layerTreeView->setRootLayer(*m_rootLayer); | 3908 m_layerTreeView->setRootLayer(*m_rootLayer); |
| 3961 | 3909 |
| 3962 bool visible = page()->visibilityState() == PageVisibilityStateVisib le; | 3910 bool visible = page()->visibilityState() == PageVisibilityStateVisib le; |
| 3963 m_layerTreeView->setVisible(visible); | 3911 m_layerTreeView->setVisible(visible); |
| 3964 m_layerTreeView->setDeviceScaleFactor(page()->deviceScaleFactor()); | 3912 m_layerTreeView->setDeviceScaleFactor(page()->deviceScaleFactor()); |
| 3965 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), mini mumPageScaleFactor(), maximumPageScaleFactor()); | 3913 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), mini mumPageScaleFactor(), maximumPageScaleFactor()); |
| 3914 m_layerTreeView->setBackgroundColor(backgroundColor()); | |
| 3966 m_layerTreeView->setHasTransparentBackground(isTransparent()); | 3915 m_layerTreeView->setHasTransparentBackground(isTransparent()); |
| 3967 updateLayerTreeViewport(); | 3916 updateLayerTreeViewport(); |
| 3968 m_client->didActivateCompositor(m_inputHandlerIdentifier); | 3917 m_client->didActivateCompositor(m_inputHandlerIdentifier); |
| 3969 m_isAcceleratedCompositingActive = true; | 3918 m_isAcceleratedCompositingActive = true; |
| 3970 m_compositorCreationFailed = false; | 3919 m_compositorCreationFailed = false; |
| 3971 if (m_pageOverlays) | 3920 if (m_pageOverlays) |
| 3972 m_pageOverlays->update(); | 3921 m_pageOverlays->update(); |
| 3973 m_layerTreeView->setShowFPSCounter(m_showFPSCounter); | 3922 m_layerTreeView->setShowFPSCounter(m_showFPSCounter); |
| 3974 m_layerTreeView->setShowPaintRects(m_showPaintRects); | 3923 m_layerTreeView->setShowPaintRects(m_showPaintRects); |
| 3975 m_layerTreeView->setShowDebugBorders(m_showDebugBorders); | 3924 m_layerTreeView->setShowDebugBorders(m_showDebugBorders); |
| 3976 m_layerTreeView->setContinuousPaintingEnabled(m_continuousPaintingEn abled); | 3925 m_layerTreeView->setContinuousPaintingEnabled(m_continuousPaintingEn abled); |
| 3977 } else { | 3926 } else { |
| 3978 m_nonCompositedContentHost.clear(); | |
| 3979 m_isAcceleratedCompositingActive = false; | 3927 m_isAcceleratedCompositingActive = false; |
| 3980 m_client->didDeactivateCompositor(); | 3928 m_client->didDeactivateCompositor(); |
| 3981 m_compositorCreationFailed = true; | 3929 m_compositorCreationFailed = true; |
| 3982 } | 3930 } |
| 3983 } | 3931 } |
| 3984 if (page()) | 3932 if (page()) |
| 3985 page()->mainFrame()->view()->setClipsRepaints(!m_isAcceleratedCompositin gActive); | 3933 page()->mainFrame()->view()->setClipsRepaints(!m_isAcceleratedCompositin gActive); |
| 3986 } | 3934 } |
| 3987 | 3935 |
| 3988 WebInputHandler* WebViewImpl::createInputHandler() | 3936 WebInputHandler* WebViewImpl::createInputHandler() |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4039 | 3987 |
| 4040 // Force a style recalc to remove all the composited layers. | 3988 // Force a style recalc to remove all the composited layers. |
| 4041 m_page->mainFrame()->document()->scheduleForcedStyleRecalc(); | 3989 m_page->mainFrame()->document()->scheduleForcedStyleRecalc(); |
| 4042 | 3990 |
| 4043 if (m_pageOverlays) | 3991 if (m_pageOverlays) |
| 4044 m_pageOverlays->update(); | 3992 m_pageOverlays->update(); |
| 4045 } | 3993 } |
| 4046 | 3994 |
| 4047 void WebViewImpl::updateLayerTreeViewport() | 3995 void WebViewImpl::updateLayerTreeViewport() |
| 4048 { | 3996 { |
| 4049 if (!page() || !m_nonCompositedContentHost || !m_layerTreeView) | 3997 if (!page() || !m_layerTreeView) |
| 4050 return; | 3998 return; |
| 4051 | 3999 |
| 4052 FrameView* view = page()->mainFrame()->view(); | |
| 4053 m_nonCompositedContentHost->setViewport(m_size, view->contentsSize(), view-> scrollPosition(), view->scrollOrigin()); | |
| 4054 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS caleFactor(), maximumPageScaleFactor()); | 4000 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS caleFactor(), maximumPageScaleFactor()); |
| 4055 } | 4001 } |
| 4056 | 4002 |
| 4057 void WebViewImpl::selectAutofillSuggestionAtIndex(unsigned listIndex) | 4003 void WebViewImpl::selectAutofillSuggestionAtIndex(unsigned listIndex) |
| 4058 { | 4004 { |
| 4059 if (m_autofillPopupClient && listIndex < m_autofillPopupClient->getSuggestio nsCount()) | 4005 if (m_autofillPopupClient && listIndex < m_autofillPopupClient->getSuggestio nsCount()) |
| 4060 m_autofillPopupClient->valueChanged(listIndex); | 4006 m_autofillPopupClient->valueChanged(listIndex); |
| 4061 } | 4007 } |
| 4062 | 4008 |
| 4063 bool WebViewImpl::detectContentOnTouch(const WebPoint& position) | 4009 bool WebViewImpl::detectContentOnTouch(const WebPoint& position) |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4150 } | 4096 } |
| 4151 | 4097 |
| 4152 bool WebViewImpl::shouldDisableDesktopWorkarounds() | 4098 bool WebViewImpl::shouldDisableDesktopWorkarounds() |
| 4153 { | 4099 { |
| 4154 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); | 4100 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); |
| 4155 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom | 4101 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom |
| 4156 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); | 4102 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); |
| 4157 } | 4103 } |
| 4158 | 4104 |
| 4159 } // namespace WebKit | 4105 } // namespace WebKit |
| OLD | NEW |