Bug 1505489 - Add a pref and enable Shadow Parts in Nightly and for chrome stylesheets. r=heycam

I want to enable in Nightly to evaluate (in the medium term) shipping it without
the part forwarding, once the cascade order and importance issues are fixed, and
that we pass all the tests that don't involve forwarding.

That is, I want to monitor whether having ::part() causes compat issues or not.

Depends on D32648

Differential Revision: https://phabricator.services.mozilla.com/D32649

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2019-06-11 17:42:58 +00:00
Родитель 72a9fa3730
Коммит 8381c5ce61
14 изменённых файлов: 23 добавлений и 61 удалений

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

@ -4721,6 +4721,19 @@ VARCACHE_PREF(
bool, false
)
#ifdef NIGHTLY_BUILD
# define PREF_VALUE true
#else
# define PREF_VALUE false
#endif
VARCACHE_PREF(
Live,
"layout.css.shadow-parts.enabled",
layout_css_shadow_parts_enabled,
bool, PREF_VALUE
)
#undef PREF_VALUE
#ifdef NIGHTLY_BUILD
# define PREF_VALUE true
#else

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

@ -5,7 +5,7 @@
//! Gecko-specific bits for selector-parsing.
use crate::element_state::{DocumentState, ElementState};
use crate::gecko_bindings::structs::RawServoSelectorList;
use crate::gecko_bindings::structs::{self, RawServoSelectorList};
use crate::gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
use crate::invalidation::element::document_state::InvalidationMatchingData;
use crate::selector_parser::{Direction, SelectorParser};
@ -349,7 +349,14 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
#[inline]
fn parse_host(&self) -> bool {
self.parse_slotted()
true
}
#[inline]
fn parse_part(&self) -> bool {
self.chrome_rules_enabled() || unsafe {
structs::StaticPrefs_sVarCache_layout_css_shadow_parts_enabled
}
}
fn parse_non_ts_pseudo_class(

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

@ -0,0 +1 @@
prefs: [layout.css.shadow-parts.enabled:true]

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

@ -1,6 +0,0 @@
[all-hosts.html]
[::part with host selector styles in first host]
expected: FAIL
[::part with host selector styles in second host]
expected: FAIL

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

@ -1,4 +0,0 @@
[chaining-invalid-selector.html]
[CSS Shadow Parts - Chaining Invalid Selector]
expected: FAIL

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

@ -1,4 +0,0 @@
[complex-matching.html]
[Complex selector for host works]
expected: FAIL

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

@ -1,4 +0,0 @@
[complex-non-matching.html]
[CSS Shadow Parts - Complex Non-matching]
expected: FAIL

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

@ -1,4 +0,0 @@
[different-host.html]
[CSS Shadow Parts - Different Host]
expected: FAIL

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

@ -1,4 +0,0 @@
[inner-host.html]
[Part in outer host is styled by document style sheet]
expected: FAIL

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

@ -1,2 +0,0 @@
[interaction-with-placeholder.html]
expected: FAIL

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

@ -1,19 +0,0 @@
[interaction-with-pseudo-elements.html]
[::first-letter in selected host is styled]
expected: FAIL
[::first-line in selected host is styled]
expected: FAIL
[::before in selected host is styled]
expected: FAIL
[::placeholder in selected host is styled]
expected: FAIL
[::selection in selected host is styled]
expected: FAIL
[::after in selected host is styled]
expected: FAIL

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

@ -1,4 +0,0 @@
[invalidation-change-part-name.html]
[Part in selected host changed color]
expected: FAIL

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

@ -1,4 +0,0 @@
[invalidation-complex-selector.html]
[Part in selected host changed color]
expected: FAIL

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

@ -1,4 +0,0 @@
[simple.html]
[Part in selected host is styled]
expected: FAIL