mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
Auto merge of #18867 - emilio:parse-hack, r=heycam
style: Dishonor display: -moz-box if -webkit-box was specified before This is a compatibility hack that Gecko supports that is apparently important for android. I want to remove it, but let's see... See https://bugzilla.mozilla.org/show_bug.cgi?id=1407701 for reference. <!-- 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/18867) <!-- Reviewable:end -->
This commit is contained in:
commit
2be76c5fd7
7 changed files with 162 additions and 79 deletions
|
@ -5,6 +5,7 @@
|
|||
use cssparser::SourceLocation;
|
||||
use servo_arc::Arc;
|
||||
use style::properties::{LonghandId, LonghandIdSet, PropertyDeclaration, PropertyDeclarationBlock, Importance};
|
||||
use style::properties::DeclarationSource;
|
||||
use style::shared_lock::SharedRwLock;
|
||||
use style::stylesheets::keyframes_rule::{Keyframe, KeyframesAnimation, KeyframePercentage, KeyframeSelector};
|
||||
use style::stylesheets::keyframes_rule::{KeyframesStep, KeyframesStepValue};
|
||||
|
@ -76,12 +77,14 @@ fn test_missing_property_in_initial_keyframe() {
|
|||
block.push(
|
||||
PropertyDeclaration::Width(
|
||||
LengthOrPercentageOrAuto::Length(NoCalcLength::from_px(20f32))),
|
||||
Importance::Normal
|
||||
Importance::Normal,
|
||||
DeclarationSource::Parsing,
|
||||
);
|
||||
block.push(
|
||||
PropertyDeclaration::Height(
|
||||
LengthOrPercentageOrAuto::Length(NoCalcLength::from_px(20f32))),
|
||||
Importance::Normal
|
||||
Importance::Normal,
|
||||
DeclarationSource::Parsing,
|
||||
);
|
||||
block
|
||||
}));
|
||||
|
@ -132,12 +135,14 @@ fn test_missing_property_in_final_keyframe() {
|
|||
block.push(
|
||||
PropertyDeclaration::Width(
|
||||
LengthOrPercentageOrAuto::Length(NoCalcLength::from_px(20f32))),
|
||||
Importance::Normal
|
||||
Importance::Normal,
|
||||
DeclarationSource::Parsing,
|
||||
);
|
||||
block.push(
|
||||
PropertyDeclaration::Height(
|
||||
LengthOrPercentageOrAuto::Length(NoCalcLength::from_px(20f32))),
|
||||
Importance::Normal
|
||||
Importance::Normal,
|
||||
DeclarationSource::Parsing,
|
||||
);
|
||||
block
|
||||
}));
|
||||
|
@ -195,12 +200,14 @@ fn test_missing_keyframe_in_both_of_initial_and_final_keyframe() {
|
|||
block.push(
|
||||
PropertyDeclaration::Width(
|
||||
LengthOrPercentageOrAuto::Length(NoCalcLength::from_px(20f32))),
|
||||
Importance::Normal
|
||||
Importance::Normal,
|
||||
DeclarationSource::Parsing,
|
||||
);
|
||||
block.push(
|
||||
PropertyDeclaration::Height(
|
||||
LengthOrPercentageOrAuto::Length(NoCalcLength::from_px(20f32))),
|
||||
Importance::Normal
|
||||
Importance::Normal,
|
||||
DeclarationSource::Parsing,
|
||||
);
|
||||
block
|
||||
}));
|
||||
|
|
|
@ -20,8 +20,8 @@ use style::error_reporting::{ParseErrorReporter, ContextualParseError};
|
|||
use style::media_queries::MediaList;
|
||||
use style::properties::Importance;
|
||||
use style::properties::{CSSWideKeyword, DeclaredValueOwned, PropertyDeclaration, PropertyDeclarationBlock};
|
||||
use style::properties::longhands;
|
||||
use style::properties::longhands::animation_timing_function;
|
||||
use style::properties::DeclarationSource;
|
||||
use style::properties::longhands::{self, animation_timing_function};
|
||||
use style::shared_lock::SharedRwLock;
|
||||
use style::stylesheets::{Origin, Namespaces};
|
||||
use style::stylesheets::{Stylesheet, StylesheetContents, NamespaceRule, CssRule, CssRules, StyleRule, KeyframesRule};
|
||||
|
@ -35,7 +35,7 @@ pub fn block_from<I>(iterable: I) -> PropertyDeclarationBlock
|
|||
where I: IntoIterator<Item=(PropertyDeclaration, Importance)> {
|
||||
let mut block = PropertyDeclarationBlock::new();
|
||||
for (d, i) in iterable {
|
||||
block.push(d, i)
|
||||
block.push(d, i, DeclarationSource::CssOm);
|
||||
}
|
||||
block
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue