Changeset 86494 in webkit


Ignore:
Timestamp:
May 14, 2011 1:00:04 PM (13 years ago)
Author:
andersca@apple.com
Message:

2011-05-14 Anders Carlsson <andersca@apple.com>

Reviewed by Sam Weinig.

Document the WantsMozillaUserAgent quirk and make it Windows specific
https://bugs.webkit.org/show_bug.cgi?id=60843

  • Shared/Plugins/PluginQuirks.h:
  • WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::userAgent):
Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r86489 r86494  
     12011-05-14  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Document the WantsMozillaUserAgent quirk and make it Windows specific
     6        https://bugs.webkit.org/show_bug.cgi?id=60843
     7
     8        * Shared/Plugins/PluginQuirks.h:
     9        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
     10        (WebKit::NetscapePlugin::userAgent):
     11
    1122011-05-14  Anders Carlsson  <andersca@apple.com>
    213
  • trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h

    r86380 r86494  
    6161        // NPN_GetValue even when it is a lie.
    6262        RequiresGTKToolKit,
     63
     64        // Windows specific quirks:
     65#elif PLUGIN_ARCHITECTURE(WIN)
     66        // Whether NPN_UserAgent should always return a Mozilla user agent.
     67        // Flash on Windows prior to version 10 only requests windowless plugins
     68        // if we return a Mozilla user agent.
     69        WantsMozillaUserAgent,
    6370#endif
    64    
    65         WantsMozillaUserAgent,
    6671
    6772        NumPluginQuirks
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp

    r86467 r86494  
    133133}
    134134
    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 
    150135const char* NetscapePlugin::userAgent()
    151136{
     137#if PLUGIN_ARCHITECTURE(WIN)
     138    static const char* MozillaUserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0";
     139   
    152140    if (quirks().contains(PluginQuirks::WantsMozillaUserAgent))
    153141        return MozillaUserAgent;
     142#endif
    154143
    155144    if (m_userAgent.isNull()) {
Note: See TracChangeset for help on using the changeset viewer.