NEW301972
chase.com: Move DeviceMotionEvent quirk to Quirks.cpp
https://bugs.webkit.org/show_bug.cgi?id=301972
Summary chase.com: Move DeviceMotionEvent quirk to Quirks.cpp
Karl Dubost
Reported 2025-11-04 15:39:04 PST
There is quirk for chase.com which is not part of the Quirks file. https://searchfox.org/wubkat/commit/48264447d2888aed97b308f6d2a8eba5cf32b9ec https://searchfox.org/wubkat/rev/e838693e27ee06031944db858a26907ef6afcf5e/Source/WebCore/page/LocalDOMWindow.cpp#2250-2267 The quirk was created in 2019. Unable to log into chase.com on iPad when DeviceMotionEvent API is disabled https://bugs.webkit.org/show_bug.cgi?id=195101 Moving it to Quirks.cpp will make it more effective and fence it to only the chase.com domain during navigation. This should improve performance
Attachments
Radar WebKit Bug Importer
Comment 1 2025-11-04 15:40:01 PST
Karl Dubost
Comment 2 2025-11-05 00:37:16 PST
The Quirk which was created in 2019. Send a fake devicemotion required just for the site. https://static.chasecdn.com/web/library/webchan/logon-microapp/latest/2867.1c168b2d615facddc456.js var e = function(e) { var t = e.acceleration, n = e.accelerationIncludingGravity, u = e.rotationRate, o = e.interval; r({ acceleration: { x: t.x, y: t.y, z: t.z }, accelerationIncludingGravity: { x: n.x, y: n.y, z: n.z }, rotationRate: { alpha: u.alpha, beta: u.beta, gamma: u.gamma }, interval: o }) }; return _(window, "devicemotion", e), function() { E(window, "devicemotion", e) } Then in https://secure.chase.com/web/auth/?treatment=chase#/logon/logon/chaseOnline They use: var initBrowserDetect = function () { … } which contains `var beforeLogon = { … } ` which itself contains: init: { value: function (e) { var o = function () { n = !0, e() }; if ("iPad" !== t.platform.product) return o(); r = function (e) { var n = 1; e.acceleration && (n += t.devicePixelRatio), i = n <= 2, t.removeEventListener("devicemotion", r, !0), o() }.bind(this), t.addEventListener("devicemotion", r, !0) } }, window.platform.product returns null on iPad pro but it returns iPad on the iPad Mini.
Karl Dubost
Comment 3 2025-11-05 00:43:53 PST
They are using https://github.com/bestiejs/platform.js#readme beforeLogon.rejectUnsupportedCallers(htmEnvConfig, loaderCallback) var htmEnvConfig = { minDeviceSize: 320, baseBackgroundImageUrl: "https://static.chasecdn.com/content/geo-images/images/", fontsUrl: "https://static.chasecdn.com/content/dam/cpo-static/fonts", browserWarningUrl: { en: "https://www.chase.com/digital/resources/browser-upgrade", es: "https://www.chase.com/es/digital/resources/browser-upgrade", }, mobileBankingUrl: "https://m.chase.com/secure.html", signOutUrl: "/svc/rr/accounts/secure/v1/signout", sessionSignOutUrl: "/svc/wl/auth/signout", isMobileForbidden: false, lobs: { default: { browsers: { Chrome: "38", Firefox: "24", Safari: "7.1", IE: "11", Edge: "12", }, deviceOS: [], }, }, }; Their support matrix is quite old too. Not sure their code is really maintained for this part.
Note You need to log in before you can comment on or make changes to this bug.