Changeset 53556 in webkit
- Timestamp:
- Jan 20, 2010 11:09:32 AM (14 years ago)
- Location:
- trunk/WebKit/mac
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/mac/ChangeLog
r53554 r53556 1 2010-01-19 Timothy Hatcher <timothy@apple.com> 2 3 Fix erroneous page scrolls when trying to select text or use form elements 4 with the Web Inspector docked. 5 6 http://webkit.org/b/24403 7 rdar://problem/6753925 8 9 Reviewed by John Sullivan and Darin Adler. 10 11 * WebCoreSupport/WebChromeClient.mm: 12 (WebChromeClient::scrollRectIntoView): The scrollRect.move() call was 13 incorrectly converting the rect under the assumption that the frame view 14 is the same size as the WebView. Using convertRect:fromView: instead 15 is enough to fix the bug, but that code isn't needed since WebCore 16 already takes care of scrolling the main frame's document view, so it 17 was redundant to do it here too. 18 1 19 2010-01-20 Steve Falkenburg <sfalken@apple.com> 2 20 -
trunk/WebKit/mac/WebCoreSupport/WebChromeClient.mm
r51147 r53556 491 491 // FIXME: This scrolling behavior should be under the control of the embedding client (rather than something 492 492 // we just do ourselves). 493 494 IntRect scrollRect = r; 495 NSView *startView = m_webView; 496 if ([m_webView _usesDocumentViews]) { 497 // We have to convert back to document view coordinates. 498 // It doesn't make sense for the scrollRectIntoView API to take document view coordinates. 499 scrollRect.move(scrollView->scrollOffset()); 500 startView = [[[m_webView mainFrame] frameView] documentView]; 501 } 502 NSRect rect = scrollRect; 503 for (NSView *view = startView; view; view = [view superview]) { 504 if ([view isKindOfClass:[NSClipView class]]) { 505 NSClipView *clipView = (NSClipView *)view; 506 NSView *documentView = [clipView documentView]; 507 [documentView scrollRectToVisible:[documentView convertRect:rect fromView:startView]]; 508 } 493 494 NSRect rect = r; 495 for (NSView *view = m_webView; view; view = [view superview]) { 496 if ([view isKindOfClass:[NSClipView class]]) { 497 NSClipView *clipView = (NSClipView *)view; 498 NSView *documentView = [clipView documentView]; 499 [documentView scrollRectToVisible:[documentView convertRect:rect fromView:m_webView]]; 500 } 509 501 } 510 502 }
Note: See TracChangeset
for help on using the changeset viewer.