mirror of
https://github.com/servo/servo.git
synced 2025-08-14 09:55:35 +01:00
Move most of geckolib into style::gecko
This commit is contained in:
parent
bc9cbc87ba
commit
b2e592b121
27 changed files with 167 additions and 157 deletions
|
@ -165,10 +165,10 @@ use gecko_bindings::structs::nsINode;
|
|||
use gecko_bindings::structs::nsIDocument;
|
||||
use gecko_bindings::structs::nsIPrincipal;
|
||||
use gecko_bindings::structs::nsIURI;
|
||||
use structs::RawGeckoNode;
|
||||
use structs::RawGeckoElement;
|
||||
use structs::RawGeckoDocument;
|
||||
use structs::ServoNodeData;
|
||||
use gecko_bindings::structs::RawGeckoNode;
|
||||
use gecko_bindings::structs::RawGeckoElement;
|
||||
use gecko_bindings::structs::RawGeckoDocument;
|
||||
use gecko_bindings::structs::ServoNodeData;
|
||||
|
||||
extern "C" {
|
||||
pub fn Gecko_EnsureTArrayCapacity(aArray: *mut ::std::os::raw::c_void,
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
use gecko_bindings::bindings::Gecko_AddRefCSSShadowArrayArbitraryThread;
|
||||
use gecko_bindings::bindings::Gecko_NewCSSShadowArray;
|
||||
use gecko_bindings::bindings::Gecko_ReleaseCSSShadowArrayArbitraryThread;
|
||||
use gecko_bindings::structs::{RefPtr, nsCSSShadowArray, nsCSSShadowItem};
|
||||
use std::{ptr, slice};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use gecko_bindings::structs::{RefPtr, nsCSSShadowArray, nsCSSShadowItem};
|
||||
|
||||
impl RefPtr<nsCSSShadowArray> {
|
||||
pub fn replace_with_new(&mut self, len: u32) {
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use gecko_bindings::structs::nsStyleAutoArray;
|
||||
use std::iter::{once, Chain, Once, IntoIterator};
|
||||
use std::slice::{Iter, IterMut};
|
||||
use gecko_bindings::structs::nsStyleAutoArray;
|
||||
|
||||
impl<T> nsStyleAutoArray<T> {
|
||||
pub fn iter_mut(&mut self) -> Chain<Once<&mut T>, IterMut<T>> {
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use gecko_bindings::bindings::{Gecko_ResetStyleCoord, Gecko_SetStyleCoordCalcValue, Gecko_AddRefCalcArbitraryThread};
|
||||
use std::mem;
|
||||
use gecko_bindings::structs::{nsStyleCoord_Calc, nsStyleUnit, nsStyleUnion, nsStyleCoord, nsStyleSides, nsStyleCorners};
|
||||
use gecko_bindings::structs::{nsStyleCoord_CalcValue, nscoord};
|
||||
use std::mem;
|
||||
|
||||
impl nsStyleCoord {
|
||||
#[inline]
|
||||
|
@ -245,8 +245,8 @@ pub trait CoordDataMut : CoordData {
|
|||
|
||||
#[inline(always)]
|
||||
fn set_value(&mut self, value: CoordDataValue) {
|
||||
use self::CoordDataValue::*;
|
||||
use gecko_bindings::structs::nsStyleUnit::*;
|
||||
use self::CoordDataValue::*;
|
||||
self.reset();
|
||||
unsafe {
|
||||
let (unit, union) = self.values_mut();
|
||||
|
@ -337,8 +337,8 @@ pub trait CoordData {
|
|||
|
||||
#[inline(always)]
|
||||
fn as_value(&self) -> CoordDataValue {
|
||||
use self::CoordDataValue::*;
|
||||
use gecko_bindings::structs::nsStyleUnit::*;
|
||||
use self::CoordDataValue::*;
|
||||
unsafe {
|
||||
match self.unit() {
|
||||
eStyleUnit_Null => Null,
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use gecko_bindings::bindings;
|
||||
use gecko_bindings::structs::{nsTArray, nsTArrayHeader};
|
||||
use std::mem;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::os::raw::c_void;
|
||||
use std::slice;
|
||||
use gecko_bindings::structs::{nsTArray, nsTArrayHeader};
|
||||
|
||||
impl<T> Deref for nsTArray<T> {
|
||||
type Target = [T];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue