Title: [97447] trunk/Source/WebKit/chromium
Revision
97447
Author
[email protected]
Date
2011-10-14 01:04:53 -0700 (Fri, 14 Oct 2011)

Log Message

Make it possible for plugins to get current fullscreen element.
WebCore::Document already has webkitCurrentFullScreenElement().
Add a wrapper for it in WebKit::WebDocument.
https://bugs.webkit.org/show_bug.cgi?id=70076

Patch by Polina Sokolova <[email protected]> on 2011-10-14
Reviewed by Darin Fisher.

* public/WebDocument.h:
* src/WebDocument.cpp:
(WebKit::WebDocument::securityOrigin):
(WebKit::WebDocument::isHTMLDocument):
(WebKit::WebDocument::isPluginDocument):
(WebKit::WebDocument::fullScreenElement):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (97446 => 97447)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-10-14 07:07:46 UTC (rev 97446)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-10-14 08:04:53 UTC (rev 97447)
@@ -1,3 +1,19 @@
+2011-10-14  Polina Sokolova  <[email protected]>
+
+        Make it possible for plugins to get current fullscreen element.
+        WebCore::Document already has webkitCurrentFullScreenElement().
+        Add a wrapper for it in WebKit::WebDocument.
+        https://bugs.webkit.org/show_bug.cgi?id=70076
+
+        Reviewed by Darin Fisher.
+
+        * public/WebDocument.h:
+        * src/WebDocument.cpp:
+        (WebKit::WebDocument::securityOrigin):
+        (WebKit::WebDocument::isHTMLDocument):
+        (WebKit::WebDocument::isPluginDocument):
+        (WebKit::WebDocument::fullScreenElement):
+
 2011-10-13  Antoine Labour  <[email protected]>
 
         Expose layer debug borders to WebLayer

Modified: trunk/Source/WebKit/chromium/public/WebDocument.h (97446 => 97447)


--- trunk/Source/WebKit/chromium/public/WebDocument.h	2011-10-14 07:07:46 UTC (rev 97446)
+++ trunk/Source/WebKit/chromium/public/WebDocument.h	2011-10-14 08:04:53 UTC (rev 97447)
@@ -54,6 +54,9 @@
 class WebString;
 class WebURL;
 
+// Temporary hack to ease Chromium/WebKit commit.
+#define WEBKIT_WEBDOCUMENT_HAS_FULLSCREENELEMENT 1
+
 // Provides readonly access to some properties of a DOM document.
 class WebDocument : public WebNode {
 public:
@@ -99,6 +102,7 @@
     WEBKIT_EXPORT WebNode focusedNode() const;
     WEBKIT_EXPORT WebDocumentType doctype() const;
     WEBKIT_EXPORT void cancelFullScreen();
+    WEBKIT_EXPORT WebElement fullScreenElement() const;
 
     // Accessibility support. These methods should only be called on the
     // top-level document, because one accessibility cache spans all of

Modified: trunk/Source/WebKit/chromium/src/WebDocument.cpp (97446 => 97447)


--- trunk/Source/WebKit/chromium/src/WebDocument.cpp	2011-10-14 07:07:46 UTC (rev 97446)
+++ trunk/Source/WebKit/chromium/src/WebDocument.cpp	2011-10-14 08:04:53 UTC (rev 97447)
@@ -65,7 +65,7 @@
     return constUnwrap<Document>()->url();
 }
 
-WebSecurityOrigin WebDocument::securityOrigin() const 
+WebSecurityOrigin WebDocument::securityOrigin() const
 {
     if (!constUnwrap<Document>())
         return WebSecurityOrigin();
@@ -88,7 +88,7 @@
 }
 
 bool WebDocument::isHTMLDocument() const
-{  
+{
     return constUnwrap<Document>()->isHTMLDocument();
 }
 
@@ -98,7 +98,7 @@
 }
 
 bool WebDocument::isPluginDocument() const
-{  
+{
     return constUnwrap<Document>()->isPluginDocument();
 }
 
@@ -189,6 +189,15 @@
 #endif
 }
 
+WebElement WebDocument::fullScreenElement() const
+{
+    Element* fullScreenElement = 0;
+#if ENABLE(FULLSCREEN_API)
+    fullScreenElement = constUnwrap<Document>()->webkitCurrentFullScreenElement();
+#endif
+    return WebElement(fullScreenElement);
+}
+
 WebAccessibilityObject WebDocument::accessibilityObject() const
 {
     const Document* document = constUnwrap<Document>();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to