RESOLVED FIXED 36434
[chromium]WebKit side of adding search support to Pepper.
https://bugs.webkit.org/show_bug.cgi?id=36434
Summary [chromium]WebKit side of adding search support to Pepper.
John Abd-El-Malek
Reported 2010-03-21 22:33:42 PDT
[chromium]WebKit side of adding search support to Pepper.
Attachments
Patch (24.90 KB, patch)
2010-03-21 22:49 PDT, John Abd-El-Malek
no flags
Patch (4.54 KB, patch)
2010-03-22 19:01 PDT, John Abd-El-Malek
no flags
Patch (10.19 KB, patch)
2010-03-24 13:27 PDT, John Abd-El-Malek
no flags
Patch (10.24 KB, patch)
2010-03-24 13:31 PDT, John Abd-El-Malek
fishd: review+
fishd: commit-queue-
John Abd-El-Malek
Comment 1 2010-03-21 22:49:13 PDT
Darin Fisher (:fishd, Google)
Comment 2 2010-03-21 23:53:23 PDT
Note to fellow reviewers. This review is blocked pending agreement on the API, which is being discussed here: http://codereview.chromium.org/1075011
John Abd-El-Malek
Comment 3 2010-03-22 19:01:31 PDT
John Abd-El-Malek
Comment 4 2010-03-22 19:02:27 PDT
Darin: I've updated the patch per our discussion.
Darin Fisher (:fishd, Google)
Comment 5 2010-03-23 15:05:58 PDT
Comment on attachment 51384 [details] Patch > Index: WebKit/chromium/public/WebDocument.h ... > // Returns the frame the document belongs to or 0 if the document is frameless. > WEBKIT_API WebFrame* frame() const; > WEBKIT_API bool isHTMLDocument() const; > + WEBKIT_API bool isPluginDocument(WebPluginContainer**); I think it is a little awkward for this function to have the side effect of returning the contained plugin. We could instead follow the inheritance approach. Define WebPluginDocument: class WebPluginDocument : public WebDocument { public: /* boiler plate */ WEBKIT_API WebPlugin* plugin(); }; Then, WebDocument would just have the simple method: WEBKIT_API bool isPluginDocument() const; Folks would then use WebPluginDocument like so. WebDocument doc = ...; if (doc.isPluginDocument()) { WebPlugin* plugin = doc.to<WebPluginDocument>.plugin(); ... } Unfortunately, WebNode (which WebDocument extends) doesn't have a to<T> method. It just has a toElement<T> method, which should really just be renamed to<T> so that it can be used with derived types that are not elements. For now, we could just add a copy of toElement<T> named to<T>, and mark toElement<T> as deprecated. You can leave it to me to clean up the deprecated usage. -Darin
John Abd-El-Malek
Comment 6 2010-03-24 13:27:12 PDT
John Abd-El-Malek
Comment 7 2010-03-24 13:31:56 PDT
John Abd-El-Malek
Comment 8 2010-03-24 13:32:19 PDT
Darin: when you have a chance, here's the updated patch with your suggested changes.
Darin Fisher (:fishd, Google)
Comment 9 2010-03-24 13:58:15 PDT
Comment on attachment 51538 [details] Patch > Index: WebKit/chromium/public/WebNode.h > + // DEPRECATED! use toConstElement() instead nit: "use toConst() instead" > Index: WebKit/chromium/public/WebPluginDocument.h > + WebPluginDocument(const WebPluginDocument& e) : WebDocument(e) { } > + > + WebPluginDocument& operator=(const WebPluginDocument& e) > + { > + WebNode::assign(e); > + return *this; > + } > + void assign(const WebPluginDocument& e) { WebNode::assign(e); } nit: "e" stood for WebElement probably in the case you copied this from. how about using "d" for document instead? R=me
John Abd-El-Malek
Comment 10 2010-03-24 14:10:42 PDT
Note You need to log in before you can comment on or make changes to this bug.