Changeset 242779 in webkit
- Timestamp:
- Mar 11, 2019, 11:07:14 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
page/Navigator.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r242777 r242779 1 2019-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 1 17 2019-03-11 Ryan Haddad <ryanhaddad@apple.com> 2 18 -
trunk/Source/WebCore/page/Navigator.cpp
r242676 r242779 57 57 Navigator::~Navigator() = default; 58 58 59 // If this function returns true, we need to hide the substring "4." that would otherwise60 // appear in the appVersion string. This is to avoid problems with old versions of a61 // library called OpenCube QuickMenu, which as of this writing is still being used on62 // 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 73 59 String Navigator::appVersion() const 74 60 { … … 78 64 if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled()) 79 65 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(); 84 67 } 85 68
Note:
See TracChangeset
for help on using the changeset viewer.