Title: [93714] trunk/Source/WebKit/chromium
Revision
93714
Author
commit-qu...@webkit.org
Date
2011-08-24 11:09:08 -0700 (Wed, 24 Aug 2011)

Log Message

Expose fullscreen API on WebElement/WebDocument
https://bugs.webkit.org/show_bug.cgi?id=66746

Patch by Jeremy Apthorp <jere...@google.com> on 2011-08-24
Reviewed by Darin Fisher.

* public/WebPluginContainer.h:
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::setFullscreen):
* src/WebPluginContainerImpl.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (93713 => 93714)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-08-24 18:07:43 UTC (rev 93713)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-08-24 18:09:08 UTC (rev 93714)
@@ -1,3 +1,15 @@
+2011-08-24  Jeremy Apthorp  <jere...@google.com>
+
+        Expose fullscreen API on WebElement/WebDocument
+        https://bugs.webkit.org/show_bug.cgi?id=66746
+
+        Reviewed by Darin Fisher.
+
+        * public/WebPluginContainer.h:
+        * src/WebPluginContainerImpl.cpp:
+        (WebKit::WebPluginContainerImpl::setFullscreen):
+        * src/WebPluginContainerImpl.h:
+
 2011-08-24  Brian Salomon  <bsalo...@google.com>
 
         [SKIA] Allow WebKitGraphicsContext3D implementation to provide a compatible GrGLInterface

Modified: trunk/Source/WebKit/chromium/public/WebDocument.h (93713 => 93714)


--- trunk/Source/WebKit/chromium/public/WebDocument.h	2011-08-24 18:07:43 UTC (rev 93713)
+++ trunk/Source/WebKit/chromium/public/WebDocument.h	2011-08-24 18:09:08 UTC (rev 93714)
@@ -99,6 +99,7 @@
     WEBKIT_EXPORT WebNode focusedNode() const;
     WEBKIT_EXPORT WebDocumentType doctype() const;
     WEBKIT_EXPORT WebAccessibilityObject accessibilityObject() const;
+    WEBKIT_EXPORT void cancelFullScreen();
 
     // Inserts the given CSS source code as a user stylesheet in the document.
     // Meant for programatic/one-off injection, as opposed to

Modified: trunk/Source/WebKit/chromium/public/WebElement.h (93713 => 93714)


--- trunk/Source/WebKit/chromium/public/WebElement.h	2011-08-24 18:07:43 UTC (rev 93713)
+++ trunk/Source/WebKit/chromium/public/WebElement.h	2011-08-24 18:09:08 UTC (rev 93714)
@@ -58,6 +58,8 @@
         WEBKIT_EXPORT bool setAttribute(const WebString& name, const WebString& value);
         WEBKIT_EXPORT WebNamedNodeMap attributes() const;
         WEBKIT_EXPORT WebString innerText();
+        WEBKIT_EXPORT WebDocument document() const;
+        WEBKIT_EXPORT void requestFullScreen();
 
         // Returns the language code specified for this element.  This attribute
         // is inherited, so the returned value is drawn from the closest parent

Modified: trunk/Source/WebKit/chromium/src/WebDocument.cpp (93713 => 93714)


--- trunk/Source/WebKit/chromium/src/WebDocument.cpp	2011-08-24 18:07:43 UTC (rev 93713)
+++ trunk/Source/WebKit/chromium/src/WebDocument.cpp	2011-08-24 18:09:08 UTC (rev 93714)
@@ -189,6 +189,13 @@
     document->addUserSheet(parsedSheet.release());
 }
 
+void WebDocument::cancelFullScreen()
+{
+#if ENABLE(FULLSCREEN_API)
+    unwrap<Document>()->webkitCancelFullScreen();
+#endif
+}
+
 WebDocument::WebDocument(const PassRefPtr<Document>& elem)
     : WebNode(elem)
 {

Modified: trunk/Source/WebKit/chromium/src/WebElement.cpp (93713 => 93714)


--- trunk/Source/WebKit/chromium/src/WebElement.cpp	2011-08-24 18:07:43 UTC (rev 93713)
+++ trunk/Source/WebKit/chromium/src/WebElement.cpp	2011-08-24 18:09:08 UTC (rev 93714)
@@ -30,6 +30,7 @@
 
 #include "config.h"
 #include "WebElement.h"
+#include "WebDocument.h"
 
 #include "Element.h"
 #include "RenderBoxModelObject.h"
@@ -95,6 +96,18 @@
     return WebString(constUnwrap<Element>()->computeInheritedLanguage());
 }
 
+void WebElement::requestFullScreen()
+{
+#if ENABLE(FULLSCREEN_API)
+    unwrap<Element>()->webkitRequestFullScreen(Element::ALLOW_KEYBOARD_INPUT);
+#endif
+}
+
+WebDocument WebElement::document() const
+{
+    return WebDocument(constUnwrap<Element>()->document());
+}
+
 WebElement::WebElement(const PassRefPtr<Element>& elem)
     : WebNode(elem)
 {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to