mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Make the pres context optional in the style system.
Differential Revision: https://phabricator.services.mozilla.com/D21239
This commit is contained in:
parent
4e3e4c106a
commit
e723a5b7d6
4 changed files with 85 additions and 38 deletions
|
@ -7,7 +7,7 @@
|
|||
use crate::context::QuirksMode;
|
||||
use crate::dom::TElement;
|
||||
use crate::gecko_bindings::bindings::{self, RawServoStyleSet};
|
||||
use crate::gecko_bindings::structs::{RawGeckoPresContextBorrowed, ServoStyleSetSizes};
|
||||
use crate::gecko_bindings::structs::{self, ServoStyleSetSizes};
|
||||
use crate::gecko_bindings::structs::{StyleSheet as DomStyleSheet, StyleSheetInfo};
|
||||
use crate::gecko_bindings::sugar::ownership::{HasArcFFI, HasBoxFFI, HasFFI, HasSimpleFFI};
|
||||
use crate::invalidation::media_queries::{MediaListKey, ToMediaListKey};
|
||||
|
@ -142,9 +142,9 @@ pub struct PerDocumentStyleDataImpl {
|
|||
pub struct PerDocumentStyleData(AtomicRefCell<PerDocumentStyleDataImpl>);
|
||||
|
||||
impl PerDocumentStyleData {
|
||||
/// Create a dummy `PerDocumentStyleData`.
|
||||
pub fn new(pres_context: RawGeckoPresContextBorrowed) -> Self {
|
||||
let device = Device::new(pres_context);
|
||||
/// Create a `PerDocumentStyleData`.
|
||||
pub fn new(document: *const structs::Document) -> Self {
|
||||
let device = Device::new(document);
|
||||
|
||||
// FIXME(emilio, tlin): How is this supposed to work with XBL? This is
|
||||
// right now not always honored, see bug 1405543...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue