mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
||||
/// the given styles.
|
||||
pub fn should_exist(&self, style: &ComputedValues) -> bool
|
||||
{
|
||||
let display = style.get_box().clone_display();
|
||||
if display == display::T::none {
|
||||
pub fn should_exist(&self, style: &ComputedValues) -> bool {
|
||||
if style.get_box().clone_display() == display::T::none {
|
||||
return false;
|
||||
}
|
||||
|
||||
if self.is_before_or_after() && style.ineffective_content_property() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -340,12 +340,7 @@ trait PrivateMatchMethods: TElement {
|
|||
pseudo: Option<&PseudoElement>,
|
||||
) -> ChildCascadeRequirement {
|
||||
debug!("accumulate_damage_for: {:?}", self);
|
||||
|
||||
// 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;
|
||||
}
|
||||
debug_assert!(!shared_context.traversal_flags.contains(TraversalFlags::Forgetful));
|
||||
|
||||
let difference =
|
||||
self.compute_style_difference(old_values, new_values, pseudo);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue