mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Make media queries work with resize and page zoom.
This commit is contained in:
parent
e483a189a3
commit
11cf538ff4
5 changed files with 134 additions and 86 deletions
|
@ -15,7 +15,7 @@ use dom::node::{Node, NodeHelpers, ElementNodeTypeId, window_from_node};
|
|||
use dom::virtualmethods::VirtualMethods;
|
||||
use layout_interface::{AddStylesheetMsg, LayoutChan};
|
||||
use servo_util::str::DOMString;
|
||||
use style::Stylesheet;
|
||||
use style::{AuthorOrigin, Stylesheet};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLStyleElement {
|
||||
|
@ -55,7 +55,7 @@ impl<'a> StyleElementHelpers for JSRef<'a, HTMLStyleElement> {
|
|||
let url = win.page().get_url();
|
||||
|
||||
let data = node.GetTextContent().expect("Element.textContent must be a string");
|
||||
let sheet = Stylesheet::from_str(data.as_slice(), url);
|
||||
let sheet = Stylesheet::from_str(data.as_slice(), url, AuthorOrigin);
|
||||
let LayoutChan(ref layout_chan) = win.page().layout_chan;
|
||||
layout_chan.send(AddStylesheetMsg(sheet));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue