forked from mirrors/gecko-dev
Bug 1868316 - Remove user-find, make inert not findable. r=dholbert
As per the HTML spec. Differential Revision: https://phabricator.services.mozilla.com/D201906
This commit is contained in:
parent
3224438b92
commit
47165ebb0f
17 changed files with 15 additions and 155 deletions
|
|
@ -180,7 +180,6 @@ exports.ANIMATION_TYPE_FOR_LONGHANDS = [
|
|||
"transform-box",
|
||||
"transform-style",
|
||||
"unicode-bidi",
|
||||
"user-find",
|
||||
"-moz-user-focus",
|
||||
"-moz-user-input",
|
||||
"-moz-user-modify",
|
||||
|
|
|
|||
|
|
@ -196,8 +196,8 @@ let runTests = t.step_func_done(function() {
|
|||
// TODO(emilio): This might be worth discussing in the spec. For now
|
||||
// hard-coding our implementation.
|
||||
testFindable(false, "find me", `
|
||||
Do you find <span style="user-find: none">not findable</span> me?
|
||||
`, "boundary-crossing user-find: none");
|
||||
Do you find <span inert>not findable</span> me?
|
||||
`, "boundary-crossing inert");
|
||||
});
|
||||
|
||||
window.onload = function() {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ use.counter:
|
|||
send_in_pings:
|
||||
- use-counters
|
||||
|
||||
# Total of 2311 use counter metrics (excludes denominators).
|
||||
# Total of 2307 use counter metrics (excludes denominators).
|
||||
# Total of 358 'page' use counters.
|
||||
use.counter.page:
|
||||
svgsvgelement_getelementbyid:
|
||||
|
|
@ -13973,7 +13973,7 @@ use.counter.worker.service:
|
|||
send_in_pings:
|
||||
- use-counters
|
||||
|
||||
# Total of 51 'deprecated operations (page)' use counters.
|
||||
# Total of 50 'deprecated operations (page)' use counters.
|
||||
use.counter.deprecated_ops.page:
|
||||
mutation_event:
|
||||
type: counter
|
||||
|
|
@ -14825,7 +14825,7 @@ use.counter.deprecated_ops.page:
|
|||
send_in_pings:
|
||||
- use-counters
|
||||
|
||||
# Total of 51 'deprecated operations (document)' use counters.
|
||||
# Total of 50 'deprecated operations (document)' use counters.
|
||||
use.counter.deprecated_ops.doc:
|
||||
mutation_event:
|
||||
type: counter
|
||||
|
|
@ -15677,7 +15677,7 @@ use.counter.deprecated_ops.doc:
|
|||
send_in_pings:
|
||||
- use-counters
|
||||
|
||||
# Total of 697 'CSS (page)' use counters.
|
||||
# Total of 696 'CSS (page)' use counters.
|
||||
use.counter.css.page:
|
||||
css_align_content:
|
||||
type: counter
|
||||
|
|
@ -17736,23 +17736,6 @@ use.counter.css.page:
|
|||
send_in_pings:
|
||||
- use-counters
|
||||
|
||||
css_user_find:
|
||||
type: counter
|
||||
description: >
|
||||
Whether a page used the CSS property user-find.
|
||||
Compare against `use.counter.top_level_content_documents_destroyed`
|
||||
to calculate the rate.
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1852098
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1852098
|
||||
notification_emails:
|
||||
- dom-core@mozilla.com
|
||||
- emilio@mozilla.com
|
||||
expires: never
|
||||
send_in_pings:
|
||||
- use-counters
|
||||
|
||||
css_user_select:
|
||||
type: counter
|
||||
description: >
|
||||
|
|
@ -27528,7 +27511,7 @@ use.counter.css.page:
|
|||
send_in_pings:
|
||||
- use-counters
|
||||
|
||||
# Total of 697 'CSS (document)' use counters.
|
||||
# Total of 696 'CSS (document)' use counters.
|
||||
use.counter.css.doc:
|
||||
css_align_content:
|
||||
type: counter
|
||||
|
|
@ -29587,23 +29570,6 @@ use.counter.css.doc:
|
|||
send_in_pings:
|
||||
- use-counters
|
||||
|
||||
css_user_find:
|
||||
type: counter
|
||||
description: >
|
||||
Whether a document used the CSS property user-find.
|
||||
Compare against `use.counter.content_documents_destroyed`
|
||||
to calculate the rate.
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1852098
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1852098
|
||||
notification_emails:
|
||||
- dom-core@mozilla.com
|
||||
- emilio@mozilla.com
|
||||
expires: never
|
||||
send_in_pings:
|
||||
- use-counters
|
||||
|
||||
css_user_select:
|
||||
type: counter
|
||||
description: >
|
||||
|
|
|
|||
|
|
@ -153,12 +153,6 @@ enum class StyleUserInput : uint8_t {
|
|||
Auto,
|
||||
};
|
||||
|
||||
// user-find
|
||||
enum class StyleUserFind : uint8_t {
|
||||
Auto,
|
||||
None,
|
||||
};
|
||||
|
||||
// user-modify
|
||||
enum class StyleUserModify : uint8_t {
|
||||
ReadOnly,
|
||||
|
|
|
|||
|
|
@ -2969,7 +2969,6 @@ nsStyleUI::nsStyleUI()
|
|||
: mInert(StyleInert::None),
|
||||
mMozTheme(StyleMozTheme::Auto),
|
||||
mUserInput(StyleUserInput::Auto),
|
||||
mUserFind(StyleUserFind::Auto),
|
||||
mUserModify(StyleUserModify::ReadOnly),
|
||||
mUserFocus(StyleUserFocus::Normal),
|
||||
mPointerEvents(StylePointerEvents::Auto),
|
||||
|
|
@ -2985,7 +2984,6 @@ nsStyleUI::nsStyleUI(const nsStyleUI& aSource)
|
|||
: mInert(aSource.mInert),
|
||||
mMozTheme(aSource.mMozTheme),
|
||||
mUserInput(aSource.mUserInput),
|
||||
mUserFind(aSource.mUserFind),
|
||||
mUserModify(aSource.mUserModify),
|
||||
mUserFocus(aSource.mUserFocus),
|
||||
mPointerEvents(aSource.mPointerEvents),
|
||||
|
|
@ -3043,8 +3041,7 @@ nsChangeHint nsStyleUI::CalcDifference(const nsStyleUI& aNewData) const {
|
|||
hint |= NS_STYLE_HINT_VISUAL | kPointerEventsHint;
|
||||
}
|
||||
|
||||
if (mUserFocus != aNewData.mUserFocus || mUserInput != aNewData.mUserInput ||
|
||||
mUserFind != aNewData.mUserFind) {
|
||||
if (mUserFocus != aNewData.mUserFocus || mUserInput != aNewData.mUserInput) {
|
||||
hint |= nsChangeHint_NeutralChange;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1742,7 +1742,6 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUI {
|
|||
|
||||
private:
|
||||
mozilla::StyleUserInput mUserInput;
|
||||
mozilla::StyleUserFind mUserFind;
|
||||
mozilla::StyleUserModify mUserModify;
|
||||
mozilla::StyleUserFocus mUserFocus;
|
||||
mozilla::StylePointerEvents mPointerEvents;
|
||||
|
|
@ -1755,8 +1754,6 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUI {
|
|||
return IsInert() ? mozilla::StyleUserInput::None : mUserInput;
|
||||
}
|
||||
|
||||
mozilla::StyleUserFind UserFind() const { return mUserFind; }
|
||||
|
||||
mozilla::StyleUserModify UserModify() const {
|
||||
return IsInert() ? mozilla::StyleUserModify::ReadOnly : mUserModify;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ prefs = [
|
|||
"layout.css.basic-shape-rect.enabled=true",
|
||||
"layout.css.basic-shape-xywh.enabled=true",
|
||||
"layout.css.transform-box-content-stroke.enabled=true",
|
||||
"layout.css.user-find.enabled=true",
|
||||
]
|
||||
support-files = [
|
||||
"animation_utils.js",
|
||||
|
|
|
|||
|
|
@ -3928,14 +3928,6 @@ var gCSSProperties = {
|
|||
alias_for: "user-select",
|
||||
subproperties: ["user-select"],
|
||||
},
|
||||
"user-find": {
|
||||
domProp: "userFind",
|
||||
inherited: true,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: ["auto"],
|
||||
other_values: ["none"],
|
||||
invalid_values: [],
|
||||
},
|
||||
"user-select": {
|
||||
domProp: "userSelect",
|
||||
inherited: false,
|
||||
|
|
|
|||
|
|
@ -8823,13 +8823,6 @@
|
|||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Whether user-find CSS property is enabled.
|
||||
- name: layout.css.user-find.enabled
|
||||
type: RelaxedAtomicBool
|
||||
value: @IS_NIGHTLY_BUILD@
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Should the :visited selector ever match (otherwise :link matches instead)?
|
||||
- name: layout.css.visited_links_enabled
|
||||
type: bool
|
||||
|
|
|
|||
|
|
@ -78,19 +78,6 @@ ${helpers.single_keyword(
|
|||
affects="",
|
||||
)}
|
||||
|
||||
${helpers.single_keyword(
|
||||
"user-find",
|
||||
"auto none",
|
||||
engines="gecko",
|
||||
gecko_ffi_name="mUserFind",
|
||||
gecko_enum_prefix="StyleUserFind",
|
||||
animation_value_type="discrete",
|
||||
gecko_pref="layout.css.user-find.enabled",
|
||||
spec="Prototype of solution proposed in https://github.com/w3c/csswg-drafts/issues/3460",
|
||||
has_effect_on_gecko_scrollbars=False,
|
||||
affects="",
|
||||
)}
|
||||
|
||||
${helpers.predefined_type(
|
||||
"caret-color",
|
||||
"color::CaretColor",
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
prefs: [intl.icu4x.segmenter.enabled:true,layout.css.user-find.enabled:true]
|
||||
prefs: [intl.icu4x.segmenter.enabled:true]
|
||||
|
|
|
|||
|
|
@ -37,9 +37,6 @@ assert_not_inherited('appearance', 'none', 'auto');
|
|||
assert_inherited('caret-color', currentColor, 'rgba(42, 53, 64, 0.75)');
|
||||
assert_inherited('caret-shape', 'auto', 'bar');
|
||||
assert_inherited('cursor', 'auto', 'pointer');
|
||||
if (CSS.supports('user-find', 'auto')) {
|
||||
assert_inherited('user-find', 'auto', 'none');
|
||||
}
|
||||
assert_not_inherited('nav-down', 'auto', '#foo');
|
||||
assert_not_inherited('nav-left', 'auto', '#foo');
|
||||
assert_not_inherited('nav-right', 'auto', '#foo');
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS UI Level 4: getComputedStyle().userFind</title>
|
||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3460">
|
||||
<meta name="assert" content="user-find computed value is as specified.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("user-find", "auto");
|
||||
test_computed_value("user-find", "none");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS UI Level 4: parsing user-find with invalid values</title>
|
||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3460">
|
||||
<meta name="assert" content="user-find supports only the grammar 'auto | none'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value("user-find", "visible");
|
||||
test_invalid_value("user-find", "never");
|
||||
test_invalid_value("user-find", "10px");
|
||||
test_invalid_value("user-find", "'none'");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS UI Level 4: parsing user-find with valid values</title>
|
||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3460">
|
||||
<meta name="assert" content="user-find supports the grammar 'auto | none'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("user-find", "auto");
|
||||
test_valid_value("user-find", "none");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,11 +2,11 @@
|
|||
<meta charset="utf-8">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3460">
|
||||
<title>Basic test for the user-find property</title>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/#inert-subtrees">
|
||||
<title>Basic test for inert and find</title>
|
||||
<body>
|
||||
<script>
|
||||
const t = async_test("Basic test for the user-find property");
|
||||
const t = async_test("Basic test for inert and find");
|
||||
|
||||
function testFindable(findCount, textToFind, buildDoc, description) {
|
||||
if (typeof findCount == "boolean")
|
||||
|
|
@ -36,15 +36,11 @@ function testFindable(findCount, textToFind, buildDoc, description) {
|
|||
let runTests = t.step_func_done(function() {
|
||||
testFindable(true, "me", `
|
||||
Find me please
|
||||
`, "sanity test");
|
||||
`, "basic functionality test");
|
||||
|
||||
testFindable(false, "me", `
|
||||
<div style="user-find: none">Do not find me please</div>
|
||||
<div inert>Do not find me please</div>
|
||||
`, "Basic use case");
|
||||
|
||||
testFindable(true, "me", `
|
||||
<div style="user-find: none">Do not find me, but <span style="user-find: auto">find me please</span></div>
|
||||
`, "nested");
|
||||
});
|
||||
|
||||
window.onload = function() {
|
||||
|
|
@ -151,7 +151,7 @@ static bool IsFindableNode(const nsINode* aNode) {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (frame->StyleUI()->UserFind() == StyleUserFind::None ||
|
||||
if (frame->StyleUI()->IsInert() ||
|
||||
frame->HidesContent(nsIFrame::IncludeContentVisibility::Hidden) ||
|
||||
frame->IsHiddenByContentVisibilityOnAnyAncestor(
|
||||
nsIFrame::IncludeContentVisibility::Hidden)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue