Commit fcc2989a authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

2011-02-26 David Dorwin <ddorwin@chromium.org>

        Reviewed by Darin Fisher.

        Enable WebKit Full Screen API in Chromium. The element becomes the full size of the window, but the window is not yet full screen. Support is disabled by default.

        fullscreen javascript bindings not implemented for v8
        https://bugs.webkit.org/show_bug.cgi?id=44797

        Tested by the existing fullscreen Layout Tests.

        * WebCore.gyp/WebCore.gyp:
        * WebCore.gypi:
2011-02-26  David Dorwin  <ddorwin@chromium.org>

        Reviewed by Darin Fisher.

        Enable WebKit Full Screen API in Chromium. The element becomes the full size of the window, but the window is not yet full screen. Support is disabled by default.

        fullscreen javascript bindings not implemented for v8
        https://bugs.webkit.org/show_bug.cgi?id=44797

        * features.gypi:
        * public/WebSettings.h:
        * src/ChromeClientImpl.cpp:
        (WebKit::ChromeClientImpl::supportsFullScreenForElement):
        (WebKit::ChromeClientImpl::enterFullScreenForElement):
        (WebKit::ChromeClientImpl::exitFullScreenForElement):
        (WebKit::ChromeClientImpl::fullScreenRendererChanged):
        * src/ChromeClientImpl.h:
        * src/WebSettingsImpl.cpp:
        (WebKit::WebSettingsImpl::setFullScreenEnabled):
        * src/WebSettingsImpl.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79774 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5254a610
2011-02-26 David Dorwin <ddorwin@chromium.org>
Reviewed by Darin Fisher.
Enable WebKit Full Screen API in Chromium. The element becomes the full size of the window, but the window is not yet full screen. Support is disabled by default.
fullscreen javascript bindings not implemented for v8
https://bugs.webkit.org/show_bug.cgi?id=44797
Tested by the existing fullscreen Layout Tests.
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
2011-02-26 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Adam Barth.
......
......@@ -533,19 +533,22 @@
},
{
'action_name': 'UserAgentStyleSheets',
# The .css files are in the same order as ../DerivedSources.make.
'inputs': [
'../css/make-css-file-arrays.pl',
'../css/html.css',
'../css/quirks.css',
'../css/view-source.css',
'../css/themeChromiumLinux.css',
'../css/themeChromiumSkia.css',
'../css/themeChromiumLinux.css', # Chromium only.
'../css/themeChromiumSkia.css', # Chromium only.
'../css/themeWin.css',
'../css/themeWinQuirks.css',
'../css/svg.css',
# Skip WML.
'../css/mathml.css',
'../css/mediaControls.css',
'../css/mediaControlsChromium.css',
'../css/fullscreen.css',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheets.h',
......
......@@ -3898,6 +3898,8 @@
'rendering/RenderFrameBase.h',
'rendering/RenderFrameSet.cpp',
'rendering/RenderFrameSet.h',
'rendering/RenderFullScreen.cpp',
'rendering/RenderFullScreen.h',
'rendering/RenderHTMLCanvas.cpp',
'rendering/RenderHTMLCanvas.h',
'rendering/RenderIFrame.cpp',
......
2011-02-26 David Dorwin <ddorwin@chromium.org>
Reviewed by Darin Fisher.
Enable WebKit Full Screen API in Chromium. The element becomes the full size of the window, but the window is not yet full screen. Support is disabled by default.
fullscreen javascript bindings not implemented for v8
https://bugs.webkit.org/show_bug.cgi?id=44797
* features.gypi:
* public/WebSettings.h:
* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::supportsFullScreenForElement):
(WebKit::ChromeClientImpl::enterFullScreenForElement):
(WebKit::ChromeClientImpl::exitFullScreenForElement):
(WebKit::ChromeClientImpl::fullScreenRendererChanged):
* src/ChromeClientImpl.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setFullScreenEnabled):
* src/WebSettingsImpl.h:
2011-02-26 John Mellor <johnme@chromium.org>
Reviewed by Antonio Gomes.
......
......@@ -56,6 +56,7 @@
'ENABLE_JAVASCRIPT_I18N_API=1',
'ENABLE_FILE_SYSTEM=1',
'ENABLE_FILTERS=1',
'ENABLE_FULLSCREEN_API=1',
'ENABLE_GEOLOCATION=1',
'ENABLE_ICONDATABASE=0',
'ENABLE_INDEXED_DATABASE=1',
......
......@@ -111,6 +111,7 @@ public:
virtual void setCaretBrowsingEnabled(bool) = 0;
virtual void setInteractiveFormValidationEnabled(bool) = 0;
virtual void setMinimumTimerInterval(double) = 0;
virtual void setFullScreenEnabled(bool) = 0;
protected:
~WebSettings() { }
......
......@@ -79,6 +79,7 @@
#include "WebPopupMenuInfo.h"
#include "WebPopupType.h"
#include "WebRect.h"
#include "WebSettings.h"
#include "WebTextDirection.h"
#include "WebURLRequest.h"
#include "WebViewClient.h"
......@@ -860,6 +861,32 @@ void ChromeClientImpl::exitFullscreenForNode(WebCore::Node* node)
m_webView->client()->exitFullscreenForNode(WebNode(node));
}
#if ENABLE(FULLSCREEN_API)
bool ChromeClientImpl::supportsFullScreenForElement(const WebCore::Element* element)
{
return m_webView->page()->settings()->fullScreenEnabled();
}
void ChromeClientImpl::enterFullScreenForElement(WebCore::Element* element)
{
// FIXME: We may need to call these someplace else when window resizes.
element->document()->webkitWillEnterFullScreenForElement(element);
element->document()->webkitDidEnterFullScreenForElement(element);
}
void ChromeClientImpl::exitFullScreenForElement(WebCore::Element* element)
{
// FIXME: We may need to call these someplace else when window resizes.
element->document()->webkitWillExitFullScreenForElement(element);
element->document()->webkitDidExitFullScreenForElement(element);
}
void ChromeClientImpl::fullScreenRendererChanged(RenderBox*)
{
notImplemented();
}
#endif
bool ChromeClientImpl::selectItemWritingDirectionIsNatural()
{
return false;
......
......@@ -38,9 +38,11 @@
namespace WebCore {
class AccessibilityObject;
class Element;
class FileChooser;
class PopupContainer;
class PopupMenuClient;
class RenderBox;
class SecurityOrigin;
struct WindowFeatures;
}
......@@ -163,6 +165,13 @@ public:
virtual void enterFullscreenForNode(WebCore::Node*);
virtual void exitFullscreenForNode(WebCore::Node*);
#if ENABLE(FULLSCREEN_API)
virtual bool supportsFullScreenForElement(const WebCore::Element*);
virtual void enterFullScreenForElement(WebCore::Element*);
virtual void exitFullScreenForElement(WebCore::Element*);
virtual void fullScreenRendererChanged(WebCore::RenderBox*);
#endif
// ChromeClientChromium methods:
virtual void popupOpened(WebCore::PopupContainer* popupContainer,
const WebCore::IntRect& bounds,
......
......@@ -35,6 +35,7 @@
#include "Settings.h"
#include "WebString.h"
#include "WebURL.h"
#include <wtf/UnusedParam.h>
#if defined(OS_WIN)
#include "RenderThemeChromiumWin.h"
......@@ -360,4 +361,13 @@ void WebSettingsImpl::setMinimumTimerInterval(double interval)
m_settings->setMinDOMTimerInterval(interval);
}
void WebSettingsImpl::setFullScreenEnabled(bool enabled)
{
#if ENABLE(FULLSCREEN_API)
m_settings->setFullScreenEnabled(enabled);
#else
UNUSED_PARAM(enabled);
#endif
}
} // namespace WebKit
......@@ -104,6 +104,7 @@ public:
virtual void setCaretBrowsingEnabled(bool);
virtual void setInteractiveFormValidationEnabled(bool);
virtual void setMinimumTimerInterval(double);
virtual void setFullScreenEnabled(bool);
private:
WebCore::Settings* m_settings;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment