aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/element.rs
diff options
context:
space:
mode:
authorGauriGNaik <gaurinaik.145@gmail.com>2015-10-26 11:31:28 -0400
committerJosh Matthews <josh@joshmatthews.net>2015-11-25 18:28:30 -0500
commit996e9e06b2b57cfc7549eaba71cf1abbd746ca24 (patch)
tree892d7bde46bac071356c7a195c460c931e88cd1f /components/script/dom/element.rs
parent8efc954531d2c7491ea01b6e22c89e35c5cf434a (diff)
downloadservo-996e9e06b2b57cfc7549eaba71cf1abbd746ca24.tar.gz
servo-996e9e06b2b57cfc7549eaba71cf1abbd746ca24.zip
Defined new trait ParseErrorReporter and added error_reporter member to ParserContext
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r--components/script/dom/element.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index 92ac3c8e1b2..f7640d3e7ff 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -80,6 +80,7 @@ use style::properties::longhands::{self, background_image, border_spacing, font_
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock, parse_style_attribute};
use style::values::CSSFloat;
use style::values::specified::{self, CSSColor, CSSRGBA, LengthOrPercentage};
+use style_traits::ParseErrorReporter;
use url::UrlParser;
use util::mem::HeapSizeOf;
use util::str::{DOMString, LengthOrPercentageOrAuto};
@@ -1514,7 +1515,8 @@ impl VirtualMethods for Element {
// Modifying the `style` attribute might change style.
*self.style_attribute.borrow_mut() =
mutation.new_value(attr).map(|value| {
- parse_style_attribute(&value, &doc.base_url())
+ let win = window_from_node(self);
+ parse_style_attribute(&value, &doc.base_url(), win.css_error_reporter())
});
if node.is_in_doc() {
doc.content_changed(node, NodeDamage::NodeStyleDamaged);