mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #19149 - emilio:random-cleanup, r=nox
style: minor cleanups <!-- 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/19149) <!-- Reviewable:end -->
This commit is contained in:
commit
cbf2ac35f7
2 changed files with 4 additions and 10 deletions
|
@ -160,12 +160,11 @@ impl PseudoElement {
|
||||||
|
|
||||||
/// Whether this pseudo-element should actually exist if it has
|
/// Whether this pseudo-element should actually exist if it has
|
||||||
/// the given styles.
|
/// the given styles.
|
||||||
pub fn should_exist(&self, style: &ComputedValues) -> bool
|
pub fn should_exist(&self, style: &ComputedValues) -> bool {
|
||||||
{
|
if style.get_box().clone_display() == display::T::none {
|
||||||
let display = style.get_box().clone_display();
|
|
||||||
if display == display::T::none {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.is_before_or_after() && style.ineffective_content_property() {
|
if self.is_before_or_after() && style.ineffective_content_property() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -340,12 +340,7 @@ trait PrivateMatchMethods: TElement {
|
||||||
pseudo: Option<&PseudoElement>,
|
pseudo: Option<&PseudoElement>,
|
||||||
) -> ChildCascadeRequirement {
|
) -> ChildCascadeRequirement {
|
||||||
debug!("accumulate_damage_for: {:?}", self);
|
debug!("accumulate_damage_for: {:?}", self);
|
||||||
|
debug_assert!(!shared_context.traversal_flags.contains(TraversalFlags::Forgetful));
|
||||||
// Don't accumulate damage if we're in a forgetful traversal.
|
|
||||||
if shared_context.traversal_flags.contains(TraversalFlags::Forgetful) {
|
|
||||||
debug!(" > forgetful traversal");
|
|
||||||
return ChildCascadeRequirement::MustCascadeChildren;
|
|
||||||
}
|
|
||||||
|
|
||||||
let difference =
|
let difference =
|
||||||
self.compute_style_difference(old_values, new_values, pseudo);
|
self.compute_style_difference(old_values, new_values, pseudo);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue