style: Don't look for viewport units in stylesheets.

Use whether we've computed any viewport unit instead.

This is more accurate (we avoid restyling unnecessarily if we've found anything
ever on the stylesheet, but that hasn't matched).

This has the benefit of also matching Gecko, and simplify some code and
fishyness around, and also hopefully speeding up stylesheet parsing.
This commit is contained in:
Emilio Cobos Álvarez 2017-08-28 11:21:14 +02:00
parent 97338d0e84
commit 15e71c5670
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
10 changed files with 39 additions and 66 deletions

View file

@ -289,7 +289,6 @@ impl<'a> StyleStylesheetLoader for StylesheetLoader<'a> {
rules: CssRules::new(Vec::new(), lock),
origin: context.stylesheet_origin,
url_data: RwLock::new(context.url_data.clone()),
dirty_on_viewport_size_change: AtomicBool::new(false),
quirks_mode: context.quirks_mode,
namespaces: RwLock::new(Namespaces::default()),
source_map_url: RwLock::new(None),