зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1655722 - implement HTML:inert attribute r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85190
This commit is contained in:
Родитель
b5e4bc5b10
Коммит
d5426056b8
|
@ -16,6 +16,7 @@
|
|||
#include "mozilla/MouseEvents.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/TextEditor.h"
|
||||
#include "mozilla/StaticPrefs_html5.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
|
||||
#include "nscore.h"
|
||||
|
@ -687,6 +688,13 @@ nsresult nsGenericHTMLElement::AfterSetAttr(
|
|||
SetFlags(NODE_HAS_ACCESSKEY);
|
||||
RegAccessKey();
|
||||
}
|
||||
} else if (aName == nsGkAtoms::inert &&
|
||||
StaticPrefs::html5_inert_enabled()) {
|
||||
if (aValue) {
|
||||
AddStates(NS_EVENT_STATE_MOZINERT);
|
||||
} else {
|
||||
RemoveStates(NS_EVENT_STATE_MOZINERT);
|
||||
}
|
||||
} else if (aName == nsGkAtoms::name) {
|
||||
if (aValue && !aValue->Equals(EmptyString(), eIgnoreCase)) {
|
||||
// This may not be quite right because we can have subclass code run
|
||||
|
|
|
@ -4578,6 +4578,12 @@
|
|||
# Prefs starting with "html5."
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# Turn HTML:inert on or off.
|
||||
- name: html5.inert.enabled
|
||||
type: bool
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
# Toggle which thread the HTML5 parser uses for stream parsing.
|
||||
- name: html5.offmainthread
|
||||
type: bool
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
prefs: [html5.inert.enabled:true]
|
|
@ -1,4 +0,0 @@
|
|||
[inert-in-shadow-dom.tentative.html]
|
||||
[inert on Shadow host affects content in shadow]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[inert-inlines.tentative.html]
|
||||
[Tests that inert inlines do not receive mouse events. To test manually, click on all the "Click me"s. The test fails if you see red.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[inert-label-focus.tentative.html]
|
||||
[Calling focus() on a label for a control which is in an inert subtree should have no effect.]
|
||||
expected: FAIL
|
||||
|
|
@ -5,12 +5,6 @@
|
|||
[Elements inside of inert subtrees return false when getting 'inert']
|
||||
expected: FAIL
|
||||
|
||||
[Button with inert atribute is unfocusable.]
|
||||
expected: FAIL
|
||||
|
||||
[All focusable elements inside inert subtree are unfocusable]
|
||||
expected: FAIL
|
||||
|
||||
[Can get inert via property]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
[inert-retargeting-iframe.tentative.html]
|
||||
expected: ERROR
|
||||
expected:
|
||||
if (os == "win"): OK
|
||||
if (os == "android"): OK
|
||||
ERROR
|
||||
|
||||
[Tests that any mouse event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates]
|
||||
expected: FAIL
|
||||
|
@ -8,12 +11,16 @@
|
|||
disabled:
|
||||
if webrender and debug and (os == "linux"): wpt-sync Bug 1564668
|
||||
expected:
|
||||
if debug and (os == "win"): ["PASS", "FAIL"]
|
||||
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:
|
||||
if os == "mac": FAIL
|
||||
FAIL
|
||||
|
||||
|
|
|
@ -8,9 +8,13 @@
|
|||
|
||||
[Tests that any mouse event on a non-inert element is correctly targeted to that element]
|
||||
expected:
|
||||
if (os == "linux") and webrender and not fission: ["PASS", "FAIL"]
|
||||
FAIL
|
||||
|
||||
[Tests that any pointer event on a non-inert element is correctly targeted to that element]
|
||||
expected:
|
||||
FAIL
|
||||
|
||||
[elementsFromPoint returns inert element]
|
||||
expected:
|
||||
if os == "mac": FAIL
|
||||
FAIL
|
||||
|
||||
|
|
|
@ -532,6 +532,7 @@ STATIC_ATOMS = [
|
|||
Atom("indent", "indent"),
|
||||
Atom("indeterminate", "indeterminate"),
|
||||
Atom("index", "index"),
|
||||
Atom("inert", "inert"),
|
||||
Atom("infinity", "infinity"),
|
||||
Atom("inherits", "inherits"),
|
||||
Atom("inheritOverflow", "inherit-overflow"),
|
||||
|
|
Загрузка…
Ссылка в новой задаче