<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[20650] branches/Safari-522</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/20650">20650</a></dd>
<dt>Author</dt> <dd>sfalken</dd>
<dt>Date</dt> <dd>2007-04-01 16:27:14 -0700 (Sun, 01 Apr 2007)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge fix from r20565</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchesSafari522LayoutTestsChangeLog">branches/Safari-522/LayoutTests/ChangeLog</a></li>
<li><a href="#branchesSafari522LayoutTestsfastoverflowscrollRevealButtonexpectedchecksum">branches/Safari-522/LayoutTests/fast/overflow/scrollRevealButton-expected.checksum</a></li>
<li><a href="#branchesSafari522LayoutTestsfastoverflowscrollRevealButtonexpectedpng">branches/Safari-522/LayoutTests/fast/overflow/scrollRevealButton-expected.png</a></li>
<li><a href="#branchesSafari522LayoutTestsfastoverflowscrollRevealButtonexpectedtxt">branches/Safari-522/LayoutTests/fast/overflow/scrollRevealButton-expected.txt</a></li>
<li><a href="#branchesSafari522WebCoreChangeLog">branches/Safari-522/WebCore/ChangeLog</a></li>
<li><a href="#branchesSafari522WebCorepageFrameViewcpp">branches/Safari-522/WebCore/page/FrameView.cpp</a></li>
<li><a href="#branchesSafari522WebCorepageFrameViewh">branches/Safari-522/WebCore/page/FrameView.h</a></li>
<li><a href="#branchesSafari522WebCoreplatformScrollViewh">branches/Safari-522/WebCore/platform/ScrollView.h</a></li>
<li><a href="#branchesSafari522WebCoreplatformgdkScrollViewGdkcpp">branches/Safari-522/WebCore/platform/gdk/ScrollViewGdk.cpp</a></li>
<li><a href="#branchesSafari522WebCoreplatformmacScrollViewMacmm">branches/Safari-522/WebCore/platform/mac/ScrollViewMac.mm</a></li>
<li><a href="#branchesSafari522WebCoreplatformqtScrollViewQtcpp">branches/Safari-522/WebCore/platform/qt/ScrollViewQt.cpp</a></li>
<li><a href="#branchesSafari522WebCoreplatformwinScrollViewWincpp">branches/Safari-522/WebCore/platform/win/ScrollViewWin.cpp</a></li>
<li><a href="#branchesSafari522WebCoreplatformwinTemporaryLinkStubscpp">branches/Safari-522/WebCore/platform/win/TemporaryLinkStubs.cpp</a></li>
<li><a href="#branchesSafari522WebCorerenderingRenderLayercpp">branches/Safari-522/WebCore/rendering/RenderLayer.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchesSafari522LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/Safari-522/LayoutTests/ChangeLog (20649 => 20650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/Safari-522/LayoutTests/ChangeLog        2007-04-01 23:01:35 UTC (rev 20649)
+++ branches/Safari-522/LayoutTests/ChangeLog        2007-04-01 23:27:14 UTC (rev 20650)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2007-03-28  Maciej Stachowiak  &lt;mjs@apple.com&gt;
+
+        Reviewed by Darin.
+        
+        - &lt;rdar://problem/4820817&gt; Autoscroll is broken in Mail.app (message jumps around when trying to select text)
+
+        * fast/overflow/scrollRevealButton-expected.checksum:
+        * fast/overflow/scrollRevealButton-expected.png:
+        * fast/overflow/scrollRevealButton-expected.txt:
+
</ins><span class="cx"> 2007-03-27  Justin Garcia  &lt;justin.garcia@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by darin
</span></span></pre></div>
<a id="branchesSafari522LayoutTestsfastoverflowscrollRevealButtonexpectedchecksum"></a>
<div class="modfile"><h4>Modified: branches/Safari-522/LayoutTests/fast/overflow/scrollRevealButton-expected.checksum (20649 => 20650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/Safari-522/LayoutTests/fast/overflow/scrollRevealButton-expected.checksum        2007-04-01 23:01:35 UTC (rev 20649)
+++ branches/Safari-522/LayoutTests/fast/overflow/scrollRevealButton-expected.checksum        2007-04-01 23:27:14 UTC (rev 20650)
</span><span class="lines">@@ -1 +1 @@
</span><del>-1a3eb440919a835d1c2d8b87e3e75d51
</del><span class="cx">\ No newline at end of file
</span><ins>+09a85baee72e3618e0e122168b061246
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchesSafari522LayoutTestsfastoverflowscrollRevealButtonexpectedpng"></a>
<div class="binary"><h4>Modified: branches/Safari-522/LayoutTests/fast/overflow/scrollRevealButton-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="branchesSafari522LayoutTestsfastoverflowscrollRevealButtonexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/Safari-522/LayoutTests/fast/overflow/scrollRevealButton-expected.txt (20649 => 20650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/Safari-522/LayoutTests/fast/overflow/scrollRevealButton-expected.txt        2007-04-01 23:01:35 UTC (rev 20649)
+++ branches/Safari-522/LayoutTests/fast/overflow/scrollRevealButton-expected.txt        2007-04-01 23:27:14 UTC (rev 20650)
</span><span class="lines">@@ -39,4 +39,5 @@
</span><span class="cx">               RenderBlock {DIV} at (0,558) size 135x300
</span><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span><span class="cx">       RenderBlock {DIV} at (0,672) size 769x500
</span><del>-frame 'fr' scrolled to 0,122
</del><ins>+scrolled to 0,4
+frame 'fr' scrolled to 0,91
</ins></span></pre></div>
<a id="branchesSafari522WebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/Safari-522/WebCore/ChangeLog (20649 => 20650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/Safari-522/WebCore/ChangeLog        2007-04-01 23:01:35 UTC (rev 20649)
+++ branches/Safari-522/WebCore/ChangeLog        2007-04-01 23:27:14 UTC (rev 20650)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2007-03-28  Maciej Stachowiak  &lt;mjs@apple.com&gt;
+        
+        Reviewed by Darin.
+        
+        - fixed &lt;rdar://problem/4820817&gt; Autoscroll is broken in Mail.app (message jumps around when trying to select text)
+                
+        Handle scrolling external scrollviews around the webview during
+        autoscroll or when scrolling into view.
+        
+        This should also restore performance on BenchJS test 6 lost due to Tim's partial fix.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::scrollRectIntoViewRecursively):
+        * page/FrameView.h:
+        * platform/ScrollView.h:
+        * platform/gdk/ScrollViewGdk.cpp:
+        (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
+        (WebCore::ScrollView::scrollRectIntoViewRecursively):
+        * platform/mac/ScrollViewMac.mm:
+        (WebCore::ScrollView::visibleContentRect):
+        (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
+        (WebCore::ScrollView::scrollRectIntoViewRecursively):
+        (WebCore::ScrollView::updateContents):
+        * platform/qt/ScrollViewQt.cpp:
+        (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
+        (WebCore::ScrollView::scrollRectIntoViewRecursively):
+        * platform/win/ScrollViewWin.cpp:
+        (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
+        * platform/win/TemporaryLinkStubs.cpp:
+        (WebCore::ScrollView::scrollRectIntoViewRecursively):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::scrollRectToVisible):
+       
</ins><span class="cx"> 2007-03-28  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Hyatt.
</span></span></pre></div>
<a id="branchesSafari522WebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: branches/Safari-522/WebCore/page/FrameView.cpp (20649 => 20650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/Safari-522/WebCore/page/FrameView.cpp        2007-04-01 23:01:35 UTC (rev 20649)
+++ branches/Safari-522/WebCore/page/FrameView.cpp        2007-04-01 23:27:14 UTC (rev 20650)
</span><span class="lines">@@ -603,11 +603,11 @@
</span><span class="cx">     suppressScrollbars(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FrameView::scrollPointRecursively(int x, int y)
</del><ins>+void FrameView::scrollRectIntoViewRecursively(const IntRect&amp; r)
</ins><span class="cx"> {
</span><span class="cx">     if (frame()-&gt;prohibitsScrolling())
</span><span class="cx">         return;
</span><del>-    ScrollView::scrollPointRecursively(x, y);
</del><ins>+    ScrollView::scrollRectIntoViewRecursively(r);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void FrameView::setContentsPos(int x, int y)
</span></span></pre></div>
<a id="branchesSafari522WebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: branches/Safari-522/WebCore/page/FrameView.h (20649 => 20650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/Safari-522/WebCore/page/FrameView.h        2007-04-01 23:01:35 UTC (rev 20649)
+++ branches/Safari-522/WebCore/page/FrameView.h        2007-04-01 23:27:14 UTC (rev 20650)
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx">     IntRect windowClipRect(bool clipToContents) const;
</span><span class="cx">     IntRect windowClipRectForLayer(const RenderLayer*, bool clipToLayerContents) const;
</span><span class="cx"> 
</span><del>-    virtual void scrollPointRecursively(int x, int y);
</del><ins>+    virtual void scrollRectIntoViewRecursively(const IntRect&amp; r);
</ins><span class="cx">     virtual void setContentsPos(int x, int y);
</span><span class="cx"> 
</span><span class="cx">     String mediaType() const;
</span></span></pre></div>
<a id="branchesSafari522WebCoreplatformScrollViewh"></a>
<div class="modfile"><h4>Modified: branches/Safari-522/WebCore/platform/ScrollView.h (20649 => 20650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/Safari-522/WebCore/platform/ScrollView.h        2007-04-01 23:01:35 UTC (rev 20649)
+++ branches/Safari-522/WebCore/platform/ScrollView.h        2007-04-01 23:27:14 UTC (rev 20650)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx">         int visibleWidth() const;
</span><span class="cx">         int visibleHeight() const;
</span><span class="cx">         FloatRect visibleContentRect() const;
</span><ins>+        FloatRect visibleContentRectConsideringExternalScrollers() const;
</ins><span class="cx"> 
</span><span class="cx">         int contentsWidth() const;
</span><span class="cx">         int contentsHeight() const;
</span><span class="lines">@@ -57,7 +58,7 @@
</span><span class="cx">         int contentsY() const;
</span><span class="cx">         IntSize scrollOffset() const;
</span><span class="cx">         void scrollBy(int dx, int dy);
</span><del>-        virtual void scrollPointRecursively(int dx, int dy);
</del><ins>+        virtual void scrollRectIntoViewRecursively(const IntRect&amp;);
</ins><span class="cx"> 
</span><span class="cx">         virtual void setContentsPos(int x, int y);
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchesSafari522WebCoreplatformgdkScrollViewGdkcpp"></a>
<div class="modfile"><h4>Modified: branches/Safari-522/WebCore/platform/gdk/ScrollViewGdk.cpp (20649 => 20650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/Safari-522/WebCore/platform/gdk/ScrollViewGdk.cpp        2007-04-01 23:01:35 UTC (rev 20649)
+++ branches/Safari-522/WebCore/platform/gdk/ScrollViewGdk.cpp        2007-04-01 23:27:14 UTC (rev 20650)
</span><span class="lines">@@ -116,6 +116,12 @@
</span><span class="cx">     return contentRect;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+FloatRect ScrollView::visibleContentRectConsideringExternalScrollers() const
+{
+    // external scrollers not supported for now
+    return visibleContentRect();
+}
+
</ins><span class="cx"> void ScrollView::setContentsPos(int newX, int newY)
</span><span class="cx"> {
</span><span class="cx">     int dx = newX - contentsX();
</span><span class="lines">@@ -274,7 +280,7 @@
</span><span class="cx">     notImplementedGdk();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ScrollView::scrollPointRecursively(int x, int y)
</del><ins>+void ScrollView::scrollRectIntoViewRecursively(const IntRect&amp;)
</ins><span class="cx"> {
</span><span class="cx">     notImplementedGdk();
</span><span class="cx"> }
</span><span class="lines">@@ -308,7 +314,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> IntPoint ScrollView::contentsToWindow(const IntPoint&amp; point) const
</span><del>-{
</del><ins>+`{
</ins><span class="cx">     notImplementedGdk();
</span><span class="cx">     return point;
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchesSafari522WebCoreplatformmacScrollViewMacmm"></a>
<div class="modfile"><h4>Modified: branches/Safari-522/WebCore/platform/mac/ScrollViewMac.mm (20649 => 20650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/Safari-522/WebCore/platform/mac/ScrollViewMac.mm        2007-04-01 23:01:35 UTC (rev 20649)
+++ branches/Safari-522/WebCore/platform/mac/ScrollViewMac.mm        2007-04-01 23:27:14 UTC (rev 20650)
</span><span class="lines">@@ -79,13 +79,29 @@
</span><span class="cx"> 
</span><span class="cx"> FloatRect ScrollView::visibleContentRect() const
</span><span class="cx"> {
</span><ins>+    NSScrollView *view = (NSScrollView *)getView(); 
+      
+    BEGIN_BLOCK_OBJC_EXCEPTIONS; 
+    if ([view isKindOfClass:[NSScrollView class]]) 
+        return [view documentVisibleRect]; 
+    else 
+        return [view visibleRect]; 
+    END_BLOCK_OBJC_EXCEPTIONS; 
+
+    return FloatRect();
+}
+
+FloatRect ScrollView::visibleContentRectConsideringExternalScrollers() const
+{
</ins><span class="cx">     BEGIN_BLOCK_OBJC_EXCEPTIONS;
</span><span class="cx">     if (NSView *docView = getDocumentView())
</span><span class="cx">         return [docView visibleRect];
</span><span class="cx">     END_BLOCK_OBJC_EXCEPTIONS;
</span><ins>+
</ins><span class="cx">     return FloatRect();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> int ScrollView::contentsWidth() const
</span><span class="cx"> {
</span><span class="cx">     NSView *docView, *view = getView();
</span><span class="lines">@@ -160,11 +176,9 @@
</span><span class="cx">     setContentsPos(contentsX() + dx, contentsY() + dy);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ScrollView::scrollPointRecursively(int x, int y)
</del><ins>+void ScrollView::scrollRectIntoViewRecursively(const IntRect&amp; r)
</ins><span class="cx"> { 
</span><del>-    x = (x &lt; 0) ? 0 : x;
-    y = (y &lt; 0) ? 0 : y;
-    NSPoint p = NSMakePoint(x,y);
</del><ins>+    NSRect rect = r;
</ins><span class="cx"> 
</span><span class="cx">     BEGIN_BLOCK_OBJC_EXCEPTIONS;
</span><span class="cx">     NSView *docView;
</span><span class="lines">@@ -178,8 +192,7 @@
</span><span class="cx">         if ([view isKindOfClass:[NSClipView class]]) {
</span><span class="cx">             NSClipView *clipView = (NSClipView *)view;
</span><span class="cx">             NSView *documentView = [clipView documentView];
</span><del>-            NSPoint viewPoint = [clipView constrainScrollPoint:[documentView convertPoint:p fromView:originalView]];
-            [documentView scrollPoint:viewPoint];
</del><ins>+            [documentView scrollRectToVisible:[documentView convertRect:rect fromView:originalView]];
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         view = [view superview];
</span><span class="lines">@@ -338,10 +351,12 @@
</span><span class="cx">     if ([view isKindOfClass:[NSScrollView class]])
</span><span class="cx">         view = getDocumentView();
</span><span class="cx"> 
</span><ins>+    NSRect visibleRect = visibleContentRect();
+
</ins><span class="cx">     // Checking for rect visibility is an important optimization for the case of
</span><span class="cx">     // Select All of a large document. AppKit does not do this check, and so ends
</span><span class="cx">     // up building a large complicated NSRegion if we don't perform the check.
</span><del>-    NSRect dirtyRect = NSIntersectionRect(rect, [view visibleRect]);
</del><ins>+    NSRect dirtyRect = NSIntersectionRect(rect, visibleRect);
</ins><span class="cx">     if (!NSIsEmptyRect(dirtyRect)) {
</span><span class="cx">         [view setNeedsDisplayInRect:dirtyRect];
</span><span class="cx">         if (now) {
</span></span></pre></div>
<a id="branchesSafari522WebCoreplatformqtScrollViewQtcpp"></a>
<div class="modfile"><h4>Modified: branches/Safari-522/WebCore/platform/qt/ScrollViewQt.cpp (20649 => 20650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/Safari-522/WebCore/platform/qt/ScrollViewQt.cpp        2007-04-01 23:01:35 UTC (rev 20649)
+++ branches/Safari-522/WebCore/platform/qt/ScrollViewQt.cpp        2007-04-01 23:27:14 UTC (rev 20650)
</span><span class="lines">@@ -106,6 +106,12 @@
</span><span class="cx">                      visibleHeight());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+FloatRect ScrollView::visibleContentRectConsideringExternalScrollers() const
+{
+    // external scrollers not supported for now
+    return visibleContentRect();
+}
+
</ins><span class="cx"> void ScrollView::setContentsPos(int newX, int newY)
</span><span class="cx"> {
</span><span class="cx">     if (!m_area)
</span><span class="lines">@@ -290,8 +296,11 @@
</span><span class="cx">     child-&gt;hide();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ScrollView::scrollPointRecursively(int x, int y)
</del><ins>+void ScrollView::scrollRectIntoViewRecursively(const IntRect&amp; r)
</ins><span class="cx"> {
</span><ins>+    int x = r.x();
+    int y = r.y();
+
</ins><span class="cx">     x = (x &lt; 0) ? 0 : x;
</span><span class="cx">     y = (y &lt; 0) ? 0 : y;
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchesSafari522WebCoreplatformwinScrollViewWincpp"></a>
<div class="modfile"><h4>Modified: branches/Safari-522/WebCore/platform/win/ScrollViewWin.cpp (20649 => 20650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/Safari-522/WebCore/platform/win/ScrollViewWin.cpp        2007-04-01 23:01:35 UTC (rev 20649)
+++ branches/Safari-522/WebCore/platform/win/ScrollViewWin.cpp        2007-04-01 23:27:14 UTC (rev 20650)
</span><span class="lines">@@ -103,6 +103,12 @@
</span><span class="cx">     return contentRect;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+FloatRect ScrollView::visibleContentRectConsideringExternalScrollers() const
+{
+    // external scrollers not supported for now
+    return visibleContentRect();
+}
+
</ins><span class="cx"> void ScrollView::setContentsPos(int newX, int newY)
</span><span class="cx"> {
</span><span class="cx">     int dx = newX - contentsX();
</span></span></pre></div>
<a id="branchesSafari522WebCoreplatformwinTemporaryLinkStubscpp"></a>
<div class="modfile"><h4>Modified: branches/Safari-522/WebCore/platform/win/TemporaryLinkStubs.cpp (20649 => 20650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/Safari-522/WebCore/platform/win/TemporaryLinkStubs.cpp        2007-04-01 23:01:35 UTC (rev 20649)
+++ branches/Safari-522/WebCore/platform/win/TemporaryLinkStubs.cpp        2007-04-01 23:27:14 UTC (rev 20650)
</span><span class="lines">@@ -346,7 +346,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ScrollView::addChild(Widget*) { notImplemented(); }
</span><span class="cx"> void ScrollView::removeChild(Widget*) { notImplemented(); }
</span><del>-void ScrollView::scrollPointRecursively(int x, int y) { notImplemented(); }
</del><ins>+void ScrollView::scrollRectIntoViewRecursively(const IntRect&amp;) { notImplemented(); }
</ins><span class="cx"> bool ScrollView::inWindow() const { notImplemented(); return true; }
</span><span class="cx"> void ScrollView::paint(GraphicsContext*, const IntRect&amp;) { notImplemented(); }
</span><span class="cx"> void ScrollView::wheelEvent(PlatformWheelEvent&amp;) { notImplemented(); }
</span></span></pre></div>
<a id="branchesSafari522WebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: branches/Safari-522/WebCore/rendering/RenderLayer.cpp (20649 => 20650)</h4>
<pre class="diff"><span>
<span class="info">--- branches/Safari-522/WebCore/rendering/RenderLayer.cpp        2007-04-01 23:01:35 UTC (rev 20649)
+++ branches/Safari-522/WebCore/rendering/RenderLayer.cpp        2007-04-01 23:27:14 UTC (rev 20650)
</span><span class="lines">@@ -759,24 +759,27 @@
</span><span class="cx">             parentLayer = m_object-&gt;parent()-&gt;enclosingLayer();
</span><span class="cx">     } else {
</span><span class="cx">         if (frameView) {
</span><del>-            IntRect viewRect = enclosingIntRect(frameView-&gt;visibleContentRect());
-            IntRect r = getRectToExpose(viewRect, rect, alignX, alignY);
-            
-            xOffset = r.x();
-            yOffset = r.y();
-            // Adjust offsets if they're outside of the allowable range.
-            xOffset = max(0, min(frameView-&gt;contentsWidth(), xOffset));
-            yOffset = max(0, min(frameView-&gt;contentsHeight(), yOffset));
</del><ins>+            if (m_object-&gt;document() &amp;&amp; m_object-&gt;document()-&gt;ownerElement() &amp;&amp; m_object-&gt;document()-&gt;ownerElement()-&gt;renderer()) {
+                IntRect viewRect = enclosingIntRect(frameView-&gt;visibleContentRect());
+                IntRect r = getRectToExpose(viewRect, rect, alignX, alignY);
+                
+                xOffset = r.x();
+                yOffset = r.y();
+                // Adjust offsets if they're outside of the allowable range.
+                xOffset = max(0, min(frameView-&gt;contentsWidth(), xOffset));
+                yOffset = max(0, min(frameView-&gt;contentsHeight(), yOffset));
</ins><span class="cx"> 
</span><del>-            if (m_object-&gt;document() &amp;&amp; m_object-&gt;document()-&gt;ownerElement() &amp;&amp; m_object-&gt;document()-&gt;ownerElement()-&gt;renderer()) {
</del><span class="cx">                 frameView-&gt;setContentsPos(xOffset, yOffset);
</span><span class="cx">                 parentLayer = m_object-&gt;document()-&gt;ownerElement()-&gt;renderer()-&gt;enclosingLayer();
</span><span class="cx">                 newRect.setX(rect.x() - frameView-&gt;contentsX() + frameView-&gt;x());
</span><span class="cx">                 newRect.setY(rect.y() - frameView-&gt;contentsY() + frameView-&gt;y());
</span><span class="cx">             } else {
</span><ins>+                IntRect viewRect = enclosingIntRect(frameView-&gt;visibleContentRectConsideringExternalScrollers());
+                IntRect r = getRectToExpose(viewRect, rect, alignX, alignY);
+                
</ins><span class="cx">                 // If this is the outermost view that RenderLayer needs to scroll, then we should scroll the view recursively
</span><span class="cx">                 // Other apps, like Mail, rely on this feature.
</span><del>-                frameView-&gt;scrollPointRecursively(xOffset, yOffset);
</del><ins>+                frameView-&gt;scrollRectIntoViewRecursively(r);
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre>
</div>
</div>

</body>
</html>