Frame* coreFrame = _private->coreFrame;
for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
- if ([webView _usesDocumentViews]) {
- // Don't call setDrawsBackground:YES here because it may be NO because of a load
- // in progress; WebFrameLoaderClient keeps it set to NO during the load process.
- WebFrame *webFrame = kit(frame);
- if (!drawsBackground)
- [[[webFrame frameView] _scrollView] setDrawsBackground:NO];
- [[[webFrame frameView] _scrollView] setBackgroundColor:backgroundColor];
- id documentView = [[webFrame frameView] documentView];
- if ([documentView respondsToSelector:@selector(setDrawsBackground:)])
- [documentView setDrawsBackground:drawsBackground];
- if ([documentView respondsToSelector:@selector(setBackgroundColor:)])
- [documentView setBackgroundColor:backgroundColor];
- }
+ // Don't call setDrawsBackground:YES here because it may be NO because of a load
+ // in progress; WebFrameLoaderClient keeps it set to NO during the load process.
+ WebFrame *webFrame = kit(frame);
+ if (!drawsBackground)
+ [[[webFrame frameView] _scrollView] setDrawsBackground:NO];
+ [[[webFrame frameView] _scrollView] setBackgroundColor:backgroundColor];
+ id documentView = [[webFrame frameView] documentView];
+ if ([documentView respondsToSelector:@selector(setDrawsBackground:)])
+ [documentView setDrawsBackground:drawsBackground];
+ if ([documentView respondsToSelector:@selector(setBackgroundColor:)])
+ [documentView setBackgroundColor:backgroundColor];
if (FrameView* view = frame->view()) {
view->setTransparent(!drawsBackground);
- (BOOL)_hasSelection
{
- if ([getWebView(self) _usesDocumentViews]) {
- id documentView = [_private->webFrameView documentView];
-
- // optimization for common case to avoid creating potentially large selection string
- if ([documentView isKindOfClass:[WebHTMLView class]])
- if (Frame* coreFrame = _private->coreFrame)
- return coreFrame->selection()->isRange();
+ id documentView = [_private->webFrameView documentView];
- if ([documentView conformsToProtocol:@protocol(WebDocumentText)])
- return [[documentView selectedString] length] > 0;
-
- return NO;
- }
+ // optimization for common case to avoid creating potentially large selection string
+ if ([documentView isKindOfClass:[WebHTMLView class]])
+ if (Frame* coreFrame = _private->coreFrame)
+ return coreFrame->selection()->isRange();
- Frame* coreFrame = _private->coreFrame;
- return coreFrame && coreFrame->selection()->isRange();
+ if ([documentView conformsToProtocol:@protocol(WebDocumentText)])
+ return [[documentView selectedString] length] > 0;
+
+ return NO;
}
- (void)_clearSelection
{
- ASSERT([getWebView(self) _usesDocumentViews]);
id documentView = [_private->webFrameView documentView];
if ([documentView conformsToProtocol:@protocol(WebDocumentText)])
[documentView deselectAll];
return NO;
// If we're drawing into a bitmap, we might be snapshotting, or drawing into a layer-backed view.
- if ([getWebView(self) _usesDocumentViews]) {
- id documentView = [_private->webFrameView documentView];
- if ([documentView isKindOfClass:[WebHTMLView class]] && [(WebHTMLView *)documentView _web_isDrawingIntoLayer])
- return NO;
- }
+ id documentView = [_private->webFrameView documentView];
+ if ([documentView isKindOfClass:[WebHTMLView class]] && [(WebHTMLView *)documentView _web_isDrawingIntoLayer])
+ return NO;
return [getWebView(self) _includesFlattenedCompositingLayersWhenDrawingToBitmap];
}
FrameView* view = _private->coreFrame->view();
if (!view)
return;
- ASSERT([getWebView(self) _usesDocumentViews]);
// FIXME: These are fake modifier keys here, but they should be real ones instead.
PlatformMouseEvent event(IntPoint(windowLoc), globalPoint(windowLoc, [view->platformWidget() window]),
LeftButton, MouseEventMoved, 0, false, false, false, false, currentTime());
}
if (Document* document = _private->coreFrame->document()) {
-#if ENABLE(DATABASE)
+#if ENABLE(SQL_DATABASE)
if (document->hasOpenDatabases())
[result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameUsesDatabases];
#endif
- (WebFrameView *)frameView
{
- ASSERT(!getWebView(self) || [getWebView(self) _usesDocumentViews]);
return _private->webFrameView;
}