Make sure we don't recreate boxes just because we have a ::first-line.

Servo part of part 5 of the fix for Gecko bug 1324619.  r=emilio
This commit is contained in:
Boris Zbarsky 2017-07-28 21:18:02 -04:00
parent 7161fff1b8
commit c531af96ae
3 changed files with 15 additions and 1 deletions

View file

@ -827,7 +827,7 @@ pub trait MatchMethods : TElement {
return StyleDifference::new(RestyleDamage::empty(), StyleChange::Unchanged)
}
if pseudo.map_or(false, |p| p.is_first_letter()) {
if pseudo.map_or(false, |p| p.is_first_letter() || p.is_first_line()) {
// No one cares about this pseudo, and we've checked above that
// we're not switching from a "cares" to a "doesn't care" state
// or vice versa.