Commit a70ccbc8 authored by andersca's avatar andersca

WebCore:

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: http://svn.webkit.org/repository/webkit/trunk@14743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b3ebb432
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> 2006-06-05 Rob Buis <buis@kde.org>
Reviewed by mjs. Reviewed by mjs.
......
...@@ -489,6 +489,7 @@ typedef enum { ...@@ -489,6 +489,7 @@ typedef enum {
- (BOOL)canProvideDocumentSource; - (BOOL)canProvideDocumentSource;
- (BOOL)canSaveAsWebArchive; - (BOOL)canSaveAsWebArchive;
- (BOOL)containsPlugins;
@end @end
// The WebCoreFrameBridge protocol contains methods for use by the WebCore side of the bridge. // The WebCoreFrameBridge protocol contains methods for use by the WebCore side of the bridge.
......
...@@ -2566,6 +2566,11 @@ static NSCharacterSet *_getPostSmartSet(void) ...@@ -2566,6 +2566,11 @@ static NSCharacterSet *_getPostSmartSet(void)
return [self canProvideDocumentSource]; return [self canProvideDocumentSource];
} }
- (BOOL)containsPlugins
{
return m_frame->containsPlugins();
}
@end @end
@implementation WebCoreFrameBridge (WebCoreBridgeInternal) @implementation WebCoreFrameBridge (WebCoreBridgeInternal)
......
...@@ -3470,5 +3470,9 @@ String Frame::documentTypeString() const ...@@ -3470,5 +3470,9 @@ String Frame::documentTypeString() const
return String(); return String();
} }
bool Frame::containsPlugins() const
{
return d->m_plugins.size() != 0;
}
} // namespace WebCore } // namespace WebCore
...@@ -788,6 +788,8 @@ public: ...@@ -788,6 +788,8 @@ public:
void setResourceRequest(const ResourceRequest& request); void setResourceRequest(const ResourceRequest& request);
const ResourceRequest& resourceRequest() const; const ResourceRequest& resourceRequest() const;
bool containsPlugins() const;
// split out controller objects // split out controller objects
FrameTree* tree() const; FrameTree* tree() const;
SelectionController& selection() const; // FIXME: Change to pointer? 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> 2006-06-03 Steve Falkenburg <sfalken@apple.com>
Reviewed by hyatt. Reviewed by hyatt.
......
...@@ -2431,22 +2431,9 @@ - (void)_reloadForPluginChanges ...@@ -2431,22 +2431,9 @@ - (void)_reloadForPluginChanges
for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self]) { for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self]) {
NSView <WebDocumentView> *documentView = [[frame frameView] documentView]; NSView <WebDocumentView> *documentView = [[frame frameView] documentView];
if ([documentView isKindOfClass:[WebNetscapePluginDocumentView class]] || if ([documentView isKindOfClass:[WebNetscapePluginDocumentView class]] ||
[documentView isKindOfClass:[WebPluginDocumentView class]]) { [documentView isKindOfClass:[WebPluginDocumentView class]] ||
([documentView isKindOfClass:[WebHTMLView class]] && [_private->bridge containsPlugins]))
[frame reload]; [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;
}
}
}
} }
} }
......
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