зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1498860 - Add window.screenLeft / window.screenTop as aliases of screenX / screenY. r=smaug
Tests are at https://github.com/web-platform-tests/wpt/pull/13543. Spec is waiting on those, but this matches all other browsers. Differential Revision: https://phabricator.services.mozilla.com/D8917 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
97e6490eb7
Коммит
54175e6475
|
@ -816,6 +816,19 @@ public:
|
|||
{
|
||||
return GetScrollY(aError);
|
||||
}
|
||||
|
||||
int32_t GetScreenLeft(mozilla::dom::CallerType aCallerType,
|
||||
mozilla::ErrorResult& aError)
|
||||
{
|
||||
return GetScreenX(aCallerType, aError);
|
||||
}
|
||||
|
||||
int32_t GetScreenTop(mozilla::dom::CallerType aCallerType,
|
||||
mozilla::ErrorResult& aError)
|
||||
{
|
||||
return GetScreenY(aCallerType, aError);
|
||||
}
|
||||
|
||||
void GetScreenX(JSContext* aCx, JS::MutableHandle<JS::Value> aValue,
|
||||
mozilla::dom::CallerType aCallerType,
|
||||
mozilla::ErrorResult& aError);
|
||||
|
|
|
@ -188,6 +188,10 @@ partial interface Window {
|
|||
[Replaceable, Throws] readonly attribute double scrollY;
|
||||
[Replaceable, Throws] readonly attribute double pageYOffset;
|
||||
|
||||
// Aliases for screenX / screenY.
|
||||
[Replaceable, Throws, NeedsCallerType] readonly attribute double screenLeft;
|
||||
[Replaceable, Throws, NeedsCallerType] readonly attribute double screenTop;
|
||||
|
||||
// client
|
||||
// These are writable because we allow chrome to write them. And they need
|
||||
// to use 'any' as the type, because non-chrome writing them needs to act
|
||||
|
|
Загрузка…
Ссылка в новой задаче