style: Fix revalidation in <svg:use> subtree.

So as to avoid incorrectly sharing styles across elements.

Differential Revision: https://phabricator.services.mozilla.com/D25918
This commit is contained in:
Emilio Cobos Álvarez 2019-04-04 03:46:55 +00:00
parent b268ef6aed
commit a6f32bc762

View file

@ -825,11 +825,15 @@ pub trait TElement:
Self: 'a,
F: FnMut(&'a CascadeData, QuirksMode, Option<Self>),
{
use rule_collector::containing_shadow_ignoring_svg_use;
let mut doc_rules_apply = !self.each_xbl_cascade_data(|data, quirks_mode| {
f(data, quirks_mode, None);
});
if let Some(shadow) = self.containing_shadow() {
// Use the same rules to look for the containing host as we do for rule
// collection.
if let Some(shadow) = containing_shadow_ignoring_svg_use(*self) {
doc_rules_apply = false;
if let Some(data) = shadow.style_data() {
f(