2006-06-06 Anders Carlsson <acarlsson@apple.com>
Reviewed by John.
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge containsPlugins]):
* page/Frame.cpp:
(WebCore::Frame::containsPlugins):
* page/Frame.h:
Add containsPlugins function which returns whether a frame contains plugins
or not.
WebKit:
2006-06-06 Anders Carlsson <acarlsson@apple.com>
Reviewed by John.
* WebView/WebFrame.m:
(-[WebFrame _reloadForPluginChanges]):
Don't traverse the view hierarchy looking for plugin views. Instead, just
ask the frame whether it contains any plugins.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14743
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-06-06 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by John.
+
+ * bridge/mac/WebCoreFrameBridge.h:
+ * bridge/mac/WebCoreFrameBridge.mm:
+ (-[WebCoreFrameBridge containsPlugins]):
+ * page/Frame.cpp:
+ (WebCore::Frame::containsPlugins):
+ * page/Frame.h:
+ Add containsPlugins function which returns whether a frame contains plugins
+ or not.
+
2006-06-05 Rob Buis <buis@kde.org>
Reviewed by mjs.
- (BOOL)canProvideDocumentSource;
- (BOOL)canSaveAsWebArchive;
+- (BOOL)containsPlugins;
@end
// The WebCoreFrameBridge protocol contains methods for use by the WebCore side of the bridge.
return [self canProvideDocumentSource];
}
+- (BOOL)containsPlugins
+{
+ return m_frame->containsPlugins();
+}
+
@end
@implementation WebCoreFrameBridge (WebCoreBridgeInternal)
return String();
}
+bool Frame::containsPlugins() const
+{
+ return d->m_plugins.size() != 0;
+}
} // namespace WebCore
void setResourceRequest(const ResourceRequest& request);
const ResourceRequest& resourceRequest() const;
+ bool containsPlugins() const;
+
// split out controller objects
FrameTree* tree() const;
SelectionController& selection() const; // FIXME: Change to pointer?
+2006-06-06 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by John.
+
+ * WebView/WebFrame.m:
+ (-[WebFrame _reloadForPluginChanges]):
+ Don't traverse the view hierarchy looking for plugin views. Instead, just
+ ask the frame whether it contains any plugins.
+
2006-06-03 Steve Falkenburg <sfalken@apple.com>
Reviewed by hyatt.
for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self]) {
NSView <WebDocumentView> *documentView = [[frame frameView] documentView];
if ([documentView isKindOfClass:[WebNetscapePluginDocumentView class]] ||
- [documentView isKindOfClass:[WebPluginDocumentView class]]) {
+ [documentView isKindOfClass:[WebPluginDocumentView class]] ||
+ ([documentView isKindOfClass:[WebHTMLView class]] && [_private->bridge containsPlugins]))
[frame reload];
- } else if ([documentView isKindOfClass:[WebHTMLView class]]) {
- NSEnumerator *viewEnumerator = [[documentView subviews] objectEnumerator];
- NSView *view;
- // FIXME: We should ask the frame if it contains plugins, rather
- // than doing this check.
- while ((view = [viewEnumerator nextObject]) != nil) {
- if ([view isKindOfClass:[WebNetscapePluginEmbeddedView class]] ||
- [view isKindOfClass:[WebNullPluginView class]] ||
- [WebPluginController isPlugInView:view]) {
- [frame reload];
- break;
- }
- }
- }
}
}