Changeset 159827 in webkit
- Timestamp:
- Nov 27, 2013, 5:05:35 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 9 added
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r159823 r159827 1 2013-11-27 Eric Carlson <eric.carlson@apple.com> 2 3 Allow the QuickTime plug-in to be replaced by script in an isolated word 4 https://bugs.webkit.org/show_bug.cgi?id=124900 5 6 Reviewed by Dean Jackson. 7 8 * platform/efl/TestExpectations: Skip the new test. 9 * platform/gtk/TestExpectations: Ditto. 10 * platform/wincairo/TestExpectations: Ditto. 11 * plugins/quicktime-plugin-replacement.html: Added. 12 * plugins/quicktime-plugin-replacement-expected.txt: Added. 13 * plugins/resources/orange.mov: Replace movie compressed with ancient (and deprecated) 14 animated gif codec with one compressed with H.264 codec. 15 1 16 2013-11-27 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> 2 17 -
trunk/LayoutTests/platform/efl/TestExpectations
r159812 r159827 1752 1752 1753 1753 webkit.org/b/124894 accessibility/fieldset-element.html [ Missing ] 1754 1755 # QuickTime plug-in not relevant to this port 1756 plugins/quicktime-plugin-replacement.html [ Skip ] -
trunk/LayoutTests/platform/gtk/TestExpectations
r159744 r159827 512 512 crypto/subtle [ Skip ] 513 513 514 # QuickTime plug-in not relevant to this port 515 plugins/quicktime-plugin-replacement.html [ Skip ] 516 514 517 #//////////////////////////////////////////////////////////////////////////////////////// 515 518 # End of Expected failures -
trunk/LayoutTests/platform/wincairo/TestExpectations
r158396 r159827 2854 2854 # crypto.subtle is not yet enabled 2855 2855 crypto/subtle [ Skip ] 2856 2857 # QuickTime plug-in not relevant to this port 2858 plugins/quicktime-plugin-replacement.html [ Skip ] -
trunk/Source/WebCore/CMakeLists.txt
r159823 r159827 12 12 "${WEBCORE_DIR}/Modules/networkinfo" 13 13 "${WEBCORE_DIR}/Modules/notifications" 14 "${WEBCORE_DIR}/Modules/plugins" 14 15 "${WEBCORE_DIR}/Modules/proximity" 15 16 "${WEBCORE_DIR}/Modules/quota" -
trunk/Source/WebCore/ChangeLog
r159823 r159827 1 2013-11-27 Eric Carlson <eric.carlson@apple.com> 2 3 Allow the QuickTime plug-in to be replaced by script in an isolated word 4 https://bugs.webkit.org/show_bug.cgi?id=124900 5 6 Reviewed by Dean Jackson. 7 8 Test: plugins/quicktime-plugin-replacement.html 9 10 * CMakeLists.txt: Add new Modules path. 11 * DerivedSources.make: Add new files. 12 * GNUmakefile.am: Add new Modules path. 13 * GNUmakefile.list.am: Add new header. 14 * WebCore.vcxproj/WebCore.vcxproj: Add new header. 15 * WebCore.vcxproj/WebCoreCommon.props: Add new Modules path. 16 * WebCore.xcodeproj/project.pbxproj: Add new files. 17 18 * Modules/plugins: Added. 19 * Modules/plugins/PluginReplacement.h: Added. Defines the interface for a plug-in replacement. 20 21 Create a replacement for the QuickTime plug-in. 22 * Modules/plugins/QuickTimePluginReplacement.cpp: Added. 23 * Modules/plugins/QuickTimePluginReplacement.css: Added. 24 * Modules/plugins/QuickTimePluginReplacement.h: Added. 25 * Modules/plugins/QuickTimePluginReplacement.idl: Added. 26 * Modules/plugins/QuickTimePluginReplacement.js: Added. 27 28 Allow plug-in replacement to be enabled at runtime. 29 * bindings/generic/RuntimeEnabledFeatures.h: 30 (WebCore::RuntimeEnabledFeatures::setPluginReplacementEnabled): 31 (WebCore::RuntimeEnabledFeatures::pluginReplacementEnabled): 32 33 * bindings/js/JSDOMBinding.h: 34 (WebCore::toJS): Add toJS(... const String& ...). 35 36 * bindings/js/JSPluginElementFunctions.cpp: 37 (WebCore::pluginScriptObject): Give a plug-in replacement a first shot at defining the 38 script interface. 39 40 * html/HTMLEmbedElement.cpp: 41 (WebCore::HTMLEmbedElement::updateWidget): Call base class requestObject. 42 43 * html/HTMLMediaElement.cpp: 44 (HTMLMediaElement::fileSize): New, passthrough to media engine. 45 * html/HTMLMediaElement.h: 46 47 * html/HTMLObjectElement.cpp: 48 (WebCore::HTMLObjectElement::updateWidget): Call base class requestObject. 49 50 Moved some logic that was previously used only for creating a plug-in snapshot to the base 51 class so it can be shared by a plug-in replacement. 52 * html/HTMLPlugInElement.cpp: 53 (WebCore::HTMLPlugInElement::HTMLPlugInElement): Initialize timer used to swap renderers. 54 (WebCore::HTMLPlugInElement::createRenderer): Allow plug-in replacement to create the renderer. 55 (WebCore::HTMLPlugInElement::swapRendererTimerFired): Create a shadow root. 56 (WebCore::HTMLPlugInElement::setDisplayState): Set the new state, prime the swap renderer 57 timer if necessary. 58 (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot): Tell the plug-in replacement to 59 install itself in the new shadow DOM. 60 (WebCore::registeredPluginReplacements): Return vector of all registered plug-in replacements. 61 (WebCore::registerPluginReplacement): Add a plug-in replacement. 62 (WebCore::pluginReplacementForType): Find a plug-in replacement for a MIME type. 63 (WebCore::HTMLPlugInElement::requestObject): If there is a plug-in replacement for the MIME type, 64 create it and set the display state. 65 (WebCore::HTMLPlugInElement::scriptObjectForPluginReplacement): Return the script object for 66 the current plug-in replacement, if any. 67 * html/HTMLPlugInElement.h: 68 69 Move some plug-in snapshot code into the base class. 70 * html/HTMLPlugInImageElement.cpp: 71 (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): No need to initialize timer. 72 (WebCore::HTMLPlugInImageElement::setDisplayState): Call base class. 73 (WebCore::HTMLPlugInImageElement::createRenderer): Ditto. 74 (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Ditto. 75 (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Remove unnecessary class name. 76 (WebCore::HTMLPlugInImageElement::requestObject): New. 77 * html/HTMLPlugInImageElement.h: 78 79 * html/HTMLVideoElement.h: Make createRenderer public so the QuickTime plug-in replacement can 80 call it. 81 82 * platform/graphics/MediaPlayer.cpp: 83 (WebCore::MediaPlayer::fileSize): New. 84 * platform/graphics/MediaPlayer.h: 85 * platform/graphics/MediaPlayerPrivate.h: 86 87 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: 88 (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): totalBytes returns an unsigned long long. 89 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: 90 (WebCore::MediaPlayerPrivateAVFoundation::fileSize): 91 92 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: 93 (WebCore::MediaPlayerPrivateAVFoundationCF::totalBytes): Return an unsigned long long. 94 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: 95 96 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: 97 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 98 (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes): Ditto. 99 100 * testing/InternalSettings.cpp: 101 (WebCore::InternalSettings::Backup::Backup): Backup the plug-in replacement runtime setting. 102 (WebCore::InternalSettings::Backup::restoreTo): Restore it. 103 (WebCore::InternalSettings::setPluginReplacementEnabled): Set it. 104 * testing/InternalSettings.h: 105 * testing/InternalSettings.idl: 106 1 107 2013-11-27 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> 2 108 -
trunk/Source/WebCore/DerivedSources.make
r159797 r159827 37 37 $(WebCore)/Modules/mediastream \ 38 38 $(WebCore)/Modules/notifications \ 39 $(WebCore)/Modules/plugins \ 39 40 $(WebCore)/Modules/quota \ 40 41 $(WebCore)/Modules/speech \ … … 142 143 $(WebCore)/Modules/notifications/NotificationPermissionCallback.idl \ 143 144 $(WebCore)/Modules/notifications/WorkerGlobalScopeNotifications.idl \ 145 $(WebCore)/Modules/plugins/QuickTimePluginReplacement.idl \ 144 146 $(WebCore)/Modules/quota/DOMWindowQuota.idl \ 145 147 $(WebCore)/Modules/quota/NavigatorStorageQuota.idl \ … … 871 873 endif 872 874 875 ifeq ($(OS),MACOS) 876 USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/Modules/plugins/QuickTimePluginReplacement.css 877 endif 878 873 879 UserAgentStyleSheets.h : css/make-css-file-arrays.pl bindings/scripts/preprocessor.pm $(USER_AGENT_STYLE_SHEETS) $(PLATFORM_FEATURE_DEFINES) 874 880 perl -I$(WebCore)/bindings/scripts $< --defines "$(FEATURE_DEFINES)" $@ UserAgentStyleSheetsData.cpp $(USER_AGENT_STYLE_SHEETS) … … 884 890 endif 885 891 892 ifeq ($(OS),MACOS) 893 USER_AGENT_SCRIPTS := $(USER_AGENT_SCRIPTS) $(WebCore)/Modules/plugins/QuickTimePluginReplacement.js 894 endif 886 895 887 896 UserAgentScripts.h : css/make-css-file-arrays.pl bindings/scripts/preprocessor.pm $(USER_AGENT_SCRIPTS) $(PLATFORM_FEATURE_DEFINES) -
trunk/Source/WebCore/GNUmakefile.am
r159419 r159827 20 20 -I$(srcdir)/Source/WebCore/Modules/navigatorcontentutils \ 21 21 -I$(srcdir)/Source/WebCore/Modules/notifications \ 22 -I$(srcdir)/Source/WebCore/Modules/plugins \ 22 23 -I$(srcdir)/Source/WebCore/Modules/proximity \ 23 24 -I$(srcdir)/Source/WebCore/Modules/quota \ -
trunk/Source/WebCore/GNUmakefile.list.am
r159823 r159827 1978 1978 Source/WebCore/Modules/notifications/WorkerGlobalScopeNotifications.cpp \ 1979 1979 Source/WebCore/Modules/notifications/WorkerGlobalScopeNotifications.h \ 1980 Source/WebCore/Modules/plugins/PluginReplacement.h \ 1980 1981 Source/WebCore/Modules/proximity/DeviceProximityClient.h \ 1981 1982 Source/WebCore/Modules/proximity/DeviceProximityController.cpp \ -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r159730 r159827 18696 18696 <ClInclude Include="..\Modules\notifications\NotificationClient.h" /> 18697 18697 <ClInclude Include="..\Modules\notifications\WorkerGlobalScopeNotifications.h" /> 18698 <ClInclude Include="..\Modules\plugins\PluginReplacement.h" /> 18698 18699 <ClInclude Include="..\Modules\webdatabase\AbstractDatabaseServer.h" /> 18699 18700 <ClInclude Include="..\Modules\webdatabase\AbstractSQLStatement.h" /> -
trunk/Source/WebCore/WebCore.vcxproj/WebCoreCommon.props
r159499 r159827 8 8 <ItemDefinitionGroup> 9 9 <ClCompile> 10 <AdditionalIncludeDirectories>$(ProjectDir)..;$(ProjectDir)..\Modules\mediacontrols;$(ProjectDir)..\Modules\mediastream;$(ProjectDir)..\Modules\filesystem;$(ProjectDir)..\Modules\geolocation;$(ProjectDir)..\Modules\indexeddb;$(ProjectDir)..\Modules\mediasource;$(ProjectDir)..\Modules\navigatorcontentutils;$(ProjectDir)..\Modules\ speech;$(ProjectDir)..\Modules\proximity;$(ProjectDir)..\Modules\quota;$(ProjectDir)..\Modules\notifications;$(ProjectDir)..\Modules\webdatabase;$(ProjectDir)..\Modules\websockets;$(ProjectDir)..\accessibility;$(ProjectDir)..\accessibility\win;$(ProjectDir)..\bridge;$(ProjectDir)..\bridge\c;$(ProjectDir)..\bridge\jsc;$(ProjectDir)..\css;$(ProjectDir)..\editing;$(ProjectDir)..\fileapi;$(ProjectDir)..\rendering;$(ProjectDir)..\rendering\line;$(ProjectDir)..\rendering\mathml;$(ProjectDir)..\rendering\shapes;$(ProjectDir)..\rendering\style;$(ProjectDir)..\rendering\svg;$(ProjectDir)..\bindings;$(ProjectDir)..\bindings\generic;$(ProjectDir)..\bindings\js;$(ProjectDir)..\bindings\js\specialization;$(ProjectDir)..\dom;$(ProjectDir)..\dom\default;$(ProjectDir)..\history;$(ProjectDir)..\html;$(ProjectDir)..\html\canvas;$(ProjectDir)..\html\forms;$(ProjectDir)..\html\parser;$(ProjectDir)..\html\shadow;$(ProjectDir)..\html\track;$(ProjectDir)..\inspector;$(ProjectDir)..\loader;$(ProjectDir)..\loader\appcache;$(ProjectDir)..\loader\archive;$(ProjectDir)..\loader\archive\cf;$(ProjectDir)..\loader\cache;$(ProjectDir)..\loader\icon;$(ProjectDir)..\mathml;$(ProjectDir)..\page;$(ProjectDir)..\page\animation;$(ProjectDir)..\page\scrolling;$(ProjectDir)..\page\win;$(ProjectDir)..\platform;$(ProjectDir)..\platform\animation;$(ProjectDir)..\platform\mock;$(ProjectDir)..\platform\sql;$(ProjectDir)..\platform\win;$(ProjectDir)..\platform\network;$(ProjectDir)..\platform\network\win;$(ProjectDir)..\platform\cf;$(ProjectDir)..\platform\graphics;$(ProjectDir)..\platform\graphics\ca;$(ProjectDir)..\platform\graphics\cpu\arm\filters;$(ProjectDir)..\platform\graphics\filters;$(ProjectDir)..\platform\graphics\filters\arm;$(ProjectDir)..\platform\graphics\opentype;$(ProjectDir)..\platform\graphics\transforms;$(ProjectDir)..\platform\text;$(ProjectDir)..\platform\text\transcoder;$(ProjectDir)..\platform\graphics\win;$(ProjectDir)..\xml;$(ProjectDir)..\xml\parser;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources;$(ProjectDir)..\plugins;$(ProjectDir)..\plugins\win;$(ProjectDir)..\svg\animation;$(ProjectDir)..\svg\graphics;$(ProjectDir)..\svg\properties;$(ProjectDir)..\svg\graphics\filters;$(ProjectDir)..\svg;$(ProjectDir)..\testing;$(ProjectDir)..\crypto;$(ProjectDir)..\wml;$(ProjectDir)..\storage;$(ProjectDir)..\style;$(ProjectDir)..\websockets;$(ProjectDir)..\workers;$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(ConfigurationBuildDir)\include\JavaScriptCore;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ProjectDir)..\ForwardingHeaders;$(ProjectDir)..\platform\graphics\gpu;$(ProjectDir)..\platform\graphics\egl;$(ProjectDir)..\platform\graphics\surfaces;$(ProjectDir)..\platform\graphics\surfaces\egl;$(ProjectDir)..\platform\graphics\opengl;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;$(WebKit_Libraries)\include\private\JavaScriptCore;$(WebKit_Libraries)\include\sqlite;$(WebKit_Libraries)\include\JavaScriptCore;$(WebKit_Libraries)\include\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>10 <AdditionalIncludeDirectories>$(ProjectDir)..;$(ProjectDir)..\Modules\mediacontrols;$(ProjectDir)..\Modules\mediastream;$(ProjectDir)..\Modules\filesystem;$(ProjectDir)..\Modules\geolocation;$(ProjectDir)..\Modules\indexeddb;$(ProjectDir)..\Modules\mediasource;$(ProjectDir)..\Modules\navigatorcontentutils;$(ProjectDir)..\Modules\plugins;$(ProjectDir)..\Modules\speech;$(ProjectDir)..\Modules\proximity;$(ProjectDir)..\Modules\quota;$(ProjectDir)..\Modules\notifications;$(ProjectDir)..\Modules\webdatabase;$(ProjectDir)..\Modules\websockets;$(ProjectDir)..\accessibility;$(ProjectDir)..\accessibility\win;$(ProjectDir)..\bridge;$(ProjectDir)..\bridge\c;$(ProjectDir)..\bridge\jsc;$(ProjectDir)..\css;$(ProjectDir)..\editing;$(ProjectDir)..\fileapi;$(ProjectDir)..\rendering;$(ProjectDir)..\rendering\line;$(ProjectDir)..\rendering\mathml;$(ProjectDir)..\rendering\shapes;$(ProjectDir)..\rendering\style;$(ProjectDir)..\rendering\svg;$(ProjectDir)..\bindings;$(ProjectDir)..\bindings\generic;$(ProjectDir)..\bindings\js;$(ProjectDir)..\bindings\js\specialization;$(ProjectDir)..\dom;$(ProjectDir)..\dom\default;$(ProjectDir)..\history;$(ProjectDir)..\html;$(ProjectDir)..\html\canvas;$(ProjectDir)..\html\forms;$(ProjectDir)..\html\parser;$(ProjectDir)..\html\shadow;$(ProjectDir)..\html\track;$(ProjectDir)..\inspector;$(ProjectDir)..\loader;$(ProjectDir)..\loader\appcache;$(ProjectDir)..\loader\archive;$(ProjectDir)..\loader\archive\cf;$(ProjectDir)..\loader\cache;$(ProjectDir)..\loader\icon;$(ProjectDir)..\mathml;$(ProjectDir)..\page;$(ProjectDir)..\page\animation;$(ProjectDir)..\page\scrolling;$(ProjectDir)..\page\win;$(ProjectDir)..\platform;$(ProjectDir)..\platform\animation;$(ProjectDir)..\platform\mock;$(ProjectDir)..\platform\sql;$(ProjectDir)..\platform\win;$(ProjectDir)..\platform\network;$(ProjectDir)..\platform\network\win;$(ProjectDir)..\platform\cf;$(ProjectDir)..\platform\graphics;$(ProjectDir)..\platform\graphics\ca;$(ProjectDir)..\platform\graphics\cpu\arm\filters;$(ProjectDir)..\platform\graphics\filters;$(ProjectDir)..\platform\graphics\filters\arm;$(ProjectDir)..\platform\graphics\opentype;$(ProjectDir)..\platform\graphics\transforms;$(ProjectDir)..\platform\text;$(ProjectDir)..\platform\text\transcoder;$(ProjectDir)..\platform\graphics\win;$(ProjectDir)..\xml;$(ProjectDir)..\xml\parser;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources;$(ProjectDir)..\plugins;$(ProjectDir)..\plugins\win;$(ProjectDir)..\svg\animation;$(ProjectDir)..\svg\graphics;$(ProjectDir)..\svg\properties;$(ProjectDir)..\svg\graphics\filters;$(ProjectDir)..\svg;$(ProjectDir)..\testing;$(ProjectDir)..\crypto;$(ProjectDir)..\wml;$(ProjectDir)..\storage;$(ProjectDir)..\style;$(ProjectDir)..\websockets;$(ProjectDir)..\workers;$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(ConfigurationBuildDir)\include\JavaScriptCore;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ProjectDir)..\ForwardingHeaders;$(ProjectDir)..\platform\graphics\gpu;$(ProjectDir)..\platform\graphics\egl;$(ProjectDir)..\platform\graphics\surfaces;$(ProjectDir)..\platform\graphics\surfaces\egl;$(ProjectDir)..\platform\graphics\opengl;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;$(WebKit_Libraries)\include\private\JavaScriptCore;$(WebKit_Libraries)\include\sqlite;$(WebKit_Libraries)\include\JavaScriptCore;$(WebKit_Libraries)\include\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 11 11 <PreprocessorDefinitions>DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 12 12 <PrecompiledHeader>Use</PrecompiledHeader> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r159797 r159827 147 147 07277E5417D018CC0015534D /* JSMediaStreamTrackEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07277E4817D018CC0015534D /* JSMediaStreamTrackEvent.cpp */; }; 148 148 07277E5517D018CC0015534D /* JSMediaStreamTrackEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E4917D018CC0015534D /* JSMediaStreamTrackEvent.h */; settings = {ATTRIBUTES = (Private, ); }; }; 149 072AE1E5183C0741000A5988 /* PluginReplacement.h in Headers */ = {isa = PBXBuildFile; fileRef = 072AE1DF183C0741000A5988 /* PluginReplacement.h */; }; 150 072AE1E6183C0741000A5988 /* QuickTimePluginReplacement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 072AE1E0183C0741000A5988 /* QuickTimePluginReplacement.cpp */; }; 151 072AE1E8183C0741000A5988 /* QuickTimePluginReplacement.h in Headers */ = {isa = PBXBuildFile; fileRef = 072AE1E2183C0741000A5988 /* QuickTimePluginReplacement.h */; }; 149 152 072C8B11131C518600A4FCE9 /* MediaPlayerPrivateAVFoundation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 076F0D0912B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.cpp */; }; 150 153 072CA86116CB4DC3008AE131 /* CaptionUserPreferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 072CA86016CB4DC3008AE131 /* CaptionUserPreferences.cpp */; }; … … 188 191 07846343145B151A00A58DF1 /* JSTrackEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07846341145B151A00A58DF1 /* JSTrackEvent.h */; }; 189 192 07846385145B1B8E00A58DF1 /* JSTrackCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 07846384145B1B8E00A58DF1 /* JSTrackCustom.h */; }; 193 077664FC183E6B5C00133B92 /* JSQuickTimePluginReplacement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 077664FA183E6B5C00133B92 /* JSQuickTimePluginReplacement.cpp */; }; 194 077664FD183E6B5C00133B92 /* JSQuickTimePluginReplacement.h in Headers */ = {isa = PBXBuildFile; fileRef = 077664FB183E6B5C00133B92 /* JSQuickTimePluginReplacement.h */; }; 190 195 078E08FE17D14CEE00420AA1 /* MediaConstraintsImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B4A17CEC32700848E51 /* MediaConstraintsImpl.cpp */; }; 191 196 078E08FF17D14CEE00420AA1 /* MediaStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B4C17CEC32700848E51 /* MediaStream.cpp */; }; … … 6766 6771 0729B14E17CFCCA0004F1D60 /* MediaStreamCenterMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStreamCenterMac.cpp; sourceTree = "<group>"; }; 6767 6772 0729B14F17CFCCA0004F1D60 /* MediaStreamCenterMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamCenterMac.h; sourceTree = "<group>"; }; 6773 072AE1DF183C0741000A5988 /* PluginReplacement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PluginReplacement.h; path = plugins/PluginReplacement.h; sourceTree = "<group>"; }; 6774 072AE1E0183C0741000A5988 /* QuickTimePluginReplacement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = QuickTimePluginReplacement.cpp; path = plugins/QuickTimePluginReplacement.cpp; sourceTree = "<group>"; }; 6775 072AE1E1183C0741000A5988 /* QuickTimePluginReplacement.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = QuickTimePluginReplacement.css; path = plugins/QuickTimePluginReplacement.css; sourceTree = "<group>"; }; 6776 072AE1E2183C0741000A5988 /* QuickTimePluginReplacement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuickTimePluginReplacement.h; path = plugins/QuickTimePluginReplacement.h; sourceTree = "<group>"; }; 6777 072AE1E3183C0741000A5988 /* QuickTimePluginReplacement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = QuickTimePluginReplacement.idl; path = plugins/QuickTimePluginReplacement.idl; sourceTree = "<group>"; }; 6778 072AE1E4183C0741000A5988 /* QuickTimePluginReplacement.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = QuickTimePluginReplacement.js; path = plugins/QuickTimePluginReplacement.js; sourceTree = "<group>"; }; 6768 6779 072CA86016CB4DC3008AE131 /* CaptionUserPreferences.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CaptionUserPreferences.cpp; sourceTree = "<group>"; }; 6769 6780 0735EE690F40C5E4004A2604 /* MediaPlayerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlayerProxy.h; sourceTree = "<group>"; }; … … 6804 6815 0783228218013ED700999E0C /* MediaStreamAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStreamAudioSource.cpp; sourceTree = "<group>"; }; 6805 6816 0783228318013ED800999E0C /* MediaStreamAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamAudioSource.h; sourceTree = "<group>"; }; 6817 077664FA183E6B5C00133B92 /* JSQuickTimePluginReplacement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSQuickTimePluginReplacement.cpp; path = JSQuickTimePluginReplacement.cpp; sourceTree = "<group>"; }; 6818 077664FB183E6B5C00133B92 /* JSQuickTimePluginReplacement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSQuickTimePluginReplacement.h; path = JSQuickTimePluginReplacement.h; sourceTree = "<group>"; }; 6806 6819 07846340145B151A00A58DF1 /* JSTrackEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTrackEvent.cpp; sourceTree = "<group>"; }; 6807 6820 07846341145B151A00A58DF1 /* JSTrackEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTrackEvent.h; sourceTree = "<group>"; }; … … 13756 13769 sourceTree = "<group>"; 13757 13770 }; 13771 072AE1DE183C0513000A5988 /* plugins */ = { 13772 isa = PBXGroup; 13773 children = ( 13774 072AE1DF183C0741000A5988 /* PluginReplacement.h */, 13775 072AE1E0183C0741000A5988 /* QuickTimePluginReplacement.cpp */, 13776 072AE1E1183C0741000A5988 /* QuickTimePluginReplacement.css */, 13777 072AE1E2183C0741000A5988 /* QuickTimePluginReplacement.h */, 13778 072AE1E3183C0741000A5988 /* QuickTimePluginReplacement.idl */, 13779 072AE1E4183C0741000A5988 /* QuickTimePluginReplacement.js */, 13780 ); 13781 name = plugins; 13782 sourceTree = "<group>"; 13783 }; 13758 13784 076F0D0812B8192700C26AA4 /* avfoundation */ = { 13759 13785 isa = PBXGroup; … … 14101 14127 isa = PBXGroup; 14102 14128 children = ( 14129 077664FA183E6B5C00133B92 /* JSQuickTimePluginReplacement.cpp */, 14130 077664FB183E6B5C00133B92 /* JSQuickTimePluginReplacement.h */, 14103 14131 A83B79100CCB001B000B0825 /* Core */, 14104 14132 E1FF8F61180745C600132674 /* Crypto */, … … 16955 16983 isa = PBXGroup; 16956 16984 children = ( 16985 072AE1DE183C0513000A5988 /* plugins */, 16957 16986 CDA98DBD16014E0800FEA3B1 /* encryptedmedia */, 16958 16987 971145FF14EF007900674FD9 /* geolocation */, … … 21997 22026 0709FC4E1025DEE30059CDBA /* AccessibilitySlider.h in Headers */, 21998 22027 51D719D7181106E00016DC51 /* IDBHistograms.h in Headers */, 22028 072AE1E8183C0741000A5988 /* QuickTimePluginReplacement.h in Headers */, 21999 22029 29D7BCFA1444AF7D0070619C /* AccessibilitySpinButton.h in Headers */, 22000 22030 AAC08CF315F941FD00F1E188 /* AccessibilitySVGRoot.h in Headers */, … … 22193 22223 FD31600212B0267600C1A359 /* ChannelSplitterNode.h in Headers */, 22194 22224 6550B6A0099DF0270090D781 /* CharacterData.h in Headers */, 22225 077664FD183E6B5C00133B92 /* JSQuickTimePluginReplacement.h in Headers */, 22195 22226 97B8FFD116AE7F960038388D /* CharacterReferenceParserInlines.h in Headers */, 22196 22227 E164FAA318315BF400DB4E61 /* CryptoKeyRSA.h in Headers */, … … 24893 24924 5DA97ECD168E787B000E3676 /* SystemVersionMac.h in Headers */, 24894 24925 A8CFF0510A154F09000A4234 /* TableLayout.h in Headers */, 24926 072AE1E5183C0741000A5988 /* PluginReplacement.h in Headers */, 24895 24927 BCE3BEC30D222B1D007E06E4 /* TagNodeList.h in Headers */, 24896 24928 F55B3DD61251F12D003EF269 /* TelephoneInputType.h in Headers */, … … 27043 27075 B2FA3D9E0AB75A6F000E5AC4 /* JSSVGImageElement.cpp in Sources */, 27044 27076 B2FA3DA00AB75A6F000E5AC4 /* JSSVGLength.cpp in Sources */, 27077 077664FC183E6B5C00133B92 /* JSQuickTimePluginReplacement.cpp in Sources */, 27045 27078 08E4FE460E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp in Sources */, 27046 27079 B2FA3DA20AB75A6F000E5AC4 /* JSSVGLengthList.cpp in Sources */, … … 27249 27282 9759E93E14EF1CF80026A2DD /* LoadableTextTrack.cpp in Sources */, 27250 27283 656D37330ADBA5DE00A4554D /* LoaderNSURLExtras.mm in Sources */, 27284 072AE1E6183C0741000A5988 /* QuickTimePluginReplacement.cpp in Sources */, 27251 27285 7EE6846812D26E3800E79415 /* LoaderRunLoopCF.cpp in Sources */, 27252 27286 51ABF64D16392E2800132A7A /* LoaderStrategy.cpp in Sources */, -
trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
r158269 r159827 229 229 void setLangAttributeAwareFormControlUIEnabled(bool isEnabled) { m_isLangAttributeAwareFormControlUIEnabled = isEnabled; } 230 230 231 void setPluginReplacementEnabled(bool isEnabled) { m_isPluginReplacementEnabled = isEnabled; } 232 bool pluginReplacementEnabled() const { return m_isPluginReplacementEnabled; } 233 231 234 static RuntimeEnabledFeatures& sharedFeatures(); 232 235 … … 251 254 bool m_isCSSCompositingEnabled; 252 255 bool m_isLangAttributeAwareFormControlUIEnabled; 256 bool m_isPluginReplacementEnabled; 257 253 258 #if ENABLE(SCRIPTED_SPEECH) 254 259 bool m_isScriptedSpeechEnabled; -
trunk/Source/WebCore/bindings/js/JSDOMBinding.h
r159275 r159827 393 393 } 394 394 395 inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject*, const String& value) 396 { 397 return jsStringOrNull(exec, value); 398 } 399 395 400 template <class T> 396 401 struct JSValueTraits { -
trunk/Source/WebCore/bindings/js/JSPluginElementFunctions.cpp
r159416 r159827 83 83 HTMLPlugInElement& pluginElement = toHTMLPlugInElement(element); 84 84 85 // First, see if we can ask the plug-in view for its script object. 85 // First, see if the element has a plug-in replacement with a script. 86 if (JSObject* scriptObject = pluginElement.scriptObjectForPluginReplacement()) 87 return scriptObject; 88 89 // Next, see if we can ask the plug-in view for its script object. 86 90 if (JSObject* scriptObject = pluginScriptObjectFromPluginViewBase(pluginElement, jsHTMLElement->globalObject())) 87 91 return scriptObject; -
trunk/Source/WebCore/html/HTMLEmbedElement.cpp
r159416 r159827 171 171 return; 172 172 173 SubframeLoader& loader = document().frame()->loader().subframeLoader();174 173 // FIXME: beforeLoad could have detached the renderer! Just like in the <object> case above. 175 loader.requestObject(*this, m_url, getNameAttribute(), m_serviceType, paramNames, paramValues);174 requestObject(m_url, m_serviceType, paramNames, paramValues); 176 175 } 177 176 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r159797 r159827 5301 5301 #endif 5302 5302 5303 } 5304 5305 #endif 5303 unsigned long long HTMLMediaElement::fileSize() const 5304 { 5305 if (m_player) 5306 return m_player->fileSize(); 5307 5308 return 0; 5309 } 5310 5311 } 5312 5313 #endif -
trunk/Source/WebCore/html/HTMLMediaElement.h
r159797 r159827 394 394 #endif 395 395 396 unsigned long long fileSize() const; 397 396 398 protected: 397 399 HTMLMediaElement(const QualifiedName&, Document&, bool); -
trunk/Source/WebCore/html/HTMLObjectElement.cpp
r159604 r159827 308 308 return; 309 309 310 SubframeLoader& loader = document().frame()->loader().subframeLoader(); 311 bool success = beforeLoadAllowedLoad && hasValidClassId() && loader.requestObject(*this, url, getNameAttribute(), serviceType, paramNames, paramValues); 310 bool success = beforeLoadAllowedLoad && hasValidClassId(); 311 if (success) 312 success = requestObject(url, serviceType, paramNames, paramValues); 312 313 if (!success && hasFallbackContent()) 313 314 renderFallbackContent(); -
trunk/Source/WebCore/html/HTMLPlugInElement.cpp
r159023 r159827 36 36 #include "FrameTree.h" 37 37 #include "HTMLNames.h" 38 #include "Logging.h" 39 #include "MIMETypeRegistry.h" 38 40 #include "Page.h" 41 #include "PluginData.h" 42 #include "PluginReplacement.h" 39 43 #include "PluginViewBase.h" 40 44 #include "RenderEmbeddedObject.h" 41 45 #include "RenderSnapshottedPlugIn.h" 42 46 #include "RenderWidget.h" 47 #include "RuntimeEnabledFeatures.h" 43 48 #include "ScriptController.h" 44 49 #include "Settings.h" 50 #include "ShadowRoot.h" 51 #include "SubframeLoader.h" 45 52 #include "Widget.h" 46 53 47 54 #if ENABLE(NETSCAPE_PLUGIN_API) 48 55 #include "npruntime_impl.h" 56 #endif 57 58 #if PLATFORM(MAC) 59 #include "QuickTimePluginReplacement.h" 49 60 #endif 50 61 … … 56 67 : HTMLFrameOwnerElement(tagName, document) 57 68 , m_inBeforeLoadEventHandler(false) 69 , m_swapRendererTimer(this, &HTMLPlugInElement::swapRendererTimerFired) 58 70 #if ENABLE(NETSCAPE_PLUGIN_API) 59 71 , m_NPObject(0) … … 263 275 #endif /* ENABLE(NETSCAPE_PLUGIN_API) */ 264 276 265 } 277 RenderElement* HTMLPlugInElement::createRenderer(PassRef<RenderStyle> style) 278 { 279 if (m_pluginReplacement && m_pluginReplacement->willCreateRenderer()) 280 return m_pluginReplacement->createRenderer(*this, std::move(style)); 281 282 return new RenderEmbeddedObject(*this, std::move(style)); 283 } 284 285 void HTMLPlugInElement::swapRendererTimerFired(Timer<HTMLPlugInElement>*) 286 { 287 ASSERT(displayState() == PreparingPluginReplacement || displayState() == DisplayingSnapshot); 288 if (userAgentShadowRoot()) 289 return; 290 291 // Create a shadow root, which will trigger the code to add a snapshot container 292 // and reattach, thus making a new Renderer. 293 ensureUserAgentShadowRoot(); 294 } 295 296 void HTMLPlugInElement::setDisplayState(DisplayState state) 297 { 298 m_displayState = state; 299 300 if ((state == DisplayingSnapshot || displayState() == PreparingPluginReplacement) && !m_swapRendererTimer.isActive()) 301 m_swapRendererTimer.startOneShot(0); 302 } 303 304 void HTMLPlugInElement::didAddUserAgentShadowRoot(ShadowRoot* root) 305 { 306 if (!m_pluginReplacement || !document().page() || displayState() != PreparingPluginReplacement) 307 return; 308 309 root->setResetStyleInheritance(true); 310 if (m_pluginReplacement->installReplacement(root)) { 311 setDisplayState(DisplayingPluginReplacement); 312 Style::reattachRenderTree(*this); 313 } 314 } 315 316 #if PLATFORM(MAC) 317 static void registrar(const ReplacementPlugin&); 318 #endif 319 320 static Vector<ReplacementPlugin*>& registeredPluginReplacements() 321 { 322 DEFINE_STATIC_LOCAL(Vector<ReplacementPlugin*>, registeredReplacements, ()); 323 static bool enginesQueried = false; 324 325 if (enginesQueried) 326 return registeredReplacements; 327 enginesQueried = true; 328 329 #if PLATFORM(MAC) 330 QuickTimePluginReplacement::registerPluginReplacement(registrar); 331 #endif 332 333 return registeredReplacements; 334 } 335 336 #if PLATFORM(MAC) 337 static void registrar(const ReplacementPlugin& replacement) 338 { 339 registeredPluginReplacements().append(new ReplacementPlugin(replacement)); 340 } 341 #endif 342 343 static ReplacementPlugin* pluginReplacementForType(const URL& url, const String& mimeType) 344 { 345 Vector<ReplacementPlugin*>& replacements = registeredPluginReplacements(); 346 if (replacements.isEmpty()) 347 return nullptr; 348 349 String extension; 350 String lastPathComponent = url.lastPathComponent(); 351 size_t dotOffset = lastPathComponent.reverseFind('.'); 352 if (dotOffset != notFound) 353 extension = lastPathComponent.substring(dotOffset + 1); 354 355 String type = mimeType; 356 if (type.isEmpty() && url.protocolIsData()) 357 type = mimeTypeFromDataURL(url.string()); 358 359 if (type.isEmpty() && !extension.isEmpty()) { 360 for (size_t i = 0; i < replacements.size(); i++) 361 if (replacements[i]->supportsFileExtension(extension)) 362 return replacements[i]; 363 } 364 365 if (type.isEmpty()) { 366 if (extension.isEmpty()) 367 return nullptr; 368 type = MIMETypeRegistry::getMediaMIMETypeForExtension(extension); 369 } 370 371 if (type.isEmpty()) 372 return nullptr; 373 374 for (unsigned i = 0; i < replacements.size(); i++) 375 if (replacements[i]->supportsType(type)) 376 return replacements[i]; 377 378 return nullptr; 379 } 380 381 bool HTMLPlugInElement::requestObject(const String& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues) 382 { 383 if (!RuntimeEnabledFeatures::sharedFeatures().pluginReplacementEnabled()) 384 return false; 385 386 if (m_pluginReplacement) 387 return true; 388 389 URL completedURL; 390 if (!url.isEmpty()) 391 completedURL = document().completeURL(url); 392 393 ReplacementPlugin* replacement = pluginReplacementForType(completedURL, mimeType); 394 if (!replacement) 395 return false; 396 397 LOG(Plugins, "%p - Found plug-in replacement for %s.", this, completedURL.string().utf8().data()); 398 399 m_pluginReplacement = replacement->create(*this, paramNames, paramValues); 400 setDisplayState(PreparingPluginReplacement); 401 return true; 402 } 403 404 JSC::JSObject* HTMLPlugInElement::scriptObjectForPluginReplacement() 405 { 406 if (m_pluginReplacement) 407 return m_pluginReplacement->scriptObject(); 408 return nullptr; 409 } 410 411 } -
trunk/Source/WebCore/html/HTMLPlugInElement.h
r158985 r159827 39 39 namespace WebCore { 40 40 41 class PluginReplacement; 41 42 class RenderEmbeddedObject; 42 43 class RenderWidget; … … 58 59 Restarting, 59 60 RestartingWithPendingMouseClick, 60 Playing 61 Playing, 62 PreparingPluginReplacement, 63 DisplayingPluginReplacement, 61 64 }; 62 65 DisplayState displayState() const { return m_displayState; } 63 virtual void setDisplayState(DisplayState state) { m_displayState = state; }66 virtual void setDisplayState(DisplayState); 64 67 virtual void updateSnapshot(PassRefPtr<Image>) { } 65 68 virtual void dispatchPendingMouseClick() { } 66 69 virtual bool isRestartedPlugin() const { return false; } 70 71 JSC::JSObject* scriptObjectForPluginReplacement(); 67 72 68 73 #if ENABLE(NETSCAPE_PLUGIN_API) … … 92 97 virtual void defaultEventHandler(Event*) OVERRIDE; 93 98 99 virtual bool requestObject(const String& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues); 100 virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE; 101 virtual void didAddUserAgentShadowRoot(ShadowRoot*) OVERRIDE; 102 94 103 // Subclasses should use guardedDispatchBeforeLoadEvent instead of calling dispatchBeforeLoadEvent directly. 95 104 bool guardedDispatchBeforeLoadEvent(const String& sourceURL); … … 98 107 99 108 private: 109 void swapRendererTimerFired(Timer<HTMLPlugInElement>*); 110 bool shouldOverridePlugin(const String& url, const String& mimeType); 111 100 112 bool dispatchBeforeLoadEvent(const String& sourceURL); // Not implemented, generates a compile error if subclasses call this by mistake. 101 113 … … 110 122 111 123 RefPtr<JSC::Bindings::Instance> m_instance; 124 Timer<HTMLPlugInElement> m_swapRendererTimer; 125 RefPtr<PluginReplacement> m_pluginReplacement; 112 126 #if ENABLE(NETSCAPE_PLUGIN_API) 113 127 NPObject* m_NPObject; -
trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp
r159604 r159827 109 109 , m_needsDocumentActivationCallbacks(false) 110 110 , m_simulatedMouseClickTimer(this, &HTMLPlugInImageElement::simulatedMouseClickTimerFired, simulatedMouseClickTimerDelay) 111 , m_swapRendererTimer(this, &HTMLPlugInImageElement::swapRendererTimerFired)112 111 , m_removeSnapshotTimer(this, &HTMLPlugInImageElement::removeSnapshotTimerFired) 113 112 , m_createdDuringUserGesture(ScriptController::processingUserGesture()) … … 140 139 141 140 HTMLPlugInElement::setDisplayState(state); 142 143 if (state == DisplayingSnapshot)144 m_swapRendererTimer.startOneShot(0);145 141 } 146 142 … … 197 193 RenderElement* HTMLPlugInImageElement::createRenderer(PassRef<RenderStyle> style) 198 194 { 195 if (displayState() >= PreparingPluginReplacement) 196 return HTMLPlugInElement::createRenderer(std::move(style)); 197 199 198 // Once a PlugIn Element creates its renderer, it needs to be told when the Document goes 200 199 // inactive or reactivates so it can clear the renderer before going into the page cache. … … 222 221 } 223 222 224 return new RenderEmbeddedObject(*this,std::move(style));223 return HTMLPlugInElement::createRenderer(std::move(style)); 225 224 } 226 225 … … 364 363 void HTMLPlugInImageElement::didAddUserAgentShadowRoot(ShadowRoot* root) 365 364 { 365 HTMLPlugInElement::didAddUserAgentShadowRoot(root); 366 if (displayState() >= PreparingPluginReplacement) 367 return; 368 366 369 Page* page = document().page(); 367 if ( !page)370 if (page) 368 371 return; 369 372 … … 408 411 RefPtr<Element> snapshotLabel = ensureUserAgentShadowRoot().querySelector(selector, ASSERT_NO_EXCEPTION); 409 412 return node && snapshotLabel && (node == snapshotLabel.get() || node->isDescendantOf(snapshotLabel.get())); 410 }411 412 void HTMLPlugInImageElement::swapRendererTimerFired(Timer<HTMLPlugInImageElement>*)413 {414 ASSERT(displayState() == DisplayingSnapshot);415 if (userAgentShadowRoot())416 return;417 418 // Create a shadow root, which will trigger the code to add a snapshot container419 // and reattach, thus making a new Renderer.420 ensureUserAgentShadowRoot();421 413 } 422 414 … … 497 489 restartSnapshottedPlugIn(); 498 490 if (forwardEvent) 499 setDisplayState( HTMLPlugInElement::RestartingWithPendingMouseClick);491 setDisplayState(RestartingWithPendingMouseClick); 500 492 restartSimilarPlugIns(); 501 493 } … … 733 725 } 734 726 727 bool HTMLPlugInImageElement::requestObject(const String& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues) 728 { 729 if (HTMLPlugInElement::requestObject(url, mimeType, paramNames, paramValues)) 730 return true; 731 732 SubframeLoader& loader = document().frame()->loader().subframeLoader(); 733 return loader.requestObject(*this, url, getNameAttribute(), mimeType, paramNames, paramValues); 734 } 735 735 736 } // namespace WebCore -
trunk/Source/WebCore/html/HTMLPlugInImageElement.h
r158097 r159827 30 30 31 31 class HTMLImageLoader; 32 class HTMLVideoElement; 32 33 class FrameLoader; 33 34 class Image; … … 124 125 125 126 virtual bool isRestartedPlugin() const OVERRIDE { return m_isRestartedPlugin; } 127 virtual bool requestObject(const String& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues) OVERRIDE; 126 128 127 129 private: … … 139 141 void simulatedMouseClickTimerFired(DeferrableOneShotTimer<HTMLPlugInImageElement>*); 140 142 141 void swapRendererTimerFired(Timer<HTMLPlugInImageElement>*);142 143 143 void restartSimilarPlugIns(); 144 144 … … 155 155 RefPtr<MouseEvent> m_pendingClickEventFromSnapshot; 156 156 DeferrableOneShotTimer<HTMLPlugInImageElement> m_simulatedMouseClickTimer; 157 Timer<HTMLPlugInImageElement> m_swapRendererTimer;158 157 Timer<HTMLPlugInImageElement> m_removeSnapshotTimer; 159 158 RefPtr<Image> m_snapshotImage; -
trunk/Source/WebCore/html/HTMLVideoElement.h
r159518 r159827 73 73 74 74 URL posterImageURL() const; 75 virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE; 75 76 76 77 private: … … 78 79 79 80 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 80 virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;81 81 virtual void didAttachRenderers() OVERRIDE; 82 82 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; -
trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp
r159518 r159827 1226 1226 } 1227 1227 1228 unsigned long long MediaPlayer::fileSize() const 1229 { 1230 if (!m_private) 1231 return 0; 1232 1233 return m_private->fileSize(); 1234 } 1235 1228 1236 void MediaPlayerFactorySupport::callRegisterMediaEngine(MediaEngineRegister registerMediaEngine) 1229 1237 { -
trunk/Source/WebCore/platform/graphics/MediaPlayer.h
r159518 r159827 509 509 size_t extraMemoryCost() const; 510 510 511 unsigned long long fileSize() const; 512 511 513 private: 512 514 MediaPlayer(MediaPlayerClient*); -
trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h
r159518 r159827 214 214 215 215 virtual size_t extraMemoryCost() const { return 0; } 216 217 virtual unsigned long long fileSize() const { return 0; } 216 218 }; 217 219 -
trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
r159208 r159827 922 922 return 0; 923 923 924 return totalBytes() * buffered()->totalDuration() / duration; 924 unsigned long long extra = totalBytes() * buffered()->totalDuration() / duration; 925 return static_cast<unsigned>(extra); 925 926 } 926 927 -
trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
r159208 r159827 191 191 virtual bool supportsFullscreen() const; 192 192 virtual bool supportsScanning() const { return true; } 193 unsigned long long fileSize() const { return totalBytes(); } 193 194 194 195 // Required interfaces for concrete derived classes. … … 226 227 virtual float rate() const = 0; 227 228 virtual void seekToTime(double time, double negativeTolerance, double positiveTolerance) = 0; 228 virtual unsigned totalBytes() const = 0;229 virtual unsigned long long totalBytes() const = 0; 229 230 virtual PassRefPtr<TimeRanges> platformBufferedTimeRanges() const = 0; 230 231 virtual double platformMaxTimeSeekable() const = 0; -
trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp
r159691 r159827 722 722 } 723 723 724 unsigned MediaPlayerPrivateAVFoundationCF::totalBytes() const724 unsigned long long MediaPlayerPrivateAVFoundationCF::totalBytes() const 725 725 { 726 726 if (!metaDataAvailable() || !avAsset(m_avfWrapper)) … … 735 735 } 736 736 737 // FIXME: It doesn't seem safe to cast an int64_t to unsigned. 738 return static_cast<unsigned>(totalMediaSize); 737 return static_cast<unsigned long long>(totalMediaSize); 739 738 } 740 739 -
trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h
r159302 r159827 78 78 virtual float rate() const; 79 79 virtual void seekToTime(double time, double negativeTolerance, double positiveTolerance); 80 virtual unsigned totalBytes() const;80 virtual unsigned long long totalBytes() const; 81 81 virtual PassRefPtr<TimeRanges> platformBufferedTimeRanges() const; 82 82 virtual double platformMinTimeSeekable() const; -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
r159518 r159827 149 149 virtual float rate() const; 150 150 virtual void seekToTime(double time, double negativeTolerance, double positiveTolerance); 151 virtual unsigned totalBytes() const;151 virtual unsigned long long totalBytes() const; 152 152 virtual PassRefPtr<TimeRanges> platformBufferedTimeRanges() const; 153 153 virtual double platformMinTimeSeekable() const; -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r159525 r159827 804 804 } 805 805 806 unsigned MediaPlayerPrivateAVFoundationObjC::totalBytes() const806 unsigned long long MediaPlayerPrivateAVFoundationObjC::totalBytes() const 807 807 { 808 808 if (!metaDataAvailable()) … … 813 813 totalMediaSize += [[thisTrack assetTrack] totalSampleDataLength]; 814 814 815 return static_cast<unsigned>(totalMediaSize);815 return totalMediaSize; 816 816 } 817 817 -
trunk/Source/WebCore/testing/InternalSettings.cpp
r157265 r159827 95 95 , m_useLegacyBackgroundSizeShorthandBehavior(settings.useLegacyBackgroundSizeShorthandBehavior()) 96 96 , m_autoscrollForDragAndDropEnabled(settings.autoscrollForDragAndDropEnabled()) 97 , m_pluginReplacementEnabled(RuntimeEnabledFeatures::sharedFeatures().pluginReplacementEnabled()) 97 98 { 98 99 } … … 157 158 settings.setUseLegacyBackgroundSizeShorthandBehavior(m_useLegacyBackgroundSizeShorthandBehavior); 158 159 settings.setAutoscrollForDragAndDropEnabled(m_autoscrollForDragAndDropEnabled); 160 RuntimeEnabledFeatures::sharedFeatures().setPluginReplacementEnabled(m_pluginReplacementEnabled); 159 161 } 160 162 … … 529 531 } 530 532 531 } 533 void InternalSettings::setPluginReplacementEnabled(bool enabled) 534 { 535 RuntimeEnabledFeatures::sharedFeatures().setPluginReplacementEnabled(enabled); 536 } 537 538 } -
trunk/Source/WebCore/testing/InternalSettings.h
r157265 r159827 92 92 bool m_useLegacyBackgroundSizeShorthandBehavior; 93 93 bool m_autoscrollForDragAndDropEnabled; 94 bool m_pluginReplacementEnabled; 94 95 }; 95 96 … … 137 138 void setAutoscrollForDragAndDropEnabled(bool enabled, ExceptionCode&); 138 139 void setFontFallbackPrefersPictographs(bool preferPictographs, ExceptionCode&); 140 void setPluginReplacementEnabled(bool); 139 141 140 142 private: -
trunk/Source/WebCore/testing/InternalSettings.idl
r157265 r159827 61 61 [RaisesException] void setAutoscrollForDragAndDropEnabled(boolean enabled); 62 62 [RaisesException] void setFontFallbackPrefersPictographs(boolean preferPictographs); 63 void setPluginReplacementEnabled(boolean enabled); 63 64 };
Note:
See TracChangeset
for help on using the changeset viewer.