Commit 83212c1f authored by hyatt's avatar hyatt

Make sure that if the scrollers are shown/hidden that we

	force an immediate layout, since if we don't, an intervening
	display can cause us to show scrollbars when they really
	shouldn't be there.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8b4a5460
2002-11-19 David Hyatt <hyatt@apple.com>
Make sure that if the scrollers are shown/hidden that we
force an immediate layout, since if we don't, an intervening
display can cause us to show scrollbars when they really
shouldn't be there.
* WebView.subproj/WebDynamicScrollBarsView.m:
(-[WebDynamicScrollBarsView updateScrollers]):
2002-11-19 Chris Blumenberg <cblu@apple.com>
Fixed: 3100597 - repro NSArray exception using contextual menu
......
2002-11-19 David Hyatt <hyatt@apple.com>
Make sure that if the scrollers are shown/hidden that we
force an immediate layout, since if we don't, an intervening
display can cause us to show scrollbars when they really
shouldn't be there.
* WebView.subproj/WebDynamicScrollBarsView.m:
(-[WebDynamicScrollBarsView updateScrollers]):
2002-11-19 Chris Blumenberg <cblu@apple.com>
Fixed: 3100597 - repro NSArray exception using contextual menu
......
......@@ -22,6 +22,11 @@ - (void)updateScrollers
// trying to figure out of the second pass is needed or not.
int pass;
BOOL hasVerticalScroller = [self hasVerticalScroller];
BOOL hasHorizontalScroller = [self hasHorizontalScroller];
BOOL oldHasVertical = hasVerticalScroller;
BOOL oldHasHorizontal = hasHorizontalScroller;
for (pass = 0; pass < 2; pass++) {
BOOL scrollsVertically;
BOOL scrollsHorizontally;
......@@ -33,7 +38,9 @@ - (void)updateScrollers
// Do a layout if pending, before checking if scrollbars are needed.
// This fixes 2969367, although may introduce a slowdown in live resize performance.
NSView *documentView = [self documentView];
if ([documentView inLiveResize] && [documentView conformsToProtocol:@protocol(WebDocumentView)]) {
if ((hasVerticalScroller != oldHasVertical ||
hasHorizontalScroller != oldHasHorizontal || [documentView inLiveResize]) && [documentView conformsToProtocol:@protocol(WebDocumentView)]) {
[(id <WebDocumentView>)documentView setNeedsLayout: YES];
[(id <WebDocumentView>)documentView layout];
}
......@@ -52,6 +59,8 @@ - (void)updateScrollers
[self setHasVerticalScroller:scrollsVertically];
[self setHasHorizontalScroller:scrollsHorizontally];
hasVerticalScroller = scrollsVertically;
hasHorizontalScroller = scrollsHorizontally;
}
}
......
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