| 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 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1572 | 1572 | 
| 1573         updatePageDefinedViewportConstraints(mainFrameImpl()->frame()->document(
      )->viewportDescription()); | 1573         updatePageDefinedViewportConstraints(mainFrameImpl()->frame()->document(
      )->viewportDescription()); | 
| 1574         updateMainFrameLayoutSize(); | 1574         updateMainFrameLayoutSize(); | 
| 1575 | 1575 | 
| 1576         WebDevToolsAgentPrivate* agentPrivate = devToolsAgentPrivate(); | 1576         WebDevToolsAgentPrivate* agentPrivate = devToolsAgentPrivate(); | 
| 1577         if (agentPrivate) | 1577         if (agentPrivate) | 
| 1578             agentPrivate->webViewResized(newSize); | 1578             agentPrivate->webViewResized(newSize); | 
| 1579         WebFrameImpl* webFrame = mainFrameImpl(); | 1579         WebFrameImpl* webFrame = mainFrameImpl(); | 
| 1580         if (webFrame->frameView()) { | 1580         if (webFrame->frameView()) { | 
| 1581             webFrame->frameView()->resize(m_size); | 1581             webFrame->frameView()->resize(m_size); | 
| 1582             if (page()->settings().pinchVirtualViewportEnabled()) | 1582             if (pinchVirtualViewportEnabled()) | 
| 1583                 page()->frameHost().pinchViewport().setSize(m_size); | 1583                 page()->frameHost().pinchViewport().mainFrameDidChangeSize(); | 
| 1584         } | 1584         } | 
| 1585     } | 1585     } | 
| 1586 | 1586 | 
| 1587     if (settings()->viewportEnabled() && !m_fixedLayoutSizeLock) { | 1587     if (settings()->viewportEnabled() && !m_fixedLayoutSizeLock) { | 
| 1588         // Relayout immediately to recalculate the minimum scale limit. | 1588         // Relayout immediately to recalculate the minimum scale limit. | 
| 1589         if (view->needsLayout()) | 1589         if (view->needsLayout()) | 
| 1590             view->layout(); | 1590             view->layout(); | 
| 1591 | 1591 | 
| 1592         if (shouldAnchorAndRescaleViewport) { | 1592         if (shouldAnchorAndRescaleViewport) { | 
| 1593             float viewportWidthRatio = static_cast<float>(newSize.width) / oldSi
      ze.width; | 1593             float viewportWidthRatio = static_cast<float>(newSize.width) / oldSi
      ze.width; | 
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2641 { | 2641 { | 
| 2642     // Since factor = 1.2^level, level = log(factor) / log(1.2) | 2642     // Since factor = 1.2^level, level = log(factor) / log(1.2) | 
| 2643     return log(factor) / log(textSizeMultiplierRatio); | 2643     return log(factor) / log(textSizeMultiplierRatio); | 
| 2644 } | 2644 } | 
| 2645 | 2645 | 
| 2646 float WebViewImpl::pageScaleFactor() const | 2646 float WebViewImpl::pageScaleFactor() const | 
| 2647 { | 2647 { | 
| 2648     if (!page()) | 2648     if (!page()) | 
| 2649         return 1; | 2649         return 1; | 
| 2650 | 2650 | 
| 2651     return page()->pageScaleFactor(); | 2651     if (!pinchVirtualViewportEnabled()) | 
|  | 2652         return page()->pageScaleFactor(); | 
|  | 2653 | 
|  | 2654     return page()->frameHost().pinchViewport().scale(); | 
| 2652 } | 2655 } | 
| 2653 | 2656 | 
| 2654 float WebViewImpl::clampPageScaleFactorToLimits(float scaleFactor) const | 2657 float WebViewImpl::clampPageScaleFactorToLimits(float scaleFactor) const | 
| 2655 { | 2658 { | 
| 2656     return m_pageScaleConstraintsSet.finalConstraints().clampToConstraints(scale
      Factor); | 2659     return m_pageScaleConstraintsSet.finalConstraints().clampToConstraints(scale
      Factor); | 
| 2657 } | 2660 } | 
| 2658 | 2661 | 
| 2659 IntPoint WebViewImpl::clampOffsetAtScale(const IntPoint& offset, float scale) | 2662 IntPoint WebViewImpl::clampOffsetAtScale(const IntPoint& offset, float scale) | 
| 2660 { | 2663 { | 
| 2661     FrameView* view = mainFrameImpl()->frameView(); | 2664     FrameView* view = mainFrameImpl()->frameView(); | 
| 2662     if (!view) | 2665     if (!view) | 
| 2663         return offset; | 2666         return offset; | 
| 2664 | 2667 | 
| 2665     return view->clampOffsetAtScale(offset, scale); | 2668     return view->clampOffsetAtScale(offset, scale); | 
| 2666 } | 2669 } | 
| 2667 | 2670 | 
|  | 2671 bool WebViewImpl::pinchVirtualViewportEnabled() const | 
|  | 2672 { | 
|  | 2673     ASSERT(page()); | 
|  | 2674     return page()->settings().pinchVirtualViewportEnabled(); | 
|  | 2675 } | 
|  | 2676 | 
|  | 2677 void WebViewImpl::setPinchViewportOffset(const WebFloatPoint& offset) | 
|  | 2678 { | 
|  | 2679     ASSERT(page()); | 
|  | 2680 | 
|  | 2681     if (!pinchVirtualViewportEnabled()) | 
|  | 2682         return; | 
|  | 2683 | 
|  | 2684     page()->frameHost().pinchViewport().setLocation(offset); | 
|  | 2685 } | 
|  | 2686 | 
|  | 2687 WebFloatPoint WebViewImpl::pinchViewportOffset() const | 
|  | 2688 { | 
|  | 2689     ASSERT(page()); | 
|  | 2690 | 
|  | 2691     if (!pinchVirtualViewportEnabled()) | 
|  | 2692         return WebFloatPoint(); | 
|  | 2693 | 
|  | 2694     return page()->frameHost().pinchViewport().visibleRect().location(); | 
|  | 2695 } | 
|  | 2696 | 
|  | 2697 void WebViewImpl::setPageScaleFactor(float scaleFactor) | 
|  | 2698 { | 
|  | 2699     ASSERT(page()); | 
|  | 2700 | 
|  | 2701     scaleFactor = clampPageScaleFactorToLimits(scaleFactor); | 
|  | 2702     if (scaleFactor == pageScaleFactor()) | 
|  | 2703         return; | 
|  | 2704 | 
|  | 2705     // TODO(bokan): Old-style pinch path. Remove when we're migrated to | 
|  | 2706     // virtual viewport pinch. | 
|  | 2707     if (!pinchVirtualViewportEnabled()) { | 
|  | 2708         IntPoint scrollOffset(mainFrame()->scrollOffset().width, mainFrame()->sc
      rollOffset().height); | 
|  | 2709         setPageScaleFactor(scaleFactor, scrollOffset); | 
|  | 2710         return; | 
|  | 2711     } | 
|  | 2712 | 
|  | 2713     page()->frameHost().pinchViewport().setScale(scaleFactor); | 
|  | 2714     deviceOrPageScaleFactorChanged(); | 
|  | 2715 } | 
|  | 2716 | 
|  | 2717 void WebViewImpl::setMainFrameScrollOffset(const WebPoint& origin) | 
|  | 2718 { | 
|  | 2719     updateMainFrameScrollPosition(origin, false); | 
|  | 2720 } | 
|  | 2721 | 
| 2668 void WebViewImpl::setPageScaleFactor(float scaleFactor, const WebPoint& origin) | 2722 void WebViewImpl::setPageScaleFactor(float scaleFactor, const WebPoint& origin) | 
| 2669 { | 2723 { | 
| 2670     if (!page()) | 2724     if (!page()) | 
| 2671         return; | 2725         return; | 
| 2672 | 2726 | 
| 2673     IntPoint newScrollOffset = origin; | 2727     IntPoint newScrollOffset = origin; | 
| 2674     scaleFactor = clampPageScaleFactorToLimits(scaleFactor); | 2728     scaleFactor = clampPageScaleFactorToLimits(scaleFactor); | 
| 2675     newScrollOffset = clampOffsetAtScale(newScrollOffset, scaleFactor); | 2729     newScrollOffset = clampOffsetAtScale(newScrollOffset, scaleFactor); | 
| 2676 | 2730 | 
| 2677     page()->setPageScaleFactor(scaleFactor, newScrollOffset); | 2731     if (pinchVirtualViewportEnabled()) | 
|  | 2732         setPageScaleFactor(scaleFactor); | 
|  | 2733         // Note, we don't set the offset in the new path. This method is going | 
|  | 2734         // away for the new pinch model so that's ok. | 
|  | 2735     else | 
|  | 2736         page()->setPageScaleFactor(scaleFactor, newScrollOffset); | 
| 2678 } | 2737 } | 
| 2679 | 2738 | 
| 2680 void WebViewImpl::setPageScaleFactorPreservingScrollOffset(float scaleFactor) |  | 
| 2681 { |  | 
| 2682     if (clampPageScaleFactorToLimits(scaleFactor) == pageScaleFactor()) |  | 
| 2683         return; |  | 
| 2684 |  | 
| 2685     IntPoint scrollOffset(mainFrame()->scrollOffset().width, mainFrame()->scroll
      Offset().height); |  | 
| 2686     setPageScaleFactor(scaleFactor, scrollOffset); |  | 
| 2687 } |  | 
| 2688 | 2739 | 
| 2689 float WebViewImpl::deviceScaleFactor() const | 2740 float WebViewImpl::deviceScaleFactor() const | 
| 2690 { | 2741 { | 
| 2691     if (!page()) | 2742     if (!page()) | 
| 2692         return 1; | 2743         return 1; | 
| 2693 | 2744 | 
| 2694     return page()->deviceScaleFactor(); | 2745     return page()->deviceScaleFactor(); | 
| 2695 } | 2746 } | 
| 2696 | 2747 | 
| 2697 void WebViewImpl::setDeviceScaleFactor(float scaleFactor) | 2748 void WebViewImpl::setDeviceScaleFactor(float scaleFactor) | 
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2779         if (view->verticalScrollbar() && !view->verticalScrollbar()->isOverlaySc
      rollbar()) | 2830         if (view->verticalScrollbar() && !view->verticalScrollbar()->isOverlaySc
      rollbar()) | 
| 2780             verticalScrollbarWidth = view->verticalScrollbar()->width(); | 2831             verticalScrollbarWidth = view->verticalScrollbar()->width(); | 
| 2781         m_pageScaleConstraintsSet.adjustFinalConstraintsToContentsSize(m_size, c
      ontentsSize(), verticalScrollbarWidth); | 2832         m_pageScaleConstraintsSet.adjustFinalConstraintsToContentsSize(m_size, c
      ontentsSize(), verticalScrollbarWidth); | 
| 2782     } | 2833     } | 
| 2783 | 2834 | 
| 2784     float newPageScaleFactor = pageScaleFactor(); | 2835     float newPageScaleFactor = pageScaleFactor(); | 
| 2785     if (m_pageScaleConstraintsSet.needsReset() && m_pageScaleConstraintsSet.fina
      lConstraints().initialScale != -1) { | 2836     if (m_pageScaleConstraintsSet.needsReset() && m_pageScaleConstraintsSet.fina
      lConstraints().initialScale != -1) { | 
| 2786         newPageScaleFactor = m_pageScaleConstraintsSet.finalConstraints().initia
      lScale; | 2837         newPageScaleFactor = m_pageScaleConstraintsSet.finalConstraints().initia
      lScale; | 
| 2787         m_pageScaleConstraintsSet.setNeedsReset(false); | 2838         m_pageScaleConstraintsSet.setNeedsReset(false); | 
| 2788     } | 2839     } | 
| 2789     setPageScaleFactorPreservingScrollOffset(newPageScaleFactor); | 2840     setPageScaleFactor(newPageScaleFactor); | 
| 2790 | 2841 | 
| 2791     updateLayerTreeViewport(); | 2842     updateLayerTreeViewport(); | 
| 2792 | 2843 | 
| 2793     // Relayout immediately to avoid violating the rule that needsLayout() | 2844     // Relayout immediately to avoid violating the rule that needsLayout() | 
| 2794     // isn't set at the end of a layout. | 2845     // isn't set at the end of a layout. | 
| 2795     if (view->needsLayout()) | 2846     if (view->needsLayout()) | 
| 2796         view->layout(); | 2847         view->layout(); | 
| 2797 } | 2848 } | 
| 2798 | 2849 | 
| 2799 void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription
      & description) | 2850 void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription
      & description) | 
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2916 } | 2967 } | 
| 2917 | 2968 | 
| 2918 void WebViewImpl::resetSavedScrollAndScaleState() | 2969 void WebViewImpl::resetSavedScrollAndScaleState() | 
| 2919 { | 2970 { | 
| 2920     m_savedPageScaleFactor = 0; | 2971     m_savedPageScaleFactor = 0; | 
| 2921     m_savedScrollOffset = IntSize(); | 2972     m_savedScrollOffset = IntSize(); | 
| 2922 } | 2973 } | 
| 2923 | 2974 | 
| 2924 void WebViewImpl::resetScrollAndScaleState() | 2975 void WebViewImpl::resetScrollAndScaleState() | 
| 2925 { | 2976 { | 
| 2926     page()->setPageScaleFactor(1, IntPoint()); | 2977     setPageScaleFactor(1, IntPoint()); | 
| 2927 | 2978 | 
| 2928     // Clear out the values for the current history item. This will prevent the 
      history item from clobbering the | 2979     // Clear out the values for the current history item. This will prevent the 
      history item from clobbering the | 
| 2929     // value determined during page scale initialization, which may be less than
       1. | 2980     // value determined during page scale initialization, which may be less than
       1. | 
| 2930     page()->mainFrame()->loader().clearScrollPositionAndViewState(); | 2981     page()->mainFrame()->loader().clearScrollPositionAndViewState(); | 
| 2931     m_pageScaleConstraintsSet.setNeedsReset(true); | 2982     m_pageScaleConstraintsSet.setNeedsReset(true); | 
| 2932 | 2983 | 
| 2933     // Clobber saved scales and scroll offsets. | 2984     // Clobber saved scales and scroll offsets. | 
| 2934     if (FrameView* view = page()->mainFrame()->document()->view()) | 2985     if (FrameView* view = page()->mainFrame()->document()->view()) | 
| 2935         view->cacheCurrentScrollPosition(); | 2986         view->cacheCurrentScrollPosition(); | 
| 2936     resetSavedScrollAndScaleState(); | 2987     resetSavedScrollAndScaleState(); | 
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3609         m_client->suppressCompositorScheduling(enable); | 3660         m_client->suppressCompositorScheduling(enable); | 
| 3610 } | 3661 } | 
| 3611 | 3662 | 
| 3612 bool WebViewImpl::allowsAcceleratedCompositing() | 3663 bool WebViewImpl::allowsAcceleratedCompositing() | 
| 3613 { | 3664 { | 
| 3614     return !m_compositorCreationFailed; | 3665     return !m_compositorCreationFailed; | 
| 3615 } | 3666 } | 
| 3616 | 3667 | 
| 3617 void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer) | 3668 void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer) | 
| 3618 { | 3669 { | 
| 3619     bool pinchVirtualViewportEnabled = page()->settings().pinchVirtualViewportEn
      abled(); |  | 
| 3620     suppressInvalidations(true); | 3670     suppressInvalidations(true); | 
| 3621 | 3671 | 
| 3622     if (pinchVirtualViewportEnabled) { | 3672     if (pinchVirtualViewportEnabled()) { | 
| 3623         PinchViewport& pinchViewport = page()->frameHost().pinchViewport(); | 3673         PinchViewport& pinchViewport = page()->frameHost().pinchViewport(); | 
| 3624         pinchViewport.attachToLayerTree(layer, graphicsLayerFactory()); | 3674         pinchViewport.attachToLayerTree(layer, graphicsLayerFactory()); | 
| 3625         pinchViewport.setSize(mainFrameImpl()->frame()->view()->frameRect().size
      ()); |  | 
| 3626         if (layer) { | 3675         if (layer) { | 
| 3627             m_rootGraphicsLayer = pinchViewport.rootGraphicsLayer(); | 3676             m_rootGraphicsLayer = pinchViewport.rootGraphicsLayer(); | 
| 3628             m_rootLayer = pinchViewport.rootGraphicsLayer()->platformLayer(); | 3677             m_rootLayer = pinchViewport.rootGraphicsLayer()->platformLayer(); | 
| 3629             m_rootTransformLayer = 0; | 3678             m_rootTransformLayer = 0; | 
| 3630         } else { | 3679         } else { | 
| 3631             m_rootGraphicsLayer = 0; | 3680             m_rootGraphicsLayer = 0; | 
| 3632             m_rootLayer = 0; | 3681             m_rootLayer = 0; | 
| 3633             m_rootTransformLayer = 0; | 3682             m_rootTransformLayer = 0; | 
| 3634         } | 3683         } | 
| 3635     } else { | 3684     } else { | 
| 3636         m_rootGraphicsLayer = layer; | 3685         m_rootGraphicsLayer = layer; | 
| 3637         m_rootLayer = layer ? layer->platformLayer() : 0; | 3686         m_rootLayer = layer ? layer->platformLayer() : 0; | 
| 3638         m_rootTransformLayer = 0; | 3687         m_rootTransformLayer = 0; | 
| 3639     } | 3688     } | 
| 3640 | 3689 | 
| 3641     setIsAcceleratedCompositingActive(layer); | 3690     setIsAcceleratedCompositingActive(layer); | 
| 3642 | 3691 | 
| 3643     updateRootLayerTransform(); | 3692     updateRootLayerTransform(); | 
| 3644 | 3693 | 
| 3645     if (m_layerTreeView) { | 3694     if (m_layerTreeView) { | 
| 3646         if (m_rootLayer) { | 3695         if (m_rootLayer) { | 
| 3647             m_layerTreeView->setRootLayer(*m_rootLayer); | 3696             m_layerTreeView->setRootLayer(*m_rootLayer); | 
| 3648             // We register viewport layers here since there may not be a layer | 3697             // We register viewport layers here since there may not be a layer | 
| 3649             // tree view prior to this point. | 3698             // tree view prior to this point. | 
| 3650             if (pinchVirtualViewportEnabled) { | 3699             if (pinchVirtualViewportEnabled()) { | 
| 3651                 page()->frameHost().pinchViewport().registerLayersWithTreeView(m
      _layerTreeView); | 3700                 page()->frameHost().pinchViewport().registerLayersWithTreeView(m
      _layerTreeView); | 
| 3652             } else { | 3701             } else { | 
| 3653                 GraphicsLayer* rootScrollLayer = compositor()->scrollLayer(); | 3702                 GraphicsLayer* rootScrollLayer = compositor()->scrollLayer(); | 
| 3654                 ASSERT(rootScrollLayer); | 3703                 ASSERT(rootScrollLayer); | 
| 3655                 WebLayer* pageScaleLayer = rootScrollLayer->parent() ? rootScrol
      lLayer->parent()->platformLayer() : 0; | 3704                 WebLayer* pageScaleLayer = rootScrollLayer->parent() ? rootScrol
      lLayer->parent()->platformLayer() : 0; | 
| 3656                 m_layerTreeView->registerViewportLayers(pageScaleLayer, rootScro
      llLayer->platformLayer(), 0); | 3705                 m_layerTreeView->registerViewportLayers(pageScaleLayer, rootScro
      llLayer->platformLayer(), 0); | 
| 3657             } | 3706             } | 
| 3658         } else { | 3707         } else { | 
| 3659             m_layerTreeView->clearRootLayer(); | 3708             m_layerTreeView->clearRootLayer(); | 
| 3660             if (pinchVirtualViewportEnabled) | 3709             if (pinchVirtualViewportEnabled()) | 
| 3661                 page()->frameHost().pinchViewport().clearLayersForTreeView(m_lay
      erTreeView); | 3710                 page()->frameHost().pinchViewport().clearLayersForTreeView(m_lay
      erTreeView); | 
| 3662             else | 3711             else | 
| 3663                 m_layerTreeView->clearViewportLayers(); | 3712                 m_layerTreeView->clearViewportLayers(); | 
| 3664         } | 3713         } | 
| 3665     } | 3714     } | 
| 3666 | 3715 | 
| 3667     suppressInvalidations(false); | 3716     suppressInvalidations(false); | 
| 3668 } | 3717 } | 
| 3669 | 3718 | 
| 3670 void WebViewImpl::scheduleCompositingLayerSync() | 3719 void WebViewImpl::scheduleCompositingLayerSync() | 
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3815     frameView->setInProgrammaticScroll(programmaticScroll); | 3864     frameView->setInProgrammaticScroll(programmaticScroll); | 
| 3816     frameView->notifyScrollPositionChanged(scrollPosition); | 3865     frameView->notifyScrollPositionChanged(scrollPosition); | 
| 3817     frameView->setInProgrammaticScroll(oldProgrammaticScroll); | 3866     frameView->setInProgrammaticScroll(oldProgrammaticScroll); | 
| 3818 } | 3867 } | 
| 3819 | 3868 | 
| 3820 void WebViewImpl::applyScrollAndScale(const WebSize& scrollDelta, float pageScal
      eDelta) | 3869 void WebViewImpl::applyScrollAndScale(const WebSize& scrollDelta, float pageScal
      eDelta) | 
| 3821 { | 3870 { | 
| 3822     if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 3871     if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 
| 3823         return; | 3872         return; | 
| 3824 | 3873 | 
| 3825     // With virtual viewport we need only set the scale (see TODO below). | 3874     if (pinchVirtualViewportEnabled()) { | 
| 3826     if (page()->settings().pinchVirtualViewportEnabled()) { | 3875         if (pageScaleDelta != 1) { | 
| 3827         WebSize scrollOffset = mainFrame()->scrollOffset(); | 3876             // When the virtual viewport is enabled, offsets are already set for
       us. | 
| 3828         WebPoint scrollPoint(scrollOffset.width, scrollOffset.height); | 3877             setPageScaleFactor(pageScaleFactor() * pageScaleDelta); | 
| 3829         setPageScaleFactor(pageScaleFactor() * pageScaleDelta, scrollPoint); | 3878             m_doubleTapZoomPending = false; | 
| 3830         m_doubleTapZoomPending = false; | 3879         } | 
|  | 3880 | 
| 3831         return; | 3881         return; | 
| 3832     } | 3882     } | 
| 3833 | 3883 | 
| 3834     // TODO(bokan): Old pinch path only - virtual viewport pinch scrolls are aut
      omatically updated via GraphicsLayer::DidScroll. | 3884     // TODO(bokan): Old pinch path only - virtual viewport pinch scrolls are aut
      omatically updated via GraphicsLayer::DidScroll. | 
| 3835     // this should be removed once old pinch is removed. | 3885     // this should be removed once old pinch is removed. | 
| 3836     if (pageScaleDelta == 1) { | 3886     if (pageScaleDelta == 1) { | 
| 3837         TRACE_EVENT_INSTANT2("webkit", "WebViewImpl::applyScrollAndScale::scroll
      By", "x", scrollDelta.width, "y", scrollDelta.height); | 3887         TRACE_EVENT_INSTANT2("webkit", "WebViewImpl::applyScrollAndScale::scroll
      By", "x", scrollDelta.width, "y", scrollDelta.height); | 
| 3838         WebSize webScrollOffset = mainFrame()->scrollOffset(); | 3888         WebSize webScrollOffset = mainFrame()->scrollOffset(); | 
| 3839         IntPoint scrollOffset(webScrollOffset.width + scrollDelta.width, webScro
      llOffset.height + scrollDelta.height); | 3889         IntPoint scrollOffset(webScrollOffset.width + scrollDelta.width, webScro
      llOffset.height + scrollDelta.height); | 
| 3840         updateMainFrameScrollPosition(scrollOffset, false); | 3890         updateMainFrameScrollPosition(scrollOffset, false); | 
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4002     const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
      nedConstraints(); | 4052     const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
      nedConstraints(); | 
| 4003 | 4053 | 
| 4004     if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4054     if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 
| 4005         return false; | 4055         return false; | 
| 4006 | 4056 | 
| 4007     return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4057     return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 
| 4008         || (constraints.minimumScale == constraints.maximumScale && constraints.
      minimumScale != -1); | 4058         || (constraints.minimumScale == constraints.maximumScale && constraints.
      minimumScale != -1); | 
| 4009 } | 4059 } | 
| 4010 | 4060 | 
| 4011 } // namespace blink | 4061 } // namespace blink | 
| OLD | NEW | 
|---|