Changeset 162663 in webkit


Ignore:
Timestamp:
Jan 23, 2014 4:39:46 PM (10 years ago)
Author:
Simon Fraser
Message:

Make visibleContentRect() return actualVisibleContentRect() on iOS most of the time
https://bugs.webkit.org/show_bug.cgi?id=127456

Reviewed by Antti Koivisto.

On iOS, visibleContentRect() returns the entire document rect for historical
reasons, and actualVisibleContentRect() returns what visibleContentRect()
returns on other platforms.

In addition, actualVisibleContentRect() was returning an empty rect in WK2.

Reduce the confusion of #ifdefs by making visibleContentRect() behave like
actualVisibleContentRect() by default on iOS. Where it needs the old behavior,
an optional parameter, LegacyIOSDocumentVisibleRect, provides this.

Achieve this by having the virtual ScrollableArea::visibleContentRectInternal(),
which is called by non-virtual visibleContentRect() and visibleContentRectIncludingScrollbars().

Similarly clean up visibleHeight/visibleWidth functions by having visibleSize() be virtual,
with non-virtual visibleHeight() and visibleWidth().

ScrollableArea subclasses override visibleContentRectInternal() and visibleSize() where necessary.

Mechanically change all the call sites of actualVisibleContentRect() to
use visibleContentRect(), and the call sites of visibleContentRect()
to visibleContentRect(..., LegacyIOSDocumentVisibleRect), adding comments
where this may not be appropriate.

Change callers of visibleContentRect(IncludeScrollbars...) to visibleContentRectIncludingScrollbars().

Also add actualScrollPosition(), and clean up some actualScroll* call sites.

No behavior change.

Source/WebCore:

  • WebCore.exp.in:
  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isOnscreen):
(WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::isOffScreen):

  • dom/Document.cpp:

(WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale):
(WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale):

  • dom/MouseRelatedEvent.cpp:

(WebCore::MouseRelatedEvent::MouseRelatedEvent):

  • editing/Editor.cpp:

(WebCore::Editor::countMatchesForText):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::bounds):
(WebCore::FrameSelection::getClippedVisibleTextRectangles):

  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::scrollLeft):
(WebCore::HTMLBodyElement::scrollTop):

  • html/ImageDocument.cpp:

(WebCore::ImageDocument::imageFitsInWindow):
(WebCore::ImageDocument::windowSizeChanged):

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::update):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::innerHeight):
(WebCore::DOMWindow::innerWidth):
(WebCore::DOMWindow::scrollX):
(WebCore::DOMWindow::scrollY):
(WebCore::DOMWindow::scrollBy):

  • page/FrameView.cpp:

(WebCore::FrameView::calculateScrollbarModesForLayout):
(WebCore::FrameView::layout):
(WebCore::FrameView::scrollContentsSlowPath):
(WebCore::FrameView::repaintContentRectangle):
(WebCore::FrameView::sendResizeEventIfNeeded):
(WebCore::FrameView::windowClipRect):
(WebCore::FrameView::isScrollable):
(WebCore::FrameView::paintControlTints):

  • page/SpatialNavigation.cpp:

(WebCore::canScrollInDirection):

  • platform/ScrollView.cpp:

(WebCore::ScrollView::unscaledVisibleContentSize):
(WebCore::ScrollView::visibleContentRectInternal):
(WebCore::ScrollView::updateScrollbars):
(WebCore::ScrollView::paint):

  • platform/ScrollView.h:

(WebCore::ScrollView::scrollOffset):
(WebCore::ScrollView::actualScrollX):
(WebCore::ScrollView::actualScrollY):
(WebCore::ScrollView::actualScrollPosition):

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::visibleContentRect):
(WebCore::ScrollableArea::visibleContentRectIncludingScrollbars):
(WebCore::ScrollableArea::visibleContentRectInternal):

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::visibleWidth):
(WebCore::ScrollableArea::visibleHeight):

  • platform/graphics/IntSize.h:

(WebCore::IntSize::expandedTo): Drive-by cleanup.
(WebCore::IntSize::shrunkTo):

  • platform/gtk/ScrollViewGtk.cpp:

(WebCore::ScrollView::visibleContentRect):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::maximumScrollPosition):
(WebCore::RenderLayer::visibleContentRectInternal):
(WebCore::RenderLayer::hitTest):

  • rendering/RenderLayer.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateCompositedBounds):

  • rendering/RenderListBox.cpp:
  • rendering/RenderListBox.h:
  • rendering/RenderView.cpp:

(WebCore::RenderView::viewRect):
(WebCore::RenderView::viewportSize):

Source/WebKit:

  • WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit2:

  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/WebPage/ViewGestureGeometryCollector.cpp:

(WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::visibleContentBounds):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):

Location:
trunk/Source
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r162660 r162663  
     12014-01-23  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Make visibleContentRect() return actualVisibleContentRect() on iOS most of the time
     4        https://bugs.webkit.org/show_bug.cgi?id=127456
     5       
     6        Reviewed by Antti Koivisto.
     7       
     8        On iOS, visibleContentRect() returns the entire document rect for historical
     9        reasons, and actualVisibleContentRect() returns what visibleContentRect()
     10        returns on other platforms.
     11       
     12        In addition, actualVisibleContentRect() was returning an empty rect in WK2.
     13       
     14        Reduce the confusion of #ifdefs by making visibleContentRect() behave like
     15        actualVisibleContentRect() by default on iOS. Where it needs the old behavior,
     16        an optional parameter, LegacyIOSDocumentVisibleRect, provides this.
     17       
     18        Achieve this by having the virtual ScrollableArea::visibleContentRectInternal(),
     19        which is called by non-virtual visibleContentRect() and visibleContentRectIncludingScrollbars().
     20       
     21        Similarly clean up visibleHeight/visibleWidth functions by having visibleSize() be virtual,
     22        with non-virtual visibleHeight() and visibleWidth().
     23       
     24        ScrollableArea subclasses override visibleContentRectInternal() and visibleSize() where necessary.
     25       
     26        Mechanically change all the call sites of actualVisibleContentRect() to
     27        use visibleContentRect(), and the call sites of visibleContentRect()
     28        to visibleContentRect(..., LegacyIOSDocumentVisibleRect), adding comments
     29        where this may not be appropriate.
     30       
     31        Change callers of visibleContentRect(IncludeScrollbars...) to visibleContentRectIncludingScrollbars().
     32       
     33        Also add actualScrollPosition(), and clean up some actualScroll* call sites.
     34       
     35        No behavior change.
     36
     37        * WebCore.exp.in:
     38        * accessibility/AccessibilityObject.cpp:
     39        (WebCore::AccessibilityObject::isOnscreen):
     40        (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
     41        * accessibility/AccessibilityRenderObject.cpp:
     42        (WebCore::AccessibilityRenderObject::isOffScreen):
     43        * dom/Document.cpp:
     44        (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale):
     45        (WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale):
     46        * dom/MouseRelatedEvent.cpp:
     47        (WebCore::MouseRelatedEvent::MouseRelatedEvent):
     48        * editing/Editor.cpp:
     49        (WebCore::Editor::countMatchesForText):
     50        * editing/FrameSelection.cpp:
     51        (WebCore::FrameSelection::bounds):
     52        (WebCore::FrameSelection::getClippedVisibleTextRectangles):
     53        * html/HTMLBodyElement.cpp:
     54        (WebCore::HTMLBodyElement::scrollLeft):
     55        (WebCore::HTMLBodyElement::scrollTop):
     56        * html/ImageDocument.cpp:
     57        (WebCore::ImageDocument::imageFitsInWindow):
     58        (WebCore::ImageDocument::windowSizeChanged):
     59        * inspector/InspectorOverlay.cpp:
     60        (WebCore::InspectorOverlay::update):
     61        * page/DOMWindow.cpp:
     62        (WebCore::DOMWindow::innerHeight):
     63        (WebCore::DOMWindow::innerWidth):
     64        (WebCore::DOMWindow::scrollX):
     65        (WebCore::DOMWindow::scrollY):
     66        (WebCore::DOMWindow::scrollBy):
     67        * page/FrameView.cpp:
     68        (WebCore::FrameView::calculateScrollbarModesForLayout):
     69        (WebCore::FrameView::layout):
     70        (WebCore::FrameView::scrollContentsSlowPath):
     71        (WebCore::FrameView::repaintContentRectangle):
     72        (WebCore::FrameView::sendResizeEventIfNeeded):
     73        (WebCore::FrameView::windowClipRect):
     74        (WebCore::FrameView::isScrollable):
     75        (WebCore::FrameView::paintControlTints):
     76        * page/SpatialNavigation.cpp:
     77        (WebCore::canScrollInDirection):
     78        * platform/ScrollView.cpp:
     79        (WebCore::ScrollView::unscaledVisibleContentSize):
     80        (WebCore::ScrollView::visibleContentRectInternal):
     81        (WebCore::ScrollView::updateScrollbars):
     82        (WebCore::ScrollView::paint):
     83        * platform/ScrollView.h:
     84        (WebCore::ScrollView::scrollOffset):
     85        (WebCore::ScrollView::actualScrollX):
     86        (WebCore::ScrollView::actualScrollY):
     87        (WebCore::ScrollView::actualScrollPosition):
     88        * platform/ScrollableArea.cpp:
     89        (WebCore::ScrollableArea::visibleContentRect):
     90        (WebCore::ScrollableArea::visibleContentRectIncludingScrollbars):
     91        (WebCore::ScrollableArea::visibleContentRectInternal):
     92        * platform/ScrollableArea.h:
     93        (WebCore::ScrollableArea::visibleWidth):
     94        (WebCore::ScrollableArea::visibleHeight):
     95        * platform/graphics/IntSize.h:
     96        (WebCore::IntSize::expandedTo): Drive-by cleanup.
     97        (WebCore::IntSize::shrunkTo):
     98        * platform/gtk/ScrollViewGtk.cpp:
     99        (WebCore::ScrollView::visibleContentRect):
     100        * rendering/RenderLayer.cpp:
     101        (WebCore::RenderLayer::scrollRectToVisible):
     102        (WebCore::RenderLayer::maximumScrollPosition):
     103        (WebCore::RenderLayer::visibleContentRectInternal):
     104        (WebCore::RenderLayer::hitTest):
     105        * rendering/RenderLayer.h:
     106        * rendering/RenderLayerBacking.cpp:
     107        (WebCore::RenderLayerBacking::updateCompositedBounds):
     108        * rendering/RenderListBox.cpp:
     109        * rendering/RenderListBox.h:
     110        * rendering/RenderView.cpp:
     111        (WebCore::RenderView::viewRect):
     112        (WebCore::RenderView::viewportSize):
     113
    11142014-01-20  Myles C. Maxfield  <mmaxfield@apple.com>
    2115
  • trunk/Source/WebCore/WebCore.exp.in

    r162633 r162663  
    14241424__ZNK7WebCore10ScrollView18contentsToRootViewERKNS_7IntRectE
    14251425__ZNK7WebCore10ScrollView18contentsToRootViewERKNS_8IntPointE
    1426 __ZNK7WebCore10ScrollView18visibleContentRectENS_14ScrollableArea36VisibleContentRectIncludesScrollbarsE
    14271426__ZNK7WebCore10ScrollView23rootViewToTotalContentsERKNS_8IntPointE
    14281427__ZNK7WebCore10ScrollView30scrollOffsetRelativeToDocumentEv
     
    15491548__ZNK7WebCore14ScrollableArea14scrollAnimatorEv
    15501549__ZNK7WebCore14ScrollableArea17totalContentsSizeEv
     1550__ZNK7WebCore14ScrollableArea18visibleContentRectENS0_26VisibleContentRectBehaviorE
    15511551__ZNK7WebCore14ScrollableArea20contentAreaWillPaintEv
    15521552__ZNK7WebCore14ScrollableArea21mouseEnteredScrollbarEPNS_9ScrollbarE
     
    15551555__ZNK7WebCore14ScrollableArea23mouseEnteredContentAreaEv
    15561556__ZNK7WebCore14ScrollableArea23mouseMovedInContentAreaEv
     1557__ZNK7WebCore14ScrollableArea26visibleContentRectInternalENS0_36VisibleContentRectIncludesScrollbarsENS0_26VisibleContentRectBehaviorE
     1558__ZNK7WebCore14ScrollableArea37visibleContentRectIncludingScrollbarsENS0_26VisibleContentRectBehaviorE
    15571559__ZNK7WebCore14SecurityOrigin10canDisplayERKNS_3URLE
    15581560__ZNK7WebCore14SecurityOrigin11toRawStringEv
     
    21202122__ZN7WebCore9FloatRectC1ERK7_NSRect
    21212123__ZNK7WebCore10FloatPointcv8_NSPointEv
    2122 __ZNK7WebCore14ScrollableArea18visibleContentRectENS0_36VisibleContentRectIncludesScrollbarsE
    21232124__ZNK7WebCore6Cursor14platformCursorEv
    21242125__ZNK7WebCore7IntRectcv7_NSRectEv
  • trunk/Source/WebCore/accessibility/AccessibilityObject.cpp

    r161979 r162663  
    18841884        const AccessibilityObject* outer = objects[i];
    18851885        const AccessibilityObject* inner = objects[i - 1];
    1886         const IntRect outerRect = i < levels ? pixelSnappedIntRect(outer->boundingBoxRect()) : outer->getScrollableAreaIfScrollable()->visibleContentRect();
     1886        // FIXME: unclear if we need LegacyIOSDocumentVisibleRect.
     1887        const IntRect outerRect = i < levels ? pixelSnappedIntRect(outer->boundingBoxRect()) : outer->getScrollableAreaIfScrollable()->visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
    18871888        const IntRect innerRect = pixelSnappedIntRect(inner->isAccessibilityScrollView() ? inner->parentObject()->boundingBoxRect() : inner->boundingBoxRect());
    18881889       
     
    19161917    LayoutRect objectRect = boundingBoxRect();
    19171918    IntPoint scrollPosition = scrollableArea->scrollPosition();
    1918     IntRect scrollVisibleRect = scrollableArea->visibleContentRect();
     1919    // FIXME: unclear if we need LegacyIOSDocumentVisibleRect.
     1920    IntRect scrollVisibleRect = scrollableArea->visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
    19191921
    19201922    int desiredX = computeBestScrollOffset(
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r162466 r162663  
    551551    ASSERT(m_renderer);
    552552    IntRect contentRect = pixelSnappedIntRect(m_renderer->absoluteClippedOverflowRect());
    553     IntRect viewRect = m_renderer->view().frameView().visibleContentRect();
     553    // FIXME: unclear if we need LegacyIOSDocumentVisibleRect.
     554    IntRect viewRect = m_renderer->view().frameView().visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
    554555    viewRect.intersect(contentRect);
    555556    return viewRect.isEmpty();
  • trunk/Source/WebCore/dom/Document.cpp

    r162258 r162663  
    58085808        inverseFrameScale = 1 / frame()->frameScaleFactor();
    58095809
    5810 #if PLATFORM(IOS)
    5811     LayoutRect visibleContentRect = view()->actualVisibleContentRect();
    5812 #else
    58135810    LayoutRect visibleContentRect = view()->visibleContentRect();
    5814 #endif
    58155811    for (size_t i = 0; i < quads.size(); ++i) {
    58165812        quads[i].move(-visibleContentRect.x(), -visibleContentRect.y());
     
    58325828        inverseFrameScale = 1 / frame()->frameScaleFactor();
    58335829
    5834 #if PLATFORM(IOS)
    5835     LayoutRect visibleContentRect = view()->actualVisibleContentRect();
    5836 #else
    58375830    LayoutRect visibleContentRect = view()->visibleContentRect();
    5838 #endif
    58395831    rect.move(-visibleContentRect.x(), -visibleContentRect.y());
    58405832    if (zoom != 1)
  • trunk/Source/WebCore/dom/MouseRelatedEvent.cpp

    r160679 r162663  
    7878            scrollPosition = frameView->scrollPosition();
    7979#else
    80             scrollPosition = frameView->actualVisibleContentRect().location();
     80            scrollPosition = frameView->actualScrollPosition();
    8181#endif
    8282            adjustedPageLocation = frameView->windowToContents(windowLocation);
  • trunk/Source/WebCore/editing/Editor.cpp

    r162451 r162663  
    32683268        if (m_frame.view() && m_frame.contentRenderer()) {
    32693269            document().updateLayout(); // Ensure layout is up to date.
    3270             LayoutRect visibleRect = m_frame.view()->visibleContentRect();
     3270            // FIXME: unclear if we need LegacyIOSDocumentVisibleRect.
     3271            // FIXME: this should probably look at paintsEntireContents()
     3272            LayoutRect visibleRect = m_frame.view()->visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
    32713273            if (!visibleRect.isEmpty()) {
    32723274                GraphicsContext context((PlatformGraphicsContext*)0);
  • trunk/Source/WebCore/editing/FrameSelection.cpp

    r161768 r162663  
    20092009
    20102010    LayoutRect selectionRect = root->selectionBounds(clipToVisibleContent);
    2011     return clipToVisibleContent ? intersection(selectionRect, view->visibleContentRect()) : selectionRect;
     2011    return clipToVisibleContent ? intersection(selectionRect, view->visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect)) : selectionRect;
    20122012}
    20132013
     
    20182018        return;
    20192019
    2020     FloatRect visibleContentRect = m_frame->view()->visibleContentRect();
     2020    FloatRect visibleContentRect = m_frame->view()->visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
    20212021
    20222022    Vector<FloatQuad> quads;
  • trunk/Source/WebCore/html/HTMLBodyElement.cpp

    r160966 r162663  
    210210        return 0;
    211211#if PLATFORM(IOS)
    212     return adjustForZoom(view->actualVisibleContentRect().x(), *frame);
     212    return adjustForZoom(view->actualScrollX(), *frame);
    213213#else
    214214    return adjustForZoom(view->scrollX(), *frame);
     
    238238        return 0;
    239239#if PLATFORM(IOS)
    240     return adjustForZoom(view->actualVisibleContentRect().y(), *frame);
     240    return adjustForZoom(view->actualScrollY(), *frame);
    241241#else
    242242    return adjustForZoom(view->scrollY(), *frame);
  • trunk/Source/WebCore/html/ImageDocument.cpp

    r162227 r162663  
    345345    LayoutSize imageSize = m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->renderer(), pageZoomFactor(this));
    346346#if PLATFORM(IOS)
    347     LayoutSize windowSize = view->contentsToScreen(view->actualVisibleContentRect()).size();
     347    LayoutSize windowSize = view->contentsToScreen(view->visibleContentRect()).size();
    348348#else
    349349    LayoutSize windowSize = LayoutSize(view->width(), view->height());
     
    364364
    365365    LayoutSize imageSize = m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->renderer(), pageZoomFactor(this));
    366     LayoutRect visibleScreenSize = frame()->view()->contentsToScreen(frame()->view()->actualVisibleContentRect());
     366    LayoutRect visibleScreenSize = frame()->view()->contentsToScreen(frame()->view()->visibleContentRect());
    367367
    368368    float widthScale = static_cast<float>(visibleScreenSize.width()) / imageSize.width();
  • trunk/Source/WebCore/inspector/InspectorOverlay.cpp

    r162602 r162663  
    329329    FrameView* overlayView = overlayPage()->mainFrame().view();
    330330    IntSize viewportSize = view->visibleContentRect().size();
    331     IntSize frameViewFullSize = view->visibleContentRect(ScrollableArea::IncludeScrollbars).size();
     331    IntSize frameViewFullSize = view->visibleContentRectIncludingScrollbars().size();
    332332    IntSize size = m_size.isEmpty() ? frameViewFullSize : m_size;
    333333    overlayPage()->setPageScaleFactor(m_page.pageScaleFactor(), IntPoint());
  • trunk/Source/WebCore/page/DOMWindow.cpp

    r161639 r162663  
    11541154        return 0;
    11551155
    1156 #if PLATFORM(IOS)
    1157     return view->mapFromLayoutToCSSUnits(static_cast<int>(view->actualVisibleContentRect().height()));
    1158 #else
    1159     return view->mapFromLayoutToCSSUnits(static_cast<int>(view->visibleContentRect(ScrollableArea::IncludeScrollbars).height()));
    1160 #endif
     1156    return view->mapFromLayoutToCSSUnits(static_cast<int>(view->visibleContentRectIncludingScrollbars().height()));
    11611157}
    11621158
     
    11701166        return 0;
    11711167
    1172 #if PLATFORM(IOS)
    1173     return view->mapFromLayoutToCSSUnits(static_cast<int>(view->actualVisibleContentRect().width()));
    1174 #else
    1175     return view->mapFromLayoutToCSSUnits(static_cast<int>(view->visibleContentRect(ScrollableArea::IncludeScrollbars).width()));
    1176 #endif
     1168    return view->mapFromLayoutToCSSUnits(static_cast<int>(view->visibleContentRectIncludingScrollbars().width()));
    11771169}
    11781170
     
    12161208
    12171209#if PLATFORM(IOS)
    1218     return static_cast<int>(view->actualVisibleContentRect().x() / (m_frame->pageZoomFactor() * m_frame->frameScaleFactor()));
     1210    return static_cast<int>(view->actualScrollX() / (m_frame->pageZoomFactor() * m_frame->frameScaleFactor()));
    12191211#else
    12201212    return view->mapFromLayoutToCSSUnits(view->scrollX());
     
    12371229
    12381230#if PLATFORM(IOS)
    1239     return static_cast<int>(view->actualVisibleContentRect().y() / (m_frame->pageZoomFactor() * m_frame->frameScaleFactor()));
     1231    return static_cast<int>(view->actualScrollY() / (m_frame->pageZoomFactor() * m_frame->frameScaleFactor()));
    12401232#else
    12411233    return view->mapFromLayoutToCSSUnits(view->scrollY());
     
    14531445    IntSize scaledOffset(view->mapFromCSSToLayoutUnits(x), view->mapFromCSSToLayoutUnits(y));
    14541446#if PLATFORM(IOS)
    1455     view->setActualScrollPosition(view->actualVisibleContentRect().location() + scaledOffset);
     1447    view->setActualScrollPosition(view->actualScrollPosition() + scaledOffset);
    14561448#else
    14571449    view->scrollBy(scaledOffset);
  • trunk/Source/WebCore/page/FrameView.cpp

    r162640 r162663  
    714714        // Seamless documents begin with heights of 0; we special case that here
    715715        // to correctly render documents that don't need scrollbars.
    716         IntSize fullVisibleSize = visibleContentRect(IncludeScrollbars).size();
     716        IntSize fullVisibleSize = visibleContentRectIncludingScrollbars(LegacyIOSDocumentVisibleRect).size();
    717717        bool isSeamlessDocument = frame().document() && frame().document()->shouldDisplaySeamlesslyWithParent();
    718718        vMode = (isSeamlessDocument && !fullVisibleSize.height()) ? ScrollbarAlwaysOff : ScrollbarAuto;
     
    12651265                        m_lastViewportSize = fixedLayoutSize();
    12661266                    else
    1267 #if PLATFORM(IOS)
    1268                         m_lastViewportSize = actualVisibleContentRect().size();
    1269 #else
    1270                         m_lastViewportSize = visibleContentRect(IncludeScrollbars).size();
    1271 #endif
     1267                        m_lastViewportSize = visibleContentRectIncludingScrollbars().size();
    12721268
    12731269                    m_lastZoomFactor = root->style().zoom();
     
    17791775#if USE(ACCELERATED_COMPOSITING)
    17801776    if (contentsInCompositedLayer()) {
    1781         IntRect updateRect = visibleContentRect();
     1777        // FIXME: respect paintsEntireContents()?
     1778        IntRect updateRect = visibleContentRect(LegacyIOSDocumentVisibleRect);
    17821779
    17831780        // Make sure to "apply" the scale factor here since we're converting from frame view
     
    21672164        IntRect paintRect = r;
    21682165        if (clipsRepaints() && !paintsEntireContents())
    2169             paintRect.intersect(visibleContentRect());
     2166            paintRect.intersect(visibleContentRect(LegacyIOSDocumentVisibleRect));
    21702167        if (paintRect.isEmpty())
    21712168            return;
     
    29392936        currentSize = fixedLayoutSize();
    29402937    else
    2941 #if PLATFORM(IOS)
    2942         currentSize = actualVisibleContentRect().size();
    2943 #else
    2944         currentSize = visibleContentRect(IncludeScrollbars).size();
    2945 #endif
     2938        currentSize = visibleContentRectIncludingScrollbars().size();
    29462939
    29472940    float currentZoomFactor = renderView->style().zoom();
     
    31663159
    31673160    // Set our clip rect to be our contents.
    3168     IntRect clipRect = contentsToWindow(visibleContentRect(clipToContents ? ExcludeScrollbars : IncludeScrollbars));
     3161    IntRect clipRect;
     3162    if (clipToContents)
     3163        clipRect = contentsToWindow(visibleContentRect(LegacyIOSDocumentVisibleRect));
     3164    else
     3165        clipRect = contentsToWindow(visibleContentRectIncludingScrollbars(LegacyIOSDocumentVisibleRect));
    31693166    if (!frame().ownerElement())
    31703167        return clipRect;
     
    32803277    // Covers #1
    32813278    IntSize totalContentsSize = this->totalContentsSize();
    3282     IntSize visibleContentSize = visibleContentRect().size();
     3279    IntSize visibleContentSize = visibleContentRect(LegacyIOSDocumentVisibleRect).size();
    32833280    if ((totalContentsSize.height() <= visibleContentSize.height() && totalContentsSize.width() <= visibleContentSize.width()))
    32843281        return false;
     
    35833580    GraphicsContext context(noContext);
    35843581    context.setUpdatingControlTints(true);
    3585     if (platformWidget())
    3586         paintContents(&context, visibleContentRect());
    3587     else
     3582    if (platformWidget()) {
     3583        // FIXME: consult paintsEntireContents().
     3584        paintContents(&context, visibleContentRect(LegacyIOSDocumentVisibleRect));
     3585    } else
    35883586        paint(&context, frameRect());
    35893587}
  • trunk/Source/WebCore/page/SpatialNavigation.cpp

    r159604 r162663  
    486486    LayoutSize size = frame->view()->totalContentsSize();
    487487    LayoutSize offset = frame->view()->scrollOffset();
    488     LayoutRect rect = frame->view()->visibleContentRect(ScrollableArea::IncludeScrollbars);
     488    LayoutRect rect = frame->view()->visibleContentRectIncludingScrollbars();
    489489
    490490    switch (direction) {
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r162597 r162663  
    257257    }
    258258
    259     return IntSize(std::max(0, width() - verticalScrollbarWidth),
    260                    std::max(0, height() - horizontalScrollbarHeight));
     259    return IntSize(width() - verticalScrollbarWidth, height() - horizontalScrollbarHeight).expandedTo(IntSize());
    261260}
    262261
    263262#if !PLATFORM(GTK)
    264 IntRect ScrollView::visibleContentRect(VisibleContentRectIncludesScrollbars scollbarInclusion) const
    265 {
     263IntRect ScrollView::visibleContentRectInternal(VisibleContentRectIncludesScrollbars scollbarInclusion, VisibleContentRectBehavior visibleContentRectBehavior) const
     264{
     265#if PLATFORM(IOS)
     266    if (visibleContentRectBehavior == LegacyIOSDocumentViewRect) {
     267        if (platformWidget())
     268            return platformVisibleContentRect(true /* include scrollbars */);
     269    }
     270   
     271    if (platformWidget())
     272        return actualVisibleContentRect();
     273#else
     274    UNUSED_PARAM(visibleContentRectBehavior);
     275#endif
     276
    266277    if (platformWidget())
    267278        return platformVisibleContentRect(scollbarInclusion == IncludeScrollbars);
     
    549560       
    550561        IntSize docSize = totalContentsSize();
    551         IntSize fullVisibleSize = visibleContentRect(IncludeScrollbars).size();
     562        IntSize fullVisibleSize = visibleContentRectIncludingScrollbars().size();
    552563
    553564        if (hScroll == ScrollbarAuto)
     
    11631174        GraphicsContextStateSaver stateSaver(*context);
    11641175        IntRect scrollViewDirtyRect = rect;
    1165         IntRect visibleAreaWithScrollbars(location(), visibleContentRect(IncludeScrollbars).size());
     1176        IntRect visibleAreaWithScrollbars(location(), visibleContentRectIncludingScrollbars().size());
    11661177        scrollViewDirtyRect.intersect(visibleAreaWithScrollbars);
    11671178        context->translate(x(), y());
  • trunk/Source/WebCore/platform/ScrollView.h

    r162597 r162663  
    160160    // the setFixedVisibleContentRect instead for the mainframe, though this must be updated manually, e.g just before resuming the page
    161161    // which usually will happen when panning, pinching and rotation ends, or when scale or position are changed manually.
    162     virtual IntRect visibleContentRect(VisibleContentRectIncludesScrollbars = ExcludeScrollbars) const override;
    163     IntSize visibleSize() const { return visibleContentRect().size(); }
     162    virtual IntSize visibleSize() const override { return visibleContentRect(LegacyIOSDocumentVisibleRect).size(); }
    164163
    165164#if USE(TILED_BACKING_STORE)
     
    177176    TileCache* tileCache();
    178177#endif
    179     virtual int visibleWidth() const override { return visibleContentRect().width(); }
    180     virtual int visibleHeight() const override { return visibleContentRect().height(); }
    181178
    182179    // visibleContentRect().size() is computed from unscaledVisibleContentSize() divided by the value of visibleContentScaleFactor.
     
    205202
    206203    // Functions for querying the current scrolled position (both as a point, a size, or as individual X and Y values).
    207     virtual IntPoint scrollPosition() const override { return visibleContentRect().location(); }
    208     IntSize scrollOffset() const { return toIntSize(visibleContentRect().location()); } // Gets the scrolled position as an IntSize. Convenient for adding to other sizes.
     204    virtual IntPoint scrollPosition() const override { return visibleContentRect(LegacyIOSDocumentVisibleRect).location(); }
     205    IntSize scrollOffset() const { return toIntSize(visibleContentRect(LegacyIOSDocumentVisibleRect).location()); } // Gets the scrolled position as an IntSize. Convenient for adding to other sizes.
    209206    virtual IntPoint maximumScrollPosition() const override; // The maximum position we can be scrolled to.
    210207    virtual IntPoint minimumScrollPosition() const override; // The minimum position we can be scrolled to.
     
    215212
    216213#if PLATFORM(IOS)
    217     int actualScrollX() const { return actualVisibleContentRect().x(); }
    218     int actualScrollY() const { return actualVisibleContentRect().y(); }
     214    int actualScrollX() const { return visibleContentRect().x(); }
     215    int actualScrollY() const { return visibleContentRect().y(); }
     216    // FIXME: maybe fix scrollPosition() on iOS to return the actual scroll position.
     217    IntPoint actualScrollPosition() const { return visibleContentRect().location(); }
    219218#endif
    220219
     
    376375
    377376private:
     377    virtual IntRect visibleContentRectInternal(VisibleContentRectIncludesScrollbars, VisibleContentRectBehavior) const override;
     378
    378379    RefPtr<Scrollbar> m_horizontalScrollbar;
    379380    RefPtr<Scrollbar> m_verticalScrollbar;
  • trunk/Source/WebCore/platform/ScrollableArea.cpp

    r161954 r162663  
    446446}
    447447
    448 IntRect ScrollableArea::visibleContentRect(VisibleContentRectIncludesScrollbars scrollbarInclusion) const
     448IntRect ScrollableArea::visibleContentRect(VisibleContentRectBehavior visibleContentRectBehavior) const
     449{
     450    return visibleContentRectInternal(ExcludeScrollbars, visibleContentRectBehavior);
     451}
     452
     453IntRect ScrollableArea::visibleContentRectIncludingScrollbars(VisibleContentRectBehavior visibleContentRectBehavior) const
     454{
     455    return visibleContentRectInternal(IncludeScrollbars, visibleContentRectBehavior);
     456}
     457
     458IntRect ScrollableArea::visibleContentRectInternal(VisibleContentRectIncludesScrollbars scrollbarInclusion, VisibleContentRectBehavior) const
    449459{
    450460    int verticalScrollbarWidth = 0;
  • trunk/Source/WebCore/platform/ScrollableArea.h

    r162098 r162663  
    154154
    155155    enum VisibleContentRectIncludesScrollbars { ExcludeScrollbars, IncludeScrollbars };
    156     virtual IntRect visibleContentRect(VisibleContentRectIncludesScrollbars = ExcludeScrollbars) const;
    157     virtual int visibleHeight() const = 0;
    158     virtual int visibleWidth() const = 0;
     156    enum VisibleContentRectBehavior {
     157        ContentsVisibleRect,
     158#if PLATFORM(IOS)
     159        LegacyIOSDocumentViewRect,
     160        LegacyIOSDocumentVisibleRect = LegacyIOSDocumentViewRect
     161#else
     162        LegacyIOSDocumentVisibleRect = ContentsVisibleRect
     163#endif
     164    };
     165
     166    IntRect visibleContentRect(VisibleContentRectBehavior = ContentsVisibleRect) const;
     167    IntRect visibleContentRectIncludingScrollbars(VisibleContentRectBehavior = ContentsVisibleRect) const;
     168
     169    int visibleWidth() const { return visibleSize().width(); }
     170    int visibleHeight() const { return visibleSize().height(); }
     171    virtual IntSize visibleSize() const = 0;
     172
    159173    virtual IntSize contentsSize() const = 0;
    160174    virtual IntSize overhangAmount() const { return IntSize(); }
     
    242256
    243257private:
     258    virtual IntRect visibleContentRectInternal(VisibleContentRectIncludesScrollbars, VisibleContentRectBehavior) const;
    244259    void scrollPositionChanged(const IntPoint&);
    245260   
  • trunk/Source/WebCore/platform/graphics/IntSize.h

    r161699 r162663  
    8888    IntSize expandedTo(const IntSize& other) const
    8989    {
    90         return IntSize(m_width > other.m_width ? m_width : other.m_width,
    91             m_height > other.m_height ? m_height : other.m_height);
     90        return IntSize(std::max(m_width, other.m_width), std::max(m_height, other.m_height));
    9291    }
    9392
    9493    IntSize shrunkTo(const IntSize& other) const
    9594    {
    96         return IntSize(m_width < other.m_width ? m_width : other.m_width,
    97             m_height < other.m_height ? m_height : other.m_height);
     95        return IntSize(std::min(m_width, other.m_width), std::min(m_height, other.m_height));
    9896    }
    9997
  • trunk/Source/WebCore/platform/gtk/ScrollViewGtk.cpp

    r143295 r162663  
    6464}
    6565
    66 IntRect ScrollView::visibleContentRect(VisibleContentRectIncludesScrollbars scrollbarInclusion) const
     66IntRect ScrollView::visibleContentRect(VisibleContentRectIncludesScrollbars scrollbarInclusion, VisibleContentRectBehavior) const
    6767{
    6868    bool includeScrollbars = scrollbarInclusion == IncludeScrollbars;
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r162644 r162663  
    24332433
    24342434            if (frameElementAndViewPermitScroll(frameElementBase, &frameView)) {
    2435                 LayoutRect viewRect = frameView.visibleContentRect();
     2435                LayoutRect viewRect = frameView.visibleContentRect(LegacyIOSDocumentVisibleRect);
    24362436                LayoutRect exposeRect = getRectToExpose(viewRect, viewRect, rect, alignX, alignY);
    24372437
     
    24592459            visibleRectRelativeToDocument.setLocation(IntPoint(scrollOffsetRelativeToDocument.width(), scrollOffsetRelativeToDocument.height()));
    24602460#else
     2461            // FIXME: is this equivalent to the code above?
    24612462            LayoutRect viewRect = frameView.actualVisibleContentRect();
    24622463            LayoutRect visibleRectRelativeToDocument = viewRect;
     
    26842685{
    26852686    // FIXME: m_scrollSize may not be up-to-date if m_scrollDimensionsDirty is true.
    2686     return -scrollOrigin() + roundedIntSize(m_scrollSize) - visibleContentRect(IncludeScrollbars).size();
    2687 }
    2688 
    2689 IntRect RenderLayer::visibleContentRect(VisibleContentRectIncludesScrollbars scrollbarInclusion) const
     2687    return -scrollOrigin() + roundedIntSize(m_scrollSize) - visibleContentRectIncludingScrollbars(ContentsVisibleRect).size();
     2688}
     2689
     2690IntRect RenderLayer::visibleContentRectInternal(VisibleContentRectIncludesScrollbars scrollbarInclusion, VisibleContentRectBehavior) const
    26902691{
    26912692    int verticalScrollbarWidth = 0;
     
    28212822{
    28222823    return IntSize(scrollWidth(), scrollHeight());
    2823 }
    2824 
    2825 int RenderLayer::visibleHeight() const
    2826 {
    2827     return m_layerSize.height();
    2828 }
    2829 
    2830 int RenderLayer::visibleWidth() const
    2831 {
    2832     return m_layerSize.width();
    28332824}
    28342825
     
    46544645    LayoutRect hitTestArea = isOutOfFlowRenderFlowThread() ? toRenderFlowThread(&renderer())->visualOverflowRect() : renderer().view().documentRect();
    46554646    if (!request.ignoreClipping())
    4656         hitTestArea.intersect(renderer().view().frameView().visibleContentRect());
     4647        hitTestArea.intersect(renderer().view().frameView().visibleContentRect(LegacyIOSDocumentVisibleRect));
    46574648
    46584649    RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestArea, hitTestLocation, false);
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r162644 r162663  
    10631063    virtual IntPoint minimumScrollPosition() const override;
    10641064    virtual IntPoint maximumScrollPosition() const override;
    1065     virtual IntRect visibleContentRect(VisibleContentRectIncludesScrollbars) const override;
    1066     virtual int visibleHeight() const override;
    1067     virtual int visibleWidth() const override;
     1065    virtual IntRect visibleContentRectInternal(VisibleContentRectIncludesScrollbars, VisibleContentRectBehavior) const override;
     1066    virtual IntSize visibleSize() const override { return m_layerSize; }
    10681067    virtual IntSize contentsSize() const override;
    10691068    virtual IntSize overhangAmount() const override;
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r162644 r162663  
    481481        if (renderer().style().position() == FixedPosition && renderer().container() == &view) {
    482482#if PLATFORM(IOS)
    483             clippingBounds = view.frameView().visibleContentRect();
     483            clippingBounds = view.frameView().visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
    484484#else
    485485            clippingBounds = view.frameView().viewportConstrainedVisibleContentRect();
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r161558 r162663  
    765765}
    766766
    767 int RenderListBox::visibleHeight() const
    768 {
    769     return height();
    770 }
    771 
    772 int RenderListBox::visibleWidth() const
    773 {
    774     return width();
    775 }
    776 
    777767IntPoint RenderListBox::lastKnownMousePosition() const
    778768{
  • trunk/Source/WebCore/rendering/RenderListBox.h

    r162198 r162663  
    119119    virtual Scrollbar* verticalScrollbar() const override { return m_vBar.get(); }
    120120    virtual IntSize contentsSize() const override;
    121     virtual int visibleHeight() const override;
    122     virtual int visibleWidth() const override;
     121    virtual IntSize visibleSize() const override { return IntSize(height(), width()); }
    123122    virtual IntPoint lastKnownMousePosition() const override;
    124123    virtual bool isHandlingWheelEvent() const override;
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r162644 r162663  
    10121012    if (shouldUsePrintingLayout())
    10131013        return LayoutRect(LayoutPoint(), size());
    1014     return frameView().visibleContentRect();
     1014    return frameView().visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
    10151015}
    10161016
     
    11061106IntSize RenderView::viewportSize() const
    11071107{
    1108     return frameView().visibleContentRect(ScrollableArea::IncludeScrollbars).size();
     1108    return frameView().visibleContentRectIncludingScrollbars(ScrollableArea::LegacyIOSDocumentVisibleRect).size();
    11091109}
    11101110
  • trunk/Source/WebKit/ChangeLog

    r162621 r162663  
     12014-01-23  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Make visibleContentRect() return actualVisibleContentRect() on iOS most of the time
     4        https://bugs.webkit.org/show_bug.cgi?id=127456
     5       
     6        Reviewed by Antti Koivisto.
     7       
     8        On iOS, visibleContentRect() returns the entire document rect for historical
     9        reasons, and actualVisibleContentRect() returns what visibleContentRect()
     10        returns on other platforms.
     11       
     12        In addition, actualVisibleContentRect() was returning an empty rect in WK2.
     13       
     14        Reduce the confusion of #ifdefs by making visibleContentRect() behave like
     15        actualVisibleContentRect() by default on iOS. Where it needs the old behavior,
     16        an optional parameter, LegacyIOSDocumentVisibleRect, provides this.
     17       
     18        Achieve this by having the virtual ScrollableArea::visibleContentRectInternal(),
     19        which is called by non-virtual visibleContentRect() and visibleContentRectIncludingScrollbars().
     20       
     21        Similarly clean up visibleHeight/visibleWidth functions by having visibleSize() be virtual,
     22        with non-virtual visibleHeight() and visibleWidth().
     23       
     24        ScrollableArea subclasses override visibleContentRectInternal() and visibleSize() where necessary.
     25       
     26        Mechanically change all the call sites of actualVisibleContentRect() to
     27        use visibleContentRect(), and the call sites of visibleContentRect()
     28        to visibleContentRect(..., LegacyIOSDocumentVisibleRect), adding comments
     29        where this may not be appropriate.
     30       
     31        Change callers of visibleContentRect(IncludeScrollbars...) to visibleContentRectIncludingScrollbars().
     32       
     33        Also add actualScrollPosition(), and clean up some actualScroll* call sites.
     34       
     35        No behavior change.
     36
     37        * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
     38
    1392014-01-22  Brent Fulgham  <bfulgham@apple.com>
    240
  • trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in

    r162479 r162663  
    469469        symbolWithPointer(?completeURL@Document@WebCore@@UBE?AVURL@2@ABVString@WTF@@@Z, ?completeURL@Document@WebCore@@UEBA?AVURL@2@AEBVString@WTF@@@Z)
    470470        symbolWithPointer(??1DOMWindow@WebCore@@UAE@XZ, ??1DOMWindow@WebCore@@UEAA@XZ)
    471         symbolWithPointer(?visibleContentRect@ScrollView@WebCore@@UBE?AVIntRect@2@W4VisibleContentRectIncludesScrollbars@ScrollableArea@2@@Z, ?visibleContentRect@ScrollView@WebCore@@UEBA?AVIntRect@2@W4VisibleContentRectIncludesScrollbars@ScrollableArea@2@@Z)
  • trunk/Source/WebKit2/ChangeLog

    r162662 r162663  
     12014-01-23  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Make visibleContentRect() return actualVisibleContentRect() on iOS most of the time
     4        https://bugs.webkit.org/show_bug.cgi?id=127456
     5       
     6        Reviewed by Antti Koivisto.
     7       
     8        On iOS, visibleContentRect() returns the entire document rect for historical
     9        reasons, and actualVisibleContentRect() returns what visibleContentRect()
     10        returns on other platforms.
     11       
     12        In addition, actualVisibleContentRect() was returning an empty rect in WK2.
     13       
     14        Reduce the confusion of #ifdefs by making visibleContentRect() behave like
     15        actualVisibleContentRect() by default on iOS. Where it needs the old behavior,
     16        an optional parameter, LegacyIOSDocumentVisibleRect, provides this.
     17       
     18        Achieve this by having the virtual ScrollableArea::visibleContentRectInternal(),
     19        which is called by non-virtual visibleContentRect() and visibleContentRectIncludingScrollbars().
     20       
     21        Similarly clean up visibleHeight/visibleWidth functions by having visibleSize() be virtual,
     22        with non-virtual visibleHeight() and visibleWidth().
     23       
     24        ScrollableArea subclasses override visibleContentRectInternal() and visibleSize() where necessary.
     25       
     26        Mechanically change all the call sites of actualVisibleContentRect() to
     27        use visibleContentRect(), and the call sites of visibleContentRect()
     28        to visibleContentRect(..., LegacyIOSDocumentVisibleRect), adding comments
     29        where this may not be appropriate.
     30       
     31        Change callers of visibleContentRect(IncludeScrollbars...) to visibleContentRectIncludingScrollbars().
     32       
     33        Also add actualScrollPosition(), and clean up some actualScroll* call sites.
     34       
     35        No behavior change.
     36
     37        * WebProcess/Plugins/PDF/PDFPlugin.h:
     38        * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
     39        (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
     40        (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
     41        * WebProcess/WebPage/WebFrame.cpp:
     42        (WebKit::WebFrame::visibleContentBounds):
     43        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
     44        (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
     45        (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
     46
    1472014-01-23  Tim Horton  <timothy_horton@apple.com>
    248
  • trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h

    r162629 r162663  
    192192    virtual WebCore::IntPoint minimumScrollPosition() const override;
    193193    virtual WebCore::IntPoint maximumScrollPosition() const override;
    194     virtual int visibleHeight() const override { return m_size.height(); }
    195     virtual int visibleWidth() const override { return m_size.width(); }
     194    virtual WebCore::IntSize visibleSize() const override { return m_size; }
    196195    virtual WebCore::IntSize contentsSize() const override { return m_pdfDocumentSize; }
    197196    virtual WebCore::Scrollbar* horizontalScrollbar() const override { return m_horizontalScrollbar.get(); }
  • trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp

    r161571 r162663  
    5454void ViewGestureGeometryCollector::collectGeometryForMagnificationGesture()
    5555{
    56     FloatRect visibleContentRect = m_webPage.mainFrameView()->visibleContentRect(ScrollableArea::IncludeScrollbars);
     56    FloatRect visibleContentRect = m_webPage.mainFrameView()->visibleContentRectIncludingScrollbars();
    5757    bool frameHandlesMagnificationGesture = m_webPage.mainWebFrame()->handlesPageScaleGesture();
    5858    m_webPage.send(Messages::ViewGestureController::DidCollectGeometryForMagnificationGesture(visibleContentRect, frameHandlesMagnificationGesture));
     
    6161void ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture(FloatPoint origin)
    6262{
    63     FloatRect visibleContentRect = m_webPage.mainFrameView()->visibleContentRect(ScrollableArea::IncludeScrollbars);
     63    FloatRect visibleContentRect = m_webPage.mainFrameView()->visibleContentRectIncludingScrollbars();
    6464    bool frameHandlesMagnificationGesture = m_webPage.mainWebFrame()->handlesPageScaleGesture();
    6565
  • trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp

    r162568 r162663  
    500500        return IntRect();
    501501   
    502     IntRect contentRect = view->visibleContentRect(ScrollableArea::IncludeScrollbars);
     502    IntRect contentRect = view->visibleContentRectIncludingScrollbars();
    503503    return IntRect(0, 0, contentRect.width(), contentRect.height());
    504504}
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

    r162662 r162663  
    733733    PlatformCALayer* renderViewLayer = static_cast<GraphicsLayerCA*>(renderView->layer()->backing()->graphicsLayer())->platformCALayer();
    734734
    735     FloatRect visibleContentRect = frameView->visibleContentRect(ScrollableArea::IncludeScrollbars);
     735    FloatRect visibleContentRect = frameView->visibleContentRectIncludingScrollbars();
    736736
    737737    FloatPoint constrainedOrigin = visibleContentRect.location();
     
    808808
    809809    FloatPoint unscrolledOrigin(origin);
    810     FloatRect visibleContentRect = m_webPage->mainFrameView()->visibleContentRect(ScrollableArea::IncludeScrollbars);
     810    FloatRect visibleContentRect = m_webPage->mainFrameView()->visibleContentRectIncludingScrollbars();
    811811    unscrolledOrigin.moveBy(-visibleContentRect.location());
    812812    m_webPage->scalePage(scale, roundedIntPoint(-unscrolledOrigin));
Note: See TracChangeset for help on using the changeset viewer.