mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Bug 1304792: Use borrowed types for ServoImportRule. r=Manishearth r=heycam
MozReview-Commit-ID: HKjsOaE2qAp Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
a5f5e48c68
commit
df9da705f5
3 changed files with 9 additions and 3 deletions
|
@ -3,10 +3,10 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use parking_lot::RwLock;
|
||||
use std::mem;
|
||||
use std::sync::Arc;
|
||||
use style::gecko_bindings::bindings::Gecko_LoadStyleSheet;
|
||||
use style::gecko_bindings::structs::{Loader, ServoStyleSheet};
|
||||
use style::gecko_bindings::sugar::ownership::HasArcFFI;
|
||||
use style::stylesheets::{ImportRule, StylesheetLoader as StyleStylesheetLoader};
|
||||
use style_traits::ToCss;
|
||||
|
||||
|
@ -37,7 +37,7 @@ impl StyleStylesheetLoader for StylesheetLoader {
|
|||
unsafe {
|
||||
Gecko_LoadStyleSheet(self.0,
|
||||
self.1,
|
||||
mem::transmute(import_rule.clone()),
|
||||
HasArcFFI::arc_as_borrowed(import_rule),
|
||||
spec_bytes,
|
||||
spec_len as u32,
|
||||
media.as_bytes().as_ptr(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue