mirror of
https://github.com/servo/servo.git
synced 2025-08-14 01:45:33 +01:00
style: Ignore pref-controlled properties in cached scrollbar style assertions.
Now if you add a new inherited, pref-controlled property, you must declare whether it can have an effect on scrollbar styles. If no, then the property will be skipped in the assertions that check whether our cached styles are equal to those we would compute. Differential Revision: https://phabricator.services.mozilla.com/D37507
This commit is contained in:
parent
145acbf876
commit
e3b57efc7e
5 changed files with 36 additions and 1 deletions
|
@ -812,6 +812,22 @@ impl LonghandIdSet {
|
|||
&IGNORED_WHEN_COLORS_DISABLED
|
||||
}
|
||||
|
||||
/// Returns the set of properties that are declared as having no effect on
|
||||
/// Gecko <scrollbar> elements or their descendant scrollbar parts.
|
||||
#[cfg(debug_assertions)]
|
||||
#[cfg(feature = "gecko")]
|
||||
#[inline]
|
||||
pub fn has_no_effect_on_gecko_scrollbars() -> &'static Self {
|
||||
// data.py asserts that has_no_effect_on_gecko_scrollbars is True or
|
||||
// False for properties that are inherited and Gecko pref controlled,
|
||||
// and is None for all other properties.
|
||||
${static_longhand_id_set(
|
||||
"HAS_NO_EFFECT_ON_SCROLLBARS",
|
||||
lambda p: p.has_effect_on_gecko_scrollbars is False
|
||||
)}
|
||||
&HAS_NO_EFFECT_ON_SCROLLBARS
|
||||
}
|
||||
|
||||
/// Iterate over the current longhand id set.
|
||||
pub fn iter(&self) -> LonghandIdSetIterator {
|
||||
LonghandIdSetIterator { longhands: self, cur: 0, }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue