Changeset 86380 in webkit
- Timestamp:
- May 12, 2011 2:17:06 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r86379 r86380 1 2011-05-12 Brian Weinstein <bweinstein@apple.com> 2 3 Reviewed by Adam Roben. 4 5 WebKit2: Implement plugin quirk for Mozilla user agent for older Flash 6 https://bugs.webkit.org/show_bug.cgi?id=60726 7 <rdar://problem/8470824> 8 9 Implement the quirk for versions of Flash before v10 that only request windowless plugins 10 if we use a Mozilla user agent. 11 12 * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: 13 (WebKit::NetscapePluginModule::determineQuirks): If we have a plugin that handles the 14 "application/x-shockwave-flash" MIME type with a version less than 10, tell it to use 15 the Mozilla user agent. 16 * Shared/Plugins/PluginQuirks.h: 17 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: 18 (WebKit::NetscapePlugin::userAgent): Add an early return if the plugin uses the Mozilla user 19 agent. 20 * win/WebKit2.vcproj: Add PluginQuirks.h. 21 1 22 2011-05-12 Anders Carlsson <andersca@apple.com> 2 23 -
trunk/Source/WebKit2/Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp
r77785 r86380 117 117 void NetscapePluginModule::determineQuirks() 118 118 { 119 PluginInfoStore::Plugin plugin; 120 getPluginInfo(m_pluginPath, plugin); 121 122 Vector<MimeClassInfo> mimeTypes = plugin.info.mimes; 123 for (size_t i = 0; i < mimeTypes.size(); ++i) { 124 // FIXME: It seems strange to assume that any plugin that handles this MIME type needs this quirk. Should 125 // we be be checking the plugin's name instead? 126 if (mimeTypes[i].type == "application/x-shockwave-flash") { 127 uint64_t flashTenVersion = fileVersion(0x00000000, 0x000a0000); 128 uint64_t version = plugin.fileVersion; 129 130 // Pre Flash v10 only requests windowless plugins if we use a Mozilla user agent. 131 // For testing information, see: https://bugs.webkit.org/show_bug.cgi?id=60726. 132 if (version < flashTenVersion) 133 m_pluginQuirks.add(PluginQuirks::WantsMozillaUserAgent); 134 135 break; 136 } 137 } 119 138 } 120 139 -
trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h
r82796 r86380 62 62 RequiresGTKToolKit, 63 63 #endif 64 65 WantsMozillaUserAgent, 66 64 67 NumPluginQuirks 65 68 }; -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
r86169 r86380 133 133 } 134 134 135 static const char* MozillaUserAgent = "Mozilla/5.0 (" 136 #if PLUGIN_ARCHITECTURE(MAC) 137 "Macintosh; U; Intel Mac OS X;" 138 #elif PLUGIN_ARCHITECTURE(WIN) 139 "Windows; U; Windows NT 5.1;" 140 #elif PLUGIN_ARCHITECTURE(X11) 141 // The Gtk port uses X11 plugins in Mac. 142 #if OS(DARWIN) && PLATFORM(GTK) 143 "X11; U; Intel Mac OS X;" 144 #else 145 "X11; U; Linux i686;" 146 #endif 147 #endif 148 " en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0"; 149 135 150 const char* NetscapePlugin::userAgent() 136 151 { 152 if (quirks().contains(PluginQuirks::WantsMozillaUserAgent)) 153 return MozillaUserAgent; 154 137 155 if (m_userAgent.isNull()) { 138 156 m_userAgent = m_pluginController->userAgent().utf8(); -
trunk/Source/WebKit2/win/WebKit2.vcproj
r85958 r86380 1402 1402 Name="Plugins" 1403 1403 > 1404 <File 1405 RelativePath="..\Shared\Plugins\PluginQuirks.h" 1406 > 1407 </File> 1404 1408 <Filter 1405 1409 Name="Netscape"
Note: See TracChangeset
for help on using the changeset viewer.