Title: [242779] trunk/Source/WebCore
- Revision
- 242779
- Author
- [email protected]
- Date
- 2019-03-11 23:07:14 -0700 (Mon, 11 Mar 2019)
Log 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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (242778 => 242779)
--- trunk/Source/WebCore/ChangeLog 2019-03-12 06:04:22 UTC (rev 242778)
+++ trunk/Source/WebCore/ChangeLog 2019-03-12 06:07:14 UTC (rev 242779)
@@ -1,3 +1,19 @@
+2019-03-11 Ryosuke Niwa <[email protected]>
+
+ 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.
+
2019-03-11 Ryan Haddad <[email protected]>
Unreviewed, rolling out r242763.
Modified: trunk/Source/WebCore/page/Navigator.cpp (242778 => 242779)
--- trunk/Source/WebCore/page/Navigator.cpp 2019-03-12 06:04:22 UTC (rev 242778)
+++ trunk/Source/WebCore/page/Navigator.cpp 2019-03-12 06:07:14 UTC (rev 242779)
@@ -56,20 +56,6 @@
Navigator::~Navigator() = default;
-// If this function returns true, we need to hide the substring "4." that would otherwise
-// appear in the appVersion string. This is to avoid problems with old versions of a
-// library called OpenCube QuickMenu, which as of this writing is still being used on
-// sites such as nwa.com -- the library thinks Safari is Netscape 4 if we don't do this!
-static bool shouldHideFourDot(Frame& frame)
-{
- auto* sourceURL = frame.script().sourceURL();
- if (!sourceURL)
- return false;
- if (!(sourceURL->endsWith("/dqm_script.js") || sourceURL->endsWith("/dqm_loader.js") || sourceURL->endsWith("/tdqm_loader.js")))
- return false;
- return frame.settings().needsSiteSpecificQuirks();
-}
-
String Navigator::appVersion() const
{
auto* frame = this->frame();
@@ -77,10 +63,7 @@
return String();
if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
ResourceLoadObserver::shared().logNavigatorAPIAccessed(*frame->document(), ResourceLoadStatistics::NavigatorAPI::AppVersion);
- String appVersion = NavigatorBase::appVersion();
- if (shouldHideFourDot(*frame))
- appVersion.replace("4.", "4_");
- return appVersion;
+ return NavigatorBase::appVersion();
}
const String& Navigator::userAgent() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes