[Webkit-unassigned] [Bug 102339] Provide page/window coordinates to plugin's local coordinates translation in WebPluginContainer.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 15 16:19:00 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=102339





--- Comment #13 from lazyboy at chromium.org  2012-11-15 16:20:49 PST ---
(From update of attachment 174527)
View in context: https://bugs.webkit.org/attachment.cgi?id=174527&action=review

>> Source/WebKit/chromium/public/WebElement.h:86
>> +        WEBKIT_EXPORT WebPluginContainerImpl* pluginContainerFromElement() const;
> 
> API functions should return the API type.  That means this should return a WebPluginContainer* not a WebPluginContainerImpl*.

Yes, I was hesitant to use Impl here, changed to WebPluginContainer. This also means even if we're returning WebPluginContainer* from the function, the actual function contents need to get it as WebPluginContainerImpl* and then return it (WebPluginContainerImpl is Widget, but WebPluginContainer is not).
Also all usages in WebFrameImpl requires casting the return value to WebPluginContainerImpl*, which I think is OK?
Done.

>> Source/WebKit/chromium/src/WebFrameImpl.cpp:1217
>> +            pluginContainer = node.toConst<WebElement>().pluginContainerFromElement();
> 
> How do you know that this cast is safe?  Maybe pluginContainerFromElement would be better on WebNode after all...  Also, you'll probably want to call it just "pluginContainer".  It's obviously from a node (or an element) if its a member function.

Move to WebNode.

>> Source/WebKit/chromium/tests/FakeWebPlugin.cpp:64
>> +}
> 
> Why are you creating a static for this?  I would just create a temporary WebString in the one place where you need it.

Done.
I thought using static would be nicer so we don't create WebString each time we hit createPlugin(), well this is test.

>> Source/WebKit/chromium/tests/WebPluginContainerTest.cpp:80
>> +WebPluginContainerImpl* getWebPluginContainer(WebView* webView, const WebString& id)
> 
> WebPluginContainerImpl -> WebPluginContainer.  You seem to only need the API type.  You should use the API type.

Done.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list