зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 921504) for mochitest failures on test_animation-type-longhand.html . CLOSED TREE
Backed out changeset e87edffd46b9 (bug 921504) Backed out changeset eb53880e5f0e (bug 921504)
This commit is contained in:
Родитель
09c4f9d7e8
Коммит
0ac1595a1a
|
@ -294,8 +294,6 @@ class EventStates {
|
|||
#define NS_EVENT_STATE_FOCUS_VISIBLE NS_DEFINE_EVENT_STATE_MACRO(52)
|
||||
// Modal <dialog> element
|
||||
#define NS_EVENT_STATE_MODAL_DIALOG NS_DEFINE_EVENT_STATE_MACRO(53)
|
||||
// Inert subtrees
|
||||
#define NS_EVENT_STATE_MOZINERT NS_DEFINE_EVENT_STATE_MACRO(54)
|
||||
|
||||
/**
|
||||
* NOTE: do not go over 63 without updating EventStates::InternalType!
|
||||
|
@ -331,8 +329,7 @@ class EventStates {
|
|||
NS_EVENT_STATE_DRAGOVER | NS_EVENT_STATE_FOCUS | NS_EVENT_STATE_FOCUSRING | \
|
||||
NS_EVENT_STATE_FOCUS_WITHIN | NS_EVENT_STATE_FULLSCREEN | \
|
||||
NS_EVENT_STATE_HOVER | NS_EVENT_STATE_URLTARGET | \
|
||||
NS_EVENT_STATE_FOCUS_VISIBLE | NS_EVENT_STATE_MODAL_DIALOG | \
|
||||
NS_EVENT_STATE_MOZINERT)
|
||||
NS_EVENT_STATE_FOCUS_VISIBLE | NS_EVENT_STATE_MODAL_DIALOG)
|
||||
|
||||
#define INTRINSIC_STATES (~EXTERNALLY_MANAGED_STATES)
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#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"
|
||||
|
@ -688,13 +687,6 @@ 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
|
||||
|
|
|
@ -86,10 +86,6 @@ 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,8 +31,6 @@ 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]
|
||||
|
|
|
@ -9744,8 +9744,7 @@ bool nsIFrame::IsFocusable(int32_t* aTabIndex, bool aWithMouse) {
|
|||
|
||||
if (mContent && mContent->IsElement() && IsVisibleConsideringAncestors() &&
|
||||
Style()->GetPseudoType() != PseudoStyleType::anonymousFlexItem &&
|
||||
Style()->GetPseudoType() != PseudoStyleType::anonymousGridItem &&
|
||||
StyleUI()->mInert != StyleInert::Inert) {
|
||||
Style()->GetPseudoType() != PseudoStyleType::anonymousGridItem) {
|
||||
const nsStyleUI* ui = StyleUI();
|
||||
if (ui->mUserFocus != StyleUserFocus::Ignore &&
|
||||
ui->mUserFocus != StyleUserFocus::None) {
|
||||
|
|
|
@ -97,7 +97,6 @@ rusty-enums = [
|
|||
"mozilla::StyleFloat",
|
||||
"mozilla::StyleImageOrientation",
|
||||
"mozilla::StyleImageRendering",
|
||||
"mozilla::StyleInert",
|
||||
"mozilla::StyleUserModify",
|
||||
"mozilla::StyleUserInput",
|
||||
"mozilla::StyleBoxDirection",
|
||||
|
|
|
@ -286,12 +286,6 @@ enum class StyleUserModify : uint8_t {
|
|||
WriteOnly,
|
||||
};
|
||||
|
||||
// -moz-inert
|
||||
enum class StyleInert : uint8_t {
|
||||
None,
|
||||
Inert,
|
||||
};
|
||||
|
||||
// -moz-window-dragging
|
||||
enum class StyleWindowDragging : uint8_t {
|
||||
Default,
|
||||
|
|
|
@ -3107,8 +3107,7 @@ LogicalSide nsStyleText::TextEmphasisSide(WritingMode aWM) const {
|
|||
//
|
||||
|
||||
nsStyleUI::nsStyleUI(const Document& aDocument)
|
||||
: mInert(StyleInert::None),
|
||||
mUserInput(StyleUserInput::Auto),
|
||||
: mUserInput(StyleUserInput::Auto),
|
||||
mUserModify(StyleUserModify::ReadOnly),
|
||||
mUserFocus(StyleUserFocus::None),
|
||||
mPointerEvents(StylePointerEvents::Auto),
|
||||
|
@ -3119,8 +3118,7 @@ nsStyleUI::nsStyleUI(const Document& aDocument)
|
|||
}
|
||||
|
||||
nsStyleUI::nsStyleUI(const nsStyleUI& aSource)
|
||||
: mInert(aSource.mInert),
|
||||
mUserInput(aSource.mUserInput),
|
||||
: mUserInput(aSource.mUserInput),
|
||||
mUserModify(aSource.mUserModify),
|
||||
mUserFocus(aSource.mUserFocus),
|
||||
mPointerEvents(aSource.mPointerEvents),
|
||||
|
@ -3181,7 +3179,7 @@ nsChangeHint nsStyleUI::CalcDifference(const nsStyleUI& aNewData) const {
|
|||
}
|
||||
}
|
||||
|
||||
if (mUserFocus != aNewData.mUserFocus || mInert != aNewData.mInert) {
|
||||
if (mUserFocus != aNewData.mUserFocus) {
|
||||
hint |= nsChangeHint_NeutralChange;
|
||||
}
|
||||
|
||||
|
|
|
@ -1730,7 +1730,6 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUI {
|
|||
|
||||
nsChangeHint CalcDifference(const nsStyleUI& aNewData) const;
|
||||
|
||||
mozilla::StyleInert mInert;
|
||||
mozilla::StyleUserInput mUserInput;
|
||||
mozilla::StyleUserModify mUserModify; // (modify-content)
|
||||
mozilla::StyleUserFocus mUserFocus; // (auto-select)
|
||||
|
|
|
@ -153,11 +153,6 @@
|
|||
outline: 1px dotted;
|
||||
}
|
||||
|
||||
/* Inert subtrees */
|
||||
*|*:-moz-inert {
|
||||
-moz-inert: inert;
|
||||
}
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
*|*::-moz-cell-content {
|
||||
|
|
|
@ -23,7 +23,6 @@ const NON_CONTENT_ACCESSIBLE_PROPERTIES = [
|
|||
"-moz-min-font-size-ratio",
|
||||
"-moz-script-size-multiplier",
|
||||
"-moz-default-appearance",
|
||||
"-moz-inert",
|
||||
// TODO(emilio): Whenever we stop using `-moz-binding` in a gazillion tests
|
||||
// we should add it here.
|
||||
];
|
||||
|
|
|
@ -1137,7 +1137,6 @@ function runTests() {
|
|||
test_unbalanced_unparseable(":-moz-handler-crashed");
|
||||
|
||||
// We're not in a UA sheet, so this should be invalid.
|
||||
test_balanced_unparseable(":-moz-inert");
|
||||
test_balanced_unparseable(":-moz-native-anonymous");
|
||||
test_balanced_unparseable(":-moz-table-border-nonzero");
|
||||
|
||||
|
|
|
@ -4560,12 +4560,6 @@
|
|||
# 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
|
||||
|
|
|
@ -145,9 +145,6 @@ bitflags! {
|
|||
///
|
||||
/// https://html.spec.whatwg.org/multipage/#centered-alignment
|
||||
const IN_MODAL_DIALOG_STATE = 1 << 53;
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/interaction.html#inert-subtrees
|
||||
const IN_MOZINERT_STATE = 1 << 54;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ macro_rules! apply_non_ts_list {
|
|||
("-moz-drag-over", MozDragOver, IN_DRAGOVER_STATE, _),
|
||||
("target", Target, IN_TARGET_STATE, _),
|
||||
("indeterminate", Indeterminate, IN_INDETERMINATE_STATE, _),
|
||||
("-moz-inert", MozInert, IN_MOZINERT_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS),
|
||||
("-moz-devtools-highlighted", MozDevtoolsHighlighted, IN_DEVTOOLS_HIGHLIGHTED_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS),
|
||||
("-moz-styleeditor-transitioning", MozStyleeditorTransitioning, IN_STYLEEDITOR_TRANSITIONING_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS),
|
||||
("fullscreen", Fullscreen, IN_FULLSCREEN_STATE, _),
|
||||
|
|
|
@ -2016,7 +2016,6 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
|
|||
NonTSPseudoClass::Checked |
|
||||
NonTSPseudoClass::Fullscreen |
|
||||
NonTSPseudoClass::Indeterminate |
|
||||
NonTSPseudoClass::MozInert |
|
||||
NonTSPseudoClass::PlaceholderShown |
|
||||
NonTSPseudoClass::Target |
|
||||
NonTSPseudoClass::Valid |
|
||||
|
|
|
@ -29,17 +29,6 @@ ${helpers.single_keyword(
|
|||
gecko_enum_prefix="StylePointerEvents",
|
||||
)}
|
||||
|
||||
${helpers.single_keyword(
|
||||
"-moz-inert",
|
||||
"none inert",
|
||||
engines="gecko",
|
||||
gecko_ffi_name="mInert",
|
||||
gecko_enum_prefix="StyleInert",
|
||||
animation_value_type="discrete",
|
||||
enabled_in="ua",
|
||||
spec="Nonstandard (https://html.spec.whatwg.org/multipage/interaction.html#inert-subtrees)",
|
||||
)}
|
||||
|
||||
${helpers.single_keyword(
|
||||
"-moz-user-input",
|
||||
"auto none",
|
||||
|
|
|
@ -347,7 +347,6 @@ impl ToCss for NonTSPseudoClass {
|
|||
Fullscreen => ":fullscreen",
|
||||
Hover => ":hover",
|
||||
Indeterminate => ":indeterminate",
|
||||
MozInert => ":-moz-inert",
|
||||
Link => ":link",
|
||||
PlaceholderShown => ":placeholder-shown",
|
||||
ReadWrite => ":read-write",
|
||||
|
@ -437,7 +436,6 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
|
|||
"fullscreen" => Fullscreen,
|
||||
"hover" => Hover,
|
||||
"indeterminate" => Indeterminate,
|
||||
"-moz-inert" => MozInert,
|
||||
"link" => Link,
|
||||
"placeholder-shown" => PlaceholderShown,
|
||||
"read-write" => ReadWrite,
|
||||
|
|
|
@ -153,56 +153,6 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
|
|||
}
|
||||
}
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/interaction.html#inert-subtrees
|
||||
///
|
||||
/// If -moz-inert is applied then add:
|
||||
/// -moz-user-focus: none;
|
||||
/// -moz-user-input: none;
|
||||
/// -moz-user-modify: read-only;
|
||||
/// user-select: none;
|
||||
/// pointer-events: none;
|
||||
/// cursor: default;
|
||||
fn adjust_for_inert(&mut self) {
|
||||
use properties::longhands::_moz_inert::computed_value::T as Inert;
|
||||
use properties::longhands::_moz_user_focus::computed_value::T as UserFocus;
|
||||
use properties::longhands::_moz_user_input::computed_value::T as UserInput;
|
||||
use properties::longhands::_moz_user_modify::computed_value::T as UserModify;
|
||||
use properties::longhands::pointer_events::computed_value::T as PointerEvents;
|
||||
use properties::longhands::cursor::computed_value::T as Cursor;
|
||||
use crate::values::specified::ui::CursorKind;
|
||||
use crate::values::specified::ui::UserSelect;
|
||||
|
||||
let needs_update = {
|
||||
let ui = self.style.get_inherited_ui();
|
||||
if ui.clone__moz_inert() == Inert::None {
|
||||
return;
|
||||
}
|
||||
|
||||
ui.clone__moz_user_focus() != UserFocus::None ||
|
||||
ui.clone__moz_user_input() != UserInput::None ||
|
||||
ui.clone__moz_user_modify() != UserModify::ReadOnly ||
|
||||
ui.clone_pointer_events() != PointerEvents::None ||
|
||||
ui.clone_cursor().keyword != CursorKind::Default ||
|
||||
ui.clone_cursor().images != Default::default()
|
||||
};
|
||||
|
||||
if needs_update {
|
||||
let ui = self.style.mutate_inherited_ui();
|
||||
ui.set__moz_user_focus(UserFocus::None);
|
||||
ui.set__moz_user_input(UserInput::None);
|
||||
ui.set__moz_user_modify(UserModify::ReadOnly);
|
||||
ui.set_pointer_events(PointerEvents::None);
|
||||
ui.set_cursor(Cursor {
|
||||
images: Default::default(),
|
||||
keyword: CursorKind::Default,
|
||||
});
|
||||
}
|
||||
|
||||
if self.style.get_ui().clone_user_select() != UserSelect::None {
|
||||
self.style.mutate_ui().set_user_select(UserSelect::None);
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether we should skip any item-based display property blockification on
|
||||
/// this element.
|
||||
fn skip_item_display_fixup<E>(&self, element: Option<E>) -> bool
|
||||
|
@ -905,7 +855,6 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
|
|||
#[cfg(feature = "gecko")]
|
||||
{
|
||||
self.adjust_for_appearance(element);
|
||||
self.adjust_for_inert();
|
||||
}
|
||||
self.set_bits();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[inert-in-shadow-dom.tentative.html]
|
||||
[inert on Shadow host affects content in shadow]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[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
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[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
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
[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
|
||||
|
||||
[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
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[inert-on-slots.tentative.html]
|
||||
[inert inside ShadowRoot affects slotted content]
|
||||
expected: FAIL
|
||||
|
|
@ -531,7 +531,6 @@ STATIC_ATOMS = [
|
|||
Atom("indent", "indent"),
|
||||
Atom("indeterminate", "indeterminate"),
|
||||
Atom("index", "index"),
|
||||
Atom("inert", "inert"),
|
||||
Atom("infinity", "infinity"),
|
||||
Atom("inherits", "inherits"),
|
||||
Atom("inheritOverflow", "inherit-overflow"),
|
||||
|
|
Загрузка…
Ссылка в новой задаче