From 445699efbd88a02719f9f7c3ac2d1859b035df67 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Fri, 30 Aug 2019 01:40:48 +0100 Subject: [PATCH] resourceloader: Remove Grade C sniffs for WebOS <=1.4 and SymbianOS Added originally in c46fc745a9de7201e based on the support document for jQuery Mobile 1.3, via . These have been obsolete since T102318 because startup.js is now a feature test, with UA-snifs only for browsers that both *do* have all Grade A capabilities for which we still want to disable the JS pipeline. * Palm WebOS: Upstream jQuery 1.x allegedly worked fine on WebOS 1.4+. Not sure why we excluded WebOS <= 1.4, looks like that should have been <= 1.3 instead. If it doesn't have the neccecary HTML5/ES5/CSS3 features, it will remain in Grade C without a sniff. Otherwise, it's probably fine to enable. Either way, not officially supported (Grade X). Usage on WMF wikis is presumed less than 0.1% as neiter Palm nor WebOS show up on https://analytics.wikimedia.org/. The example UAs mention WebKit/525 and WebKit/532 which correlate with Safari 3.x and Safari 4.x, which we know doesn't pass the feature test. * Symbian: The example UAs mention WebKit/413 which corelates with Safari 2, which we know doesn't pass the feature test. Change-Id: I62a83e3b4967f309739095d9c73650f9859ee856 --- resources/src/startup/startup.js | 2 +- tests/qunit/suites/resources/startup.test.js | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/src/startup/startup.js b/resources/src/startup/startup.js index 06c6737b26..e7137d2ab4 100644 --- a/resources/src/startup/startup.js +++ b/resources/src/startup/startup.js @@ -74,7 +74,7 @@ function isCompatible( ua ) { // // Please extend the regex instead of adding new ones! // And add a test case to startup.test.js - !ua.match( /MSIE 10|webOS\/1\.[0-4]|SymbianOS|NetFront|Opera Mini|S40OviBrowser|MeeGo|Android.+Glass|^Mozilla\/5\.0 .+ Gecko\/$|googleweblight|PLAYSTATION|PlayStation/ ) + !ua.match( /MSIE 10|NetFront|Opera Mini|S40OviBrowser|MeeGo|Android.+Glass|^Mozilla\/5\.0 .+ Gecko\/$|googleweblight|PLAYSTATION|PlayStation/ ) ); } diff --git a/tests/qunit/suites/resources/startup.test.js b/tests/qunit/suites/resources/startup.test.js index e286dd8c10..622041517b 100644 --- a/tests/qunit/suites/resources/startup.test.js +++ b/tests/qunit/suites/resources/startup.test.js @@ -80,6 +80,14 @@ /* Grade X */ + // Open WebOS < 1.5 (Palm Pre, Palm Pixi) + 'Mozilla/5.0 (webOS/1.0; U; en-US) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/1.0 Safari/525.27.1 Pre/1.0', + 'Mozilla/5.0 (webOS/1.4.0; U; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 Pixi/1.1 ', + // SymbianOS + 'NokiaN95_8GB-3;Mozilla/5.0 SymbianOS/9.2;U;Series60/3.1 NokiaN95_8GB-3/11.2.011 Profile/MIDP-2.0 Configuration/CLDC-1.1 AppleWebKit/413 (KHTML, like Gecko)', + 'Nokia7610/2.0 (5.0509.0) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0 ', + 'Mozilla/5.0 (SymbianOS/9.1; U; [en]; SymbianOS/91 Series60/3.0) AppleWebKit/413 (KHTML, like Gecko) Safari/413', + 'Mozilla/5.0 (SymbianOS/9.3; Series60/3.2 NokiaE52-2/091.003; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.1.34 Mobile Safari/533.4', // Gecko 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060928 (Debian|Debian-1.8.0.7-1) Epiphany/2.14', 'Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.6) Gecko/20070817 IceWeasel/2.0.0.6-g2', @@ -116,14 +124,6 @@ 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)', // IE Mobile 10 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; HTC; Windows Phone 8X by HTC)', - // Open WebOS < 1.5 (Palm Pre, Palm Pixi) - 'Mozilla/5.0 (webOS/1.0; U; en-US) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/1.0 Safari/525.27.1 Pre/1.0', - 'Mozilla/5.0 (webOS/1.4.0; U; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 Pixi/1.1 ', - // SymbianOS - 'NokiaN95_8GB-3;Mozilla/5.0 SymbianOS/9.2;U;Series60/3.1 NokiaN95_8GB-3/11.2.011 Profile/MIDP-2.0 Configuration/CLDC-1.1 AppleWebKit/413 (KHTML, like Gecko)', - 'Nokia7610/2.0 (5.0509.0) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0 ', - 'Mozilla/5.0 (SymbianOS/9.1; U; [en]; SymbianOS/91 Series60/3.0) AppleWebKit/413 (KHTML, like Gecko) Safari/413', - 'Mozilla/5.0 (SymbianOS/9.3; Series60/3.2 NokiaE52-2/091.003; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.1.34 Mobile Safari/533.4', // NetFront 'Mozilla/4.0 (compatible; Linux 2.6.10) NetFront/3.3 Kindle/1.0 (screen 600x800)', 'Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.0 (screen 824x1200; rotate)', -- 2.20.1