WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
FullScreen-WebCore
FullScreen-WebCore.patch (text/plain), 61.98 KB, created by
Jer Noble
on 2010-07-27 20:36:21 PDT
(
hide
)
Description:
FullScreen-WebCore
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2010-07-27 20:36:21 PDT
Size:
61.98 KB
patch
obsolete
>Index: WebCore/ChangeLog >=================================================================== >--- WebCore/ChangeLog (revision 64185) >+++ WebCore/ChangeLog (working copy) >@@ -1,3 +1,141 @@ >+2010-07-27 Jer Noble <jer.noble@apple.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add JavaScript API to allow a page to go fullscreen. >+ rdar://problem/6867795 >+ >+ 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=235601> >+ >+ 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() >+ >+ HTMLIFrameElement: >+ - One new content attribute: >+ + allowFullScreen >+ >+ 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 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. >+ * html/HTMLIFrameElement.idl: Added the allowFullScreen attribute. >+ >+ Source changes: >+ * bindings/objc/PublicDOMInterfaces.h: Exposed Document and Element fullscreen functions in the DOM classes. >+ * css/CSSSelector.cpp: Added new FullScreen pseudo-classes. >+ (WebCore::CSSSelector::pseudoId): >+ (WebCore::nameToPseudoTypeMap): >+ (WebCore::CSSSelector::extractPseudoType): >+ * css/CSSSelector.h: >+ (WebCore::CSSSelector::): 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::Document): >+ (WebCore::Document::createEvent): Support creating a "WebKitFullScreenChange" event. >+ (WebCore::Document::addListenerTypeIfNeeded): Support listening for a "webKitFullScreenChangeEvent" >+ (WebCore::Document::webkitRequestFullScreen): >+ (WebCore::Document::webkitRequestFullScreenWithKeys): >+ (WebCore::Document::webkitRequestFullScreenForElementWithKeys): 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::webkitRequestFullScreenForElementWithKeys. >+ (WebCore::Element::webkitRequestFullScreenWithKeys): Calls Document::webkitRequestFullScreenForElementWithKeys. >+ * dom/Element.h: >+ * dom/Event.cpp: >+ (WebCore::Event::isWebKitFullScreenChangeEvent): Overrided by WebKitFullScreenChangeEvent. >+ * dom/Event.h: >+ * dom/EventNames.h: >+ * dom/WebKitFullScreenChangeEvent.cpp: Added. >+ (WebCore::WebKitFullScreenChangeEvent::WebKitFullScreenChangeEvent): >+ (WebCore::WebKitFullScreenChangeEvent::~WebKitFullScreenChangeEvent): >+ (WebCore::WebKitFullScreenChangeEvent::initWebKitFullScreenChangeEvent): >+ * dom/WebKitFullScreenChangeEvent.h: Added. >+ (WebCore::WebKitFullScreenChangeEvent::create): >+ (WebCore::WebKitFullScreenChangeEvent::isWebKitFullScreenChangeEvent): >+ * dom/WebKitFullScreenChangeEvent.idl: Added. >+ * html/HTMLElement.cpp: >+ (WebCore::HTMLElement::parseMappedAttribute): Parse the new "onwebkitfullscreenchange" attribute and register a listener. >+ * html/HTMLIFrameElement.h: >+ (WebCore::HTMLIFrameElement::webkitAllowFullScreen): Accessor for m_allowFullScreen. >+ (WebCore::HTMLIFrameElement::setWebkitAllowFullScreen): Accessor for m_allowFullScreen. >+ * html/HTMLMediaElement.cpp: Re-implemented the HTMLMediaElement full screen support in terms of the new (generic) full screen support. >+ (WebCore::HTMLMediaElement::HTMLMediaElement): >+ (WebCore::HTMLMediaElement::parseMappedAttribute): >+ (WebCore::HTMLMediaElement::removedFromDocument): >+ (WebCore::HTMLMediaElement::documentWillBecomeInactive): >+ (WebCore::HTMLMediaElement::isFullscreen): >+ (WebCore::HTMLMediaElement::enterFullscreen): >+ (WebCore::HTMLMediaElement::exitFullscreen): >+ * html/HTMLMediaElement.h: >+ * html/HTMLVideoElement.cpp: >+ (WebCore::HTMLVideoElement::supportsFullscreen): >+ * html/HTMLVideoElement.h: >+ * 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) >+ (WebCore::Settings::setFullScreenEnabled): >+ (WebCore::Settings::fullScreenEnabled): >+ * rendering/MediaControlElements.cpp: >+ (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): The full screen button now toggles full screen mode (previously, it only entered). >+ * rendering/style/RenderStyleConstants.h: >+ (WebCore::): >+ > 2010-07-27 James Hawkins <jhawkins@chromium.org> > > Reviewed by Darin Fisher. >Index: WebCore/DerivedSources.make >=================================================================== >--- WebCore/DerivedSources.make (revision 64185) >+++ WebCore/DerivedSources.make (working copy) >@@ -449,6 +449,7 @@ DOM_CLASSES = \ > WebKitCSSKeyframesRule \ > WebKitCSSMatrix \ > WebKitCSSTransformValue \ >+ WebKitFullScreenChangeEvent \ > WebKitPoint \ > WebKitTransitionEvent \ > WebSocket \ >@@ -662,6 +663,10 @@ ifeq ($(OS),MACOS) > endif > endif > >+ifeq ($(findstring ENABLE_FULLSCREEN,$(FEATURE_DEFINES)), ENABLE_FULLSCREEN) >+ USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/fullscreen.css >+endif >+ > UserAgentStyleSheets.h : css/make-css-file-arrays.pl $(USER_AGENT_STYLE_SHEETS) > perl $< $@ UserAgentStyleSheetsData.cpp $(USER_AGENT_STYLE_SHEETS) > >@@ -840,6 +845,72 @@ all : WebCore.exp WebCore.LP64.exp > WebCore.exp : $(BUILT_PRODUCTS_DIR)/WebCoreExportFileGenerator > $^ > $@ > >+# FIXME: WTF_USE_PLUGIN_HOST_PROCESS is only true when building for x86_64, but we shouldn't have to know about that here. >+ifeq ($(findstring x86_64,$(ARCHS)) $(findstring x86_64,$(VALID_ARCHS)), x86_64 x86_64) >+ifeq ($(shell gcc -arch x86_64 -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep WTF_USE_PLUGIN_HOST_PROCESS | cut -d' ' -f3), 1) >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.PluginHostProcess.exp >+endif >+endif >+ >+ifeq ($(findstring ENABLE_3D_RENDERING,$(FEATURE_DEFINES)), ENABLE_3D_RENDERING) >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.3DRendering.exp >+endif >+ >+ifeq ($(shell gcc -arch x86_64 -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep WTF_USE_ACCELERATED_COMPOSITING | cut -d' ' -f3), 1) >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.AcceleratedCompositing.exp >+endif >+ >+ifeq ($(shell gcc -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_CONTEXT_MENUS | cut -d' ' -f3), 1) >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.ContextMenus.exp >+endif >+ >+ifeq ($(ENABLE_DASHBOARD_SUPPORT), 1) >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.DashboardSupport.exp >+endif >+ >+ifeq ($(shell gcc -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_DRAG_SUPPORT | cut -d' ' -f3), 1) >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.DragSupport.exp >+endif >+ >+ifeq ($(shell gcc -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_INSPECTOR | cut -d' ' -f3), 1) >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Inspector.exp >+endif >+ >+ifeq ($(ENABLE_ORIENTATION_EVENTS), 1) >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.OrientationEvents.exp >+endif >+ >+ifeq ($(findstring 10.4,$(MACOSX_DEPLOYMENT_TARGET)), 10.4) >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Tiger.exp >+endif >+ >+ifeq ($(findstring ENABLE_PLUGIN_PROXY_FOR_VIDEO,$(FEATURE_DEFINES)), ENABLE_PLUGIN_PROXY_FOR_VIDEO) >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.VideoProxy.exp >+endif >+ >+ifeq ($(findstring ENABLE_VIDEO,$(FEATURE_DEFINES)), ENABLE_VIDEO) >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Video.exp >+endif >+ >+ifeq ($(findstring ENABLE_GEOLOCATION,$(FEATURE_DEFINES)), ENABLE_GEOLOCATION) >+ifeq ($(findstring ENABLE_CLIENT_BASED_GEOLOCATION,$(FEATURE_DEFINES)), ENABLE_CLIENT_BASED_GEOLOCATION) >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.ClientBasedGeolocation.exp >+else >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Geolocation.exp >+endif >+endif >+ >+ifeq ($(findstring ENABLE_FULLSCREEN,$(FEATURE_DEFINES)), ENABLE_FULLSCREEN) >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.FullScreen.exp >+endif >+ >+ifeq ($(shell gcc -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK | cut -d' ' -f3), 1) >+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.ProtectionSpaceAuthCallback.exp >+endif >+ >+WebCore.exp : WebCore.base.exp $(WEBCORE_EXPORT_DEPENDENCIES) >+ cat $^ > $@ >+ > # Switch NSRect, NSSize and NSPoint with their CG counterparts for the 64-bit exports file. > WebCore.LP64.exp : WebCore.exp > cat $^ | sed -e s/7_NSRect/6CGRect/ -e s/7_NSSize/6CGSize/ -e s/8_NSPoint/7CGPoint/ > $@ >Index: WebCore/WebCore.FullScreen.exp >=================================================================== >--- WebCore/WebCore.FullScreen.exp (revision 0) >+++ WebCore/WebCore.FullScreen.exp (revision 0) >@@ -0,0 +1,4 @@ >+__ZN7WebCore8Document35webkitWillEnterFullScreenForElementEPNS_7ElementE >+__ZN7WebCore8Document34webkitDidEnterFullScreenForElementEPNS_7ElementE >+__ZN7WebCore8Document34webkitWillExitFullScreenForElementEPNS_7ElementE >+__ZN7WebCore8Document33webkitDidExitFullScreenForElementEPNS_7ElementE >Index: WebCore/Configurations/FeatureDefines.xcconfig >=================================================================== >--- WebCore/Configurations/FeatureDefines.xcconfig (revision 64185) >+++ WebCore/Configurations/FeatureDefines.xcconfig (working copy) >@@ -55,6 +55,7 @@ ENABLE_EVENTSOURCE = ENABLE_EVENTSOURCE; > ENABLE_FILTERS = ENABLE_FILTERS; > ENABLE_FILE_READER = ENABLE_FILE_READER; > ENABLE_FILE_WRITER = ; >+ENABLE_FULLSCREEN = ENABLE_FULLSCREEN; > ENABLE_GEOLOCATION = ENABLE_GEOLOCATION; > ENABLE_ICONDATABASE = ENABLE_ICONDATABASE; > ENABLE_IMAGE_RESIZER = ; >@@ -85,4 +86,4 @@ ENABLE_XHTMLMP = ; > ENABLE_XPATH = ENABLE_XPATH; > ENABLE_XSLT = ENABLE_XSLT; > >-FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB_SLICE) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_READER) $(ENABLE_FILE_WRITER) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT); >+FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB_SLICE) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_READER) $(ENABLE_FILE_WRITER) $(ENABLE_FULLSCREEN) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT); >Index: WebCore/WebCore.xcodeproj/project.pbxproj >=================================================================== >--- WebCore/WebCore.xcodeproj/project.pbxproj (revision 64185) >+++ WebCore/WebCore.xcodeproj/project.pbxproj (working copy) >@@ -4980,6 +4980,8 @@ > C5EBDD84105EDDEC0056816F /* StorageEventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = C5EBDD81105EDDEC0056816F /* StorageEventDispatcher.h */; }; > C6D74AD509AA282E000B0A52 /* ModifySelectionListLevel.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D74AD309AA282E000B0A52 /* ModifySelectionListLevel.h */; }; > C6D74AE409AA290A000B0A52 /* ModifySelectionListLevel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D74AE309AA290A000B0A52 /* ModifySelectionListLevel.cpp */; }; >+ CDA79A7311E7A4C700878D95 /* WebKitFullScreenChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = CDA79A7111E7A4C700878D95 /* WebKitFullScreenChangeEvent.h */; }; >+ CDA79A7411E7A4C700878D95 /* WebKitFullScreenChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA79A7211E7A4C700878D95 /* WebKitFullScreenChangeEvent.cpp */; }; > CE02F0C411E83ADD00C6684A /* ScriptControllerBase.h in Headers */ = {isa = PBXBuildFile; fileRef = CE02F0C311E83ADD00C6684A /* ScriptControllerBase.h */; settings = {ATTRIBUTES = (Private, ); }; }; > CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */ = {isa = PBXBuildFile; fileRef = CE172E001136E8CE0062A533 /* ZoomMode.h */; settings = {ATTRIBUTES = (Private, ); }; }; > CE4C00E410F6F7BA00CA38F5 /* HTMLNoScriptElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE4C00E310F6F7BA00CA38F5 /* HTMLNoScriptElement.cpp */; }; >@@ -10647,6 +10649,11 @@ > C5EBDD81105EDDEC0056816F /* StorageEventDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageEventDispatcher.h; sourceTree = "<group>"; }; > C6D74AD309AA282E000B0A52 /* ModifySelectionListLevel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModifySelectionListLevel.h; sourceTree = "<group>"; }; > C6D74AE309AA290A000B0A52 /* ModifySelectionListLevel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ModifySelectionListLevel.cpp; sourceTree = "<group>"; }; >+ CD1455E911F6A29200CA87A5 /* WebCore.FullScreen.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = WebCore.FullScreen.exp; sourceTree = "<group>"; }; >+ CD4E0AFA11F7BC27009D3811 /* fullscreen.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = fullscreen.css; sourceTree = "<group>"; }; >+ CDA79A7111E7A4C700878D95 /* WebKitFullScreenChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitFullScreenChangeEvent.h; sourceTree = "<group>"; }; >+ CDA79A7211E7A4C700878D95 /* WebKitFullScreenChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitFullScreenChangeEvent.cpp; sourceTree = "<group>"; }; >+ CDA79A7611E7A4D900878D95 /* WebKitFullScreenChangeEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitFullScreenChangeEvent.idl; sourceTree = "<group>"; }; > CE02F0C311E83ADD00C6684A /* ScriptControllerBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptControllerBase.h; sourceTree = "<group>"; }; > CE172E001136E8CE0062A533 /* ZoomMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZoomMode.h; sourceTree = "<group>"; }; > CE4C00E310F6F7BA00CA38F5 /* HTMLNoScriptElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLNoScriptElement.cpp; sourceTree = "<group>"; }; >@@ -11674,6 +11681,7 @@ > children = ( > 5D87BB8211E3ED8600702B6F /* ExportFileGenerator.cpp */, > 5D4B8C5211E52C8B00BBB62F /* WebCore.exp.in */, >+ CD1455E911F6A29200CA87A5 /* WebCore.FullScreen.exp */, > ); > name = Exports; > sourceTree = "<group>"; >@@ -16601,6 +16609,7 @@ > BC9ADD220CC4032600098C4C /* WebKitCSSTransformValue.h */, > 31611E540E1C4D4A00F6A579 /* WebKitCSSTransformValue.idl */, > 4CDE54EC0E5579780089E26C /* wml.css */, >+ CD4E0AFA11F7BC27009D3811 /* fullscreen.css */, > ); > path = css; > sourceTree = "<group>"; >@@ -17136,6 +17145,9 @@ > 31C0FF1B0E4CEB6E007D6FE5 /* WebKitAnimationEvent.cpp */, > 31C0FF1C0E4CEB6E007D6FE5 /* WebKitAnimationEvent.h */, > 31C0FF1D0E4CEB6E007D6FE5 /* WebKitAnimationEvent.idl */, >+ CDA79A7111E7A4C700878D95 /* WebKitFullScreenChangeEvent.h */, >+ CDA79A7211E7A4C700878D95 /* WebKitFullScreenChangeEvent.cpp */, >+ CDA79A7611E7A4D900878D95 /* WebKitFullScreenChangeEvent.idl */, > 31C0FF1E0E4CEB6E007D6FE5 /* WebKitTransitionEvent.cpp */, > 31C0FF1F0E4CEB6E007D6FE5 /* WebKitTransitionEvent.h */, > 31C0FF200E4CEB6E007D6FE5 /* WebKitTransitionEvent.idl */, >@@ -19847,6 +19859,7 @@ > E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */, > 97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */, > CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */, >+ CDA79A7311E7A4C700878D95 /* WebKitFullScreenChangeEvent.h in Headers */, > ); > runOnlyForDeploymentPostprocessing = 0; > }; >@@ -22242,6 +22255,7 @@ > 93F19B0508245E59001E9ABC /* XSLTProcessorLibxslt.cpp in Sources */, > E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */, > 97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */, >+ CDA79A7411E7A4C700878D95 /* WebKitFullScreenChangeEvent.cpp in Sources */, > ); > runOnlyForDeploymentPostprocessing = 0; > }; >Index: WebCore/bindings/objc/PublicDOMInterfaces.h >=================================================================== >--- WebCore/bindings/objc/PublicDOMInterfaces.h (revision 64185) >+++ WebCore/bindings/objc/PublicDOMInterfaces.h (working copy) >@@ -156,6 +156,11 @@ @interface DOMDocument : DOMNode WEBKIT_ > - (DOMNodeList *)getElementsByClassName:(NSString *)tagname AVAILABLE_IN_WEBKIT_VERSION_4_0; > - (DOMElement *)querySelector:(NSString *)selectors AVAILABLE_IN_WEBKIT_VERSION_4_0; > - (DOMNodeList *)querySelectorAll:(NSString *)selectors AVAILABLE_IN_WEBKIT_VERSION_4_0; >+#if defined(ENABLE_FULLSCREEN) && ENABLE_FULLSCREEN >+- (void)webkitRequestFullScreen AVAILABLE_IN_WEBKIT_VERSION_4_0; >+- (void)webkitRequestFullScreenWithKeys AVAILABLE_IN_WEBKIT_VERSION_4_0; >+- (void)webkitCancelFullScreen AVAILABLE_IN_WEBKIT_VERSION_4_0; >+#endif > @end > > @interface DOMDocumentFragment : DOMNode WEBKIT_VERSION_1_3 >@@ -224,6 +229,10 @@ @interface DOMElement : DOMNode WEBKIT_V > - (DOMNodeList *)getElementsByClassName:(NSString *)name AVAILABLE_IN_WEBKIT_VERSION_4_0; > - (DOMElement *)querySelector:(NSString *)selectors AVAILABLE_IN_WEBKIT_VERSION_4_0; > - (DOMNodeList *)querySelectorAll:(NSString *)selectors AVAILABLE_IN_WEBKIT_VERSION_4_0; >+#if defined(ENABLE_FULLSCREEN) && ENABLE_FULLSCREEN >+- (void)webkitRequestFullScreen AVAILABLE_IN_WEBKIT_VERSION_4_0; >+- (void)webkitRequestFullScreenWithKeys AVAILABLE_IN_WEBKIT_VERSION_4_0; >+#endif > @end > > @interface DOMEntity : DOMNode WEBKIT_VERSION_1_3 >@@ -569,6 +578,9 @@ @interface DOMHTMLIFrameElement : DOMHTM > @property(copy) NSString *width; > @property(readonly, retain) DOMDocument *contentDocument; > @property(readonly, retain) DOMAbstractView *contentWindow AVAILABLE_IN_WEBKIT_VERSION_4_0; >+#if defined(ENABLE_FULLSCREEN) && ENABLE_FULLSCREEN >+@property(assign) BOOL webkitAllowFullScreen; >+#endif > @end > > @interface DOMHTMLImageElement : DOMHTMLElement WEBKIT_VERSION_1_3 >Index: WebCore/css/CSSSelector.cpp >=================================================================== >--- WebCore/css/CSSSelector.cpp (revision 64185) >+++ WebCore/css/CSSSelector.cpp (working copy) >@@ -244,6 +244,15 @@ PseudoId CSSSelector::pseudoId(PseudoTyp > return NOPSEUDO; > #endif > >+#if ENABLE(FULLSCREEN) >+ case PseudoFullScreen: >+ return FULL_SCREEN; >+ case PseudoFullScreenDoc: >+ return FULL_SCREEN_DOC; >+ case PseudoFullScreenRootWithTarget: >+ return FULL_SCREEN_ROOT_WITH_TARGET; >+#endif >+ > case PseudoInputListButton: > #if ENABLE(DATALIST) > return INPUT_LIST_BUTTON; >@@ -422,6 +431,11 @@ static HashMap<AtomicStringImpl*, CSSSel > DEFINE_STATIC_LOCAL(AtomicString, firstPage, ("first")); > DEFINE_STATIC_LOCAL(AtomicString, leftPage, ("left")); > DEFINE_STATIC_LOCAL(AtomicString, rightPage, ("right")); >+#if ENABLE(FULLSCREEN) >+ DEFINE_STATIC_LOCAL(AtomicString, fullScreen, ("-webkit-full-screen")); >+ DEFINE_STATIC_LOCAL(AtomicString, fullScreenDoc, ("-webkit-full-screen-doc")); >+ DEFINE_STATIC_LOCAL(AtomicString, fullScreenRootWithTarget, ("-webkit-full-screen-root-with-target")); >+#endif > > static HashMap<AtomicStringImpl*, CSSSelector::PseudoType>* nameToPseudoType = 0; > if (!nameToPseudoType) { >@@ -533,6 +547,11 @@ static HashMap<AtomicStringImpl*, CSSSel > nameToPseudoType->set(firstPage.impl(), CSSSelector::PseudoFirstPage); > nameToPseudoType->set(leftPage.impl(), CSSSelector::PseudoLeftPage); > nameToPseudoType->set(rightPage.impl(), CSSSelector::PseudoRightPage); >+#if ENABLE(FULLSCREEN) >+ nameToPseudoType->set(fullScreen.impl(), CSSSelector::PseudoFullScreen); >+ nameToPseudoType->set(fullScreenDoc.impl(), CSSSelector::PseudoFullScreenDoc); >+ nameToPseudoType->set(fullScreenRootWithTarget.impl(), CSSSelector::PseudoFullScreenRootWithTarget); >+#endif > } > return nameToPseudoType; > } >@@ -662,6 +681,11 @@ void CSSSelector::extractPseudoType() co > case PseudoSingleButton: > case PseudoNoButton: > case PseudoNotParsed: >+#if ENABLE(FULLSCREEN) >+ case PseudoFullScreen: >+ case PseudoFullScreenDoc: >+ case PseudoFullScreenRootWithTarget: >+#endif > break; > case PseudoFirstPage: > case PseudoLeftPage: >Index: WebCore/css/CSSSelector.h >=================================================================== >--- WebCore/css/CSSSelector.h (revision 64185) >+++ WebCore/css/CSSSelector.h (working copy) >@@ -217,6 +217,11 @@ namespace WebCore { > PseudoLeftPage, > PseudoRightPage, > PseudoFirstPage, >+#if ENABLE(FULLSCREEN) >+ PseudoFullScreen, >+ PseudoFullScreenDoc, >+ PseudoFullScreenRootWithTarget, >+#endif > }; > > enum MarginBoxType { >Index: WebCore/css/CSSStyleSelector.cpp >=================================================================== >--- WebCore/css/CSSStyleSelector.cpp (revision 64185) >+++ WebCore/css/CSSStyleSelector.cpp (working copy) >@@ -548,6 +548,14 @@ static void loadFullDefaultStyle() > String quirksRules = String(quirksUserAgentStyleSheet, sizeof(quirksUserAgentStyleSheet)) + RenderTheme::defaultTheme()->extraQuirksStyleSheet(); > CSSStyleSheet* quirksSheet = parseUASheet(quirksRules); > defaultQuirksStyle->addRulesFromSheet(quirksSheet, screenEval()); >+ >+#if ENABLE(FULLSCREEN) >+ // Full-screen rules. >+ String fullscreenRules = String(fullscreenUserAgentStyleSheet, sizeof(fullscreenUserAgentStyleSheet)) + RenderTheme::defaultTheme()->extraDefaultStyleSheet(); >+ CSSStyleSheet* fullscreenSheet = parseUASheet(fullscreenRules); >+ defaultStyle->addRulesFromSheet(fullscreenSheet, screenEval()); >+ defaultQuirksStyle->addRulesFromSheet(fullscreenSheet, screenEval()); >+#endif > } > > static void loadSimpleDefaultStyle() >@@ -563,6 +571,13 @@ static void loadSimpleDefaultStyle() > defaultStyle->addRulesFromSheet(simpleDefaultStyleSheet, screenEval()); > > // No need to initialize quirks sheet yet as there are no quirk rules for elements allowed in simple default style. >+ >+#if ENABLE(FULLSCREEN) >+ // Full-screen rules. >+ String fullscreenRules = String(fullscreenUserAgentStyleSheet, sizeof(fullscreenUserAgentStyleSheet)) + RenderTheme::defaultTheme()->extraDefaultStyleSheet(); >+ CSSStyleSheet* fullscreenSheet = parseUASheet(fullscreenRules); >+ defaultStyle->addRulesFromSheet(fullscreenSheet, screenEval()); >+#endif > } > > static void loadViewSourceStyle() >@@ -2619,6 +2634,37 @@ bool CSSStyleSelector::SelectorChecker:: > break; > return true; > } >+#if ENABLE(FULLSCREEN) >+ case CSSSelector::PseudoFullScreen: >+ // While a Document is in the fullscreen state, and the document's current fullscreen >+ // element is an element in the document, the 'full-screen' pseudoclass applies to >+ // that element. Also, an <iframe>, <object> or <embed> element whose child browsing >+ // context's Document is in the fullscreen state has the 'full-screen' pseudoclass applied. >+ if (!e->document()->webkitIsFullScreen()) >+ return false; >+ if (e != e->document()->webkitCurrentFullScreenElement()) >+ return false; >+ return true; >+ case CSSSelector::PseudoFullScreenDoc: >+ // While a Document is in the fullscreen state, the 'full-screen-doc' pseudoclass applies >+ // to the root element of that Document. >+ if (!e->document()->webkitIsFullScreen()) >+ return false; >+ if (e != e->document()->documentElement()) >+ return false; >+ return true; >+ case CSSSelector::PseudoFullScreenRootWithTarget: >+ // While a Document is in the fullscreen state and the document's current fullscreen element >+ // is an element in the document, the 'full-screen-doc-with-target' pseudoclass applies to >+ // the root element of that Document. >+ if (!e->document()->webkitIsFullScreen()) >+ return false; >+ if (e != e->document()->documentElement()) >+ return false; >+ if (!e->document()->contains(e->document()->webkitCurrentFullScreenElement())) >+ return false; >+ return true; >+#endif > case CSSSelector::PseudoUnknown: > case CSSSelector::PseudoNotParsed: > default: >Index: WebCore/css/fullscreen.css >=================================================================== >--- WebCore/css/fullscreen.css (revision 0) >+++ WebCore/css/fullscreen.css (revision 0) >@@ -0,0 +1,26 @@ >+:-webkit-full-screen { >+ position:fixed; >+ top:0; >+ left:0; >+ right:0; >+ bottom:0; >+} >+:-webkit-full-screen-root-with-target { >+ overflow:hidden; >+} >+ >+video:-webkit-full-screen { >+ width: 100%; >+ height: 100% >+ image-fit: fill; >+} >+ >+img:-webkit-full-screen { >+ width: 100%; >+ height: 100%; >+ image-fit: fill; >+} >+ >+video:-webkit-full-page-media:-webkit-full-screen::-webkit-media-controls-panel { >+ bottom: 0px; >+} >\ No newline at end of file >Index: WebCore/dom/Document.cpp >=================================================================== >--- WebCore/dom/Document.cpp (revision 64185) >+++ WebCore/dom/Document.cpp (working copy) >@@ -199,6 +199,10 @@ > #include "HTMLNoScriptElement.h" > #endif > >+#if ENABLE(FULLSCREEN) >+#include "WebKitFullScreenChangeEvent.h" >+#endif >+ > using namespace std; > using namespace WTF; > using namespace Unicode; >@@ -404,6 +408,11 @@ Document::Document(Frame* frame, const K > #endif > , m_weakReference(DocumentWeakReference::create(this)) > , m_idAttributeName(idAttr) >+#if ENABLE(FULLSCREEN) >+ , m_isFullScreen(0) >+ , m_areKeysEnabled(0) >+ , m_fullScreenElement(0) >+#endif > { > m_document = this; > >@@ -3272,6 +3281,10 @@ PassRefPtr<Event> Document::createEvent( > #endif > event = TouchEvent::create(); > #endif >+#if ENABLE(FULLSCREEN) >+ else if (eventType == "WebKitFullScreenChange") >+ event = WebKitFullScreenChangeEvent::create(); >+#endif > #if ENABLE(DEVICE_ORIENTATION) > else if (eventType == "DeviceOrientationEvent") > event = DeviceOrientationEvent::create(); >@@ -3323,6 +3336,10 @@ void Document::addListenerTypeIfNeeded(c > page->chrome()->client()->needTouchEvents(true); > } > #endif >+#if ENABLE(FULLSCREEN) >+ else if (eventType == eventNames().webkitfullscreenchangeEvent) >+ addListenerType(FULLSCREEN_LISTENER); >+#endif > } > > CSSStyleDeclaration* Document::getOverrideStyle(Element*, const String&) >@@ -5036,5 +5053,84 @@ InspectorController* Document::inspector > return page() ? page()->inspectorController() : 0; > } > #endif >+ >+#if ENABLE(FULLSCREEN) >+void Document::webkitRequestFullScreen() >+{ >+ webkitRequestFullScreenForElementWithKeys(documentElement(), false); >+} >+ >+void Document::webkitRequestFullScreenWithKeys() >+{ >+ webkitRequestFullScreenForElementWithKeys(documentElement(), true); >+} >+ >+void Document::webkitRequestFullScreenForElementWithKeys(Element* element, bool keysEnabled) >+{ >+ if (!page() || !page()->settings()->fullScreenEnabled()) >+ return; >+ >+ if (!element) >+ element = documentElement(); >+ >+ if (page()->chrome()->client()->supportsFullscreenForElement(element)) { >+ page()->chrome()->client()->enterFullscreenForElement(element); >+ m_fullScreenElement = element; >+ m_areKeysEnabled = keysEnabled; >+ } >+} >+ >+void Document::webkitCancelFullScreen() >+{ >+ if (!page() || !page()->settings()->fullScreenEnabled()) >+ return; >+ >+ if (page()->chrome()->client()->supportsFullscreenForElement(m_fullScreenElement)) >+ page()->chrome()->client()->exitFullscreenForElement(m_fullScreenElement); >+} >+ >+void Document::webkitWillEnterFullScreenForElement(Element* element) >+{ >+ if (!page() || !page()->settings()->fullScreenEnabled()) >+ return; >+ >+ m_fullScreenElement = element ? element : documentElement(); >+ m_isFullScreen = true; >+ m_fullScreenElement->setNeedsStyleRecalc(FullStyleChange); >+ if (documentElement() != m_fullScreenElement) >+ documentElement()->setNeedsStyleRecalc(FullStyleChange); >+ m_fullScreenElement->dispatchEvent(WebKitFullScreenChangeEvent::create()); >+ updateStyleIfNeeded(); >+} >+ >+void Document::webkitDidEnterFullScreenForElement(Element*) >+{ >+} >+ >+void Document::webkitWillExitFullScreenForElement(Element*) >+{ >+} >+ >+void Document::webkitDidExitFullScreenForElement(Element*) >+{ >+ if (!page()) >+ return; >+ >+ if (!page()->settings()->fullScreenEnabled()) >+ return; >+ >+ m_isFullScreen = false; >+ m_areKeysEnabled = false; >+ if (m_fullScreenElement) { >+ m_fullScreenElement->setNeedsStyleRecalc(FullStyleChange); >+ m_fullScreenElement->dispatchEvent(WebKitFullScreenChangeEvent::create()); >+ m_fullScreenElement = 0; >+ } else >+ documentElement()->dispatchEvent(WebKitFullScreenChangeEvent::create()); >+ documentElement()->setNeedsStyleRecalc(FullStyleChange); >+ updateStyleIfNeeded(); >+} >+ >+#endif > > } // namespace WebCore >Index: WebCore/dom/Document.h >=================================================================== >--- WebCore/dom/Document.h (revision 64185) >+++ WebCore/dom/Document.h (working copy) >@@ -274,6 +274,9 @@ public: > DEFINE_ATTRIBUTE_EVENT_LISTENER(touchend); > DEFINE_ATTRIBUTE_EVENT_LISTENER(touchcancel); > #endif >+#if ENABLE(FULLSCREEN) >+ DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitfullscreenchange); >+#endif > > DocumentType* doctype() const { return m_docType.get(); } > >@@ -675,7 +678,8 @@ public: > TRANSITIONEND_LISTENER = 0x800, > BEFORELOAD_LISTENER = 0x1000, > TOUCH_LISTENER = 0x2000, >- BEFOREPROCESS_LISTENER = 0x4000 >+ BEFOREPROCESS_LISTENER = 0x4000, >+ FULLSCREEN_LISTENER = 0x8000, > }; > > bool hasListenerType(ListenerType listenerType) const { return (m_listenerTypes & listenerType); } >@@ -1001,6 +1005,21 @@ public: > MediaCanStartListener* takeAnyMediaCanStartListener(); > > const QualifiedName& idAttributeName() const { return m_idAttributeName; } >+ >+#if ENABLE(FULLSCREEN) >+ bool webkitIsFullScreen() const { return m_isFullScreen; } >+ bool webkitIsFullScreenWithKeysEnabled() const { return m_isFullScreen && m_areKeysEnabled; } >+ Element* webkitCurrentFullScreenElement() const { return m_fullScreenElement; } >+ void webkitRequestFullScreen(); >+ void webkitRequestFullScreenWithKeys(); >+ void webkitRequestFullScreenForElementWithKeys(Element*, bool keysEnabled); >+ void webkitCancelFullScreen(); >+ >+ void webkitWillEnterFullScreenForElement(Element*); >+ void webkitDidEnterFullScreenForElement(Element*); >+ void webkitWillExitFullScreenForElement(Element*); >+ void webkitDidExitFullScreenForElement(Element*); >+#endif > > bool writeDisabled() const { return m_writeDisabled; } > void setWriteDisabled(bool flag) { m_writeDisabled = flag; } >@@ -1286,6 +1305,12 @@ private: > HashSet<MediaCanStartListener*> m_mediaCanStartListeners; > > QualifiedName m_idAttributeName; >+ >+#if ENABLE(FULLSCREEN) >+ bool m_isFullScreen; >+ bool m_areKeysEnabled; >+ Element* m_fullScreenElement; >+#endif > }; > > inline bool Document::hasElementWithId(AtomicStringImpl* id) const >Index: WebCore/dom/Document.idl >=================================================================== >--- WebCore/dom/Document.idl (revision 64185) >+++ WebCore/dom/Document.idl (working copy) >@@ -240,6 +240,15 @@ module core { > [DontEnum] void initializeWMLPageState(); > #endif > >+#if defined(ENABLE_FULLSCREEN) && ENABLE_FULLSCREEN >+ void webkitRequestFullScreen(); >+ void webkitRequestFullScreenWithKeys(); >+ readonly attribute boolean webkitIsFullScreen; >+ readonly attribute boolean webkitIsFullScreenWithKeysEnabled; >+ readonly attribute Element webkitCurrentFullScreenElement; >+ void webkitCancelFullScreen(); >+#endif >+ > #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C > // Event handler DOM attributes > attribute [DontEnum] EventListener onabort; >Index: WebCore/dom/Element.cpp >=================================================================== >--- WebCore/dom/Element.cpp (revision 64185) >+++ WebCore/dom/Element.cpp (working copy) >@@ -1582,5 +1582,17 @@ bool Element::childShouldCreateRenderer( > return Node::childShouldCreateRenderer(child); > } > #endif >+ >+#if ENABLE(FULLSCREEN) >+void Element::webkitRequestFullScreen() >+{ >+ document()->webkitRequestFullScreenForElementWithKeys(this, false); >+} >+ >+void Element::webkitRequestFullScreenWithKeys() >+{ >+ document()->webkitRequestFullScreenForElementWithKeys(this, true); >+} >+#endif > > } // namespace WebCore >Index: WebCore/dom/Element.h >=================================================================== >--- WebCore/dom/Element.h (revision 64185) >+++ WebCore/dom/Element.h (working copy) >@@ -94,6 +94,9 @@ public: > DEFINE_ATTRIBUTE_EVENT_LISTENER(touchend); > DEFINE_ATTRIBUTE_EVENT_LISTENER(touchcancel); > #endif >+#if ENABLE(FULLSCREEN) >+ DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitfullscreenchange); >+#endif > > virtual PassRefPtr<DocumentFragment> createContextualFragment(const String&, FragmentScriptingPermission = FragmentScriptingAllowed); > >@@ -292,6 +295,11 @@ public: > #if ENABLE(SVG) > virtual bool childShouldCreateRenderer(Node*) const; > #endif >+ >+#if ENABLE(FULLSCREEN) >+ void webkitRequestFullScreen(); >+ void webkitRequestFullScreenWithKeys(); >+#endif > > protected: > Element(const QualifiedName& tagName, Document* document, ConstructionType type) >Index: WebCore/dom/Element.idl >=================================================================== >--- WebCore/dom/Element.idl (revision 64185) >+++ WebCore/dom/Element.idl (working copy) >@@ -133,6 +133,11 @@ module core { > readonly attribute DOMString innerText; > #endif > >+#if defined(ENABLE_FULLSCREEN) && ENABLE_FULLSCREEN >+ void webkitRequestFullScreen(); >+ void webkitRequestFullScreenWithKeys(); >+#endif >+ > #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C > // Event handler DOM attributes > attribute [DontEnum] EventListener onabort; >@@ -205,6 +210,7 @@ module core { > attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchmove; > attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchend; > attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchcancel; >+ attribute [DontEnum, Conditional=FULLSCREEN] EventListener onwebkitfullscreenchange; > #endif > }; > >Index: WebCore/dom/Event.cpp >=================================================================== >--- WebCore/dom/Event.cpp (revision 64185) >+++ WebCore/dom/Event.cpp (working copy) >@@ -162,6 +162,13 @@ bool Event::isWebKitTransitionEvent() co > return false; > } > >+#if ENABLE(FULLSCREEN) >+bool Event::isWebKitFullScreenChangeEvent() const >+{ >+ return false; >+} >+#endif >+ > bool Event::isXMLHttpRequestProgressEvent() const > { > return false; >Index: WebCore/dom/Event.h >=================================================================== >--- WebCore/dom/Event.h (revision 64185) >+++ WebCore/dom/Event.h (working copy) >@@ -123,6 +123,9 @@ namespace WebCore { > virtual bool isWebKitAnimationEvent() const; > virtual bool isWebKitTransitionEvent() const; > virtual bool isBeforeLoadEvent() const; >+#if ENABLE(FULLSCREEN) >+ virtual bool isWebKitFullScreenChangeEvent() const; >+#endif > #if ENABLE(SVG) > virtual bool isSVGZoomEvent() const; > #endif >Index: WebCore/dom/EventNames.h >=================================================================== >--- WebCore/dom/EventNames.h (revision 64185) >+++ WebCore/dom/EventNames.h (working copy) >@@ -159,6 +159,8 @@ namespace WebCore { > \ > macro(loadend) \ > \ >+ macro(webkitfullscreenchange) >+ \ > // end of DOM_EVENT_NAMES_FOR_EACH > > class EventNames : public Noncopyable { >Index: WebCore/dom/WebKitFullScreenChangeEvent.cpp >=================================================================== >--- WebCore/dom/WebKitFullScreenChangeEvent.cpp (revision 0) >+++ WebCore/dom/WebKitFullScreenChangeEvent.cpp (revision 0) >@@ -0,0 +1,59 @@ >+/* >+ * Copyright (C) 2010 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "WebKitFullScreenChangeEvent.h" >+ >+#if ENABLE(FULLSCREEN) >+ >+#include "EventNames.h" >+ >+namespace WebCore { >+ >+// From the Mozilla FullScreen proposal: "The [fullScreenChangeEvent] bubbles >+// and is not cancellable." >+ >+WebKitFullScreenChangeEvent::WebKitFullScreenChangeEvent() >+: Event(eventNames().webkitfullscreenchangeEvent, true, false) >+{ >+} >+ >+WebKitFullScreenChangeEvent::~WebKitFullScreenChangeEvent() >+{ >+} >+ >+void WebKitFullScreenChangeEvent::initWebKitFullScreenChangeEvent(const AtomicString& type, >+ bool canBubbleArg, >+ bool cancelableArg) >+{ >+ if (dispatched()) >+ return; >+ >+ initEvent(type, canBubbleArg, cancelableArg); >+} >+ >+} // namespace WebCore >+ >+#endif >Index: WebCore/dom/WebKitFullScreenChangeEvent.h >=================================================================== >--- WebCore/dom/WebKitFullScreenChangeEvent.h (revision 0) >+++ WebCore/dom/WebKitFullScreenChangeEvent.h (revision 0) >@@ -0,0 +1,58 @@ >+/* >+ * Copyright (C) 2010 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef WebKitFullScreenChangeEvent_h >+#define WebKitFullScreenChangeEvent_h >+ >+#if ENABLE(FULLSCREEN) >+ >+#include "Event.h" >+ >+namespace WebCore { >+ >+class WebKitFullScreenChangeEvent : public Event { >+public: >+ static PassRefPtr<WebKitFullScreenChangeEvent> create() >+ { >+ return adoptRef(new WebKitFullScreenChangeEvent); >+ } >+ virtual ~WebKitFullScreenChangeEvent(); >+ >+ void initWebKitFullScreenChangeEvent(const AtomicString& type, >+ bool canBubbleArg, >+ bool cancelableArg); >+ >+ virtual bool isWebKitFullScreenChangeEvent() const { return true; } >+ >+private: >+ WebKitFullScreenChangeEvent(); >+ WebKitFullScreenChangeEvent(const AtomicString& type); >+}; >+ >+} // namespace WebCore >+ >+#endif // ENABLE(FULLSCREEN) >+ >+#endif // WebKitFullScreenChangeEvent_h >Index: WebCore/dom/WebKitFullScreenChangeEvent.idl >=================================================================== >--- WebCore/dom/WebKitFullScreenChangeEvent.idl (revision 0) >+++ WebCore/dom/WebKitFullScreenChangeEvent.idl (revision 0) >@@ -0,0 +1,36 @@ >+/* >+ * Copyright (C) 2010 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+module events { >+ >+ interface [ >+ Conditional=WORKERS&FULLSCREEN, >+ NoStaticTables >+ ] FullScreenChangeEvent : Event { >+ >+ void initErrorEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString messageArg, in DOMString filenameArg, in unsigned long linenoArg); >+ }; >+ >+} >Index: WebCore/html/HTMLElement.cpp >=================================================================== >--- WebCore/html/HTMLElement.cpp (revision 64185) >+++ WebCore/html/HTMLElement.cpp (working copy) >@@ -47,6 +47,10 @@ > #include "markup.h" > #include <wtf/StdLibExtras.h> > >+#if ENABLE(FULLSCREEN) >+#include "WebKitFullScreenChangeEvent.h" >+#endif >+ > namespace WebCore { > > using namespace HTMLNames; >@@ -262,7 +266,11 @@ void HTMLElement::parseMappedAttribute(A > setAttributeEventListener(eventNames().touchendEvent, createAttributeEventListener(this, attr)); > } else if (attr->name() == ontouchcancelAttr) { > setAttributeEventListener(eventNames().touchcancelEvent, createAttributeEventListener(this, attr)); >+#if ENABLE(FULLSCREEN) >+ } else if (attr->name() == onwebkitfullscreenchangeAttr) { >+ setAttributeEventListener(eventNames().webkitfullscreenchangeEvent, createAttributeEventListener(this, attr)); > } >+#endif > } > > String HTMLElement::innerHTML() const >Index: WebCore/html/HTMLElement.idl >=================================================================== >--- WebCore/html/HTMLElement.idl (revision 64185) >+++ WebCore/html/HTMLElement.idl (working copy) >@@ -64,6 +64,11 @@ module html { > #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C > readonly attribute DOMString titleDisplayString; > #endif >+ >+#if defined(ENABLE_FULLSCREEN) && ENABLE_FULLSCREEN >+ void webkitRequestFullScreen(); >+ void webkitRequestFullScreenWithKeys(); >+#endif > }; > > } >Index: WebCore/html/HTMLIFrameElement.cpp >=================================================================== >--- WebCore/html/HTMLIFrameElement.cpp (revision 64185) >+++ WebCore/html/HTMLIFrameElement.cpp (working copy) >@@ -132,6 +132,10 @@ void HTMLIFrameElement::parseMappedAttri > else if (attr->name() == sandboxAttr) > setSandboxFlags(parseSandboxAttribute(attr)); > #endif >+#if ENABLE(FULLSCREEN) >+ if (attr->name() == webkitallowfullscreenAttr) >+ m_allowFullScreen = true; >+#endif > else > HTMLFrameElementBase::parseMappedAttribute(attr); > } >Index: WebCore/html/HTMLIFrameElement.h >=================================================================== >--- WebCore/html/HTMLIFrameElement.h (revision 64185) >+++ WebCore/html/HTMLIFrameElement.h (working copy) >@@ -31,6 +31,9 @@ namespace WebCore { > class HTMLIFrameElement : public HTMLFrameElementBase { > public: > static PassRefPtr<HTMLIFrameElement> create(const QualifiedName&, Document*); >+ >+ bool webkitAllowFullScreen() const { return m_allowFullScreen; } >+ void setWebkitAllowFullScreen(bool value) { m_allowFullScreen = value; } > > private: > HTMLIFrameElement(const QualifiedName&, Document*); >@@ -50,6 +53,7 @@ private: > virtual bool isURLAttribute(Attribute*) const; > > AtomicString m_name; >+ bool m_allowFullScreen; > }; > > } // namespace WebCore >Index: WebCore/html/HTMLIFrameElement.idl >=================================================================== >--- WebCore/html/HTMLIFrameElement.idl (revision 64185) >+++ WebCore/html/HTMLIFrameElement.idl (working copy) >@@ -30,6 +30,9 @@ module html { > attribute [Reflect] DOMString name; > attribute [Reflect] DOMString sandbox; > attribute [Reflect] DOMString scrolling; >+#if defined(ENABLE_FULLSCREEN) && ENABLE_FULLSCREEN >+ attribute [Reflect] DOMString webkitAllowFullScreen; >+#endif > attribute [Reflect] DOMString src; > attribute [Reflect] DOMString width; > >Index: WebCore/html/HTMLMediaElement.cpp >=================================================================== >--- WebCore/html/HTMLMediaElement.cpp (revision 64185) >+++ WebCore/html/HTMLMediaElement.cpp (working copy) >@@ -123,7 +123,6 @@ HTMLMediaElement::HTMLMediaElement(const > , m_sentEndEvent(false) > , m_pausedInternal(false) > , m_sendProgressEvents(true) >- , m_isFullscreen(false) > , m_closedCaptionsVisible(false) > #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) > , m_needWidgetUpdate(false) >@@ -260,10 +259,6 @@ void HTMLMediaElement::parseMappedAttrib > setAttributeEventListener(eventNames().volumechangeEvent, createAttributeEventListener(this, attr)); > else if (attrName == onwaitingAttr) > setAttributeEventListener(eventNames().waitingEvent, createAttributeEventListener(this, attr)); >- else if (attrName == onwebkitbeginfullscreenAttr) >- setAttributeEventListener(eventNames().webkitbeginfullscreenEvent, createAttributeEventListener(this, attr)); >- else if (attrName == onwebkitendfullscreenAttr) >- setAttributeEventListener(eventNames().webkitendfullscreenEvent, createAttributeEventListener(this, attr)); > else > HTMLElement::parseMappedAttribute(attr); > } >@@ -312,8 +307,10 @@ void HTMLMediaElement::removedFromDocume > { > if (m_networkState > NETWORK_EMPTY) > pause(processingUserGesture()); >- if (m_isFullscreen) >+#if ENABLE(FULLSCREEN) >+ if (isFullscreen()) > exitFullscreen(); >+#endif > HTMLElement::removedFromDocument(); > } > >@@ -1852,8 +1849,10 @@ void HTMLMediaElement::userCancelledLoad > > void HTMLMediaElement::documentWillBecomeInactive() > { >- if (m_isFullscreen) >+#if ENABLE(FULLSCREEN) >+ if (isFullscreen()) > exitFullscreen(); >+#endif > > m_inActiveDocument = false; > userCancelledLoad(); >@@ -2013,25 +2012,25 @@ void HTMLMediaElement::createMediaPlayer > } > #endif // ENABLE(PLUGIN_PROXY_FOR_VIDEO) > >+#if ENABLE(FULLSCREEN) >+bool HTMLMediaElement::isFullscreen() const >+{ >+ return document() ? document()->webkitCurrentFullScreenElement() == this : false; >+} >+ > void HTMLMediaElement::enterFullscreen() > { >- ASSERT(!m_isFullscreen); >- m_isFullscreen = true; >- if (document() && document()->page()) { >- document()->page()->chrome()->client()->enterFullscreenForNode(this); >- scheduleEvent(eventNames().webkitbeginfullscreenEvent); >- } >+ ASSERT(!isFullscreen()); >+ webkitRequestFullScreenWithKeys(); > } > > void HTMLMediaElement::exitFullscreen() > { >- ASSERT(m_isFullscreen); >- m_isFullscreen = false; >- if (document() && document()->page()) { >- document()->page()->chrome()->client()->exitFullscreenForNode(this); >- scheduleEvent(eventNames().webkitendfullscreenEvent); >- } >+ ASSERT(isFullscreen()); >+ if (document()) >+ document()->webkitCancelFullScreen(); > } >+#endif > > PlatformMedia HTMLMediaElement::platformMedia() const > { >Index: WebCore/html/HTMLMediaElement.h >=================================================================== >--- WebCore/html/HTMLMediaElement.h (revision 64185) >+++ WebCore/html/HTMLMediaElement.h (working copy) >@@ -157,9 +157,11 @@ public: > > bool hasSingleSecurityOrigin() const { return !m_player || m_player->hasSingleSecurityOrigin(); } > >- bool isFullscreen() const { return m_isFullscreen; } >+#if ENABLE(FULLSCREEN) >+ bool isFullscreen() const; > void enterFullscreen(); > void exitFullscreen(); >+#endif > > bool hasClosedCaptions() const; > bool closedCaptionsVisible() const; >@@ -355,7 +357,6 @@ private: > // support progress events so setting m_sendProgressEvents disables them > bool m_sendProgressEvents : 1; > >- bool m_isFullscreen : 1; > bool m_closedCaptionsVisible : 1; > > #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) >Index: WebCore/html/HTMLVideoElement.cpp >=================================================================== >--- WebCore/html/HTMLVideoElement.cpp (revision 64185) >+++ WebCore/html/HTMLVideoElement.cpp (working copy) >@@ -40,6 +40,7 @@ > #include "Page.h" > #include "RenderImage.h" > #include "RenderVideo.h" >+#include "Settings.h" > > namespace WebCore { > >@@ -120,18 +121,23 @@ void HTMLVideoElement::parseMappedAttrib > HTMLMediaElement::parseMappedAttribute(attr); > } > >+#if ENABLE(FULLSCREEN) > bool HTMLVideoElement::supportsFullscreen() const > { > Page* page = document() ? document()->page() : 0; > if (!page) > return false; > >+ if (!page->settings()->fullScreenEnabled()) >+ return false; >+ > if (!player() || !player()->supportsFullscreen() || !player()->hasVideo()) > return false; > > // Check with the platform client. >- return page->chrome()->client()->supportsFullscreenForNode(this); >+ return page->chrome()->client()->supportsFullscreenForElement(this); > } >+#endif > > unsigned HTMLVideoElement::videoWidth() const > { >@@ -204,6 +210,7 @@ bool HTMLVideoElement::hasAvailableVideo > return player()->hasAvailableVideoFrame(); > } > >+#if ENABLE(FULLSCREEN) > void HTMLVideoElement::webkitEnterFullscreen(bool isUserGesture, ExceptionCode& ec) > { > if (isFullscreen()) >@@ -234,6 +241,7 @@ bool HTMLVideoElement::webkitDisplayingF > { > return isFullscreen(); > } >+#endif > > void HTMLVideoElement::willMoveToNewOwnerDocument() > { >Index: WebCore/html/HTMLVideoElement.h >=================================================================== >--- WebCore/html/HTMLVideoElement.h (revision 64185) >+++ WebCore/html/HTMLVideoElement.h (working copy) >@@ -44,6 +44,7 @@ public: > unsigned videoWidth() const; > unsigned videoHeight() const; > >+#if ENABLE(FULLSCREEN) > // Fullscreen > void webkitEnterFullscreen(bool isUserGesture, ExceptionCode&); > void webkitExitFullscreen(); >@@ -54,7 +55,8 @@ public: > // https://bugs.webkit.org/show_bug.cgi?id=36081 > void webkitEnterFullScreen(bool isUserGesture, ExceptionCode& ec) { webkitEnterFullscreen(isUserGesture, ec); } > void webkitExitFullScreen() { webkitExitFullscreen(); } >- >+#endif >+ > bool shouldDisplayPosterImage() const { return m_shouldDisplayPosterImage; } > > // Used by canvas to gain raw pixel access >@@ -73,7 +75,9 @@ private: > virtual void parseMappedAttribute(Attribute*); > virtual bool isVideo() const { return true; } > virtual bool hasVideo() const { return player() && player()->hasVideo(); } >+#if ENABLE(FULLSCREEN) > virtual bool supportsFullscreen() const; >+#endif > virtual bool isURLAttribute(Attribute*) const; > virtual const QualifiedName& imageSourceAttributeName() const; > >Index: WebCore/page/ChromeClient.h >=================================================================== >--- WebCore/page/ChromeClient.h (revision 64185) >+++ WebCore/page/ChromeClient.h (working copy) >@@ -219,9 +219,11 @@ namespace WebCore { > virtual bool allowsAcceleratedCompositing() const { return true; } > #endif > >- virtual bool supportsFullscreenForNode(const Node*) { return false; } >- virtual void enterFullscreenForNode(Node*) { } >- virtual void exitFullscreenForNode(Node*) { } >+#if ENABLE(FULLSCREEN) >+ virtual bool supportsFullscreenForElement(const Element*) { return false; } >+ virtual void enterFullscreenForElement(Element*) { } >+ virtual void exitFullscreenForElement(Element*) { } >+#endif > > #if ENABLE(TILED_BACKING_STORE) > virtual IntRect visibleRectForTiledBackingStore() const { return IntRect(); } >Index: WebCore/page/Settings.cpp >=================================================================== >--- WebCore/page/Settings.cpp (revision 64185) >+++ WebCore/page/Settings.cpp (working copy) >@@ -136,6 +136,9 @@ Settings::Settings(Page* page) > , m_html5TreeBuilderEnabled(false) // Will be deleted soon, do not use. > , m_paginateDuringLayoutEnabled(false) > , m_dnsPrefetchingEnabled(true) >+#if ENABLE(FULLSCREEN) >+ , m_fullScreenEnabled(false) >+#endif > , m_memoryInfoEnabled(false) > , m_interactiveFormValidation(false) > { >Index: WebCore/page/Settings.h >=================================================================== >--- WebCore/page/Settings.h (revision 64185) >+++ WebCore/page/Settings.h (working copy) >@@ -310,6 +310,11 @@ namespace WebCore { > void setPaginateDuringLayoutEnabled(bool flag) { m_paginateDuringLayoutEnabled = flag; } > bool paginateDuringLayoutEnabled() const { return m_paginateDuringLayoutEnabled; } > >+#if ENABLE(FULLSCREEN) >+ void setFullScreenEnabled(bool flag) { m_fullScreenEnabled = flag; } >+ bool fullScreenEnabled() const { return m_fullScreenEnabled; } >+#endif >+ > void setMemoryInfoEnabled(bool flag) { m_memoryInfoEnabled = flag; } > bool memoryInfoEnabled() const { return m_memoryInfoEnabled; } > >@@ -403,8 +408,14 @@ namespace WebCore { > bool m_html5TreeBuilderEnabled: 1; // Will be deleted soon, do not use. > bool m_paginateDuringLayoutEnabled : 1; > bool m_dnsPrefetchingEnabled : 1; >+<<<<<<< .mine >+#if ENABLE(FULLSCREEN) >+ bool m_fullScreenEnabled : 1; >+#endif >+======= > bool m_memoryInfoEnabled: 1; > bool m_interactiveFormValidation: 1; >+>>>>>>> .r64185 > > #if USE(SAFARI_THEME) > static bool gShouldPaintNativeControls; >Index: WebCore/rendering/MediaControlElements.cpp >=================================================================== >--- WebCore/rendering/MediaControlElements.cpp (revision 64185) >+++ WebCore/rendering/MediaControlElements.cpp (working copy) >@@ -776,7 +776,10 @@ PassRefPtr<MediaControlFullscreenButtonE > void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event) > { > if (event->type() == eventNames().clickEvent) { >- mediaElement()->enterFullscreen(); >+ if (mediaElement()->isFullscreen()) >+ mediaElement()->exitFullscreen(); >+ else >+ mediaElement()->enterFullscreen(); > event->setDefaultHandled(); > } > HTMLInputElement::defaultEventHandler(event); >Index: WebCore/rendering/style/RenderStyleConstants.h >=================================================================== >--- WebCore/rendering/style/RenderStyleConstants.h (revision 64185) >+++ WebCore/rendering/style/RenderStyleConstants.h (working copy) >@@ -79,6 +79,7 @@ enum PseudoId { > METER_HORIZONTAL_BAR, METER_HORIZONTAL_OPTIMUM, METER_HORIZONTAL_SUBOPTIMAL, METER_HORIZONTAL_EVEN_LESS_GOOD, > METER_VERTICAL_BAR, METER_VERTICAL_OPTIMUM, METER_VERTICAL_SUBOPTIMAL, METER_VERTICAL_EVEN_LESS_GOOD, > AFTER_LAST_INTERNAL_PSEUDOID, >+ FULL_SCREEN, FULL_SCREEN_DOC, FULL_SCREEN_ROOT_WITH_TARGET, > FIRST_PUBLIC_PSEUDOID = FIRST_LINE, > FIRST_INTERNAL_PSEUDOID = FILE_UPLOAD_BUTTON, > PUBLIC_PSEUDOID_MASK = ((1 << FIRST_INTERNAL_PSEUDOID) - 1) & ~((1 << FIRST_PUBLIC_PSEUDOID) - 1)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 43099
:
62784
|
62785
|
62786
|
62787
|
62793
|
62797
|
62799
|
62833
|
62835
|
62874
|
62954
|
62968
|
63360
|
63361
|
63397
|
63476
|
63477
|
63623
|
63624
|
63626
|
63627
|
63628
|
63936
|
63937
|
63938
|
63939
|
63941
|
63943
|
63949
|
63955
|
64545
|
64997
|
65593