WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
66746
Expose setFullscreen method on WebPluginContainer
https://bugs.webkit.org/show_bug.cgi?id=66746
Summary
Expose setFullscreen method on WebPluginContainer
Jeremy Apthorp
Reported
2011-08-22 23:12:11 PDT
Expose setFullscreen method on WebPluginContainer
Attachments
Patch
(3.09 KB, patch)
2011-08-22 23:14 PDT
,
Jeremy Apthorp
no flags
Details
Formatted Diff
Diff
Patch
(3.13 KB, patch)
2011-08-22 23:41 PDT
,
Jeremy Apthorp
no flags
Details
Formatted Diff
Diff
Patch
(3.91 KB, patch)
2011-08-23 18:19 PDT
,
Jeremy Apthorp
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Jeremy Apthorp
Comment 1
2011-08-22 23:14:05 PDT
Created
attachment 104791
[details]
Patch
WebKit Review Bot
Comment 2
2011-08-22 23:18:48 PDT
Comment on
attachment 104791
[details]
Patch
Attachment 104791
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/9482076
Jeremy Apthorp
Comment 3
2011-08-22 23:41:51 PDT
Created
attachment 104792
[details]
Patch
Eric Seidel (no email)
Comment 4
2011-08-23 11:57:57 PDT
API changes sound like a fishd review.
Eric Seidel (no email)
Comment 5
2011-08-23 12:06:19 PDT
Comment on
attachment 104792
[details]
Patch I thought the new fullscreen goodness allowed you to make any element fullscreen?
Jeremy Apthorp
Comment 6
2011-08-23 15:25:17 PDT
(In reply to
comment #5
)
> (From update of
attachment 104792
[details]
) > I thought the new fullscreen goodness allowed you to make any element fullscreen?
They do. The reason I put the code in WebPluginContainer instead of WebElement is that WebPluginContainer has a direct reference to a WebCore::HTMLPlugInElement, and it seemed silly to wrap it in WebElement only to unwrap it and call a method on it immediately afterwards. I think if I moved the function to WebElement, I would mirror the WebKit API, and have: webelement->requestFullScreen(flags); and webelement->document()->cancelFullScreen(); which would necessitate adding 3 methods: - void WebElement::requestFullScreen(flags) - WebDocument WebElement::document() - void WebDocument::cancelFullScreen() If that seems cleaner/better to someone with a clearer understanding of the WebFoo wrapper APIs than me, I'm happy to reimplement it that way :)
Darin Fisher (:fishd, Google)
Comment 7
2011-08-23 16:24:38 PDT
Comment on
attachment 104792
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=104792&action=review
> Source/WebKit/chromium/public/WebPluginContainer.h:93 > + virtual void setFullscreen(bool) = 0;
Since this is implemented as webkitRequestFullScreen, it could fail. In other words, this method should probably have a name indicative of the fact that this could fail. Another idea here, is that we could just expose a requestFullScreen function on WebElement. WebPluginContainer provides a way to get the WebElement containing the plugin. We could also add a cancelFullScreen method on WebElement. This might be the better way to expose this functionality to the embedder of WebKit.
Darin Fisher (:fishd, Google)
Comment 8
2011-08-23 16:27:00 PDT
(In reply to
comment #6
)
> (In reply to
comment #5
) > > (From update of
attachment 104792
[details]
[details]) > > I thought the new fullscreen goodness allowed you to make any element fullscreen? > > They do. The reason I put the code in WebPluginContainer instead of WebElement is that WebPluginContainer has a direct reference to a WebCore::HTMLPlugInElement, and it seemed silly to wrap it in WebElement only to unwrap it and call a method on it immediately afterwards. > > I think if I moved the function to WebElement, I would mirror the WebKit API, and have: > > webelement->requestFullScreen(flags); > > and > > webelement->document()->cancelFullScreen(); > > which would necessitate adding 3 methods: > - void WebElement::requestFullScreen(flags) > - WebDocument WebElement::document() > - void WebDocument::cancelFullScreen() > > > If that seems cleaner/better to someone with a clearer understanding of the WebFoo wrapper APIs than me, I'm happy to reimplement it that way :)
Heh, sorry... I only looked at the patch before commenting. I think it is better to add the more generic APIs. We've found that to be the better way in the past. I have to note though that if this is for Pepper, we may have a bit of an issue to worry about. Assuming we want to require a user gesture before accepting a request to make an element fullscreen, we might have trouble here. You see with pepper, events are dispatched asynchronously. This means that when the plugin sees the event, webkit has already cleared its user gesture flag.
Jeremy Apthorp
Comment 9
2011-08-23 18:19:10 PDT
Created
attachment 104953
[details]
Patch
Jeremy Apthorp
Comment 10
2011-08-23 18:20:51 PDT
(In reply to
comment #7
)
> (From update of
attachment 104792
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=104792&action=review
> > > Source/WebKit/chromium/public/WebPluginContainer.h:93 > > + virtual void setFullscreen(bool) = 0; > > Since this is implemented as webkitRequestFullScreen, it could fail. In other > words, this method should probably have a name indicative of the fact that this > could fail. > > Another idea here, is that we could just expose a requestFullScreen function on > WebElement. WebPluginContainer provides a way to get the WebElement containing > the plugin. We could also add a cancelFullScreen method on WebElement. This > might be the better way to expose this functionality to the embedder of WebKit.
I've rearranged this to reflect the arrangement of the underlying WebKit implementation.
WebKit Review Bot
Comment 11
2011-08-24 11:09:21 PDT
Comment on
attachment 104953
[details]
Patch Clearing flags on attachment: 104953 Committed
r93714
: <
http://trac.webkit.org/changeset/93714
>
WebKit Review Bot
Comment 12
2011-08-24 11:09:26 PDT
All reviewed patches have been landed. Closing bug.
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