style: Parameterize the update and rebuild methods to take an iterator.

In preparation to avoid cloning the stylesheets while rebuilding in Gecko.
This commit is contained in:
Emilio Cobos Álvarez 2017-05-11 01:45:00 +02:00
parent 50e0c67e2c
commit 677daaabc5
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
5 changed files with 39 additions and 30 deletions

View file

@ -105,7 +105,7 @@ impl PerDocumentStyleDataImpl {
let mut stylesheets = Vec::<Arc<Stylesheet>>::new();
self.stylesheets.flush(&mut stylesheets);
self.stylist.clear();
self.stylist.rebuild(stylesheets.as_slice(),
self.stylist.rebuild(stylesheets.iter(),
&StylesheetGuards::same(guard),
/* ua_sheets = */ None,
/* stylesheets_changed = */ true,