Commit 595f51b4 authored by rjw's avatar rjw

Fix to 3131226. Don't force a layout when the document view is set

        on the page's scrollview.  A layout would occur indirectly as a result
        of reflectScrolledClipView: being called when the document view
        was set.  The khtmlpart/khtmlview/WebHTMLView would be out of sync
        at this point and a layout would have unintended and incorrect
        side effects.

        Reviewed by Darin (and tested by John).

        * WebView.subproj/WebDynamicScrollBarsView.h:
        * WebView.subproj/WebDynamicScrollBarsView.m:
        (-[WebDynamicScrollBarsView updateScrollers]):
        * WebView.subproj/WebViewPrivate.m:
        (-[WebView _setDocumentView:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 94e6d75e
2003-01-03 Richard Williamson <rjw@apple.com>
Fix to 3131226. Don't force a layout when the document view is set
on the page's scrollview. A layout would occur indirectly as a result
of reflectScrolledClipView: being called when the document view
was set. The khtmlpart/khtmlview/WebHTMLView would be out of sync
at this point and a layout would have unintended and incorrect
side effects.
Reviewed by Darin (and tested by John).
* WebView.subproj/WebDynamicScrollBarsView.h:
* WebView.subproj/WebDynamicScrollBarsView.m:
(-[WebDynamicScrollBarsView updateScrollers]):
* WebView.subproj/WebViewPrivate.m:
(-[WebView _setDocumentView:]):
=== Alexander-48 ===
2003-01-02 Richard Williamson <rjw@apple.com>
......
......@@ -17,10 +17,11 @@
{
NSCursor *cursor;
BOOL disallowsScrolling;
BOOL suppressLayout;
}
- (void)setAllowsScrolling:(BOOL)flag;
- (BOOL)allowsScrolling;
- (void)updateScrollers;
- (void)setSuppressLayout: (BOOL)flag;
@end
......@@ -13,6 +13,11 @@
@implementation WebDynamicScrollBarsView
- (void)setSuppressLayout: (BOOL)flag;
{
suppressLayout = flag;
}
- (void)updateScrollers
{
// We need to do the work below twice in the case where a scroll bar disappears,
......@@ -27,6 +32,9 @@ - (void)updateScrollers
BOOL oldHasVertical = hasVerticalScroller;
BOOL oldHasHorizontal = hasHorizontalScroller;
if (suppressLayout)
return;
for (pass = 0; pass < 2; pass++) {
BOOL scrollsVertically;
BOOL scrollsHorizontally;
......
......@@ -66,7 +66,11 @@ - (int)_marginHeight
- (void)_setDocumentView:(id)view
{
[[self frameScrollView] setDocumentView: view];
WebDynamicScrollBarsView *sv = [self frameScrollView];
[sv setSuppressLayout: YES];
[sv setDocumentView: view];
[sv setSuppressLayout: NO];
}
-(id <WebDocumentView>)_makeDocumentViewForDataSource:(WebDataSource *)dataSource
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment