mirror of
https://github.com/servo/servo.git
synced 2025-07-03 05:23:38 +01:00
Auto merge of #18772 - upsuper:backout-unshipping, r=backout
Backout #18759 <!-- 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/18772) <!-- Reviewable:end -->
This commit is contained in:
commit
8dece5e74e
4 changed files with 2603 additions and 2531 deletions
File diff suppressed because it is too large
Load diff
|
@ -32,7 +32,6 @@ use string_cache::Atom;
|
|||
use style_traits::{CSSPixel, DevicePixel};
|
||||
use style_traits::{ToCss, ParseError, StyleParseError};
|
||||
use style_traits::viewport::ViewportConstraints;
|
||||
use stylesheets::Origin;
|
||||
use values::{CSSFloat, CustomIdent, serialize_dimension};
|
||||
use values::computed::{self, ToComputedValue};
|
||||
use values::specified::Length;
|
||||
|
@ -585,10 +584,8 @@ impl Expression {
|
|||
/// ```
|
||||
/// (media-feature: media-value)
|
||||
/// ```
|
||||
pub fn parse<'i, 't>(
|
||||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
|
||||
-> Result<Self, ParseError<'i>> {
|
||||
input.expect_parenthesis_block().map_err(|err|
|
||||
match err {
|
||||
BasicParseError::UnexpectedToken(t) => StyleParseError::ExpectedIdentifier(t),
|
||||
|
@ -609,12 +606,6 @@ impl Expression {
|
|||
)?;
|
||||
|
||||
let mut flags = 0;
|
||||
|
||||
if context.in_chrome_stylesheet() ||
|
||||
context.stylesheet_origin == Origin::UserAgent {
|
||||
flags |= nsMediaFeature_RequirementFlags::eUserAgentAndChromeOnly as u8;
|
||||
}
|
||||
|
||||
let result = {
|
||||
let mut feature_name = &**ident;
|
||||
|
||||
|
|
|
@ -116,8 +116,8 @@ macro_rules! apply_non_ts_list {
|
|||
("-moz-window-inactive", MozWindowInactive, mozWindowInactive, _, _),
|
||||
],
|
||||
string: [
|
||||
("-moz-system-metric", MozSystemMetric, mozSystemMetric, _,
|
||||
PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
|
||||
// FIXME(emilio): Unship this for content docs (bug 1396066).
|
||||
("-moz-system-metric", MozSystemMetric, mozSystemMetric, _, _),
|
||||
("lang", Lang, lang, _, _),
|
||||
],
|
||||
keyword: [
|
||||
|
|
|
@ -130,11 +130,6 @@ impl<'a> ParserContext<'a> {
|
|||
};
|
||||
context.error_reporter.report_error(self.url_data, location, error)
|
||||
}
|
||||
|
||||
/// Returns whether this is a chrome stylesheets.
|
||||
pub fn in_chrome_stylesheet(&self) -> bool {
|
||||
self.url_data.is_chrome()
|
||||
}
|
||||
}
|
||||
|
||||
// XXXManishearth Replace all specified value parse impls with impls of this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue