| Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
|
| ===================================================================
|
| --- webkit/plugins/ppapi/ppapi_plugin_instance.cc (revision 105467)
|
| +++ webkit/plugins/ppapi/ppapi_plugin_instance.cc (working copy)
|
| @@ -115,6 +115,7 @@
|
| using WebKit::WebCursorInfo;
|
| using WebKit::WebDocument;
|
| using WebKit::WebFrame;
|
| +using WebKit::WebElement;
|
| using WebKit::WebInputEvent;
|
| using WebKit::WebPluginContainer;
|
| using WebKit::WebString;
|
| @@ -237,7 +238,7 @@
|
| if (!instance)
|
| return false;
|
|
|
| - WebKit::WebElement plugin_element = instance->container()->element();
|
| + WebElement plugin_element = instance->container()->element();
|
| *security_origin = plugin_element.document().securityOrigin();
|
| return true;
|
| }
|
| @@ -736,10 +737,30 @@
|
| if (sent_did_change_view_ && position == position_ && new_clip == clip_)
|
| return;
|
|
|
| + if (desired_fullscreen_state_ || fullscreen_) {
|
| + WebElement element = container_->element();
|
| + WebDocument document = element.document();
|
| + // TODO(polina): temporary hack to ease WebKit/Chromium commit sequence.
|
| +#ifdef WEBKIT_WEBDOCUMENT_HAS_FULLSCREENELEMENT
|
| + bool is_fullscreen_element = (element == document.fullScreenElement());
|
| +#else
|
| + bool is_fullscreen_element = desired_fullscreen_state_;
|
| +#endif
|
| + if (!fullscreen_ && desired_fullscreen_state_ &&
|
| + delegate()->IsInFullscreenMode() && is_fullscreen_element) {
|
| + // Entered fullscreen. Only possible via SetFullscreen.
|
| + fullscreen_ = true;
|
| + } else if (fullscreen_ && !is_fullscreen_element) {
|
| + // Exited fullscreen. Possible via SetFullscreen or F11,
|
| + // so desired_fullscreen_state might be out-of-date.
|
| + desired_fullscreen_state_ = false;
|
| + fullscreen_ = false;
|
| + }
|
| + }
|
| +
|
| sent_did_change_view_ = true;
|
| position_ = position;
|
| clip_ = new_clip;
|
| - fullscreen_ = desired_fullscreen_state_;
|
| flash_fullscreen_ = (fullscreen_container_ != NULL);
|
|
|
| PP_Rect pp_position, pp_clip;
|
| @@ -1901,7 +1922,7 @@
|
| if (!relative_string)
|
| return PP_MakeNull();
|
|
|
| - WebKit::WebElement plugin_element = container()->element();
|
| + WebElement plugin_element = container()->element();
|
| GURL document_url = plugin_element.document().baseURL();
|
| return ::ppapi::URLUtilImpl::GenerateURLReturn(
|
| module()->pp_module(),
|
|
|