mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Bug 1304792: stylo: Implement @import. r=heycam
MozReview-Commit-ID: Hw1V66JxIBD Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
b49eb6f566
commit
a5f5e48c68
7 changed files with 177 additions and 16 deletions
|
@ -11,7 +11,7 @@
|
|||
use app_units::Au;
|
||||
use gecko::values::{convert_rgba_to_nscolor, StyleCoordHelpers};
|
||||
use gecko_bindings::bindings::{Gecko_CreateGradient, Gecko_SetGradientImageValue, Gecko_SetUrlImageValue};
|
||||
use gecko_bindings::bindings::{RawServoStyleSheet, RawServoDeclarationBlock, RawServoStyleRule};
|
||||
use gecko_bindings::bindings::{RawServoStyleSheet, RawServoDeclarationBlock, RawServoStyleRule, RawServoImportRule};
|
||||
use gecko_bindings::bindings::{ServoComputedValues, ServoCssRules};
|
||||
use gecko_bindings::structs::{nsStyleCoord_CalcValue, nsStyleImage};
|
||||
use gecko_bindings::structs::nsresult;
|
||||
|
@ -19,7 +19,7 @@ use gecko_bindings::sugar::ns_style_coord::{CoordDataValue, CoordDataMut};
|
|||
use gecko_bindings::sugar::ownership::{HasArcFFI, HasFFI};
|
||||
use parking_lot::RwLock;
|
||||
use properties::{ComputedValues, PropertyDeclarationBlock};
|
||||
use stylesheets::{CssRules, RulesMutateError, Stylesheet, StyleRule};
|
||||
use stylesheets::{CssRules, RulesMutateError, Stylesheet, StyleRule, ImportRule};
|
||||
use values::computed::{CalcLengthOrPercentage, Gradient, Image, LengthOrPercentage, LengthOrPercentageOrAuto};
|
||||
|
||||
unsafe impl HasFFI for Stylesheet {
|
||||
|
@ -46,6 +46,11 @@ unsafe impl HasFFI for RwLock<StyleRule> {
|
|||
}
|
||||
unsafe impl HasArcFFI for RwLock<StyleRule> {}
|
||||
|
||||
unsafe impl HasFFI for RwLock<ImportRule> {
|
||||
type FFIType = RawServoImportRule;
|
||||
}
|
||||
unsafe impl HasArcFFI for RwLock<ImportRule> {}
|
||||
|
||||
impl From<CalcLengthOrPercentage> for nsStyleCoord_CalcValue {
|
||||
fn from(other: CalcLengthOrPercentage) -> nsStyleCoord_CalcValue {
|
||||
let has_percentage = other.percentage.is_some();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue