haikuwebkit/LayoutTests/fullscreen/full-screen-remove-expected...

7 lines
221 B
Plaintext
Raw Permalink Normal View History

2010-07-27 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 https://bugs.webkit.org/show_bug.cgi?id=43099 * wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS). 2010-07-27 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 Added chrome client overrides which support entering and exiting full screen. A new preference has been added (setFullScreenEnabled:) to control at runtime whether full screen support is enabled (defaults to disabled). Added a new WebKitFullScreenListener callback object which notifies WebCore when the chrome has started/finished its full screen animation. * Configurations/FeatureDefines.xcconfig: * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::supportsFullscreenForElement): (WebChromeClient::enterFullscreenForElement): (WebChromeClient::exitFullscreenForElement): (-[WebKitFullScreenListener initWithElement:]): (-[WebKitFullScreenListener webkitWillEnterFullScreen]): (-[WebKitFullScreenListener webkitDidEnterFullScreen]): (-[WebKitFullScreenListener webkitWillExitFullScreen]): (-[WebKitFullScreenListener webkitDidExitFullScreen]): * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences setFullScreenEnabled:]): (-[WebPreferences fullScreenEnabled]): * WebView/WebUIDelegatePrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChangedNotification:]): 2010-07-27 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 https://bugs.webkit.org/show_bug.cgi?id=43099 Mozilla has proposed a new set of JavaScript APIs which allow any element in a document to go full-screen. The current revision of their proposal can be found here: <https://wiki.mozilla.org/index.php?title=Gecko:FullScreenAPI&oldid=243429> The proposed specification includes the following: Document: - Three new methods on Document: + void requestFullScreen() + void requestFullScreenWithKeys() + void cancelFullScreen() - Three new attributes of Document: + readonly attribute boolean fullScreen + readonly attribute boolean fullScreenWithKeys + (optional) readonly attribute Element currentFullScreenElement Element: - Two new methods on Element: + void requestFullScreen() + void requestFullScreenWithKeys() Events: - One new event: + fullScreenChange CSS Pseudo-classes: - Three new Pseudo-classes: + :full-screen + :full-screen-doc + :full-screen-root-with-target For WebKit's initial implementation, all the above new APIs will be prefixed with "webkit" or "-webkit" where appropriate. New tests: LayoutTests/fullscreen/full-screen-api.html LayoutTests/fullscreen/full-screen-css.html LayoutTests/fullscreen/full-screen-request.html Project file changes: * Configurations/FeatureDefines.xcconfig: Added an ENABLE_FULLSCREEN_API entry. * DerivedSources.make: Added rules for fullscreen.css and WebCore.FullScreen.exp. * WebCore.FullScreen.exp: Added export symbols for Document and Element functions. * WebCore.xcodeproj/project.pbxproj: New source files added to the project. IDL changes: * dom/Document.idl: Added the new full-screen API to the Document's javascript interface. * dom/Element.idl: Added the new full-screen API to the Element's javascript interface. Source changes: * bindings/objc/PublicDOMInterfaces.h: Exposed Document and Element fullscreen functions in the DOM classes. * css/CSSSelector.cpp: Added new FullScreen pseudo-classes. * css/CSSSelector.h: Added new full-screen pseudo classes to the PseudoType enum. * css/CSSStyleSelector.cpp: (WebCore::loadFullDefaultStyle): Pull the fullscreen.css sheet into the defaultStyle and the defaultQuirksStyle sheets. (WebCore::loadSimpleDefaultStyle): Pull the fullscreen.css sheet into the defaultStyle sheet. (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Check for the new FullScreen pseudo classes. * dom/Document.cpp: (WebCore::Document::createEvent): Support creating a "WebKitFullScreenChange" event. (WebCore::Document::addListenerTypeIfNeeded): Support listening for a "webKitFullScreenChangeEvent" (WebCore::Document::webkitRequestFullScreenForElement): Passes request to the chrome client to enter full screen mode. (WebCore::Document::webkitCancelFullScreen): Passes request to the chrome client to exit full screen mode. (WebCore::Document::webkitWillEnterFullScreenForElement): Sets the FullScreen pseudo-classes on the full-screen element and its document. (WebCore::Document::webkitDidEnterFullScreenForElement): Currently a no-op. (WebCore::Document::webkitWillExitFullScreenForElement): Currently a no-op. (WebCore::Document::webkitDidExitFullScreenForElement): Clears the FullScreen pseudo-classes on the full-screen element and its document. * dom/Document.h: Added const accessors for new full-screen instance variables. (WebCore::Document::): (WebCore::Document::webkitIsFullScreen): Accessor for m_isFullScreen. (WebCore::Document::webkitIsFullScreenWithKeysEnabled): Accessor for m_isFullScren and m_areKeysEnabled. (WebCore::Document::webkitCurrentFullScreenElement): Accessor for m_fullScreenElement. * dom/Element.cpp: (WebCore::Element::webkitRequestFullScreen): Calls Document::webkitRequestFullScreenForElement. * dom/Element.h: * dom/EventNames.h: Add a webkitfullscreenchange event name. * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): Parse the new "onwebkitfullscreenchange" attribute and register a listener. * page/ChromeClient.h: (WebCore::ChromeClient::supportsFullscreenForElement): Pass through to the current UI delegate. (WebCore::ChromeClient::enterFullscreenForElement): Create a WebKitFullScreenListener and pass through to the current UI delegate. (WebCore::ChromeClient::exitFullscreenForElement): Create a WebKitFullScreenListener and pass through to the current UI delegate. * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: Add a new setting to control runtime support for full screen mode (defaults to off) * rendering/MediaControlElements.cpp: (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): The full screen button now toggles full screen mode (previously, it only entered). * rendering/style/RenderStyleConstants.h: Added new style constants. 2010-08-09 Jer Noble <jer.noble@apple.com> Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 https://bugs.webkit.org/show_bug.cgi?id=43099 New tests for the new full screen API: full-screen-api.html: tests for the presence of the new full screen apis. full-screen-request.html: tests that clients can request the browser enter full screen mode successfully. full-screen-css.html: tests that the new full screen pseudo classes are applied once full screen mode is entered. full-screen-remove.html: tests that the document's current full screen element is changed when that element is removed from the DOM tree. full-screen-remove-ancestor.html: tests that the document's current full screen element is changed an ancestor of that element is removed from the DOM tree. full-screen-twice.html: tests that entering full screen mode on two different elements in a row does not fail. Tests that were changed: domListEnumeration.html: This test returns a specific count of properties on HTML elements; after consultation with Sam Weinig (the original test author), it was decided that this part of the test would be very difficult to make platform specific, and that nothing significant would be lost if the property count sections were removed. platform/*/Skipped: Added the fullscreen/ directory to the Skipped list for every platform save mac. * fast/dom/Window/window-properties-expected.txt: Added the new properties exposed on Document and Element. * fast/dom/domListEnumeration-expected.txt: Removed the iteration count part of this test. * fast/dom/script-tests/domListEnumeration.js: "" * fullscreen: Added. * platform/mac/fullscreen: Added. * platform/mac/fullscreen/full-screen-api-expected.txt: Added. * platform/mac/fullscreen/full-screen-api.html: Added. * platform/mac/fullscreen/full-screen-css-expected.txt: Added. * platform/mac/fullscreen/full-screen-css.html: Added. * platform/mac/fullscreen/full-screen-remove-ancestor-expected.txt: Added. * platform/mac/fullscreen/full-screen-remove-ancestor.html: Added. * platform/mac/fullscreen/full-screen-remove-expected.txt: Added. * platform/mac/fullscreen/full-screen-remove.html: Added. * platform/mac/fullscreen/full-screen-request-expected.txt: Added. * platform/mac/fullscreen/full-screen-request.html: Added. * platform/mac/fullscreen/full-screen-twice-expected.txt: Added. * platform/mac/fullscreen/full-screen-twice.html: Added. 2010-07-27 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 Added basic full screen support to DumpRenderTree: when a webView requests that DumpRenderTree go "full screen", just call the provided callback listener object's will/did Enter/Exit full screen methods. Also, register a new user default which enables full screen support. * DumpRenderTree/mac/DumpRenderTree.mm: (resetDefaultsToConsistentValues): * DumpRenderTree/mac/UIDelegate.mm: (-[UIDelegate webView:supportsFullscreenForElement:]): (-[UIDelegate webView:enterFullscreenForElement:listener:]): (-[UIDelegate webView:exitFullscreenForElement:listener:]): Canonical link: https://commits.webkit.org/57023@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@66251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-08-27 20:49:02 +00:00
EVENT(webkitfullscreenchange)
EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLSpanElement]') OK
2010-07-27 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 https://bugs.webkit.org/show_bug.cgi?id=43099 * wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS). 2010-07-27 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 Added chrome client overrides which support entering and exiting full screen. A new preference has been added (setFullScreenEnabled:) to control at runtime whether full screen support is enabled (defaults to disabled). Added a new WebKitFullScreenListener callback object which notifies WebCore when the chrome has started/finished its full screen animation. * Configurations/FeatureDefines.xcconfig: * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::supportsFullscreenForElement): (WebChromeClient::enterFullscreenForElement): (WebChromeClient::exitFullscreenForElement): (-[WebKitFullScreenListener initWithElement:]): (-[WebKitFullScreenListener webkitWillEnterFullScreen]): (-[WebKitFullScreenListener webkitDidEnterFullScreen]): (-[WebKitFullScreenListener webkitWillExitFullScreen]): (-[WebKitFullScreenListener webkitDidExitFullScreen]): * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences setFullScreenEnabled:]): (-[WebPreferences fullScreenEnabled]): * WebView/WebUIDelegatePrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChangedNotification:]): 2010-07-27 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 https://bugs.webkit.org/show_bug.cgi?id=43099 Mozilla has proposed a new set of JavaScript APIs which allow any element in a document to go full-screen. The current revision of their proposal can be found here: <https://wiki.mozilla.org/index.php?title=Gecko:FullScreenAPI&oldid=243429> The proposed specification includes the following: Document: - Three new methods on Document: + void requestFullScreen() + void requestFullScreenWithKeys() + void cancelFullScreen() - Three new attributes of Document: + readonly attribute boolean fullScreen + readonly attribute boolean fullScreenWithKeys + (optional) readonly attribute Element currentFullScreenElement Element: - Two new methods on Element: + void requestFullScreen() + void requestFullScreenWithKeys() Events: - One new event: + fullScreenChange CSS Pseudo-classes: - Three new Pseudo-classes: + :full-screen + :full-screen-doc + :full-screen-root-with-target For WebKit's initial implementation, all the above new APIs will be prefixed with "webkit" or "-webkit" where appropriate. New tests: LayoutTests/fullscreen/full-screen-api.html LayoutTests/fullscreen/full-screen-css.html LayoutTests/fullscreen/full-screen-request.html Project file changes: * Configurations/FeatureDefines.xcconfig: Added an ENABLE_FULLSCREEN_API entry. * DerivedSources.make: Added rules for fullscreen.css and WebCore.FullScreen.exp. * WebCore.FullScreen.exp: Added export symbols for Document and Element functions. * WebCore.xcodeproj/project.pbxproj: New source files added to the project. IDL changes: * dom/Document.idl: Added the new full-screen API to the Document's javascript interface. * dom/Element.idl: Added the new full-screen API to the Element's javascript interface. Source changes: * bindings/objc/PublicDOMInterfaces.h: Exposed Document and Element fullscreen functions in the DOM classes. * css/CSSSelector.cpp: Added new FullScreen pseudo-classes. * css/CSSSelector.h: Added new full-screen pseudo classes to the PseudoType enum. * css/CSSStyleSelector.cpp: (WebCore::loadFullDefaultStyle): Pull the fullscreen.css sheet into the defaultStyle and the defaultQuirksStyle sheets. (WebCore::loadSimpleDefaultStyle): Pull the fullscreen.css sheet into the defaultStyle sheet. (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Check for the new FullScreen pseudo classes. * dom/Document.cpp: (WebCore::Document::createEvent): Support creating a "WebKitFullScreenChange" event. (WebCore::Document::addListenerTypeIfNeeded): Support listening for a "webKitFullScreenChangeEvent" (WebCore::Document::webkitRequestFullScreenForElement): Passes request to the chrome client to enter full screen mode. (WebCore::Document::webkitCancelFullScreen): Passes request to the chrome client to exit full screen mode. (WebCore::Document::webkitWillEnterFullScreenForElement): Sets the FullScreen pseudo-classes on the full-screen element and its document. (WebCore::Document::webkitDidEnterFullScreenForElement): Currently a no-op. (WebCore::Document::webkitWillExitFullScreenForElement): Currently a no-op. (WebCore::Document::webkitDidExitFullScreenForElement): Clears the FullScreen pseudo-classes on the full-screen element and its document. * dom/Document.h: Added const accessors for new full-screen instance variables. (WebCore::Document::): (WebCore::Document::webkitIsFullScreen): Accessor for m_isFullScreen. (WebCore::Document::webkitIsFullScreenWithKeysEnabled): Accessor for m_isFullScren and m_areKeysEnabled. (WebCore::Document::webkitCurrentFullScreenElement): Accessor for m_fullScreenElement. * dom/Element.cpp: (WebCore::Element::webkitRequestFullScreen): Calls Document::webkitRequestFullScreenForElement. * dom/Element.h: * dom/EventNames.h: Add a webkitfullscreenchange event name. * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): Parse the new "onwebkitfullscreenchange" attribute and register a listener. * page/ChromeClient.h: (WebCore::ChromeClient::supportsFullscreenForElement): Pass through to the current UI delegate. (WebCore::ChromeClient::enterFullscreenForElement): Create a WebKitFullScreenListener and pass through to the current UI delegate. (WebCore::ChromeClient::exitFullscreenForElement): Create a WebKitFullScreenListener and pass through to the current UI delegate. * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: Add a new setting to control runtime support for full screen mode (defaults to off) * rendering/MediaControlElements.cpp: (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): The full screen button now toggles full screen mode (previously, it only entered). * rendering/style/RenderStyleConstants.h: Added new style constants. 2010-08-09 Jer Noble <jer.noble@apple.com> Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 https://bugs.webkit.org/show_bug.cgi?id=43099 New tests for the new full screen API: full-screen-api.html: tests for the presence of the new full screen apis. full-screen-request.html: tests that clients can request the browser enter full screen mode successfully. full-screen-css.html: tests that the new full screen pseudo classes are applied once full screen mode is entered. full-screen-remove.html: tests that the document's current full screen element is changed when that element is removed from the DOM tree. full-screen-remove-ancestor.html: tests that the document's current full screen element is changed an ancestor of that element is removed from the DOM tree. full-screen-twice.html: tests that entering full screen mode on two different elements in a row does not fail. Tests that were changed: domListEnumeration.html: This test returns a specific count of properties on HTML elements; after consultation with Sam Weinig (the original test author), it was decided that this part of the test would be very difficult to make platform specific, and that nothing significant would be lost if the property count sections were removed. platform/*/Skipped: Added the fullscreen/ directory to the Skipped list for every platform save mac. * fast/dom/Window/window-properties-expected.txt: Added the new properties exposed on Document and Element. * fast/dom/domListEnumeration-expected.txt: Removed the iteration count part of this test. * fast/dom/script-tests/domListEnumeration.js: "" * fullscreen: Added. * platform/mac/fullscreen: Added. * platform/mac/fullscreen/full-screen-api-expected.txt: Added. * platform/mac/fullscreen/full-screen-api.html: Added. * platform/mac/fullscreen/full-screen-css-expected.txt: Added. * platform/mac/fullscreen/full-screen-css.html: Added. * platform/mac/fullscreen/full-screen-remove-ancestor-expected.txt: Added. * platform/mac/fullscreen/full-screen-remove-ancestor.html: Added. * platform/mac/fullscreen/full-screen-remove-expected.txt: Added. * platform/mac/fullscreen/full-screen-remove.html: Added. * platform/mac/fullscreen/full-screen-request-expected.txt: Added. * platform/mac/fullscreen/full-screen-request.html: Added. * platform/mac/fullscreen/full-screen-twice-expected.txt: Added. * platform/mac/fullscreen/full-screen-twice.html: Added. 2010-07-27 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 Added basic full screen support to DumpRenderTree: when a webView requests that DumpRenderTree go "full screen", just call the provided callback listener object's will/did Enter/Exit full screen methods. Also, register a new user default which enables full screen support. * DumpRenderTree/mac/DumpRenderTree.mm: (resetDefaultsToConsistentValues): * DumpRenderTree/mac/UIDelegate.mm: (-[UIDelegate webView:supportsFullscreenForElement:]): (-[UIDelegate webView:enterFullscreenForElement:listener:]): (-[UIDelegate webView:exitFullscreenForElement:listener:]): Canonical link: https://commits.webkit.org/57023@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@66251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-08-27 20:49:02 +00:00
EVENT(webkitfullscreenchange)
EXPECTED (document.webkitCurrentFullScreenElement == 'null') OK
2010-07-27 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 https://bugs.webkit.org/show_bug.cgi?id=43099 * wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS). 2010-07-27 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 Added chrome client overrides which support entering and exiting full screen. A new preference has been added (setFullScreenEnabled:) to control at runtime whether full screen support is enabled (defaults to disabled). Added a new WebKitFullScreenListener callback object which notifies WebCore when the chrome has started/finished its full screen animation. * Configurations/FeatureDefines.xcconfig: * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::supportsFullscreenForElement): (WebChromeClient::enterFullscreenForElement): (WebChromeClient::exitFullscreenForElement): (-[WebKitFullScreenListener initWithElement:]): (-[WebKitFullScreenListener webkitWillEnterFullScreen]): (-[WebKitFullScreenListener webkitDidEnterFullScreen]): (-[WebKitFullScreenListener webkitWillExitFullScreen]): (-[WebKitFullScreenListener webkitDidExitFullScreen]): * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences setFullScreenEnabled:]): (-[WebPreferences fullScreenEnabled]): * WebView/WebUIDelegatePrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChangedNotification:]): 2010-07-27 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 https://bugs.webkit.org/show_bug.cgi?id=43099 Mozilla has proposed a new set of JavaScript APIs which allow any element in a document to go full-screen. The current revision of their proposal can be found here: <https://wiki.mozilla.org/index.php?title=Gecko:FullScreenAPI&oldid=243429> The proposed specification includes the following: Document: - Three new methods on Document: + void requestFullScreen() + void requestFullScreenWithKeys() + void cancelFullScreen() - Three new attributes of Document: + readonly attribute boolean fullScreen + readonly attribute boolean fullScreenWithKeys + (optional) readonly attribute Element currentFullScreenElement Element: - Two new methods on Element: + void requestFullScreen() + void requestFullScreenWithKeys() Events: - One new event: + fullScreenChange CSS Pseudo-classes: - Three new Pseudo-classes: + :full-screen + :full-screen-doc + :full-screen-root-with-target For WebKit's initial implementation, all the above new APIs will be prefixed with "webkit" or "-webkit" where appropriate. New tests: LayoutTests/fullscreen/full-screen-api.html LayoutTests/fullscreen/full-screen-css.html LayoutTests/fullscreen/full-screen-request.html Project file changes: * Configurations/FeatureDefines.xcconfig: Added an ENABLE_FULLSCREEN_API entry. * DerivedSources.make: Added rules for fullscreen.css and WebCore.FullScreen.exp. * WebCore.FullScreen.exp: Added export symbols for Document and Element functions. * WebCore.xcodeproj/project.pbxproj: New source files added to the project. IDL changes: * dom/Document.idl: Added the new full-screen API to the Document's javascript interface. * dom/Element.idl: Added the new full-screen API to the Element's javascript interface. Source changes: * bindings/objc/PublicDOMInterfaces.h: Exposed Document and Element fullscreen functions in the DOM classes. * css/CSSSelector.cpp: Added new FullScreen pseudo-classes. * css/CSSSelector.h: Added new full-screen pseudo classes to the PseudoType enum. * css/CSSStyleSelector.cpp: (WebCore::loadFullDefaultStyle): Pull the fullscreen.css sheet into the defaultStyle and the defaultQuirksStyle sheets. (WebCore::loadSimpleDefaultStyle): Pull the fullscreen.css sheet into the defaultStyle sheet. (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Check for the new FullScreen pseudo classes. * dom/Document.cpp: (WebCore::Document::createEvent): Support creating a "WebKitFullScreenChange" event. (WebCore::Document::addListenerTypeIfNeeded): Support listening for a "webKitFullScreenChangeEvent" (WebCore::Document::webkitRequestFullScreenForElement): Passes request to the chrome client to enter full screen mode. (WebCore::Document::webkitCancelFullScreen): Passes request to the chrome client to exit full screen mode. (WebCore::Document::webkitWillEnterFullScreenForElement): Sets the FullScreen pseudo-classes on the full-screen element and its document. (WebCore::Document::webkitDidEnterFullScreenForElement): Currently a no-op. (WebCore::Document::webkitWillExitFullScreenForElement): Currently a no-op. (WebCore::Document::webkitDidExitFullScreenForElement): Clears the FullScreen pseudo-classes on the full-screen element and its document. * dom/Document.h: Added const accessors for new full-screen instance variables. (WebCore::Document::): (WebCore::Document::webkitIsFullScreen): Accessor for m_isFullScreen. (WebCore::Document::webkitIsFullScreenWithKeysEnabled): Accessor for m_isFullScren and m_areKeysEnabled. (WebCore::Document::webkitCurrentFullScreenElement): Accessor for m_fullScreenElement. * dom/Element.cpp: (WebCore::Element::webkitRequestFullScreen): Calls Document::webkitRequestFullScreenForElement. * dom/Element.h: * dom/EventNames.h: Add a webkitfullscreenchange event name. * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): Parse the new "onwebkitfullscreenchange" attribute and register a listener. * page/ChromeClient.h: (WebCore::ChromeClient::supportsFullscreenForElement): Pass through to the current UI delegate. (WebCore::ChromeClient::enterFullscreenForElement): Create a WebKitFullScreenListener and pass through to the current UI delegate. (WebCore::ChromeClient::exitFullscreenForElement): Create a WebKitFullScreenListener and pass through to the current UI delegate. * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: Add a new setting to control runtime support for full screen mode (defaults to off) * rendering/MediaControlElements.cpp: (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): The full screen button now toggles full screen mode (previously, it only entered). * rendering/style/RenderStyleConstants.h: Added new style constants. 2010-08-09 Jer Noble <jer.noble@apple.com> Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 https://bugs.webkit.org/show_bug.cgi?id=43099 New tests for the new full screen API: full-screen-api.html: tests for the presence of the new full screen apis. full-screen-request.html: tests that clients can request the browser enter full screen mode successfully. full-screen-css.html: tests that the new full screen pseudo classes are applied once full screen mode is entered. full-screen-remove.html: tests that the document's current full screen element is changed when that element is removed from the DOM tree. full-screen-remove-ancestor.html: tests that the document's current full screen element is changed an ancestor of that element is removed from the DOM tree. full-screen-twice.html: tests that entering full screen mode on two different elements in a row does not fail. Tests that were changed: domListEnumeration.html: This test returns a specific count of properties on HTML elements; after consultation with Sam Weinig (the original test author), it was decided that this part of the test would be very difficult to make platform specific, and that nothing significant would be lost if the property count sections were removed. platform/*/Skipped: Added the fullscreen/ directory to the Skipped list for every platform save mac. * fast/dom/Window/window-properties-expected.txt: Added the new properties exposed on Document and Element. * fast/dom/domListEnumeration-expected.txt: Removed the iteration count part of this test. * fast/dom/script-tests/domListEnumeration.js: "" * fullscreen: Added. * platform/mac/fullscreen: Added. * platform/mac/fullscreen/full-screen-api-expected.txt: Added. * platform/mac/fullscreen/full-screen-api.html: Added. * platform/mac/fullscreen/full-screen-css-expected.txt: Added. * platform/mac/fullscreen/full-screen-css.html: Added. * platform/mac/fullscreen/full-screen-remove-ancestor-expected.txt: Added. * platform/mac/fullscreen/full-screen-remove-ancestor.html: Added. * platform/mac/fullscreen/full-screen-remove-expected.txt: Added. * platform/mac/fullscreen/full-screen-remove.html: Added. * platform/mac/fullscreen/full-screen-request-expected.txt: Added. * platform/mac/fullscreen/full-screen-request.html: Added. * platform/mac/fullscreen/full-screen-twice-expected.txt: Added. * platform/mac/fullscreen/full-screen-twice.html: Added. 2010-07-27 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. Add JavaScript API to allow a page to go fullscreen. rdar://problem/6867795 Added basic full screen support to DumpRenderTree: when a webView requests that DumpRenderTree go "full screen", just call the provided callback listener object's will/did Enter/Exit full screen methods. Also, register a new user default which enables full screen support. * DumpRenderTree/mac/DumpRenderTree.mm: (resetDefaultsToConsistentValues): * DumpRenderTree/mac/UIDelegate.mm: (-[UIDelegate webView:supportsFullscreenForElement:]): (-[UIDelegate webView:enterFullscreenForElement:listener:]): (-[UIDelegate webView:exitFullscreenForElement:listener:]): Canonical link: https://commits.webkit.org/57023@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@66251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-08-27 20:49:02 +00:00
END OF TEST