mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Part 11: Move Gecko borrowed FFI types to a separate header file.
Differential Revision: https://phabricator.services.mozilla.com/D8653
This commit is contained in:
parent
89e4d6c049
commit
d960db340c
3 changed files with 34 additions and 12 deletions
|
@ -12,7 +12,7 @@ use euclid::TypedScale;
|
|||
use gecko::values::{convert_nscolor_to_rgba, convert_rgba_to_nscolor};
|
||||
use gecko_bindings::bindings;
|
||||
use gecko_bindings::structs;
|
||||
use gecko_bindings::structs::{nsPresContext, RawGeckoPresContextOwned};
|
||||
use gecko_bindings::structs::{nsPresContext, RawGeckoPresContextBorrowed};
|
||||
use media_queries::MediaType;
|
||||
use properties::ComputedValues;
|
||||
use servo_arc::Arc;
|
||||
|
@ -30,7 +30,7 @@ pub struct Device {
|
|||
/// NB: The pres context lifetime is tied to the styleset, who owns the
|
||||
/// stylist, and thus the `Device`, so having a raw pres context pointer
|
||||
/// here is fine.
|
||||
pres_context: RawGeckoPresContextOwned,
|
||||
pres_context: RawGeckoPresContextBorrowed,
|
||||
default_values: Arc<ComputedValues>,
|
||||
/// The font size of the root element
|
||||
/// This is set when computing the style of the root
|
||||
|
@ -77,7 +77,7 @@ unsafe impl Send for Device {}
|
|||
|
||||
impl Device {
|
||||
/// Trivially constructs a new `Device`.
|
||||
pub fn new(pres_context: RawGeckoPresContextOwned) -> Self {
|
||||
pub fn new(pres_context: RawGeckoPresContextBorrowed) -> Self {
|
||||
assert!(!pres_context.is_null());
|
||||
Device {
|
||||
pres_context,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue