+2007-05-18 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by John.
+
+ <rdar://problem/5204792> REGRESSION (r21367): System widgets are drawn with vertical/horizontal scroll bars
+
+ No test because the bug requires calling setAllowsScrolling: to reproduce.
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView setAllowsScrolling:]): Update the FrameView's scroll state as well as the one
+ on WebDynamicScrollBarsView, otherwise this setting won't stick if the frame has already loaded
+ a document.
+
2007-05-18 Geoffrey Garen <ggaren@apple.com>
Fixed spelling error.
#import <JavaScriptCore/Assertions.h>
#import <WebCore/DragController.h>
#import <WebCore/Frame.h>
+#import <WebCore/FrameView.h>
#import <WebCore/HistoryItem.h>
#import <WebCore/Page.h>
#import <WebCore/WebCoreFrameView.h>
- (void)setAllowsScrolling:(BOOL)flag
{
- [(WebDynamicScrollBarsView *)[self _scrollView] setAllowsScrolling:flag];
+ WebDynamicScrollBarsView *scrollView = (WebDynamicScrollBarsView *)[self _scrollView];
+ [scrollView setAllowsScrolling:flag];
+ WebCore::Frame *frame = core([self webFrame]);
+ if (WebCore::FrameView *view = frame? frame->view() : 0) {
+ view->setHScrollbarMode((WebCore::ScrollbarMode)[scrollView horizontalScrollingMode]);
+ view->setVScrollbarMode((WebCore::ScrollbarMode)[scrollView verticalScrollingMode]);
+ }
}
- (BOOL)allowsScrolling