diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-06-09 14:31:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-09 14:31:48 -0700 |
commit | 061cb5f48e5c93a5decf39e530aea4a566e97341 (patch) | |
tree | 1682083740ce2a850c5204cd046918a8427c57ba /components/script/dom/cssmediarule.rs | |
parent | 8fee7f45e0481bf6074788029f8a1eaea24fcca5 (diff) | |
parent | 27ae1ef2e7d78f38e744f2e00e177302f2d6aa82 (diff) | |
download | servo-061cb5f48e5c93a5decf39e530aea4a566e97341.tar.gz servo-061cb5f48e5c93a5decf39e530aea4a566e97341.zip |
Auto merge of #16752 - jdm:css-parse-error, r=SimonSapin
Report more informative CSS errors
This requires https://github.com/servo/rust-cssparser/pull/143 for the final commit. There's no better way to split that work up, unfortunately, and it's extremely easy to bitrot. I would appreciate if we could expedite reviewing this work.
This is the work necessary to enable https://bugzilla.mozilla.org/show_bug.cgi?id=1352669. It makes sense to merge it separately because it's so much effort to keep it up to date with the ongoing Stylo work.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes
<!-- 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/16752)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/cssmediarule.rs')
-rw-r--r-- | components/script/dom/cssmediarule.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/cssmediarule.rs b/components/script/dom/cssmediarule.rs index 6986b0fe03d..1f5535f1b3e 100644 --- a/components/script/dom/cssmediarule.rs +++ b/components/script/dom/cssmediarule.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use cssparser::Parser; +use cssparser::{Parser, ParserInput}; use dom::bindings::codegen::Bindings::CSSMediaRuleBinding; use dom::bindings::codegen::Bindings::CSSMediaRuleBinding::CSSMediaRuleMethods; use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods; @@ -69,7 +69,8 @@ impl CSSMediaRule { /// https://drafts.csswg.org/css-conditional-3/#the-cssmediarule-interface pub fn set_condition_text(&self, text: DOMString) { - let mut input = Parser::new(&text); + let mut input = ParserInput::new(&text); + let mut input = Parser::new(&mut input); let global = self.global(); let win = global.as_window(); let url = win.get_url(); |