<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[162663] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/162663">162663</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2014-01-23 16:39:46 -0800 (Thu, 23 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>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):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomMouseRelatedEventcpp">trunk/Source/WebCore/dom/MouseRelatedEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingFrameSelectioncpp">trunk/Source/WebCore/editing/FrameSelection.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLBodyElementcpp">trunk/Source/WebCore/html/HTMLBodyElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlImageDocumentcpp">trunk/Source/WebCore/html/ImageDocument.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorOverlaycpp">trunk/Source/WebCore/inspector/InspectorOverlay.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowcpp">trunk/Source/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSpatialNavigationcpp">trunk/Source/WebCore/page/SpatialNavigation.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollViewcpp">trunk/Source/WebCore/platform/ScrollView.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollViewh">trunk/Source/WebCore/platform/ScrollView.h</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollableAreacpp">trunk/Source/WebCore/platform/ScrollableArea.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollableAreah">trunk/Source/WebCore/platform/ScrollableArea.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsIntSizeh">trunk/Source/WebCore/platform/graphics/IntSize.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgtkScrollViewGtkcpp">trunk/Source/WebCore/platform/gtk/ScrollViewGtk.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerh">trunk/Source/WebCore/rendering/RenderLayer.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerBackingcpp">trunk/Source/WebCore/rendering/RenderLayerBacking.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderListBoxcpp">trunk/Source/WebCore/rendering/RenderListBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderListBoxh">trunk/Source/WebCore/rendering/RenderListBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebKitvcxprojWebKitExportGeneratorWebKitExportsdefin">trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPDFPDFPluginh">trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageViewGestureGeometryCollectorcpp">trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebFramecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/ChangeLog        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -1,3 +1,116 @@
</span><ins>+2014-01-23  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        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.
+
+        * 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):
+
</ins><span class="cx"> 2014-01-20  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">        Turn text-decoration-skip: ink on for all underlines
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -1423,7 +1423,6 @@
</span><span class="cx"> __ZNK7WebCore10ScrollView16windowToContentsERKNS_8IntPointE
</span><span class="cx"> __ZNK7WebCore10ScrollView18contentsToRootViewERKNS_7IntRectE
</span><span class="cx"> __ZNK7WebCore10ScrollView18contentsToRootViewERKNS_8IntPointE
</span><del>-__ZNK7WebCore10ScrollView18visibleContentRectENS_14ScrollableArea36VisibleContentRectIncludesScrollbarsE
</del><span class="cx"> __ZNK7WebCore10ScrollView23rootViewToTotalContentsERKNS_8IntPointE
</span><span class="cx"> __ZNK7WebCore10ScrollView30scrollOffsetRelativeToDocumentEv
</span><span class="cx"> __ZNK7WebCore10StorageMap6lengthEv
</span><span class="lines">@@ -1548,12 +1547,15 @@
</span><span class="cx"> __ZNK7WebCore14ResourceLoader11frameLoaderEv
</span><span class="cx"> __ZNK7WebCore14ScrollableArea14scrollAnimatorEv
</span><span class="cx"> __ZNK7WebCore14ScrollableArea17totalContentsSizeEv
</span><ins>+__ZNK7WebCore14ScrollableArea18visibleContentRectENS0_26VisibleContentRectBehaviorE
</ins><span class="cx"> __ZNK7WebCore14ScrollableArea20contentAreaWillPaintEv
</span><span class="cx"> __ZNK7WebCore14ScrollableArea21mouseEnteredScrollbarEPNS_9ScrollbarE
</span><span class="cx"> __ZNK7WebCore14ScrollableArea21scrollbarsCanBeActiveEv
</span><span class="cx"> __ZNK7WebCore14ScrollableArea22mouseExitedContentAreaEv
</span><span class="cx"> __ZNK7WebCore14ScrollableArea23mouseEnteredContentAreaEv
</span><span class="cx"> __ZNK7WebCore14ScrollableArea23mouseMovedInContentAreaEv
</span><ins>+__ZNK7WebCore14ScrollableArea26visibleContentRectInternalENS0_36VisibleContentRectIncludesScrollbarsENS0_26VisibleContentRectBehaviorE
+__ZNK7WebCore14ScrollableArea37visibleContentRectIncludingScrollbarsENS0_26VisibleContentRectBehaviorE
</ins><span class="cx"> __ZNK7WebCore14SecurityOrigin10canDisplayERKNS_3URLE
</span><span class="cx"> __ZNK7WebCore14SecurityOrigin11toRawStringEv
</span><span class="cx"> __ZNK7WebCore14SecurityOrigin12isolatedCopyEv
</span><span class="lines">@@ -2119,7 +2121,6 @@
</span><span class="cx"> __ZN7WebCore8IntPointC1ERK8_NSPoint
</span><span class="cx"> __ZN7WebCore9FloatRectC1ERK7_NSRect
</span><span class="cx"> __ZNK7WebCore10FloatPointcv8_NSPointEv
</span><del>-__ZNK7WebCore14ScrollableArea18visibleContentRectENS0_36VisibleContentRectIncludesScrollbarsE
</del><span class="cx"> __ZNK7WebCore6Cursor14platformCursorEv
</span><span class="cx"> __ZNK7WebCore7IntRectcv7_NSRectEv
</span><span class="cx"> __ZNK7WebCore7IntSizecv6CGSizeEv
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -1883,7 +1883,8 @@
</span><span class="cx">     for (size_t i = levels; i &gt;= 1; i--) {
</span><span class="cx">         const AccessibilityObject* outer = objects[i];
</span><span class="cx">         const AccessibilityObject* inner = objects[i - 1];
</span><del>-        const IntRect outerRect = i &lt; levels ? pixelSnappedIntRect(outer-&gt;boundingBoxRect()) : outer-&gt;getScrollableAreaIfScrollable()-&gt;visibleContentRect();
</del><ins>+        // FIXME: unclear if we need LegacyIOSDocumentVisibleRect.
+        const IntRect outerRect = i &lt; levels ? pixelSnappedIntRect(outer-&gt;boundingBoxRect()) : outer-&gt;getScrollableAreaIfScrollable()-&gt;visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
</ins><span class="cx">         const IntRect innerRect = pixelSnappedIntRect(inner-&gt;isAccessibilityScrollView() ? inner-&gt;parentObject()-&gt;boundingBoxRect() : inner-&gt;boundingBoxRect());
</span><span class="cx">         
</span><span class="cx">         if (!outerRect.intersects(innerRect)) {
</span><span class="lines">@@ -1915,7 +1916,8 @@
</span><span class="cx"> 
</span><span class="cx">     LayoutRect objectRect = boundingBoxRect();
</span><span class="cx">     IntPoint scrollPosition = scrollableArea-&gt;scrollPosition();
</span><del>-    IntRect scrollVisibleRect = scrollableArea-&gt;visibleContentRect();
</del><ins>+    // FIXME: unclear if we need LegacyIOSDocumentVisibleRect.
+    IntRect scrollVisibleRect = scrollableArea-&gt;visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
</ins><span class="cx"> 
</span><span class="cx">     int desiredX = computeBestScrollOffset(
</span><span class="cx">         scrollPosition.x(),
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -550,7 +550,8 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_renderer);
</span><span class="cx">     IntRect contentRect = pixelSnappedIntRect(m_renderer-&gt;absoluteClippedOverflowRect());
</span><del>-    IntRect viewRect = m_renderer-&gt;view().frameView().visibleContentRect();
</del><ins>+    // FIXME: unclear if we need LegacyIOSDocumentVisibleRect.
+    IntRect viewRect = m_renderer-&gt;view().frameView().visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
</ins><span class="cx">     viewRect.intersect(contentRect);
</span><span class="cx">     return viewRect.isEmpty();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/dom/Document.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -5807,11 +5807,7 @@
</span><span class="cx">     if (frame())
</span><span class="cx">         inverseFrameScale = 1 / frame()-&gt;frameScaleFactor();
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-    LayoutRect visibleContentRect = view()-&gt;actualVisibleContentRect();
-#else
</del><span class="cx">     LayoutRect visibleContentRect = view()-&gt;visibleContentRect();
</span><del>-#endif
</del><span class="cx">     for (size_t i = 0; i &lt; quads.size(); ++i) {
</span><span class="cx">         quads[i].move(-visibleContentRect.x(), -visibleContentRect.y());
</span><span class="cx">         if (zoom != 1)
</span><span class="lines">@@ -5831,11 +5827,7 @@
</span><span class="cx">     if (frame())
</span><span class="cx">         inverseFrameScale = 1 / frame()-&gt;frameScaleFactor();
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-    LayoutRect visibleContentRect = view()-&gt;actualVisibleContentRect();
-#else
</del><span class="cx">     LayoutRect visibleContentRect = view()-&gt;visibleContentRect();
</span><del>-#endif
</del><span class="cx">     rect.move(-visibleContentRect.x(), -visibleContentRect.y());
</span><span class="cx">     if (zoom != 1)
</span><span class="cx">         rect.scale(1 / zoom);
</span></span></pre></div>
<a id="trunkSourceWebCoredomMouseRelatedEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/MouseRelatedEvent.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/MouseRelatedEvent.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/dom/MouseRelatedEvent.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx">             scrollPosition = frameView-&gt;scrollPosition();
</span><span class="cx"> #else
</span><del>-            scrollPosition = frameView-&gt;actualVisibleContentRect().location();
</del><ins>+            scrollPosition = frameView-&gt;actualScrollPosition();
</ins><span class="cx"> #endif
</span><span class="cx">             adjustedPageLocation = frameView-&gt;windowToContents(windowLocation);
</span><span class="cx">             float scaleFactor = 1 / (frame-&gt;pageZoomFactor() * frame-&gt;frameScaleFactor());
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/editing/Editor.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -3267,7 +3267,9 @@
</span><span class="cx">         // Do a &quot;fake&quot; paint in order to execute the code that computes the rendered rect for each text match.
</span><span class="cx">         if (m_frame.view() &amp;&amp; m_frame.contentRenderer()) {
</span><span class="cx">             document().updateLayout(); // Ensure layout is up to date.
</span><del>-            LayoutRect visibleRect = m_frame.view()-&gt;visibleContentRect();
</del><ins>+            // FIXME: unclear if we need LegacyIOSDocumentVisibleRect.
+            // FIXME: this should probably look at paintsEntireContents()
+            LayoutRect visibleRect = m_frame.view()-&gt;visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
</ins><span class="cx">             if (!visibleRect.isEmpty()) {
</span><span class="cx">                 GraphicsContext context((PlatformGraphicsContext*)0);
</span><span class="cx">                 context.setPaintingDisabled(true);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingFrameSelectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/FrameSelection.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -2008,7 +2008,7 @@
</span><span class="cx">         return LayoutRect();
</span><span class="cx"> 
</span><span class="cx">     LayoutRect selectionRect = root-&gt;selectionBounds(clipToVisibleContent);
</span><del>-    return clipToVisibleContent ? intersection(selectionRect, view-&gt;visibleContentRect()) : selectionRect;
</del><ins>+    return clipToVisibleContent ? intersection(selectionRect, view-&gt;visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect)) : selectionRect;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void FrameSelection::getClippedVisibleTextRectangles(Vector&lt;FloatRect&gt;&amp; rectangles) const
</span><span class="lines">@@ -2017,7 +2017,7 @@
</span><span class="cx">     if (!root)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    FloatRect visibleContentRect = m_frame-&gt;view()-&gt;visibleContentRect();
</del><ins>+    FloatRect visibleContentRect = m_frame-&gt;view()-&gt;visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
</ins><span class="cx"> 
</span><span class="cx">     Vector&lt;FloatQuad&gt; quads;
</span><span class="cx">     toNormalizedRange()-&gt;textQuads(quads, true);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLBodyElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLBodyElement.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLBodyElement.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/html/HTMLBodyElement.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -209,7 +209,7 @@
</span><span class="cx">     if (!view)
</span><span class="cx">         return 0;
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-    return adjustForZoom(view-&gt;actualVisibleContentRect().x(), *frame);
</del><ins>+    return adjustForZoom(view-&gt;actualScrollX(), *frame);
</ins><span class="cx"> #else
</span><span class="cx">     return adjustForZoom(view-&gt;scrollX(), *frame);
</span><span class="cx"> #endif
</span><span class="lines">@@ -237,7 +237,7 @@
</span><span class="cx">     if (!view)
</span><span class="cx">         return 0;
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-    return adjustForZoom(view-&gt;actualVisibleContentRect().y(), *frame);
</del><ins>+    return adjustForZoom(view-&gt;actualScrollY(), *frame);
</ins><span class="cx"> #else
</span><span class="cx">     return adjustForZoom(view-&gt;scrollY(), *frame);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlImageDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/ImageDocument.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/ImageDocument.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/html/ImageDocument.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -344,7 +344,7 @@
</span><span class="cx"> 
</span><span class="cx">     LayoutSize imageSize = m_imageElement-&gt;cachedImage()-&gt;imageSizeForRenderer(m_imageElement-&gt;renderer(), pageZoomFactor(this));
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-    LayoutSize windowSize = view-&gt;contentsToScreen(view-&gt;actualVisibleContentRect()).size();
</del><ins>+    LayoutSize windowSize = view-&gt;contentsToScreen(view-&gt;visibleContentRect()).size();
</ins><span class="cx"> #else
</span><span class="cx">     LayoutSize windowSize = LayoutSize(view-&gt;width(), view-&gt;height());
</span><span class="cx"> #endif
</span><span class="lines">@@ -363,7 +363,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     LayoutSize imageSize = m_imageElement-&gt;cachedImage()-&gt;imageSizeForRenderer(m_imageElement-&gt;renderer(), pageZoomFactor(this));
</span><del>-    LayoutRect visibleScreenSize = frame()-&gt;view()-&gt;contentsToScreen(frame()-&gt;view()-&gt;actualVisibleContentRect());
</del><ins>+    LayoutRect visibleScreenSize = frame()-&gt;view()-&gt;contentsToScreen(frame()-&gt;view()-&gt;visibleContentRect());
</ins><span class="cx"> 
</span><span class="cx">     float widthScale = static_cast&lt;float&gt;(visibleScreenSize.width()) / imageSize.width();
</span><span class="cx">     float heightScale = static_cast&lt;float&gt;(visibleScreenSize.height()) / imageSize.height();
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorOverlaycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx"> 
</span><span class="cx">     FrameView* overlayView = overlayPage()-&gt;mainFrame().view();
</span><span class="cx">     IntSize viewportSize = view-&gt;visibleContentRect().size();
</span><del>-    IntSize frameViewFullSize = view-&gt;visibleContentRect(ScrollableArea::IncludeScrollbars).size();
</del><ins>+    IntSize frameViewFullSize = view-&gt;visibleContentRectIncludingScrollbars().size();
</ins><span class="cx">     IntSize size = m_size.isEmpty() ? frameViewFullSize : m_size;
</span><span class="cx">     overlayPage()-&gt;setPageScaleFactor(m_page.pageScaleFactor(), IntPoint());
</span><span class="cx">     size.scale(m_page.pageScaleFactor());
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/page/DOMWindow.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -1153,11 +1153,7 @@
</span><span class="cx">     if (!view)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-    return view-&gt;mapFromLayoutToCSSUnits(static_cast&lt;int&gt;(view-&gt;actualVisibleContentRect().height()));
-#else
-    return view-&gt;mapFromLayoutToCSSUnits(static_cast&lt;int&gt;(view-&gt;visibleContentRect(ScrollableArea::IncludeScrollbars).height()));
-#endif
</del><ins>+    return view-&gt;mapFromLayoutToCSSUnits(static_cast&lt;int&gt;(view-&gt;visibleContentRectIncludingScrollbars().height()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int DOMWindow::innerWidth() const
</span><span class="lines">@@ -1169,11 +1165,7 @@
</span><span class="cx">     if (!view)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-    return view-&gt;mapFromLayoutToCSSUnits(static_cast&lt;int&gt;(view-&gt;actualVisibleContentRect().width()));
-#else
-    return view-&gt;mapFromLayoutToCSSUnits(static_cast&lt;int&gt;(view-&gt;visibleContentRect(ScrollableArea::IncludeScrollbars).width()));
-#endif
</del><ins>+    return view-&gt;mapFromLayoutToCSSUnits(static_cast&lt;int&gt;(view-&gt;visibleContentRectIncludingScrollbars().width()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int DOMWindow::screenX() const
</span><span class="lines">@@ -1215,7 +1207,7 @@
</span><span class="cx">     m_frame-&gt;document()-&gt;updateLayoutIgnorePendingStylesheets();
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-    return static_cast&lt;int&gt;(view-&gt;actualVisibleContentRect().x() / (m_frame-&gt;pageZoomFactor() * m_frame-&gt;frameScaleFactor()));
</del><ins>+    return static_cast&lt;int&gt;(view-&gt;actualScrollX() / (m_frame-&gt;pageZoomFactor() * m_frame-&gt;frameScaleFactor()));
</ins><span class="cx"> #else
</span><span class="cx">     return view-&gt;mapFromLayoutToCSSUnits(view-&gt;scrollX());
</span><span class="cx"> #endif
</span><span class="lines">@@ -1236,7 +1228,7 @@
</span><span class="cx">     m_frame-&gt;document()-&gt;updateLayoutIgnorePendingStylesheets();
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-    return static_cast&lt;int&gt;(view-&gt;actualVisibleContentRect().y() / (m_frame-&gt;pageZoomFactor() * m_frame-&gt;frameScaleFactor()));
</del><ins>+    return static_cast&lt;int&gt;(view-&gt;actualScrollY() / (m_frame-&gt;pageZoomFactor() * m_frame-&gt;frameScaleFactor()));
</ins><span class="cx"> #else
</span><span class="cx">     return view-&gt;mapFromLayoutToCSSUnits(view-&gt;scrollY());
</span><span class="cx"> #endif
</span><span class="lines">@@ -1452,7 +1444,7 @@
</span><span class="cx"> 
</span><span class="cx">     IntSize scaledOffset(view-&gt;mapFromCSSToLayoutUnits(x), view-&gt;mapFromCSSToLayoutUnits(y));
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-    view-&gt;setActualScrollPosition(view-&gt;actualVisibleContentRect().location() + scaledOffset);
</del><ins>+    view-&gt;setActualScrollPosition(view-&gt;actualScrollPosition() + scaledOffset);
</ins><span class="cx"> #else
</span><span class="cx">     view-&gt;scrollBy(scaledOffset);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -713,7 +713,7 @@
</span><span class="cx">         hMode = ScrollbarAuto;
</span><span class="cx">         // Seamless documents begin with heights of 0; we special case that here
</span><span class="cx">         // to correctly render documents that don't need scrollbars.
</span><del>-        IntSize fullVisibleSize = visibleContentRect(IncludeScrollbars).size();
</del><ins>+        IntSize fullVisibleSize = visibleContentRectIncludingScrollbars(LegacyIOSDocumentVisibleRect).size();
</ins><span class="cx">         bool isSeamlessDocument = frame().document() &amp;&amp; frame().document()-&gt;shouldDisplaySeamlesslyWithParent();
</span><span class="cx">         vMode = (isSeamlessDocument &amp;&amp; !fullVisibleSize.height()) ? ScrollbarAlwaysOff : ScrollbarAuto;
</span><span class="cx">     } else {
</span><span class="lines">@@ -1264,11 +1264,7 @@
</span><span class="cx">                     if (useFixedLayout() &amp;&amp; !fixedLayoutSize().isEmpty() &amp;&amp; delegatesScrolling())
</span><span class="cx">                         m_lastViewportSize = fixedLayoutSize();
</span><span class="cx">                     else
</span><del>-#if PLATFORM(IOS)
-                        m_lastViewportSize = actualVisibleContentRect().size();
-#else
-                        m_lastViewportSize = visibleContentRect(IncludeScrollbars).size();
-#endif
</del><ins>+                        m_lastViewportSize = visibleContentRectIncludingScrollbars().size();
</ins><span class="cx"> 
</span><span class="cx">                     m_lastZoomFactor = root-&gt;style().zoom();
</span><span class="cx"> 
</span><span class="lines">@@ -1778,7 +1774,8 @@
</span><span class="cx"> {
</span><span class="cx"> #if USE(ACCELERATED_COMPOSITING)
</span><span class="cx">     if (contentsInCompositedLayer()) {
</span><del>-        IntRect updateRect = visibleContentRect();
</del><ins>+        // FIXME: respect paintsEntireContents()?
+        IntRect updateRect = visibleContentRect(LegacyIOSDocumentVisibleRect);
</ins><span class="cx"> 
</span><span class="cx">         // Make sure to &quot;apply&quot; the scale factor here since we're converting from frame view
</span><span class="cx">         // coordinates to layer backing coordinates.
</span><span class="lines">@@ -2166,7 +2163,7 @@
</span><span class="cx">     if ((m_deferringRepaints || m_deferredRepaintTimer.isActive() || delay) &amp;&amp; !immediate) {
</span><span class="cx">         IntRect paintRect = r;
</span><span class="cx">         if (clipsRepaints() &amp;&amp; !paintsEntireContents())
</span><del>-            paintRect.intersect(visibleContentRect());
</del><ins>+            paintRect.intersect(visibleContentRect(LegacyIOSDocumentVisibleRect));
</ins><span class="cx">         if (paintRect.isEmpty())
</span><span class="cx">             return;
</span><span class="cx">         if (m_repaintCount == cRepaintRectUnionThreshold) {
</span><span class="lines">@@ -2938,11 +2935,7 @@
</span><span class="cx">     if (useFixedLayout() &amp;&amp; !fixedLayoutSize().isEmpty() &amp;&amp; delegatesScrolling())
</span><span class="cx">         currentSize = fixedLayoutSize();
</span><span class="cx">     else
</span><del>-#if PLATFORM(IOS)
-        currentSize = actualVisibleContentRect().size();
-#else
-        currentSize = visibleContentRect(IncludeScrollbars).size();
-#endif
</del><ins>+        currentSize = visibleContentRectIncludingScrollbars().size();
</ins><span class="cx"> 
</span><span class="cx">     float currentZoomFactor = renderView-&gt;style().zoom();
</span><span class="cx">     bool shouldSendResizeEvent = !m_firstLayout &amp;&amp; (currentSize != m_lastViewportSize || currentZoomFactor != m_lastZoomFactor);
</span><span class="lines">@@ -3165,7 +3158,11 @@
</span><span class="cx">         return IntRect(IntPoint(), totalContentsSize());
</span><span class="cx"> 
</span><span class="cx">     // Set our clip rect to be our contents.
</span><del>-    IntRect clipRect = contentsToWindow(visibleContentRect(clipToContents ? ExcludeScrollbars : IncludeScrollbars));
</del><ins>+    IntRect clipRect;
+    if (clipToContents)
+        clipRect = contentsToWindow(visibleContentRect(LegacyIOSDocumentVisibleRect));
+    else
+        clipRect = contentsToWindow(visibleContentRectIncludingScrollbars(LegacyIOSDocumentVisibleRect));
</ins><span class="cx">     if (!frame().ownerElement())
</span><span class="cx">         return clipRect;
</span><span class="cx"> 
</span><span class="lines">@@ -3279,7 +3276,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Covers #1
</span><span class="cx">     IntSize totalContentsSize = this-&gt;totalContentsSize();
</span><del>-    IntSize visibleContentSize = visibleContentRect().size();
</del><ins>+    IntSize visibleContentSize = visibleContentRect(LegacyIOSDocumentVisibleRect).size();
</ins><span class="cx">     if ((totalContentsSize.height() &lt;= visibleContentSize.height() &amp;&amp; totalContentsSize.width() &lt;= visibleContentSize.width()))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -3582,9 +3579,10 @@
</span><span class="cx">     PlatformGraphicsContext* const noContext = 0;
</span><span class="cx">     GraphicsContext context(noContext);
</span><span class="cx">     context.setUpdatingControlTints(true);
</span><del>-    if (platformWidget())
-        paintContents(&amp;context, visibleContentRect());
-    else
</del><ins>+    if (platformWidget()) {
+        // FIXME: consult paintsEntireContents().
+        paintContents(&amp;context, visibleContentRect(LegacyIOSDocumentVisibleRect));
+    } else
</ins><span class="cx">         paint(&amp;context, frameRect());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageSpatialNavigationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/SpatialNavigation.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/SpatialNavigation.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/page/SpatialNavigation.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -485,7 +485,7 @@
</span><span class="cx">         return false;
</span><span class="cx">     LayoutSize size = frame-&gt;view()-&gt;totalContentsSize();
</span><span class="cx">     LayoutSize offset = frame-&gt;view()-&gt;scrollOffset();
</span><del>-    LayoutRect rect = frame-&gt;view()-&gt;visibleContentRect(ScrollableArea::IncludeScrollbars);
</del><ins>+    LayoutRect rect = frame-&gt;view()-&gt;visibleContentRectIncludingScrollbars();
</ins><span class="cx"> 
</span><span class="cx">     switch (direction) {
</span><span class="cx">     case FocusDirectionLeft:
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollView.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollView.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/platform/ScrollView.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -256,14 +256,25 @@
</span><span class="cx">             horizontalScrollbarHeight = !horizontalBar-&gt;isOverlayScrollbar() ? horizontalBar-&gt;height() : 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return IntSize(std::max(0, width() - verticalScrollbarWidth),
-                   std::max(0, height() - horizontalScrollbarHeight));
</del><ins>+    return IntSize(width() - verticalScrollbarWidth, height() - horizontalScrollbarHeight).expandedTo(IntSize());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(GTK)
</span><del>-IntRect ScrollView::visibleContentRect(VisibleContentRectIncludesScrollbars scollbarInclusion) const
</del><ins>+IntRect ScrollView::visibleContentRectInternal(VisibleContentRectIncludesScrollbars scollbarInclusion, VisibleContentRectBehavior visibleContentRectBehavior) const
</ins><span class="cx"> {
</span><ins>+#if PLATFORM(IOS)
+    if (visibleContentRectBehavior == LegacyIOSDocumentViewRect) {
+        if (platformWidget())
+            return platformVisibleContentRect(true /* include scrollbars */);
+    }
+    
</ins><span class="cx">     if (platformWidget())
</span><ins>+        return actualVisibleContentRect();
+#else
+    UNUSED_PARAM(visibleContentRectBehavior);
+#endif
+
+    if (platformWidget())
</ins><span class="cx">         return platformVisibleContentRect(scollbarInclusion == IncludeScrollbars);
</span><span class="cx"> 
</span><span class="cx"> #if USE(TILED_BACKING_STORE)
</span><span class="lines">@@ -548,7 +559,7 @@
</span><span class="cx">         bool sendContentResizedNotification = false;
</span><span class="cx">         
</span><span class="cx">         IntSize docSize = totalContentsSize();
</span><del>-        IntSize fullVisibleSize = visibleContentRect(IncludeScrollbars).size();
</del><ins>+        IntSize fullVisibleSize = visibleContentRectIncludingScrollbars().size();
</ins><span class="cx"> 
</span><span class="cx">         if (hScroll == ScrollbarAuto)
</span><span class="cx">             newHasHorizontalScrollbar = docSize.width() &gt; visibleWidth();
</span><span class="lines">@@ -1162,7 +1173,7 @@
</span><span class="cx">     if (!m_scrollbarsSuppressed &amp;&amp; (m_horizontalScrollbar || m_verticalScrollbar)) {
</span><span class="cx">         GraphicsContextStateSaver stateSaver(*context);
</span><span class="cx">         IntRect scrollViewDirtyRect = rect;
</span><del>-        IntRect visibleAreaWithScrollbars(location(), visibleContentRect(IncludeScrollbars).size());
</del><ins>+        IntRect visibleAreaWithScrollbars(location(), visibleContentRectIncludingScrollbars().size());
</ins><span class="cx">         scrollViewDirtyRect.intersect(visibleAreaWithScrollbars);
</span><span class="cx">         context-&gt;translate(x(), y());
</span><span class="cx">         scrollViewDirtyRect.moveBy(-location());
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollView.h (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollView.h        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/platform/ScrollView.h        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -159,8 +159,7 @@
</span><span class="cx">     // In the situation the client is responsible for the scrolling (ie. with a tiled backing store) it is possible to use
</span><span class="cx">     // the setFixedVisibleContentRect instead for the mainframe, though this must be updated manually, e.g just before resuming the page
</span><span class="cx">     // which usually will happen when panning, pinching and rotation ends, or when scale or position are changed manually.
</span><del>-    virtual IntRect visibleContentRect(VisibleContentRectIncludesScrollbars = ExcludeScrollbars) const override;
-    IntSize visibleSize() const { return visibleContentRect().size(); }
</del><ins>+    virtual IntSize visibleSize() const override { return visibleContentRect(LegacyIOSDocumentVisibleRect).size(); }
</ins><span class="cx"> 
</span><span class="cx"> #if USE(TILED_BACKING_STORE)
</span><span class="cx">     virtual void setFixedVisibleContentRect(const IntRect&amp; visibleContentRect) { m_fixedVisibleContentRect = visibleContentRect; }
</span><span class="lines">@@ -176,8 +175,6 @@
</span><span class="cx">     void setActualScrollPosition(const IntPoint&amp;);
</span><span class="cx">     TileCache* tileCache();
</span><span class="cx"> #endif
</span><del>-    virtual int visibleWidth() const override { return visibleContentRect().width(); }
-    virtual int visibleHeight() const override { return visibleContentRect().height(); }
</del><span class="cx"> 
</span><span class="cx">     // visibleContentRect().size() is computed from unscaledVisibleContentSize() divided by the value of visibleContentScaleFactor.
</span><span class="cx">     // visibleContentScaleFactor is usually 1, except when the setting delegatesPageScaling is true and the
</span><span class="lines">@@ -204,8 +201,8 @@
</span><span class="cx">     virtual void setContentsSize(const IntSize&amp;);
</span><span class="cx"> 
</span><span class="cx">     // Functions for querying the current scrolled position (both as a point, a size, or as individual X and Y values).
</span><del>-    virtual IntPoint scrollPosition() const override { return visibleContentRect().location(); }
-    IntSize scrollOffset() const { return toIntSize(visibleContentRect().location()); } // Gets the scrolled position as an IntSize. Convenient for adding to other sizes.
</del><ins>+    virtual IntPoint scrollPosition() const override { return visibleContentRect(LegacyIOSDocumentVisibleRect).location(); }
+    IntSize scrollOffset() const { return toIntSize(visibleContentRect(LegacyIOSDocumentVisibleRect).location()); } // Gets the scrolled position as an IntSize. Convenient for adding to other sizes.
</ins><span class="cx">     virtual IntPoint maximumScrollPosition() const override; // The maximum position we can be scrolled to.
</span><span class="cx">     virtual IntPoint minimumScrollPosition() const override; // The minimum position we can be scrolled to.
</span><span class="cx">     // Adjust the passed in scroll position to keep it between the minimum and maximum positions.
</span><span class="lines">@@ -214,8 +211,10 @@
</span><span class="cx">     int scrollY() const { return scrollPosition().y(); }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-    int actualScrollX() const { return actualVisibleContentRect().x(); }
-    int actualScrollY() const { return actualVisibleContentRect().y(); }
</del><ins>+    int actualScrollX() const { return visibleContentRect().x(); }
+    int actualScrollY() const { return visibleContentRect().y(); }
+    // FIXME: maybe fix scrollPosition() on iOS to return the actual scroll position.
+    IntPoint actualScrollPosition() const { return visibleContentRect().location(); }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // scrollOffset() anchors its (0,0) point at the top end of the header if this ScrollableArea
</span><span class="lines">@@ -375,6 +374,8 @@
</span><span class="cx">     void updateScrollbars(const IntSize&amp; desiredOffset);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+    virtual IntRect visibleContentRectInternal(VisibleContentRectIncludesScrollbars, VisibleContentRectBehavior) const override;
+
</ins><span class="cx">     RefPtr&lt;Scrollbar&gt; m_horizontalScrollbar;
</span><span class="cx">     RefPtr&lt;Scrollbar&gt; m_verticalScrollbar;
</span><span class="cx">     ScrollbarMode m_horizontalScrollbarMode;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollableAreacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollableArea.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollableArea.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/platform/ScrollableArea.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -445,8 +445,18 @@
</span><span class="cx">     return totalContentsSize;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IntRect ScrollableArea::visibleContentRect(VisibleContentRectIncludesScrollbars scrollbarInclusion) const
</del><ins>+IntRect ScrollableArea::visibleContentRect(VisibleContentRectBehavior visibleContentRectBehavior) const
</ins><span class="cx"> {
</span><ins>+    return visibleContentRectInternal(ExcludeScrollbars, visibleContentRectBehavior);
+}
+
+IntRect ScrollableArea::visibleContentRectIncludingScrollbars(VisibleContentRectBehavior visibleContentRectBehavior) const
+{
+    return visibleContentRectInternal(IncludeScrollbars, visibleContentRectBehavior);
+}
+
+IntRect ScrollableArea::visibleContentRectInternal(VisibleContentRectIncludesScrollbars scrollbarInclusion, VisibleContentRectBehavior) const
+{
</ins><span class="cx">     int verticalScrollbarWidth = 0;
</span><span class="cx">     int horizontalScrollbarHeight = 0;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollableAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollableArea.h (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollableArea.h        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/platform/ScrollableArea.h        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -153,9 +153,23 @@
</span><span class="cx">     virtual IntPoint maximumScrollPosition() const;
</span><span class="cx"> 
</span><span class="cx">     enum VisibleContentRectIncludesScrollbars { ExcludeScrollbars, IncludeScrollbars };
</span><del>-    virtual IntRect visibleContentRect(VisibleContentRectIncludesScrollbars = ExcludeScrollbars) const;
-    virtual int visibleHeight() const = 0;
-    virtual int visibleWidth() const = 0;
</del><ins>+    enum VisibleContentRectBehavior {
+        ContentsVisibleRect,
+#if PLATFORM(IOS)
+        LegacyIOSDocumentViewRect,
+        LegacyIOSDocumentVisibleRect = LegacyIOSDocumentViewRect
+#else
+        LegacyIOSDocumentVisibleRect = ContentsVisibleRect
+#endif
+    };
+
+    IntRect visibleContentRect(VisibleContentRectBehavior = ContentsVisibleRect) const;
+    IntRect visibleContentRectIncludingScrollbars(VisibleContentRectBehavior = ContentsVisibleRect) const;
+
+    int visibleWidth() const { return visibleSize().width(); }
+    int visibleHeight() const { return visibleSize().height(); }
+    virtual IntSize visibleSize() const = 0;
+
</ins><span class="cx">     virtual IntSize contentsSize() const = 0;
</span><span class="cx">     virtual IntSize overhangAmount() const { return IntSize(); }
</span><span class="cx">     virtual IntPoint lastKnownMousePosition() const { return IntPoint(); }
</span><span class="lines">@@ -241,6 +255,7 @@
</span><span class="cx">     bool hasLayerForScrollCorner() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+    virtual IntRect visibleContentRectInternal(VisibleContentRectIncludesScrollbars, VisibleContentRectBehavior) const;
</ins><span class="cx">     void scrollPositionChanged(const IntPoint&amp;);
</span><span class="cx">     
</span><span class="cx">     // NOTE: Only called from the ScrollAnimator.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsIntSizeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/IntSize.h (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/IntSize.h        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/platform/graphics/IntSize.h        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -87,14 +87,12 @@
</span><span class="cx"> 
</span><span class="cx">     IntSize expandedTo(const IntSize&amp; other) const
</span><span class="cx">     {
</span><del>-        return IntSize(m_width &gt; other.m_width ? m_width : other.m_width,
-            m_height &gt; other.m_height ? m_height : other.m_height);
</del><ins>+        return IntSize(std::max(m_width, other.m_width), std::max(m_height, other.m_height));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     IntSize shrunkTo(const IntSize&amp; other) const
</span><span class="cx">     {
</span><del>-        return IntSize(m_width &lt; other.m_width ? m_width : other.m_width,
-            m_height &lt; other.m_height ? m_height : other.m_height);
</del><ins>+        return IntSize(std::min(m_width, other.m_width), std::min(m_height, other.m_height));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     void clampNegativeToZero()
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgtkScrollViewGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/gtk/ScrollViewGtk.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/gtk/ScrollViewGtk.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/platform/gtk/ScrollViewGtk.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">     return Scrollbar::createNativeScrollbar(this, orientation, RegularScrollbar);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IntRect ScrollView::visibleContentRect(VisibleContentRectIncludesScrollbars scrollbarInclusion) const
</del><ins>+IntRect ScrollView::visibleContentRect(VisibleContentRectIncludesScrollbars scrollbarInclusion, VisibleContentRectBehavior) const
</ins><span class="cx"> {
</span><span class="cx">     bool includeScrollbars = scrollbarInclusion == IncludeScrollbars;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -2432,7 +2432,7 @@
</span><span class="cx">                 frameElementBase = toHTMLFrameElementBase(ownerElement);
</span><span class="cx"> 
</span><span class="cx">             if (frameElementAndViewPermitScroll(frameElementBase, &amp;frameView)) {
</span><del>-                LayoutRect viewRect = frameView.visibleContentRect();
</del><ins>+                LayoutRect viewRect = frameView.visibleContentRect(LegacyIOSDocumentVisibleRect);
</ins><span class="cx">                 LayoutRect exposeRect = getRectToExpose(viewRect, viewRect, rect, alignX, alignY);
</span><span class="cx"> 
</span><span class="cx">                 int xOffset = roundToInt(exposeRect.x());
</span><span class="lines">@@ -2458,6 +2458,7 @@
</span><span class="cx">             IntSize scrollOffsetRelativeToDocument = frameView.scrollOffsetRelativeToDocument();
</span><span class="cx">             visibleRectRelativeToDocument.setLocation(IntPoint(scrollOffsetRelativeToDocument.width(), scrollOffsetRelativeToDocument.height()));
</span><span class="cx"> #else
</span><ins>+            // FIXME: is this equivalent to the code above?
</ins><span class="cx">             LayoutRect viewRect = frameView.actualVisibleContentRect();
</span><span class="cx">             LayoutRect visibleRectRelativeToDocument = viewRect;
</span><span class="cx"> #endif
</span><span class="lines">@@ -2683,10 +2684,10 @@
</span><span class="cx"> IntPoint RenderLayer::maximumScrollPosition() const
</span><span class="cx"> {
</span><span class="cx">     // FIXME: m_scrollSize may not be up-to-date if m_scrollDimensionsDirty is true.
</span><del>-    return -scrollOrigin() + roundedIntSize(m_scrollSize) - visibleContentRect(IncludeScrollbars).size();
</del><ins>+    return -scrollOrigin() + roundedIntSize(m_scrollSize) - visibleContentRectIncludingScrollbars(ContentsVisibleRect).size();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-IntRect RenderLayer::visibleContentRect(VisibleContentRectIncludesScrollbars scrollbarInclusion) const
</del><ins>+IntRect RenderLayer::visibleContentRectInternal(VisibleContentRectIncludesScrollbars scrollbarInclusion, VisibleContentRectBehavior) const
</ins><span class="cx"> {
</span><span class="cx">     int verticalScrollbarWidth = 0;
</span><span class="cx">     int horizontalScrollbarHeight = 0;
</span><span class="lines">@@ -2822,16 +2823,6 @@
</span><span class="cx">     return IntSize(scrollWidth(), scrollHeight());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int RenderLayer::visibleHeight() const
-{
-    return m_layerSize.height();
-}
-
-int RenderLayer::visibleWidth() const
-{
-    return m_layerSize.width();
-}
-
</del><span class="cx"> bool RenderLayer::shouldSuspendScrollAnimations() const
</span><span class="cx"> {
</span><span class="cx">     return renderer().view().frameView().shouldSuspendScrollAnimations();
</span><span class="lines">@@ -4653,7 +4644,7 @@
</span><span class="cx"> 
</span><span class="cx">     LayoutRect hitTestArea = isOutOfFlowRenderFlowThread() ? toRenderFlowThread(&amp;renderer())-&gt;visualOverflowRect() : renderer().view().documentRect();
</span><span class="cx">     if (!request.ignoreClipping())
</span><del>-        hitTestArea.intersect(renderer().view().frameView().visibleContentRect());
</del><ins>+        hitTestArea.intersect(renderer().view().frameView().visibleContentRect(LegacyIOSDocumentVisibleRect));
</ins><span class="cx"> 
</span><span class="cx">     RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestArea, hitTestLocation, false);
</span><span class="cx">     if (!insideLayer) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.h (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.h        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/rendering/RenderLayer.h        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -1062,9 +1062,8 @@
</span><span class="cx">     virtual IntPoint scrollPosition() const override;
</span><span class="cx">     virtual IntPoint minimumScrollPosition() const override;
</span><span class="cx">     virtual IntPoint maximumScrollPosition() const override;
</span><del>-    virtual IntRect visibleContentRect(VisibleContentRectIncludesScrollbars) const override;
-    virtual int visibleHeight() const override;
-    virtual int visibleWidth() const override;
</del><ins>+    virtual IntRect visibleContentRectInternal(VisibleContentRectIncludesScrollbars, VisibleContentRectBehavior) const override;
+    virtual IntSize visibleSize() const override { return m_layerSize; }
</ins><span class="cx">     virtual IntSize contentsSize() const override;
</span><span class="cx">     virtual IntSize overhangAmount() const override;
</span><span class="cx">     virtual IntPoint lastKnownMousePosition() const override;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -480,7 +480,7 @@
</span><span class="cx">         LayoutRect clippingBounds;
</span><span class="cx">         if (renderer().style().position() == FixedPosition &amp;&amp; renderer().container() == &amp;view) {
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-            clippingBounds = view.frameView().visibleContentRect();
</del><ins>+            clippingBounds = view.frameView().visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
</ins><span class="cx"> #else
</span><span class="cx">             clippingBounds = view.frameView().viewportConstrainedVisibleContentRect();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListBox.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -764,16 +764,6 @@
</span><span class="cx">     return IntSize(scrollWidth(), scrollHeight());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int RenderListBox::visibleHeight() const
-{
-    return height();
-}
-
-int RenderListBox::visibleWidth() const
-{
-    return width();
-}
-
</del><span class="cx"> IntPoint RenderListBox::lastKnownMousePosition() const
</span><span class="cx"> {
</span><span class="cx">     return view().frameView().lastKnownMousePosition();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListBox.h (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListBox.h        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/rendering/RenderListBox.h        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -118,8 +118,7 @@
</span><span class="cx">     virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, const IntPoint&amp;) const override;
</span><span class="cx">     virtual Scrollbar* verticalScrollbar() const override { return m_vBar.get(); }
</span><span class="cx">     virtual IntSize contentsSize() const override;
</span><del>-    virtual int visibleHeight() const override;
-    virtual int visibleWidth() const override;
</del><ins>+    virtual IntSize visibleSize() const override { return IntSize(height(), width()); }
</ins><span class="cx">     virtual IntPoint lastKnownMousePosition() const override;
</span><span class="cx">     virtual bool isHandlingWheelEvent() const override;
</span><span class="cx">     virtual bool shouldSuspendScrollAnimations() const override;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebCore/rendering/RenderView.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -1011,7 +1011,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (shouldUsePrintingLayout())
</span><span class="cx">         return LayoutRect(LayoutPoint(), size());
</span><del>-    return frameView().visibleContentRect();
</del><ins>+    return frameView().visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> IntRect RenderView::unscaledDocumentRect() const
</span><span class="lines">@@ -1105,7 +1105,7 @@
</span><span class="cx"> 
</span><span class="cx"> IntSize RenderView::viewportSize() const
</span><span class="cx"> {
</span><del>-    return frameView().visibleContentRect(ScrollableArea::IncludeScrollbars).size();
</del><ins>+    return frameView().visibleContentRectIncludingScrollbars(ScrollableArea::LegacyIOSDocumentVisibleRect).size();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderView::updateHitTestResult(HitTestResult&amp; result, const LayoutPoint&amp; point)
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebKit/ChangeLog        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2014-01-23  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        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.
+
+        * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
+
</ins><span class="cx"> 2014-01-22  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Update project and solution files for 64-bit builds
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitvcxprojWebKitExportGeneratorWebKitExportsdefin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -468,4 +468,3 @@
</span><span class="cx">         symbolWithPointer(?vm@ScriptExecutionContext@WebCore@@QAEPAVVM@JSC@@XZ, ?vm@ScriptExecutionContext@WebCore@@QEAAPEAVVM@JSC@@XZ)
</span><span class="cx">         symbolWithPointer(?completeURL@Document@WebCore@@UBE?AVURL@2@ABVString@WTF@@@Z, ?completeURL@Document@WebCore@@UEBA?AVURL@2@AEBVString@WTF@@@Z)
</span><span class="cx">         symbolWithPointer(??1DOMWindow@WebCore@@UAE@XZ, ??1DOMWindow@WebCore@@UEAA@XZ)
</span><del>-        symbolWithPointer(?visibleContentRect@ScrollView@WebCore@@UBE?AVIntRect@2@W4VisibleContentRectIncludesScrollbars@ScrollableArea@2@@Z, ?visibleContentRect@ScrollView@WebCore@@UEBA?AVIntRect@2@W4VisibleContentRectIncludesScrollbars@ScrollableArea@2@@Z)
</del></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2014-01-23  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        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.
+
+        * 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):
+
</ins><span class="cx"> 2014-01-23  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [wk2] Page Overlays: Add API to clear the page overlay (and get rid of its backing store)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPDFPDFPluginh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -191,8 +191,7 @@
</span><span class="cx">     virtual WebCore::IntPoint scrollPosition() const override;
</span><span class="cx">     virtual WebCore::IntPoint minimumScrollPosition() const override;
</span><span class="cx">     virtual WebCore::IntPoint maximumScrollPosition() const override;
</span><del>-    virtual int visibleHeight() const override { return m_size.height(); }
-    virtual int visibleWidth() const override { return m_size.width(); }
</del><ins>+    virtual WebCore::IntSize visibleSize() const override { return m_size; }
</ins><span class="cx">     virtual WebCore::IntSize contentsSize() const override { return m_pdfDocumentSize; }
</span><span class="cx">     virtual WebCore::Scrollbar* horizontalScrollbar() const override { return m_horizontalScrollbar.get(); }
</span><span class="cx">     virtual WebCore::Scrollbar* verticalScrollbar() const override { return m_verticalScrollbar.get(); }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageViewGestureGeometryCollectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -53,14 +53,14 @@
</span><span class="cx"> 
</span><span class="cx"> void ViewGestureGeometryCollector::collectGeometryForMagnificationGesture()
</span><span class="cx"> {
</span><del>-    FloatRect visibleContentRect = m_webPage.mainFrameView()-&gt;visibleContentRect(ScrollableArea::IncludeScrollbars);
</del><ins>+    FloatRect visibleContentRect = m_webPage.mainFrameView()-&gt;visibleContentRectIncludingScrollbars();
</ins><span class="cx">     bool frameHandlesMagnificationGesture = m_webPage.mainWebFrame()-&gt;handlesPageScaleGesture();
</span><span class="cx">     m_webPage.send(Messages::ViewGestureController::DidCollectGeometryForMagnificationGesture(visibleContentRect, frameHandlesMagnificationGesture));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture(FloatPoint origin)
</span><span class="cx"> {
</span><del>-    FloatRect visibleContentRect = m_webPage.mainFrameView()-&gt;visibleContentRect(ScrollableArea::IncludeScrollbars);
</del><ins>+    FloatRect visibleContentRect = m_webPage.mainFrameView()-&gt;visibleContentRectIncludingScrollbars();
</ins><span class="cx">     bool frameHandlesMagnificationGesture = m_webPage.mainWebFrame()-&gt;handlesPageScaleGesture();
</span><span class="cx"> 
</span><span class="cx">     FloatPoint scrolledOrigin = origin;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -499,7 +499,7 @@
</span><span class="cx">     if (!view)
</span><span class="cx">         return IntRect();
</span><span class="cx">     
</span><del>-    IntRect contentRect = view-&gt;visibleContentRect(ScrollableArea::IncludeScrollbars);
</del><ins>+    IntRect contentRect = view-&gt;visibleContentRectIncludingScrollbars();
</ins><span class="cx">     return IntRect(0, 0, contentRect.width(), contentRect.height());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (162662 => 162663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-01-24 00:36:14 UTC (rev 162662)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-01-24 00:39:46 UTC (rev 162663)
</span><span class="lines">@@ -732,7 +732,7 @@
</span><span class="cx">     RenderView* renderView = frameView-&gt;renderView();
</span><span class="cx">     PlatformCALayer* renderViewLayer = static_cast&lt;GraphicsLayerCA*&gt;(renderView-&gt;layer()-&gt;backing()-&gt;graphicsLayer())-&gt;platformCALayer();
</span><span class="cx"> 
</span><del>-    FloatRect visibleContentRect = frameView-&gt;visibleContentRect(ScrollableArea::IncludeScrollbars);
</del><ins>+    FloatRect visibleContentRect = frameView-&gt;visibleContentRectIncludingScrollbars();
</ins><span class="cx"> 
</span><span class="cx">     FloatPoint constrainedOrigin = visibleContentRect.location();
</span><span class="cx">     constrainedOrigin.moveBy(-origin);
</span><span class="lines">@@ -807,7 +807,7 @@
</span><span class="cx">     shadowLayer-&gt;setPosition(shadowLayer-&gt;bounds().center());
</span><span class="cx"> 
</span><span class="cx">     FloatPoint unscrolledOrigin(origin);
</span><del>-    FloatRect visibleContentRect = m_webPage-&gt;mainFrameView()-&gt;visibleContentRect(ScrollableArea::IncludeScrollbars);
</del><ins>+    FloatRect visibleContentRect = m_webPage-&gt;mainFrameView()-&gt;visibleContentRectIncludingScrollbars();
</ins><span class="cx">     unscrolledOrigin.moveBy(-visibleContentRect.location());
</span><span class="cx">     m_webPage-&gt;scalePage(scale, roundedIntPoint(-unscrolledOrigin));
</span><span class="cx">     flushLayers();
</span></span></pre>
</div>
</div>

</body>
</html>