mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
style: Add basic @container rule parsing and boilerplate
For now parse a MediaFeatureCondition. That needs being made more specific, but that is probably worth its own patch. Differential Revision: https://phabricator.services.mozilla.com/D143192
This commit is contained in:
parent
6755548267
commit
b31ea25848
10 changed files with 134 additions and 6 deletions
|
@ -15,7 +15,7 @@ use crate::gecko_bindings::structs::{
|
|||
RawServoKeyframesRule, RawServoLayerBlockRule, RawServoLayerStatementRule, RawServoMediaList,
|
||||
RawServoMediaRule, RawServoMozDocumentRule, RawServoNamespaceRule, RawServoPageRule,
|
||||
RawServoScrollTimelineRule, RawServoStyleRule, RawServoStyleSheetContents,
|
||||
RawServoSupportsRule, ServoCssRules,
|
||||
RawServoSupportsRule, RawServoContainerRule, ServoCssRules,
|
||||
};
|
||||
use crate::gecko_bindings::sugar::ownership::{HasArcFFI, HasFFI, Strong};
|
||||
use crate::media_queries::MediaList;
|
||||
|
@ -26,7 +26,7 @@ use crate::stylesheets::keyframes_rule::Keyframe;
|
|||
use crate::stylesheets::{
|
||||
CounterStyleRule, CssRules, DocumentRule, FontFaceRule, FontFeatureValuesRule, ImportRule,
|
||||
KeyframesRule, LayerBlockRule, LayerStatementRule, MediaRule, NamespaceRule, PageRule,
|
||||
ScrollTimelineRule, StyleRule, StylesheetContents, SupportsRule,
|
||||
ScrollTimelineRule, StyleRule, StylesheetContents, SupportsRule, ContainerRule,
|
||||
};
|
||||
use servo_arc::{Arc, ArcBorrow};
|
||||
use std::{mem, ptr};
|
||||
|
@ -98,6 +98,9 @@ impl_arc_ffi!(Locked<ScrollTimelineRule> => RawServoScrollTimelineRule
|
|||
impl_arc_ffi!(Locked<SupportsRule> => RawServoSupportsRule
|
||||
[Servo_SupportsRule_AddRef, Servo_SupportsRule_Release]);
|
||||
|
||||
impl_arc_ffi!(Locked<ContainerRule> => RawServoContainerRule
|
||||
[Servo_ContainerRule_AddRef, Servo_ContainerRule_Release]);
|
||||
|
||||
impl_arc_ffi!(Locked<DocumentRule> => RawServoMozDocumentRule
|
||||
[Servo_DocumentRule_AddRef, Servo_DocumentRule_Release]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue