Bug 301972
| Summary: | chase.com: Move DeviceMotionEvent quirk to Quirks.cpp | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Karl Dubost <karlcow> |
| Component: | WebKit Misc. | Assignee: | Karl Dubost <karlcow> |
| Status: | NEW | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | https://chase.com/ | ||
| Bug Depends on: | 195101 | ||
| Bug Blocks: | |||
Karl Dubost
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/164047712>
Karl Dubost
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
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.