Bug 1655722 - add HTMLElement::inert property r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D82943
This commit is contained in:
Alexander Surkov 2020-07-30 17:30:46 +00:00
Родитель f092f2d06e
Коммит 9b0c71a8eb
6 изменённых файлов: 6 добавлений и 26 удалений

Просмотреть файл

@ -86,6 +86,10 @@ class nsGenericHTMLElement : public nsGenericHTMLElementBase {
void SetHidden(bool aHidden, mozilla::ErrorResult& aError) {
SetHTMLBoolAttr(nsGkAtoms::hidden, aHidden, aError);
}
bool Inert() const { return GetBoolAttr(nsGkAtoms::inert); }
void SetInert(bool aInert, mozilla::ErrorResult& aError) {
SetHTMLBoolAttr(nsGkAtoms::inert, aInert, aError);
}
void Click(mozilla::dom::CallerType aCallerType);
void GetAccessKey(nsString& aAccessKey) {
GetHTMLAttr(nsGkAtoms::accesskey, aAccessKey);

Просмотреть файл

@ -31,6 +31,8 @@ interface HTMLElement : Element {
// user interaction
[CEReactions, SetterThrows, Pure]
attribute boolean hidden;
[CEReactions, SetterThrows, Pure, Pref="html5.inert.enabled"]
attribute boolean inert;
[NeedsCallerType]
void click();
[CEReactions, SetterThrows, Pure]

Просмотреть файл

@ -1,10 +0,0 @@
[inert-node-is-unfocusable.tentative.html]
[Setting inert via property correctly modifies inert state]
expected: FAIL
[Elements inside of inert subtrees return false when getting 'inert']
expected: FAIL
[Can get inert via property]
expected: FAIL

Просмотреть файл

@ -1,4 +0,0 @@
[inert-on-slots.tentative.html]
[inert inside ShadowRoot affects slotted content]
expected: FAIL

Просмотреть файл

@ -12,14 +12,10 @@
if webrender and debug and (os == "linux"): wpt-sync Bug 1564668
expected:
if (os == "win"): ["PASS", "FAIL"]
if (os == "android"): FAIL
[Tests that any pointer event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates]
expected: FAIL
[Tests that any pointer event on a non-inert element is correctly targeted to that element]
expected: FAIL
[elementsFromPoint returns inert element]
expected:
FAIL

Просмотреть файл

@ -6,14 +6,6 @@
[Tests that any pointer event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates]
expected: FAIL
[Tests that any mouse event on a non-inert element is correctly targeted to that element]
expected:
FAIL
[Tests that any pointer event on a non-inert element is correctly targeted to that element]
expected:
FAIL
[elementsFromPoint returns inert element]
expected:
FAIL