mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Auto merge of #18699 - emilio:remove-cfg, r=jdm
Remove some cfg'd imports. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18699) <!-- Reviewable:end -->
This commit is contained in:
commit
e13f5a656a
2 changed files with 8 additions and 13 deletions
|
@ -17,7 +17,6 @@ use smallbitvec::SmallBitVec;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::{fmt, mem, ops};
|
use std::{fmt, mem, ops};
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
#[cfg(feature = "gecko")] use std::ptr;
|
|
||||||
|
|
||||||
#[cfg(feature = "servo")] use cssparser::RGBA;
|
#[cfg(feature = "servo")] use cssparser::RGBA;
|
||||||
use cssparser::{CowRcStr, Parser, TokenSerializationType, serialize_identifier};
|
use cssparser::{CowRcStr, Parser, TokenSerializationType, serialize_identifier};
|
||||||
|
@ -2660,7 +2659,7 @@ impl<'a> StyleBuilder<'a> {
|
||||||
debug_assert_eq!(parent_style.is_some(), parent_style_ignoring_first_line.is_some());
|
debug_assert_eq!(parent_style.is_some(), parent_style_ignoring_first_line.is_some());
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
debug_assert!(parent_style.is_none() ||
|
debug_assert!(parent_style.is_none() ||
|
||||||
ptr::eq(parent_style.unwrap(),
|
::std::ptr::eq(parent_style.unwrap(),
|
||||||
parent_style_ignoring_first_line.unwrap()) ||
|
parent_style_ignoring_first_line.unwrap()) ||
|
||||||
parent_style.unwrap().pseudo() == Some(PseudoElement::FirstLine));
|
parent_style.unwrap().pseudo() == Some(PseudoElement::FirstLine));
|
||||||
let reset_style = device.default_computed_values();
|
let reset_style = device.default_computed_values();
|
||||||
|
@ -3130,11 +3129,6 @@ pub fn cascade(
|
||||||
rule_cache_conditions: &mut RuleCacheConditions,
|
rule_cache_conditions: &mut RuleCacheConditions,
|
||||||
) -> Arc<ComputedValues> {
|
) -> Arc<ComputedValues> {
|
||||||
debug_assert_eq!(parent_style.is_some(), parent_style_ignoring_first_line.is_some());
|
debug_assert_eq!(parent_style.is_some(), parent_style_ignoring_first_line.is_some());
|
||||||
#[cfg(feature = "gecko")]
|
|
||||||
debug_assert!(parent_style.is_none() ||
|
|
||||||
ptr::eq(parent_style.unwrap(),
|
|
||||||
parent_style_ignoring_first_line.unwrap()) ||
|
|
||||||
parent_style.unwrap().pseudo() == Some(PseudoElement::FirstLine));
|
|
||||||
let empty = SmallBitVec::new();
|
let empty = SmallBitVec::new();
|
||||||
let iter_declarations = || {
|
let iter_declarations = || {
|
||||||
rule_node.self_and_ancestors().flat_map(|node| {
|
rule_node.self_and_ancestors().flat_map(|node| {
|
||||||
|
@ -3218,7 +3212,7 @@ where
|
||||||
debug_assert_eq!(parent_style.is_some(), parent_style_ignoring_first_line.is_some());
|
debug_assert_eq!(parent_style.is_some(), parent_style_ignoring_first_line.is_some());
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
debug_assert!(parent_style.is_none() ||
|
debug_assert!(parent_style.is_none() ||
|
||||||
ptr::eq(parent_style.unwrap(),
|
::std::ptr::eq(parent_style.unwrap(),
|
||||||
parent_style_ignoring_first_line.unwrap()) ||
|
parent_style_ignoring_first_line.unwrap()) ||
|
||||||
parent_style.unwrap().pseudo() == Some(PseudoElement::FirstLine));
|
parent_style.unwrap().pseudo() == Some(PseudoElement::FirstLine));
|
||||||
let (inherited_style, layout_parent_style) = match parent_style {
|
let (inherited_style, layout_parent_style) = match parent_style {
|
||||||
|
|
|
@ -13,11 +13,8 @@ use selector_parser::PseudoElement;
|
||||||
use sharing::StyleSharingTarget;
|
use sharing::StyleSharingTarget;
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
use style_resolver::{PseudoElementResolution, StyleResolverForElement};
|
use style_resolver::{PseudoElementResolution, StyleResolverForElement};
|
||||||
#[cfg(feature = "servo")] use style_traits::ToCss;
|
|
||||||
use stylist::RuleInclusion;
|
use stylist::RuleInclusion;
|
||||||
use traversal_flags::{TraversalFlags, self};
|
use traversal_flags::{TraversalFlags, self};
|
||||||
#[cfg(feature = "servo")] use values::Either;
|
|
||||||
#[cfg(feature = "servo")] use values::generics::image::Image;
|
|
||||||
|
|
||||||
/// A per-traversal-level chunk of data. This is sent down by the traversal, and
|
/// A per-traversal-level chunk of data. This is sent down by the traversal, and
|
||||||
/// currently only holds the dom depth for the bloom filter.
|
/// currently only holds the dom depth for the bloom filter.
|
||||||
|
@ -783,6 +780,10 @@ fn notify_paint_worklet<E>(context: &StyleContext<E>, data: &ElementData)
|
||||||
where
|
where
|
||||||
E: TElement,
|
E: TElement,
|
||||||
{
|
{
|
||||||
|
use style_traits::ToCss;
|
||||||
|
use values::Either;
|
||||||
|
use values::generics::image::Image;
|
||||||
|
|
||||||
// We speculatively evaluate any paint worklets during styling.
|
// We speculatively evaluate any paint worklets during styling.
|
||||||
// This allows us to run paint worklets in parallel with style and layout.
|
// This allows us to run paint worklets in parallel with style and layout.
|
||||||
// Note that this is wasted effort if the size of the node has
|
// Note that this is wasted effort if the size of the node has
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue