WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
118330
The callback for WKPageGetPlugInInformation needs info about whether or not there are any non-playing instances of the plug-in on the page
https://bugs.webkit.org/show_bug.cgi?id=118330
Summary
The callback for WKPageGetPlugInInformation needs info about whether or not t...
Jessie Berlin
Reported
2013-07-02 15:41:09 PDT
<
rdar://problem/14320278
>
Attachments
Patch
(14.10 KB, patch)
2013-07-02 15:58 PDT
,
Jessie Berlin
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jessie Berlin
Comment 1
2013-07-02 15:58:11 PDT
Created
attachment 205954
[details]
Patch
Dean Jackson
Comment 2
2013-07-02 16:14:03 PDT
Comment on
attachment 205954
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=205954&action=review
> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:1000 > + HTMLPlugInImageElement* plugInImageElement = toHTMLPlugInImageElement(node); > + mimeTypes.add(plugInImageElement->loadedMimeType());
Nit: merge into one line.
> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:1022 > + RefPtr<NodeList> plugIns = frame->document()->getElementsByTagName(WebCore::HTMLNames::embedTag.localName());
What about <object>?
Dean Jackson
Comment 3
2013-07-02 16:14:26 PDT
Comment on
attachment 205954
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=205954&action=review
>> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:1022 >> + RefPtr<NodeList> plugIns = frame->document()->getElementsByTagName(WebCore::HTMLNames::embedTag.localName()); > > What about <object>?
Duh! right below :)
Andy Estes
Comment 4
2013-07-02 16:15:28 PDT
Comment on
attachment 205954
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=205954&action=review
> Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp:106 > + return ASCIILiteral("PluginInformationPageContainsNonPlayingInstanceOfPlugIn");
Plugin or PlugIn?
> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:1024 > + RefPtr<NodeList> plugIns = frame->document()->getElementsByTagName(WebCore::HTMLNames::embedTag.localName()); > + if (plugIns) > + addPlugInMimeTypesFromNodeListForNonPlayingPlugIns(plugIns, nonPlayingPlugInMimeTypes);
Why keep a RefPtr here instead of just passing the PassRefPtr you got from getElementsByTagName() into addPlugInMimeTypesFromNodeListForNonPlayingPlugIns()? You seem to be adding some refcount churn that isn't necessary.
> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:1028 > + plugIns = frame->document()->getElementsByTagName(WebCore::HTMLNames::objectTag.localName()); > + if (plugIns) > + addPlugInMimeTypesFromNodeListForNonPlayingPlugIns(plugIns, nonPlayingPlugInMimeTypes);
Ditto. Also, should you be looking for <applet> elements?
Anders Carlsson
Comment 5
2013-07-02 16:20:36 PDT
Comment on
attachment 205954
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=205954&action=review
>> Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp:106 >> + return ASCIILiteral("PluginInformationPageContainsNonPlayingInstanceOfPlugIn"); > > Plugin or PlugIn?
PlugIn!
> Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm:503 > + for (const String& plugInMimeType : nonPlayingPlugInInstanceMimeTypes) {
No space before the colon.
>> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:1028 >> + addPlugInMimeTypesFromNodeListForNonPlayingPlugIns(plugIns, nonPlayingPlugInMimeTypes); > > Ditto. > > Also, should you be looking for <applet> elements?
Yes, should look for <applet>s.
Jessie Berlin
Comment 6
2013-07-02 16:33:33 PDT
(In reply to
comment #5
)
> (From update of
attachment 205954
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=205954&action=review
> > >> Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp:106 > >> + return ASCIILiteral("PluginInformationPageContainsNonPlayingInstanceOfPlugIn"); > > > > Plugin or PlugIn? > > PlugIn!
Fixed!
> > > Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm:503 > > + for (const String& plugInMimeType : nonPlayingPlugInInstanceMimeTypes) { > > No space before the colon.
Fixed.
> > >> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:1028 > >> + addPlugInMimeTypesFromNodeListForNonPlayingPlugIns(plugIns, nonPlayingPlugInMimeTypes); > > > > Ditto.
I was mimicking HTMLPlugInImageElement::restartSimilarPlugIns a little too closely. Fixed, and added an early return in addPlugInMimeTypesFromNodeListForNonPlayingPlugIns if !plugIns.
> > > > Also, should you be looking for <applet> elements? > > Yes, should look for <applet>s.
No, we do not snapshot Java. Added an assertion in addPlugInMimeTypesFromNodeListForNonPlayingPlugIns: ASSERT(!plugInElement->hasTagName(WebCore::HTMLNames::appletTag));
Jessie Berlin
Comment 7
2013-07-02 17:07:22 PDT
Comment on
attachment 205954
[details]
Patch Committed in
http://trac.webkit.org/changeset/152328
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug