mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
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:
parent
b268ef6aed
commit
a6f32bc762
1 changed files with 5 additions and 1 deletions
|
@ -825,11 +825,15 @@ pub trait TElement:
|
||||||
Self: 'a,
|
Self: 'a,
|
||||||
F: FnMut(&'a CascadeData, QuirksMode, Option<Self>),
|
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| {
|
let mut doc_rules_apply = !self.each_xbl_cascade_data(|data, quirks_mode| {
|
||||||
f(data, quirks_mode, None);
|
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;
|
doc_rules_apply = false;
|
||||||
if let Some(data) = shadow.style_data() {
|
if let Some(data) = shadow.style_data() {
|
||||||
f(
|
f(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue