aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_layout_interface/wrapper_traits.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-01-04 21:01:38 -0800
committerGitHub <noreply@github.com>2017-01-04 21:01:38 -0800
commit143dfc879e609603839502d61bc064fba96cc80f (patch)
tree265320a870027cb37d355aeacebff435db4be8ec /components/script_layout_interface/wrapper_traits.rs
parent16b0da5004fd730de87883daa35a78b6af01f042 (diff)
parentdd80b5c0e7b0ad62b7897ac17782d573a2fa16ea (diff)
downloadservo-143dfc879e609603839502d61bc064fba96cc80f.tar.gz
servo-143dfc879e609603839502d61bc064fba96cc80f.zip
Auto merge of #14848 - bzbarsky:initial-styles, r=bholley
Stop using global initial styles for stylo; the initial styles need to be per-document <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1298588 <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests on the servo side because behavior is unchanged. Gecko-side tests probably exist. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14848) <!-- Reviewable:end -->
Diffstat (limited to 'components/script_layout_interface/wrapper_traits.rs')
-rw-r--r--components/script_layout_interface/wrapper_traits.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script_layout_interface/wrapper_traits.rs b/components/script_layout_interface/wrapper_traits.rs
index 77414fa48d5..0103b185096 100644
--- a/components/script_layout_interface/wrapper_traits.rs
+++ b/components/script_layout_interface/wrapper_traits.rs
@@ -391,6 +391,7 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug +
context.stylist.precomputed_values_for_pseudo(
&style_pseudo,
Some(&data.styles().primary.values),
+ &context.default_computed_values,
false);
data.styles_mut().pseudos
.insert(style_pseudo.clone(), new_style.unwrap());
@@ -407,7 +408,8 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug +
.lazily_compute_pseudo_element_style(
self,
&style_pseudo,
- &data.styles().primary.values);
+ &data.styles().primary.values,
+ &context.default_computed_values);
data.styles_mut().pseudos
.insert(style_pseudo.clone(), new_style.unwrap());
}