mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
style: Follow the list-item definition from the spec a bit more closely.
The HTML restriction doesn't match any browser. This matches Edge, though I filed https://github.com/w3c/csswg-drafts/issues/3766 about the pseudo-element condition. Differential Revision: https://phabricator.services.mozilla.com/D24936
This commit is contained in:
parent
5a55978478
commit
1f73c524bd
1 changed files with 2 additions and 8 deletions
|
@ -728,10 +728,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
|
|||
///
|
||||
/// https://drafts.csswg.org/css-lists-3/#declaring-a-list-item
|
||||
#[cfg(feature = "gecko")]
|
||||
fn adjust_for_list_item<E>(&mut self, element: Option<E>)
|
||||
where
|
||||
E: TElement,
|
||||
{
|
||||
fn adjust_for_list_item(&mut self) {
|
||||
use crate::properties::longhands::counter_increment::computed_value::T as ComputedIncrement;
|
||||
use crate::values::generics::counters::CounterPair;
|
||||
use crate::values::specified::list::MozListReversed;
|
||||
|
@ -743,9 +740,6 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
|
|||
if self.style.pseudo.is_some() {
|
||||
return;
|
||||
}
|
||||
if !element.map_or(false, |e| e.is_html_element()) {
|
||||
return;
|
||||
}
|
||||
// Note that we map <li value=INTEGER> to 'counter-set: list-item INTEGER;
|
||||
// counter-increment: list-item 0;' so we'll return here unless the author
|
||||
// explicitly specified something else.
|
||||
|
@ -833,7 +827,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
|
|||
#[cfg(feature = "gecko")]
|
||||
{
|
||||
self.adjust_for_appearance(element);
|
||||
self.adjust_for_list_item(element);
|
||||
self.adjust_for_list_item();
|
||||
}
|
||||
self.set_bits();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue