diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2017-04-23 10:32:16 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-04-26 17:30:28 +0200 |
commit | f872fdac9a49ef1bc551e507439fa322e4d31528 (patch) | |
tree | 9f4683dc258f6726dabf5cf78fb6d8b6eca00081 /components/layout_thread/lib.rs | |
parent | 8f1356de60d0f0b1571b0e84b929ba7d8054177f (diff) | |
download | servo-f872fdac9a49ef1bc551e507439fa322e4d31528.tar.gz servo-f872fdac9a49ef1bc551e507439fa322e4d31528.zip |
Make Stylist::quirks_mode hold a QuirksMode
Diffstat (limited to 'components/layout_thread/lib.rs')
-rw-r--r-- | components/layout_thread/lib.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index c17d3bd9b48..e69e55512d4 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -601,7 +601,7 @@ impl LayoutThread { Msg::AddStylesheet(style_info) => { self.handle_add_stylesheet(style_info, possibly_locked_rw_data) } - Msg::SetQuirksMode => self.handle_set_quirks_mode(possibly_locked_rw_data), + Msg::SetQuirksMode(mode) => self.handle_set_quirks_mode(possibly_locked_rw_data, mode), Msg::GetRPC(response_chan) => { response_chan.send(box LayoutRPCImpl(self.rw_data.clone()) as Box<LayoutRPC + Send>).unwrap(); @@ -772,9 +772,11 @@ impl LayoutThread { } /// Sets quirks mode for the document, causing the quirks mode stylesheet to be used. - fn handle_set_quirks_mode<'a, 'b>(&self, possibly_locked_rw_data: &mut RwData<'a, 'b>) { + fn handle_set_quirks_mode<'a, 'b>(&self, + possibly_locked_rw_data: &mut RwData<'a, 'b>, + quirks_mode: QuirksMode) { let mut rw_data = possibly_locked_rw_data.lock(); - Arc::get_mut(&mut rw_data.stylist).unwrap().set_quirks_mode(true); + Arc::get_mut(&mut rw_data.stylist).unwrap().set_quirks_mode(quirks_mode); possibly_locked_rw_data.block(rw_data); } |