⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 242779 in webkit


Ignore:
Timestamp:
Mar 11, 2019, 11:07:14 PM (7 years ago)
Author:
rniwa@webkit.org
Message:

Remove OpenCube QuickMenu quirks from navigator.appVersion
https://bugs.webkit.org/show_bug.cgi?id=195600

Reviewed by Simon Fraser.

Remove the site specific quirk added in r35050 for OpenCube QuickMenu library for nwa.com

Blink removed this code back in 2013. The fact Chrome has been shipping successfully without
this quirk for six years is a good evidence that it's no longer needed for the Web compatibility.

  • page/Navigator.cpp:

(WebCore::Navigator::appVersion const):
(WebCore::shouldHideFourDot): Deleted.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r242777 r242779  
     12019-03-11  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Remove OpenCube QuickMenu quirks from navigator.appVersion
     4        https://bugs.webkit.org/show_bug.cgi?id=195600
     5
     6        Reviewed by Simon Fraser.
     7
     8        Remove the site specific quirk added in r35050 for OpenCube QuickMenu library for nwa.com
     9
     10        Blink removed this code back in 2013. The fact Chrome has been shipping successfully without
     11        this quirk for six years is a good evidence that it's no longer needed for the Web compatibility.
     12
     13        * page/Navigator.cpp:
     14        (WebCore::Navigator::appVersion const):
     15        (WebCore::shouldHideFourDot): Deleted.
     16
    1172019-03-11  Ryan Haddad  <ryanhaddad@apple.com>
    218
  • trunk/Source/WebCore/page/Navigator.cpp

    r242676 r242779  
    5757Navigator::~Navigator() = default;
    5858
    59 // If this function returns true, we need to hide the substring "4." that would otherwise
    60 // appear in the appVersion string. This is to avoid problems with old versions of a
    61 // library called OpenCube QuickMenu, which as of this writing is still being used on
    62 // sites such as nwa.com -- the library thinks Safari is Netscape 4 if we don't do this!
    63 static bool shouldHideFourDot(Frame& frame)
    64 {
    65     auto* sourceURL = frame.script().sourceURL();
    66     if (!sourceURL)
    67         return false;
    68     if (!(sourceURL->endsWith("/dqm_script.js") || sourceURL->endsWith("/dqm_loader.js") || sourceURL->endsWith("/tdqm_loader.js")))
    69         return false;
    70     return frame.settings().needsSiteSpecificQuirks();
    71 }
    72 
    7359String Navigator::appVersion() const
    7460{
     
    7864    if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
    7965        ResourceLoadObserver::shared().logNavigatorAPIAccessed(*frame->document(), ResourceLoadStatistics::NavigatorAPI::AppVersion);
    80     String appVersion = NavigatorBase::appVersion();
    81     if (shouldHideFourDot(*frame))
    82         appVersion.replace("4.", "4_");
    83     return appVersion;
     66    return NavigatorBase::appVersion();
    8467}
    8568
Note: See TracChangeset for help on using the changeset viewer.