style: Make insertion of @font-face rules not necessarily restyle the whole document.
draft
style: Make insertion of @font-face rules not necessarily restyle the whole document.
MozReview-Commit-ID: 5ewKiShUHNi
--- a/servo/components/style/invalidation/stylesheets.rs
+++ b/servo/components/style/invalidation/stylesheets.rs
@@ -412,19 +412,23 @@ impl StylesheetInvalidationSet {
Document(..) |
Namespace(..) |
Import(..) |
Media(..) |
Supports(..) => {
// Do nothing, relevant nested rules are visited as part of the
// iteration.
}
- FontFace(..) |
+ FontFace(..) => {
+ // Do nothing, @font-face doesn't affect computed style
+ // information. We'll restyle when the font face loads, if
+ // needed.
+ }
+ Keyframes(..) |
CounterStyle(..) |
- Keyframes(..) |
Page(..) |
Viewport(..) |
FontFeatureValues(..) => {
debug!(" > Found unsupported rule, marking the whole subtree \
invalid.");
// TODO(emilio): Can we do better here?
//