style: Make insertion of @font-face rules not necessarily restyle the whole document. draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 02 Feb 2018 11:04:05 +0100
changeset 750470 798f2b6062fd47a2688f6440f4647255b8cec2bc
parent 750383 27e993937c984b0e2bd05aeb17d791c7c036ad21
child 750471 f08fff0d507426b22ee7b907af2b92fd45a3641e
child 750477 94dc5f7ceead081877b918745381a36222327aac
child 750478 545953e84d40f8f8c33990e853d35cb7f735c497
child 750525 2b6f9944e3797d6a010c6a3ebf86e30e4d8f08b6
child 750526 a0bc6dcf30e086a3ffe4fba77123be3a4638b9cd
push id97672
push userbmo:emilio@crisal.io
push dateFri, 02 Feb 2018 11:40:23 +0000
milestone60.0a1
style: Make insertion of @font-face rules not necessarily restyle the whole document. MozReview-Commit-ID: 5ewKiShUHNi
servo/components/style/invalidation/stylesheets.rs
--- 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?
                 //