mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Ensure the default computed values are up-to-date before evaluating media queries.
Zoom changes can change the meaning of ems, so we can't re-evaluate media queries with the old values, because otherwise we may miss a restyle. Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1357461 MozReview-Commit-ID: HQInvR7RPqR
This commit is contained in:
parent
5c66d3c77a
commit
dd3bf6f952
3 changed files with 20 additions and 13 deletions
|
@ -9,7 +9,6 @@ use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut};
|
|||
use dom::TElement;
|
||||
use fnv::FnvHashMap;
|
||||
use gecko::rules::{CounterStyleRule, FontFaceRule};
|
||||
use gecko::wrapper::GeckoElement;
|
||||
use gecko_bindings::bindings::RawServoStyleSet;
|
||||
use gecko_bindings::structs::RawGeckoPresContextOwned;
|
||||
use gecko_bindings::structs::nsIDocument;
|
||||
|
@ -70,15 +69,6 @@ impl PerDocumentStyleData {
|
|||
}
|
||||
|
||||
impl PerDocumentStyleDataImpl {
|
||||
/// Reset the device state because it may have changed.
|
||||
///
|
||||
/// Implies also a stylesheet flush.
|
||||
pub fn reset_device(&mut self, guard: &SharedRwLockReadGuard) {
|
||||
self.stylist.device_mut().reset();
|
||||
self.stylesheets.force_dirty();
|
||||
self.flush_stylesheets::<GeckoElement>(guard, None);
|
||||
}
|
||||
|
||||
/// Recreate the style data if the stylesheets have changed.
|
||||
pub fn flush_stylesheets<E>(&mut self,
|
||||
guard: &SharedRwLockReadGuard,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue