зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #13372 - Merge most of geckolib into style (from Manishearth:merge-stylo); r=emilio
Fixes #13038 r? @emilio Source-Repo: https://github.com/servo/servo Source-Revision: f763eca344fa6a49f2467d9baa25044bebc41ff2 --HG-- rename : servo/ports/geckolib/binding_tools/.gitignore => servo/components/style/binding_tools/.gitignore rename : servo/ports/geckolib/binding_tools/README.md => servo/components/style/binding_tools/README.md rename : servo/ports/geckolib/binding_tools/regen.py => servo/components/style/binding_tools/regen.py rename : servo/ports/geckolib/binding_tools/regen.sh => servo/components/style/binding_tools/regen.sh rename : servo/ports/geckolib/binding_tools/regen_atoms.py => servo/components/style/binding_tools/regen_atoms.py rename : servo/ports/geckolib/binding_tools/setup_bindgen.sh => servo/components/style/binding_tools/setup_bindgen.sh rename : servo/ports/geckolib/context.rs => servo/components/style/gecko/context.rs rename : servo/components/style/gecko_conversions.rs => servo/components/style/gecko/conversions.rs rename : servo/ports/geckolib/data.rs => servo/components/style/gecko/data.rs rename : servo/components/style/generated/gecko_pseudo_element_helper.rs => servo/components/style/gecko/generated/gecko_pseudo_element_helper.rs rename : servo/components/style/gecko_selector_impl.rs => servo/components/style/gecko/selector_impl.rs rename : servo/ports/geckolib/snapshot.rs => servo/components/style/gecko/snapshot.rs rename : servo/ports/geckolib/snapshot_helpers.rs => servo/components/style/gecko/snapshot_helpers.rs rename : servo/ports/geckolib/traversal.rs => servo/components/style/gecko/traversal.rs rename : servo/components/style/gecko_values.rs => servo/components/style/gecko/values.rs rename : servo/ports/geckolib/wrapper.rs => servo/components/style/gecko/wrapper.rs rename : servo/ports/geckolib/gecko_bindings/bindings.rs => servo/components/style/gecko_bindings/bindings.rs rename : servo/ports/geckolib/gecko_bindings/lib.rs => servo/components/style/gecko_bindings/mod.rs rename : servo/ports/geckolib/gecko_bindings/ptr.rs => servo/components/style/gecko_bindings/ptr.rs rename : servo/ports/geckolib/gecko_bindings/structs_debug.rs => servo/components/style/gecko_bindings/structs_debug.rs rename : servo/ports/geckolib/gecko_bindings/structs_release.rs => servo/components/style/gecko_bindings/structs_release.rs rename : servo/ports/geckolib/gecko_bindings/sugar/mod.rs => servo/components/style/gecko_bindings/sugar/mod.rs rename : servo/ports/geckolib/gecko_bindings/sugar/ns_css_shadow_array.rs => servo/components/style/gecko_bindings/sugar/ns_css_shadow_array.rs rename : servo/ports/geckolib/gecko_bindings/sugar/ns_style_auto_array.rs => servo/components/style/gecko_bindings/sugar/ns_style_auto_array.rs rename : servo/ports/geckolib/gecko_bindings/sugar/ns_style_coord.rs => servo/components/style/gecko_bindings/sugar/ns_style_coord.rs rename : servo/ports/geckolib/gecko_bindings/sugar/ns_t_array.rs => servo/components/style/gecko_bindings/sugar/ns_t_array.rs rename : servo/ports/geckolib/gecko_bindings/sugar/ownership.rs => servo/components/style/gecko_bindings/sugar/ownership.rs rename : servo/ports/geckolib/string_cache/lib.rs => servo/components/style/gecko_string_cache/mod.rs rename : servo/ports/geckolib/string_cache/namespace.rs => servo/components/style/gecko_string_cache/namespace.rs
This commit is contained in:
Родитель
5b30e36e71
Коммит
30bfdcfd16
|
@ -2272,6 +2272,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2286,6 +2287,7 @@ dependencies = [
|
|||
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ordered-float 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"plugins 0.0.1",
|
||||
"quickersort 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -12,8 +12,8 @@ name = "style"
|
|||
path = "lib.rs"
|
||||
|
||||
[features]
|
||||
gecko = ["gecko_bindings", "gecko_string_cache"]
|
||||
servo = ["serde", "serde/unstable", "serde_macros", "heapsize", "heapsize_plugin",
|
||||
gecko = []
|
||||
servo = ["serde/unstable", "serde", "serde_macros", "heapsize_plugin",
|
||||
"style_traits/servo", "app_units/plugins",
|
||||
"cssparser/heap_size", "cssparser/serde-serialization",
|
||||
"selectors/heap_size", "selectors/unstable", "string_cache",
|
||||
|
@ -23,20 +23,21 @@ testing = []
|
|||
[dependencies]
|
||||
app_units = "0.3"
|
||||
bitflags = "0.7"
|
||||
cfg-if = "0.1.0"
|
||||
cssparser = "0.7"
|
||||
deque = "0.3.1"
|
||||
encoding = "0.2"
|
||||
euclid = "0.10.1"
|
||||
fnv = "1.0"
|
||||
gecko_bindings = {path = "../../ports/geckolib/gecko_bindings", optional = true}
|
||||
gecko_string_cache = {path = "../../ports/geckolib/string_cache", optional = true}
|
||||
heapsize = {version = "0.3.0", optional = true}
|
||||
heapsize = "0.3.0"
|
||||
heapsize_plugin = {version = "0.1.2", optional = true}
|
||||
lazy_static = "0.2"
|
||||
log = "0.3.5"
|
||||
libc = "0.2"
|
||||
matches = "0.1"
|
||||
num-integer = "0.1.32"
|
||||
num-traits = "0.1.32"
|
||||
num_cpus = "0.2.2"
|
||||
ordered-float = "0.2.2"
|
||||
quickersort = "2.0.0"
|
||||
rand = "0.3"
|
||||
|
|
|
@ -432,11 +432,13 @@ def build(objdir, target_name, debug, debugger, kind_name=None,
|
|||
flags.append("--blacklist-type")
|
||||
flags.append("{}Strong".format(ty))
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}Strong = ::sugar::ownership::Strong<{0}>;".format(ty))
|
||||
flags.append("pub type {0}Strong = ::gecko_bindings::sugar::ownership::Strong<{0}>;"
|
||||
.format(ty))
|
||||
flags.append("--blacklist-type")
|
||||
flags.append("{}BorrowedOrNull".format(ty))
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}BorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, {0}>;".format(ty))
|
||||
flags.append("pub type {0}BorrowedOrNull<'a> = \
|
||||
::gecko_bindings::sugar::ownership::Borrowed<'a, {0}>;".format(ty))
|
||||
flags.append("--blacklist-type")
|
||||
flags.append("{}Borrowed".format(ty))
|
||||
flags.append("--raw-line")
|
||||
|
@ -452,7 +454,8 @@ def build(objdir, target_name, debug, debugger, kind_name=None,
|
|||
flags.append("--blacklist-type")
|
||||
flags.append("{}BorrowedOrNull".format(ty))
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}BorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, {0}>;".format(ty))
|
||||
flags.append("pub type {0}BorrowedOrNull<'a> = \
|
||||
::gecko_bindings::sugar::ownership::Borrowed<'a, {0}>;".format(ty))
|
||||
# Right now the only immutable borrow types are ones which we import
|
||||
# from the |structs| module. As such, we don't need to create an opaque
|
||||
# type with zero_size_type. If we ever introduce immutable borrow types
|
||||
|
@ -478,21 +481,21 @@ def build(objdir, target_name, debug, debugger, kind_name=None,
|
|||
flags.append("--blacklist-type")
|
||||
flags.append("{}Owned".format(ty))
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}Owned = ::sugar::ownership::Owned<{0}>;".format(ty))
|
||||
flags.append("pub type {0}Owned = ::gecko_bindings::sugar::ownership::Owned<{0}>;".format(ty))
|
||||
flags.append("--blacklist-type")
|
||||
flags.append("{}BorrowedOrNull".format(ty))
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}BorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, {0}>;"
|
||||
flags.append("pub type {0}BorrowedOrNull<'a> = ::gecko_bindings::sugar::ownership::Borrowed<'a, {0}>;"
|
||||
.format(ty))
|
||||
flags.append("--blacklist-type")
|
||||
flags.append("{}BorrowedMutOrNull".format(ty))
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}BorrowedMutOrNull<'a> = ::sugar::ownership::BorrowedMut<'a, {0}>;"
|
||||
flags.append("pub type {0}BorrowedMutOrNull<'a> = ::gecko_bindings::sugar::ownership::BorrowedMut<'a, {0}>;"
|
||||
.format(ty))
|
||||
flags.append("--blacklist-type")
|
||||
flags.append("{}OwnedOrNull".format(ty))
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}OwnedOrNull = ::sugar::ownership::OwnedOrNull<{0}>;".format(ty))
|
||||
flags.append("pub type {0}OwnedOrNull = ::gecko_bindings::sugar::ownership::OwnedOrNull<{0}>;".format(ty))
|
||||
zero_size_type(ty, flags)
|
||||
|
||||
if "structs_types" in current_target:
|
||||
|
@ -500,7 +503,7 @@ def build(objdir, target_name, debug, debugger, kind_name=None,
|
|||
flags.append("--blacklist-type")
|
||||
flags.append(ty)
|
||||
flags.append("--raw-line")
|
||||
flags.append("use structs::{};".format(ty))
|
||||
flags.append("use gecko_bindings::structs::{};".format(ty))
|
||||
|
||||
# TODO: this is hacky, figure out a better way to do it without
|
||||
# hardcoding everything...
|
|
@ -117,7 +117,7 @@ def write_atom_macro(atoms, file_name):
|
|||
|
||||
with open(file_name, "wb") as f:
|
||||
f.write(PRELUDE)
|
||||
f.write("use gecko_bindings::structs::nsIAtom;\n\n")
|
||||
f.write("use style::gecko_bindings::structs::nsIAtom;\n\n")
|
||||
f.write("use Atom;\n\n")
|
||||
for source in SOURCES:
|
||||
if source.TYPE != "nsIAtom":
|
||||
|
@ -138,7 +138,8 @@ def write_atom_macro(atoms, file_name):
|
|||
f.write("}\n\n")
|
||||
f.write("#[macro_export]\n")
|
||||
f.write("macro_rules! atom {\n")
|
||||
f.writelines(['("%s") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::%s as *mut _) };\n'
|
||||
f.writelines(['("%s") => { $crate::string_cache::atom_macro::unsafe_atom_from_static(\
|
||||
$crate::string_cache::atom_macro::%s as *mut _) };\n'
|
||||
% (atom.value, atom.ident) for atom in atoms])
|
||||
f.write("}\n")
|
||||
|
||||
|
@ -191,6 +192,6 @@ def write_pseudo_element_helper(atoms, target_filename):
|
|||
|
||||
def build(objdir, verbose=False):
|
||||
atoms = collect_atoms(objdir)
|
||||
write_atom_macro(atoms, "../string_cache/atom_macro.rs")
|
||||
write_pseudo_element_helper(atoms, "../../../components/style/generated/gecko_pseudo_element_helper.rs")
|
||||
write_atom_macro(atoms, "../gecko_string_cache/atom_macro.rs")
|
||||
write_pseudo_element_helper(atoms, "../gecko/generated/gecko_pseudo_element_helper.rs")
|
||||
return 0
|
|
@ -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 context::{LocalStyleContext, StyleContext, SharedStyleContext};
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
use style::context::{LocalStyleContext, StyleContext, SharedStyleContext};
|
||||
|
||||
thread_local!(static LOCAL_CONTEXT_KEY: RefCell<Option<Rc<LocalStyleContext>>> = RefCell::new(None));
|
||||
|
|
@ -107,12 +107,12 @@ impl From<nsStyleCoord_CalcValue> for LengthOrPercentage {
|
|||
|
||||
pub mod basic_shape {
|
||||
use euclid::size::Size2D;
|
||||
use gecko::values::GeckoStyleCoordConvertible;
|
||||
use gecko_bindings::structs;
|
||||
use gecko_bindings::structs::{StyleBasicShape, StyleBasicShapeType, StyleFillRule};
|
||||
use gecko_bindings::structs::{nsStyleCoord, nsStyleCorners};
|
||||
use gecko_bindings::structs::StyleClipPathGeometryBox;
|
||||
use gecko_bindings::sugar::ns_style_coord::{CoordDataMut, CoordDataValue};
|
||||
use gecko_values::GeckoStyleCoordConvertible;
|
||||
use std::borrow::Borrow;
|
||||
use values::computed::{BorderRadiusSize, LengthOrPercentage};
|
||||
use values::computed::basic_shape::*;
|
|
@ -2,25 +2,25 @@
|
|||
* 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 animation::Animation;
|
||||
use context::SharedStyleContext;
|
||||
use dom::OpaqueNode;
|
||||
use euclid::size::TypedSize2D;
|
||||
use gecko_bindings::bindings::RawServoStyleSet;
|
||||
use gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
|
||||
use media_queries::{Device, MediaType};
|
||||
use num_cpus;
|
||||
use parallel::WorkQueueData;
|
||||
use selector_matching::Stylist;
|
||||
use std::cmp;
|
||||
use std::collections::HashMap;
|
||||
use std::env;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::sync::mpsc::{Receiver, Sender, channel};
|
||||
use style::animation::Animation;
|
||||
use style::context::SharedStyleContext;
|
||||
use style::dom::OpaqueNode;
|
||||
use style::media_queries::{Device, MediaType};
|
||||
use style::parallel::WorkQueueData;
|
||||
use style::selector_matching::Stylist;
|
||||
use style::stylesheets::Stylesheet;
|
||||
use style::thread_state;
|
||||
use style::workqueue::WorkQueue;
|
||||
use style_traits::ViewportPx;
|
||||
use stylesheets::Stylesheet;
|
||||
use thread_state;
|
||||
use workqueue::WorkQueue;
|
||||
|
||||
pub struct PerDocumentStyleData {
|
||||
/// Rule processor.
|
|
@ -0,0 +1,15 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
|
||||
pub mod context;
|
||||
pub mod data;
|
||||
pub mod snapshot;
|
||||
pub mod snapshot_helpers;
|
||||
pub mod traversal;
|
||||
pub mod wrapper;
|
||||
|
||||
pub mod conversions;
|
||||
pub mod selector_impl;
|
||||
pub mod values;
|
|
@ -1,16 +1,17 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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 element_state::ElementState;
|
||||
use gecko::snapshot_helpers;
|
||||
use gecko::wrapper::AttrSelectorHelpers;
|
||||
use gecko_bindings::bindings;
|
||||
use gecko_bindings::structs::ServoElementSnapshot;
|
||||
use gecko_bindings::structs::ServoElementSnapshotFlags as Flags;
|
||||
use gecko_string_cache::Atom;
|
||||
use restyle_hints::ElementSnapshot;
|
||||
use selector_impl::TheSelectorImpl;
|
||||
use selectors::parser::AttrSelector;
|
||||
use snapshot_helpers;
|
||||
use style::element_state::ElementState;
|
||||
use style::restyle_hints::ElementSnapshot;
|
||||
use style::selector_impl::TheSelectorImpl;
|
||||
use wrapper::AttrSelectorHelpers;
|
||||
use string_cache::Atom;
|
||||
|
||||
// NB: This is sound, in some sense, because during computation of restyle hints
|
||||
// the snapshot is kept alive by the modified elements table.
|
|
@ -5,8 +5,8 @@
|
|||
//! Element an snapshot common logic.
|
||||
|
||||
use gecko_bindings::structs::nsIAtom;
|
||||
use gecko_string_cache::Atom;
|
||||
use std::{ptr, slice};
|
||||
use string_cache::Atom;
|
||||
|
||||
pub type ClassOrClassList<T> = unsafe extern fn (T, *mut *mut nsIAtom, *mut *mut *mut nsIAtom) -> u32;
|
||||
|
|
@ -2,13 +2,13 @@
|
|||
* 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 context::StandaloneStyleContext;
|
||||
use context::{LocalStyleContext, SharedStyleContext, StyleContext};
|
||||
use dom::OpaqueNode;
|
||||
use gecko::context::StandaloneStyleContext;
|
||||
use gecko::wrapper::GeckoNode;
|
||||
use std::mem;
|
||||
use style::context::{LocalStyleContext, SharedStyleContext, StyleContext};
|
||||
use style::dom::OpaqueNode;
|
||||
use style::traversal::{DomTraversalContext, recalc_style_at};
|
||||
use style::traversal::RestyleResult;
|
||||
use wrapper::GeckoNode;
|
||||
use traversal::{DomTraversalContext, recalc_style_at};
|
||||
use traversal::RestyleResult;
|
||||
|
||||
pub struct RecalcStyleOnly<'lc> {
|
||||
context: StandaloneStyleContext<'lc>,
|
|
@ -4,6 +4,15 @@
|
|||
|
||||
#![allow(unsafe_code)]
|
||||
|
||||
|
||||
use data::PrivateStyleData;
|
||||
use dom::{LayoutIterator, NodeInfo, TDocument, TElement, TNode, TRestyleDamage, UnsafeNode};
|
||||
use dom::{OpaqueNode, PresentationalHintsSynthetizer};
|
||||
use element_state::ElementState;
|
||||
use error_reporting::StdoutErrorReporter;
|
||||
use gecko::selector_impl::{GeckoSelectorImpl, NonTSPseudoClass, PseudoElement};
|
||||
use gecko::snapshot::GeckoElementSnapshot;
|
||||
use gecko::snapshot_helpers;
|
||||
use gecko_bindings::bindings;
|
||||
use gecko_bindings::bindings::{Gecko_CalcStyleDifference, Gecko_StoreStyleDifference};
|
||||
use gecko_bindings::bindings::{Gecko_DropStyleChildrenIterator, Gecko_MaybeCreateStyleChildrenIterator};
|
||||
|
@ -24,31 +33,23 @@ use gecko_bindings::structs::{NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO, NODE_IS_DIRT
|
|||
use gecko_bindings::structs::{RawGeckoDocument, RawGeckoElement, RawGeckoNode};
|
||||
use gecko_bindings::structs::{nsChangeHint, nsIAtom, nsStyleContext};
|
||||
use gecko_bindings::structs::OpaqueStyleData;
|
||||
use gecko_bindings::sugar::ownership::FFIArcHelpers;
|
||||
use gecko_string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
|
||||
use glue::GeckoDeclarationBlock;
|
||||
use gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI, HasFFI};
|
||||
use libc::uintptr_t;
|
||||
use parser::ParserContextExtraData;
|
||||
use properties::{ComputedValues, parse_style_attribute};
|
||||
use properties::PropertyDeclarationBlock;
|
||||
use refcell::{Ref, RefCell, RefMut};
|
||||
use selector_impl::ElementExt;
|
||||
use selector_matching::ApplicableDeclarationBlock;
|
||||
use selectors::Element;
|
||||
use selectors::parser::{AttrSelector, NamespaceConstraint};
|
||||
use snapshot::GeckoElementSnapshot;
|
||||
use snapshot_helpers;
|
||||
use sink::Push;
|
||||
use std::fmt;
|
||||
use std::ops::BitOr;
|
||||
use std::ptr;
|
||||
use std::sync::Arc;
|
||||
use style::data::PrivateStyleData;
|
||||
use style::dom::{LayoutIterator, NodeInfo, TDocument, TElement, TNode, TRestyleDamage, UnsafeNode};
|
||||
use style::dom::{OpaqueNode, PresentationalHintsSynthetizer};
|
||||
use style::element_state::ElementState;
|
||||
use style::error_reporting::StdoutErrorReporter;
|
||||
use style::gecko_selector_impl::{GeckoSelectorImpl, NonTSPseudoClass, PseudoElement};
|
||||
use style::parser::ParserContextExtraData;
|
||||
use style::properties::{ComputedValues, parse_style_attribute};
|
||||
use style::properties::PropertyDeclarationBlock;
|
||||
use style::refcell::{Ref, RefCell, RefMut};
|
||||
use style::selector_impl::ElementExt;
|
||||
use style::selector_matching::ApplicableDeclarationBlock;
|
||||
use style::sink::Push;
|
||||
use std::sync::atomic::{AtomicBool, AtomicPtr};
|
||||
use string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
|
||||
use url::Url;
|
||||
|
||||
pub struct NonOpaqueStyleData(RefCell<PrivateStyleData>);
|
||||
|
@ -60,6 +61,24 @@ impl NonOpaqueStyleData {
|
|||
}
|
||||
|
||||
|
||||
pub struct GeckoDeclarationBlock {
|
||||
pub declarations: Option<Arc<PropertyDeclarationBlock>>,
|
||||
// XXX The following two fields are made atomic to work around the
|
||||
// ownership system so that they can be changed inside a shared
|
||||
// instance. It wouldn't provide safety as Rust usually promises,
|
||||
// but it is fine as far as we only access them in a single thread.
|
||||
// If we need to access them in different threads, we would need
|
||||
// to redesign how it works with MiscContainer in Gecko side.
|
||||
pub cache: AtomicPtr<bindings::nsHTMLCSSStyleSheet>,
|
||||
pub immutable: AtomicBool,
|
||||
}
|
||||
|
||||
unsafe impl HasFFI for GeckoDeclarationBlock {
|
||||
type FFIType = bindings::ServoDeclarationBlock;
|
||||
}
|
||||
unsafe impl HasArcFFI for GeckoDeclarationBlock {}
|
||||
|
||||
|
||||
// We can eliminate OpaqueStyleData when the bindings move into the style crate.
|
||||
fn to_opaque_style_data(d: *mut NonOpaqueStyleData) -> *mut OpaqueStyleData {
|
||||
d as *mut OpaqueStyleData
|
|
@ -1,174 +1,174 @@
|
|||
/* automatically generated by rust-bindgen */
|
||||
|
||||
use heapsize::HeapSizeOf;
|
||||
pub type ServoComputedValuesStrong = ::sugar::ownership::Strong<ServoComputedValues>;
|
||||
pub type ServoComputedValuesBorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, ServoComputedValues>;
|
||||
pub type ServoComputedValuesStrong = ::gecko_bindings::sugar::ownership::Strong<ServoComputedValues>;
|
||||
pub type ServoComputedValuesBorrowedOrNull<'a> = ::gecko_bindings::sugar::ownership::Borrowed<'a, ServoComputedValues>;
|
||||
pub type ServoComputedValuesBorrowed<'a> = &'a ServoComputedValues;
|
||||
enum ServoComputedValuesVoid{ }
|
||||
pub struct ServoComputedValues(ServoComputedValuesVoid);
|
||||
pub type RawServoStyleSheetStrong = ::sugar::ownership::Strong<RawServoStyleSheet>;
|
||||
pub type RawServoStyleSheetBorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, RawServoStyleSheet>;
|
||||
pub type RawServoStyleSheetStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoStyleSheet>;
|
||||
pub type RawServoStyleSheetBorrowedOrNull<'a> = ::gecko_bindings::sugar::ownership::Borrowed<'a, RawServoStyleSheet>;
|
||||
pub type RawServoStyleSheetBorrowed<'a> = &'a RawServoStyleSheet;
|
||||
enum RawServoStyleSheetVoid{ }
|
||||
pub struct RawServoStyleSheet(RawServoStyleSheetVoid);
|
||||
pub type ServoDeclarationBlockStrong = ::sugar::ownership::Strong<ServoDeclarationBlock>;
|
||||
pub type ServoDeclarationBlockBorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, ServoDeclarationBlock>;
|
||||
pub type ServoDeclarationBlockStrong = ::gecko_bindings::sugar::ownership::Strong<ServoDeclarationBlock>;
|
||||
pub type ServoDeclarationBlockBorrowedOrNull<'a> = ::gecko_bindings::sugar::ownership::Borrowed<'a, ServoDeclarationBlock>;
|
||||
pub type ServoDeclarationBlockBorrowed<'a> = &'a ServoDeclarationBlock;
|
||||
enum ServoDeclarationBlockVoid{ }
|
||||
pub struct ServoDeclarationBlock(ServoDeclarationBlockVoid);
|
||||
pub type RawGeckoNodeBorrowed<'a> = &'a RawGeckoNode;
|
||||
pub type RawGeckoNodeBorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, RawGeckoNode>;
|
||||
pub type RawGeckoNodeBorrowedOrNull<'a> = ::gecko_bindings::sugar::ownership::Borrowed<'a, RawGeckoNode>;
|
||||
pub type RawGeckoElementBorrowed<'a> = &'a RawGeckoElement;
|
||||
pub type RawGeckoElementBorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, RawGeckoElement>;
|
||||
pub type RawGeckoElementBorrowedOrNull<'a> = ::gecko_bindings::sugar::ownership::Borrowed<'a, RawGeckoElement>;
|
||||
pub type RawGeckoDocumentBorrowed<'a> = &'a RawGeckoDocument;
|
||||
pub type RawGeckoDocumentBorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, RawGeckoDocument>;
|
||||
pub type RawGeckoDocumentBorrowedOrNull<'a> = ::gecko_bindings::sugar::ownership::Borrowed<'a, RawGeckoDocument>;
|
||||
pub type RawServoStyleSetBorrowed<'a> = &'a RawServoStyleSet;
|
||||
pub type RawServoStyleSetBorrowedMut<'a> = &'a mut RawServoStyleSet;
|
||||
pub type RawServoStyleSetOwned = ::sugar::ownership::Owned<RawServoStyleSet>;
|
||||
pub type RawServoStyleSetBorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, RawServoStyleSet>;
|
||||
pub type RawServoStyleSetBorrowedMutOrNull<'a> = ::sugar::ownership::BorrowedMut<'a, RawServoStyleSet>;
|
||||
pub type RawServoStyleSetOwnedOrNull = ::sugar::ownership::OwnedOrNull<RawServoStyleSet>;
|
||||
pub type RawServoStyleSetOwned = ::gecko_bindings::sugar::ownership::Owned<RawServoStyleSet>;
|
||||
pub type RawServoStyleSetBorrowedOrNull<'a> = ::gecko_bindings::sugar::ownership::Borrowed<'a, RawServoStyleSet>;
|
||||
pub type RawServoStyleSetBorrowedMutOrNull<'a> = ::gecko_bindings::sugar::ownership::BorrowedMut<'a, RawServoStyleSet>;
|
||||
pub type RawServoStyleSetOwnedOrNull = ::gecko_bindings::sugar::ownership::OwnedOrNull<RawServoStyleSet>;
|
||||
enum RawServoStyleSetVoid{ }
|
||||
pub struct RawServoStyleSet(RawServoStyleSetVoid);
|
||||
pub type StyleChildrenIteratorBorrowed<'a> = &'a StyleChildrenIterator;
|
||||
pub type StyleChildrenIteratorBorrowedMut<'a> = &'a mut StyleChildrenIterator;
|
||||
pub type StyleChildrenIteratorOwned = ::sugar::ownership::Owned<StyleChildrenIterator>;
|
||||
pub type StyleChildrenIteratorBorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, StyleChildrenIterator>;
|
||||
pub type StyleChildrenIteratorBorrowedMutOrNull<'a> = ::sugar::ownership::BorrowedMut<'a, StyleChildrenIterator>;
|
||||
pub type StyleChildrenIteratorOwnedOrNull = ::sugar::ownership::OwnedOrNull<StyleChildrenIterator>;
|
||||
pub type StyleChildrenIteratorOwned = ::gecko_bindings::sugar::ownership::Owned<StyleChildrenIterator>;
|
||||
pub type StyleChildrenIteratorBorrowedOrNull<'a> = ::gecko_bindings::sugar::ownership::Borrowed<'a, StyleChildrenIterator>;
|
||||
pub type StyleChildrenIteratorBorrowedMutOrNull<'a> = ::gecko_bindings::sugar::ownership::BorrowedMut<'a, StyleChildrenIterator>;
|
||||
pub type StyleChildrenIteratorOwnedOrNull = ::gecko_bindings::sugar::ownership::OwnedOrNull<StyleChildrenIterator>;
|
||||
enum StyleChildrenIteratorVoid{ }
|
||||
pub struct StyleChildrenIterator(StyleChildrenIteratorVoid);
|
||||
use structs::nsStyleFont;
|
||||
use gecko_bindings::structs::nsStyleFont;
|
||||
unsafe impl Send for nsStyleFont {}
|
||||
unsafe impl Sync for nsStyleFont {}
|
||||
use structs::nsStyleColor;
|
||||
use gecko_bindings::structs::nsStyleColor;
|
||||
unsafe impl Send for nsStyleColor {}
|
||||
unsafe impl Sync for nsStyleColor {}
|
||||
use structs::nsStyleList;
|
||||
use gecko_bindings::structs::nsStyleList;
|
||||
unsafe impl Send for nsStyleList {}
|
||||
unsafe impl Sync for nsStyleList {}
|
||||
use structs::nsStyleText;
|
||||
use gecko_bindings::structs::nsStyleText;
|
||||
unsafe impl Send for nsStyleText {}
|
||||
unsafe impl Sync for nsStyleText {}
|
||||
use structs::nsStyleVisibility;
|
||||
use gecko_bindings::structs::nsStyleVisibility;
|
||||
unsafe impl Send for nsStyleVisibility {}
|
||||
unsafe impl Sync for nsStyleVisibility {}
|
||||
use structs::nsStyleUserInterface;
|
||||
use gecko_bindings::structs::nsStyleUserInterface;
|
||||
unsafe impl Send for nsStyleUserInterface {}
|
||||
unsafe impl Sync for nsStyleUserInterface {}
|
||||
use structs::nsStyleTableBorder;
|
||||
use gecko_bindings::structs::nsStyleTableBorder;
|
||||
unsafe impl Send for nsStyleTableBorder {}
|
||||
unsafe impl Sync for nsStyleTableBorder {}
|
||||
use structs::nsStyleSVG;
|
||||
use gecko_bindings::structs::nsStyleSVG;
|
||||
unsafe impl Send for nsStyleSVG {}
|
||||
unsafe impl Sync for nsStyleSVG {}
|
||||
use structs::nsStyleVariables;
|
||||
use gecko_bindings::structs::nsStyleVariables;
|
||||
unsafe impl Send for nsStyleVariables {}
|
||||
unsafe impl Sync for nsStyleVariables {}
|
||||
use structs::nsStyleBackground;
|
||||
use gecko_bindings::structs::nsStyleBackground;
|
||||
unsafe impl Send for nsStyleBackground {}
|
||||
unsafe impl Sync for nsStyleBackground {}
|
||||
use structs::nsStylePosition;
|
||||
use gecko_bindings::structs::nsStylePosition;
|
||||
unsafe impl Send for nsStylePosition {}
|
||||
unsafe impl Sync for nsStylePosition {}
|
||||
use structs::nsStyleTextReset;
|
||||
use gecko_bindings::structs::nsStyleTextReset;
|
||||
unsafe impl Send for nsStyleTextReset {}
|
||||
unsafe impl Sync for nsStyleTextReset {}
|
||||
use structs::nsStyleDisplay;
|
||||
use gecko_bindings::structs::nsStyleDisplay;
|
||||
unsafe impl Send for nsStyleDisplay {}
|
||||
unsafe impl Sync for nsStyleDisplay {}
|
||||
use structs::nsStyleContent;
|
||||
use gecko_bindings::structs::nsStyleContent;
|
||||
unsafe impl Send for nsStyleContent {}
|
||||
unsafe impl Sync for nsStyleContent {}
|
||||
use structs::nsStyleUIReset;
|
||||
use gecko_bindings::structs::nsStyleUIReset;
|
||||
unsafe impl Send for nsStyleUIReset {}
|
||||
unsafe impl Sync for nsStyleUIReset {}
|
||||
use structs::nsStyleTable;
|
||||
use gecko_bindings::structs::nsStyleTable;
|
||||
unsafe impl Send for nsStyleTable {}
|
||||
unsafe impl Sync for nsStyleTable {}
|
||||
use structs::nsStyleMargin;
|
||||
use gecko_bindings::structs::nsStyleMargin;
|
||||
unsafe impl Send for nsStyleMargin {}
|
||||
unsafe impl Sync for nsStyleMargin {}
|
||||
use structs::nsStylePadding;
|
||||
use gecko_bindings::structs::nsStylePadding;
|
||||
unsafe impl Send for nsStylePadding {}
|
||||
unsafe impl Sync for nsStylePadding {}
|
||||
use structs::nsStyleBorder;
|
||||
use gecko_bindings::structs::nsStyleBorder;
|
||||
unsafe impl Send for nsStyleBorder {}
|
||||
unsafe impl Sync for nsStyleBorder {}
|
||||
use structs::nsStyleOutline;
|
||||
use gecko_bindings::structs::nsStyleOutline;
|
||||
unsafe impl Send for nsStyleOutline {}
|
||||
unsafe impl Sync for nsStyleOutline {}
|
||||
use structs::nsStyleXUL;
|
||||
use gecko_bindings::structs::nsStyleXUL;
|
||||
unsafe impl Send for nsStyleXUL {}
|
||||
unsafe impl Sync for nsStyleXUL {}
|
||||
use structs::nsStyleSVGReset;
|
||||
use gecko_bindings::structs::nsStyleSVGReset;
|
||||
unsafe impl Send for nsStyleSVGReset {}
|
||||
unsafe impl Sync for nsStyleSVGReset {}
|
||||
use structs::nsStyleColumn;
|
||||
use gecko_bindings::structs::nsStyleColumn;
|
||||
unsafe impl Send for nsStyleColumn {}
|
||||
unsafe impl Sync for nsStyleColumn {}
|
||||
use structs::nsStyleEffects;
|
||||
use gecko_bindings::structs::nsStyleEffects;
|
||||
unsafe impl Send for nsStyleEffects {}
|
||||
unsafe impl Sync for nsStyleEffects {}
|
||||
use structs::nsStyleImage;
|
||||
use gecko_bindings::structs::nsStyleImage;
|
||||
unsafe impl Send for nsStyleImage {}
|
||||
unsafe impl Sync for nsStyleImage {}
|
||||
use structs::nsStyleGradient;
|
||||
use gecko_bindings::structs::nsStyleGradient;
|
||||
unsafe impl Send for nsStyleGradient {}
|
||||
unsafe impl Sync for nsStyleGradient {}
|
||||
use structs::nsStyleCoord;
|
||||
use gecko_bindings::structs::nsStyleCoord;
|
||||
unsafe impl Send for nsStyleCoord {}
|
||||
unsafe impl Sync for nsStyleCoord {}
|
||||
use structs::nsStyleGradientStop;
|
||||
use gecko_bindings::structs::nsStyleGradientStop;
|
||||
unsafe impl Send for nsStyleGradientStop {}
|
||||
unsafe impl Sync for nsStyleGradientStop {}
|
||||
use structs::nsStyleImageLayers;
|
||||
use gecko_bindings::structs::nsStyleImageLayers;
|
||||
unsafe impl Send for nsStyleImageLayers {}
|
||||
unsafe impl Sync for nsStyleImageLayers {}
|
||||
use structs::nsStyleImageLayers_Layer;
|
||||
use gecko_bindings::structs::nsStyleImageLayers_Layer;
|
||||
unsafe impl Send for nsStyleImageLayers_Layer {}
|
||||
unsafe impl Sync for nsStyleImageLayers_Layer {}
|
||||
use structs::nsStyleImageLayers_LayerType;
|
||||
use gecko_bindings::structs::nsStyleImageLayers_LayerType;
|
||||
unsafe impl Send for nsStyleImageLayers_LayerType {}
|
||||
unsafe impl Sync for nsStyleImageLayers_LayerType {}
|
||||
use structs::nsStyleUnit;
|
||||
use gecko_bindings::structs::nsStyleUnit;
|
||||
unsafe impl Send for nsStyleUnit {}
|
||||
unsafe impl Sync for nsStyleUnit {}
|
||||
use structs::nsStyleUnion;
|
||||
use gecko_bindings::structs::nsStyleUnion;
|
||||
unsafe impl Send for nsStyleUnion {}
|
||||
unsafe impl Sync for nsStyleUnion {}
|
||||
use structs::nsStyleCoord_CalcValue;
|
||||
use gecko_bindings::structs::nsStyleCoord_CalcValue;
|
||||
unsafe impl Send for nsStyleCoord_CalcValue {}
|
||||
unsafe impl Sync for nsStyleCoord_CalcValue {}
|
||||
use structs::nsStyleCoord_Calc;
|
||||
use gecko_bindings::structs::nsStyleCoord_Calc;
|
||||
unsafe impl Send for nsStyleCoord_Calc {}
|
||||
unsafe impl Sync for nsStyleCoord_Calc {}
|
||||
use structs::nsRestyleHint;
|
||||
use structs::ServoElementSnapshot;
|
||||
use structs::nsChangeHint;
|
||||
use structs::SheetParsingMode;
|
||||
use structs::nsMainThreadPtrHandle;
|
||||
use structs::nsMainThreadPtrHolder;
|
||||
use structs::nscolor;
|
||||
use structs::nsFont;
|
||||
use structs::FontFamilyList;
|
||||
use structs::FontFamilyType;
|
||||
use structs::nsIAtom;
|
||||
use structs::nsStyleContext;
|
||||
use gecko_bindings::structs::nsRestyleHint;
|
||||
use gecko_bindings::structs::ServoElementSnapshot;
|
||||
use gecko_bindings::structs::nsChangeHint;
|
||||
use gecko_bindings::structs::SheetParsingMode;
|
||||
use gecko_bindings::structs::nsMainThreadPtrHandle;
|
||||
use gecko_bindings::structs::nsMainThreadPtrHolder;
|
||||
use gecko_bindings::structs::nscolor;
|
||||
use gecko_bindings::structs::nsFont;
|
||||
use gecko_bindings::structs::FontFamilyList;
|
||||
use gecko_bindings::structs::FontFamilyType;
|
||||
use gecko_bindings::structs::nsIAtom;
|
||||
use gecko_bindings::structs::nsStyleContext;
|
||||
unsafe impl Send for nsStyleContext {}
|
||||
unsafe impl Sync for nsStyleContext {}
|
||||
use structs::StyleClipPath;
|
||||
use structs::StyleBasicShapeType;
|
||||
use structs::StyleBasicShape;
|
||||
use structs::nsCSSShadowArray;
|
||||
use structs::nsINode;
|
||||
use structs::nsIDocument;
|
||||
use structs::nsIPrincipal;
|
||||
use structs::nsIURI;
|
||||
use structs::RawGeckoNode;
|
||||
use structs::RawGeckoElement;
|
||||
use structs::RawGeckoDocument;
|
||||
use structs::ServoNodeData;
|
||||
use gecko_bindings::structs::StyleClipPath;
|
||||
use gecko_bindings::structs::StyleBasicShapeType;
|
||||
use gecko_bindings::structs::StyleBasicShape;
|
||||
use gecko_bindings::structs::nsCSSShadowArray;
|
||||
use gecko_bindings::structs::nsINode;
|
||||
use gecko_bindings::structs::nsIDocument;
|
||||
use gecko_bindings::structs::nsIPrincipal;
|
||||
use gecko_bindings::structs::nsIURI;
|
||||
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,
|
|
@ -2,8 +2,6 @@
|
|||
* 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/. */
|
||||
|
||||
extern crate heapsize;
|
||||
|
||||
#[allow(dead_code, non_camel_case_types)]
|
||||
pub mod bindings;
|
||||
pub mod ptr;
|
|
@ -2,7 +2,7 @@
|
|||
* 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 bindings::*;
|
||||
use gecko_bindings::bindings::*;
|
||||
use heapsize::HeapSizeOf;
|
||||
use std::fmt::{self, Debug};
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
* 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 bindings::Gecko_AddRefCSSShadowArrayArbitraryThread;
|
||||
use bindings::Gecko_NewCSSShadowArray;
|
||||
use bindings::Gecko_ReleaseCSSShadowArrayArbitraryThread;
|
||||
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 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 structs::nsStyleAutoArray;
|
||||
|
||||
impl<T> nsStyleAutoArray<T> {
|
||||
pub fn iter_mut(&mut self) -> Chain<Once<&mut T>, IterMut<T>> {
|
|
@ -2,10 +2,10 @@
|
|||
* 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 bindings::{Gecko_ResetStyleCoord, Gecko_SetStyleCoordCalcValue, Gecko_AddRefCalcArbitraryThread};
|
||||
use gecko_bindings::bindings::{Gecko_ResetStyleCoord, Gecko_SetStyleCoordCalcValue, Gecko_AddRefCalcArbitraryThread};
|
||||
use gecko_bindings::structs::{nsStyleCoord_Calc, nsStyleUnit, nsStyleUnion, nsStyleCoord, nsStyleSides, nsStyleCorners};
|
||||
use gecko_bindings::structs::{nsStyleCoord_CalcValue, nscoord};
|
||||
use std::mem;
|
||||
use structs::{nsStyleCoord_Calc, nsStyleUnit, nsStyleUnion, nsStyleCoord, nsStyleSides, nsStyleCorners};
|
||||
use structs::{nsStyleCoord_CalcValue, nscoord};
|
||||
|
||||
impl nsStyleCoord {
|
||||
#[inline]
|
||||
|
@ -235,7 +235,7 @@ pub trait CoordDataMut : CoordData {
|
|||
/// Useful for initializing uninits
|
||||
/// (set_value may segfault on uninits)
|
||||
fn leaky_set_null(&mut self) {
|
||||
use structs::nsStyleUnit::*;
|
||||
use gecko_bindings::structs::nsStyleUnit::*;
|
||||
unsafe {
|
||||
let (unit, union) = self.values_mut();
|
||||
*unit = eStyleUnit_Null;
|
||||
|
@ -245,8 +245,8 @@ pub trait CoordDataMut : CoordData {
|
|||
|
||||
#[inline(always)]
|
||||
fn set_value(&mut self, value: CoordDataValue) {
|
||||
use gecko_bindings::structs::nsStyleUnit::*;
|
||||
use self::CoordDataValue::*;
|
||||
use structs::nsStyleUnit::*;
|
||||
self.reset();
|
||||
unsafe {
|
||||
let (unit, union) = self.values_mut();
|
||||
|
@ -337,8 +337,8 @@ pub trait CoordData {
|
|||
|
||||
#[inline(always)]
|
||||
fn as_value(&self) -> CoordDataValue {
|
||||
use gecko_bindings::structs::nsStyleUnit::*;
|
||||
use self::CoordDataValue::*;
|
||||
use structs::nsStyleUnit::*;
|
||||
unsafe {
|
||||
match self.unit() {
|
||||
eStyleUnit_Null => Null,
|
||||
|
@ -363,7 +363,7 @@ pub trait CoordData {
|
|||
#[inline]
|
||||
/// Pretend inner value is a float; obtain it.
|
||||
unsafe fn get_float(&self) -> f32 {
|
||||
use structs::nsStyleUnit::*;
|
||||
use gecko_bindings::structs::nsStyleUnit::*;
|
||||
debug_assert!(self.unit() == eStyleUnit_Percent || self.unit() == eStyleUnit_Factor
|
||||
|| self.unit() == eStyleUnit_Degree || self.unit() == eStyleUnit_Grad
|
||||
|| self.unit() == eStyleUnit_Radian || self.unit() == eStyleUnit_Turn
|
||||
|
@ -374,7 +374,7 @@ pub trait CoordData {
|
|||
#[inline]
|
||||
/// Pretend inner value is an int; obtain it.
|
||||
unsafe fn get_integer(&self) -> i32 {
|
||||
use structs::nsStyleUnit::*;
|
||||
use gecko_bindings::structs::nsStyleUnit::*;
|
||||
debug_assert!(self.unit() == eStyleUnit_Coord || self.unit() == eStyleUnit_Integer
|
||||
|| self.unit() == eStyleUnit_Enumerated);
|
||||
*self.union().mInt.as_ref()
|
|
@ -2,12 +2,12 @@
|
|||
* 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 bindings;
|
||||
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 structs::{nsTArray, nsTArrayHeader};
|
||||
|
||||
impl<T> Deref for nsTArray<T> {
|
||||
type Target = [T];
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -2,12 +2,7 @@
|
|||
* 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/. */
|
||||
|
||||
#[macro_use] #[no_link]
|
||||
extern crate cfg_if;
|
||||
extern crate gecko_bindings;
|
||||
extern crate heapsize;
|
||||
extern crate selectors;
|
||||
extern crate serde;
|
||||
#![allow(unsafe_code)]
|
||||
|
||||
use gecko_bindings::bindings::Gecko_AddRefAtom;
|
||||
use gecko_bindings::bindings::Gecko_Atomize;
|
||||
|
@ -16,7 +11,6 @@ use gecko_bindings::structs::nsIAtom;
|
|||
use heapsize::HeapSizeOf;
|
||||
use selectors::bloom::BloomHash;
|
||||
use selectors::parser::FromCowStr;
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::{Cow, Borrow};
|
||||
use std::char::{self, DecodeUtf16};
|
||||
|
@ -30,9 +24,10 @@ use std::slice;
|
|||
#[macro_use]
|
||||
#[allow(improper_ctypes)]
|
||||
pub mod atom_macro;
|
||||
#[macro_use]
|
||||
pub mod namespace;
|
||||
|
||||
pub use namespace::{Namespace, WeakNamespace};
|
||||
pub use string_cache::namespace::{Namespace, WeakNamespace};
|
||||
|
||||
/// A strong reference to a Gecko atom.
|
||||
#[derive(PartialEq, Eq)]
|
||||
|
@ -242,19 +237,6 @@ impl HeapSizeOf for Atom {
|
|||
}
|
||||
}
|
||||
|
||||
impl Serialize for Atom {
|
||||
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer {
|
||||
self.with_str(|s| s.serialize(serializer))
|
||||
}
|
||||
}
|
||||
|
||||
impl Deserialize for Atom {
|
||||
fn deserialize<D>(deserializer: &mut D) -> Result<Atom, D::Error> where D: Deserializer {
|
||||
let string: String = try!(Deserialize::deserialize(deserializer));
|
||||
Ok(Atom::from(&*string))
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for Atom {
|
||||
fn fmt(&self, w: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(w, "Gecko Atom({:p}, {})", self.0, self)
|
|
@ -2,16 +2,16 @@
|
|||
* 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 {Atom, WeakAtom};
|
||||
use gecko_bindings::structs::nsIAtom;
|
||||
use selectors::bloom::BloomHash;
|
||||
use std::borrow::Borrow;
|
||||
use std::fmt;
|
||||
use std::ops::Deref;
|
||||
use string_cache::{Atom, WeakAtom};
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! ns {
|
||||
() => { $crate::Namespace(atom!("")) }
|
||||
() => { $crate::string_cache::Namespace(atom!("")) }
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Default, Hash)]
|
|
@ -38,6 +38,8 @@ extern crate app_units;
|
|||
#[allow(unused_extern_crates)]
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
#[macro_use] #[no_link]
|
||||
extern crate cfg_if;
|
||||
extern crate core;
|
||||
#[macro_use]
|
||||
extern crate cssparser;
|
||||
|
@ -45,12 +47,11 @@ extern crate deque;
|
|||
extern crate encoding;
|
||||
extern crate euclid;
|
||||
extern crate fnv;
|
||||
#[cfg(feature = "gecko")] extern crate gecko_bindings;
|
||||
#[cfg(feature = "gecko")] #[macro_use] extern crate gecko_string_cache as string_cache;
|
||||
#[cfg(feature = "servo")] extern crate heapsize;
|
||||
extern crate heapsize;
|
||||
#[allow(unused_extern_crates)]
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
extern crate libc;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[allow(unused_extern_crates)]
|
||||
|
@ -58,12 +59,14 @@ extern crate log;
|
|||
extern crate matches;
|
||||
extern crate num_integer;
|
||||
extern crate num_traits;
|
||||
#[cfg(feature = "gecko")] extern crate num_cpus;
|
||||
extern crate ordered_float;
|
||||
extern crate quickersort;
|
||||
extern crate rand;
|
||||
extern crate rustc_serialize;
|
||||
extern crate selectors;
|
||||
#[cfg(feature = "servo")] extern crate serde;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate serde;
|
||||
extern crate smallvec;
|
||||
#[cfg(feature = "servo")] #[macro_use] extern crate string_cache;
|
||||
#[macro_use]
|
||||
|
@ -72,6 +75,10 @@ extern crate time;
|
|||
extern crate url;
|
||||
extern crate util;
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
#[path = "./gecko_string_cache/mod.rs"]
|
||||
#[macro_use] pub mod string_cache;
|
||||
|
||||
pub mod animation;
|
||||
pub mod attr;
|
||||
pub mod bezier;
|
||||
|
@ -85,9 +92,8 @@ pub mod domrefcell;
|
|||
pub mod element_state;
|
||||
pub mod error_reporting;
|
||||
pub mod font_face;
|
||||
#[cfg(feature = "gecko")] pub mod gecko_conversions;
|
||||
#[cfg(feature = "gecko")] pub mod gecko_selector_impl;
|
||||
#[cfg(feature = "gecko")] pub mod gecko_values;
|
||||
#[cfg(feature = "gecko")] #[allow(unsafe_code)] pub mod gecko;
|
||||
#[cfg(feature = "gecko")] #[allow(unsafe_code)] pub mod gecko_bindings;
|
||||
pub mod keyframes;
|
||||
pub mod logical_geometry;
|
||||
pub mod matching;
|
||||
|
|
|
@ -27,9 +27,9 @@ use gecko_bindings::bindings::{Gecko_FontFamilyList_Clear, Gecko_InitializeImage
|
|||
use gecko_bindings::bindings::ServoComputedValuesBorrowedOrNull;
|
||||
use gecko_bindings::structs;
|
||||
use gecko_bindings::sugar::ns_style_coord::{CoordDataValue, CoordData, CoordDataMut};
|
||||
use gecko_values::{StyleCoordHelpers, GeckoStyleCoordConvertible, convert_nscolor_to_rgba};
|
||||
use gecko_values::convert_rgba_to_nscolor;
|
||||
use gecko_values::round_border_to_device_pixels;
|
||||
use gecko::values::{StyleCoordHelpers, GeckoStyleCoordConvertible, convert_nscolor_to_rgba};
|
||||
use gecko::values::convert_rgba_to_nscolor;
|
||||
use gecko::values::round_border_to_device_pixels;
|
||||
use logical_geometry::WritingMode;
|
||||
use properties::CascadePropertyFn;
|
||||
use properties::longhands;
|
||||
|
@ -1622,8 +1622,8 @@ clip-path
|
|||
use gecko_bindings::structs::StyleClipPathGeometryBox;
|
||||
use gecko_bindings::structs::{StyleBasicShape, StyleBasicShapeType, StyleShapeSourceType};
|
||||
use gecko_bindings::structs::{StyleClipPath, StyleFillRule};
|
||||
use gecko_conversions::basic_shape::set_corners_from_radius;
|
||||
use gecko_values::GeckoStyleCoordConvertible;
|
||||
use gecko::conversions::basic_shape::set_corners_from_radius;
|
||||
use gecko::values::GeckoStyleCoordConvertible;
|
||||
use values::computed::basic_shape::*;
|
||||
let ref mut clip_path = self.gecko.mClipPath;
|
||||
// clean up existing struct
|
||||
|
|
|
@ -18,10 +18,10 @@ pub use servo_selector_impl::*;
|
|||
pub use servo_selector_impl::{ServoSelectorImpl as TheSelectorImpl, ServoElementSnapshot as ElementSnapshot};
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
pub use gecko_selector_impl::*;
|
||||
pub use gecko::selector_impl::*;
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
pub use gecko_selector_impl::{GeckoSelectorImpl as TheSelectorImpl};
|
||||
pub use gecko::selector_impl::{GeckoSelectorImpl as TheSelectorImpl};
|
||||
|
||||
/// This function determines if a pseudo-element is eagerly cascaded or not.
|
||||
///
|
||||
|
|
|
@ -2155,6 +2155,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2169,6 +2170,7 @@ dependencies = [
|
|||
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ordered-float 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"plugins 0.0.1",
|
||||
"quickersort 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -5,8 +5,6 @@ dependencies = [
|
|||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gecko_bindings 0.0.1",
|
||||
"gecko_string_cache 0.2.20",
|
||||
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -156,25 +154,6 @@ name = "fnv"
|
|||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "gecko_bindings"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gecko_string_cache"
|
||||
version = "0.2.20"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gecko_bindings 0.0.1",
|
||||
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getopts"
|
||||
version = "0.2.14"
|
||||
|
@ -358,13 +337,13 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fnv 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gecko_bindings 0.0.1",
|
||||
"gecko_string_cache 0.2.20",
|
||||
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -372,6 +351,7 @@ dependencies = [
|
|||
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ordered-float 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quickersort 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -401,7 +381,6 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gecko_bindings 0.0.1",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
]
|
||||
|
|
|
@ -13,8 +13,6 @@ crate-type = ["staticlib", "rlib"]
|
|||
app_units = "0.3"
|
||||
env_logger = "0.3"
|
||||
euclid = "0.10.1"
|
||||
gecko_bindings = {version = "0.0.1", path = "gecko_bindings"}
|
||||
gecko_string_cache = {path = "string_cache"}
|
||||
lazy_static = "0.2"
|
||||
libc = "0.2"
|
||||
log = {version = "0.3.5", features = ["release_max_level_info"]}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
[package]
|
||||
name = "gecko_bindings"
|
||||
version = "0.0.1"
|
||||
authors = ["The Servo Project Developers"]
|
||||
license = "MPL-2.0"
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
name = "gecko_bindings"
|
||||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
heapsize = "0.3.0"
|
|
@ -5,25 +5,8 @@
|
|||
#![allow(unsafe_code)]
|
||||
|
||||
use app_units::Au;
|
||||
use data::{NUM_THREADS, PerDocumentStyleData};
|
||||
use env_logger;
|
||||
use euclid::Size2D;
|
||||
use gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoNodeBorrowed};
|
||||
use gecko_bindings::bindings::{RawServoStyleSetBorrowed, RawServoStyleSetOwned};
|
||||
use gecko_bindings::bindings::{RawServoStyleSetBorrowedMut, RawGeckoDocumentBorrowed};
|
||||
use gecko_bindings::bindings::{RawServoStyleSheetBorrowed, ServoComputedValuesBorrowed};
|
||||
use gecko_bindings::bindings::{RawServoStyleSheetStrong, ServoComputedValuesStrong};
|
||||
use gecko_bindings::bindings::{ServoComputedValuesBorrowedOrNull, ServoDeclarationBlock};
|
||||
use gecko_bindings::bindings::{ServoDeclarationBlockBorrowed, ServoDeclarationBlockStrong};
|
||||
use gecko_bindings::bindings::{ThreadSafePrincipalHolder, ThreadSafeURIHolder, nsHTMLCSSStyleSheet};
|
||||
use gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI};
|
||||
use gecko_bindings::structs::{SheetParsingMode, nsIAtom};
|
||||
use gecko_bindings::structs::ServoElementSnapshot;
|
||||
use gecko_bindings::structs::nsRestyleHint;
|
||||
use gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI, HasBoxFFI};
|
||||
use gecko_bindings::sugar::ownership::{HasFFI, HasSimpleFFI, Strong};
|
||||
use gecko_string_cache::Atom;
|
||||
use snapshot::GeckoElementSnapshot;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
use std::slice;
|
||||
|
@ -34,17 +17,36 @@ use style::arc_ptr_eq;
|
|||
use style::context::{LocalStyleContextCreationInfo, ReflowGoal, SharedStyleContext};
|
||||
use style::dom::{NodeInfo, TDocument, TElement, TNode};
|
||||
use style::error_reporting::StdoutErrorReporter;
|
||||
use style::gecko_selector_impl::{GeckoSelectorImpl, PseudoElement};
|
||||
use style::gecko::data::{NUM_THREADS, PerDocumentStyleData};
|
||||
use style::gecko::selector_impl::{GeckoSelectorImpl, PseudoElement};
|
||||
use style::gecko::snapshot::GeckoElementSnapshot;
|
||||
use style::gecko::traversal::RecalcStyleOnly;
|
||||
use style::gecko::wrapper::{DUMMY_BASE_URL, GeckoDeclarationBlock, GeckoDocument};
|
||||
use style::gecko::wrapper::{GeckoElement, GeckoNode};
|
||||
use style::gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoNodeBorrowed};
|
||||
use style::gecko_bindings::bindings::{RawServoStyleSetBorrowed, RawServoStyleSetOwned};
|
||||
use style::gecko_bindings::bindings::{RawServoStyleSetBorrowedMut, RawGeckoDocumentBorrowed};
|
||||
use style::gecko_bindings::bindings::{RawServoStyleSheetBorrowed, ServoComputedValuesBorrowed};
|
||||
use style::gecko_bindings::bindings::{RawServoStyleSheetStrong, ServoComputedValuesStrong};
|
||||
use style::gecko_bindings::bindings::{ServoDeclarationBlockBorrowed, ServoDeclarationBlockStrong};
|
||||
use style::gecko_bindings::bindings::{ThreadSafePrincipalHolder, ThreadSafeURIHolder};
|
||||
use style::gecko_bindings::bindings::{nsHTMLCSSStyleSheet, ServoComputedValuesBorrowedOrNull};
|
||||
use style::gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI};
|
||||
use style::gecko_bindings::structs::{SheetParsingMode, nsIAtom};
|
||||
use style::gecko_bindings::structs::ServoElementSnapshot;
|
||||
use style::gecko_bindings::structs::nsRestyleHint;
|
||||
use style::gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI, HasBoxFFI};
|
||||
use style::gecko_bindings::sugar::ownership::{HasSimpleFFI, Strong};
|
||||
use style::parallel;
|
||||
use style::parser::ParserContextExtraData;
|
||||
use style::properties::{ComputedValues, PropertyDeclarationBlock, parse_one_declaration};
|
||||
use style::properties::{ComputedValues, parse_one_declaration};
|
||||
use style::selector_impl::PseudoElementCascadeType;
|
||||
use style::sequential;
|
||||
use style::string_cache::Atom;
|
||||
use style::stylesheets::{Origin, Stylesheet};
|
||||
use style::timer::Timer;
|
||||
use traversal::RecalcStyleOnly;
|
||||
use url::Url;
|
||||
use wrapper::{DUMMY_BASE_URL, GeckoDocument, GeckoElement, GeckoNode};
|
||||
|
||||
|
||||
/*
|
||||
* For Gecko->Servo function calls, we need to redeclare the same signature that was declared in
|
||||
|
@ -337,23 +339,6 @@ pub extern "C" fn Servo_StyleSet_Drop(data: RawServoStyleSetOwned) -> () {
|
|||
let _ = data.into_box::<PerDocumentStyleData>();
|
||||
}
|
||||
|
||||
pub struct GeckoDeclarationBlock {
|
||||
pub declarations: Option<Arc<PropertyDeclarationBlock>>,
|
||||
// XXX The following two fields are made atomic to work around the
|
||||
// ownership system so that they can be changed inside a shared
|
||||
// instance. It wouldn't provide safety as Rust usually promises,
|
||||
// but it is fine as far as we only access them in a single thread.
|
||||
// If we need to access them in different threads, we would need
|
||||
// to redesign how it works with MiscContainer in Gecko side.
|
||||
pub cache: AtomicPtr<nsHTMLCSSStyleSheet>,
|
||||
pub immutable: AtomicBool,
|
||||
}
|
||||
|
||||
unsafe impl HasFFI for GeckoDeclarationBlock {
|
||||
type FFIType = ServoDeclarationBlock;
|
||||
}
|
||||
unsafe impl HasArcFFI for GeckoDeclarationBlock {}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_ParseStyleAttribute(bytes: *const u8, length: u32,
|
||||
cache: *mut nsHTMLCSSStyleSheet)
|
||||
|
|
|
@ -2,28 +2,17 @@
|
|||
* 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/. */
|
||||
|
||||
|
||||
#[macro_use]extern crate style;
|
||||
extern crate app_units;
|
||||
extern crate env_logger;
|
||||
extern crate euclid;
|
||||
extern crate gecko_bindings;
|
||||
#[macro_use] extern crate gecko_string_cache;
|
||||
#[macro_use] extern crate lazy_static;
|
||||
extern crate libc;
|
||||
#[macro_use] extern crate log;
|
||||
extern crate num_cpus;
|
||||
extern crate selectors;
|
||||
extern crate style;
|
||||
extern crate style_traits;
|
||||
extern crate url;
|
||||
|
||||
mod context;
|
||||
mod data;
|
||||
mod snapshot;
|
||||
mod snapshot_helpers;
|
||||
#[allow(non_snake_case)]
|
||||
pub mod glue;
|
||||
mod traversal;
|
||||
mod wrapper;
|
||||
|
||||
// FIXME(bholley): This should probably go away once we harmonize the allocators.
|
||||
#[no_mangle]
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
[package]
|
||||
name = "gecko_string_cache"
|
||||
description = "A crate to allow using Gecko's nsIAtom as a replacement for string_cache."
|
||||
version = "0.2.20"
|
||||
authors = ["The Servo Project Developers"]
|
||||
license = "MPL-2.0"
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
cfg-if = "0.1.0"
|
||||
gecko_bindings = {version = "0.0.1", path = "../gecko_bindings"}
|
||||
heapsize = "0.3.5"
|
||||
libc = "0.2"
|
||||
selectors = "0.13"
|
||||
serde = "0.8"
|
|
@ -8,10 +8,10 @@ packages = ["lazy_static"]
|
|||
# Files that are ignored for all tidy and lint checks.
|
||||
files = [
|
||||
# Generated and upstream code combined with our own. Could use cleanup
|
||||
"./ports/geckolib/gecko_bindings/bindings.rs",
|
||||
"./ports/geckolib/gecko_bindings/structs_debug.rs",
|
||||
"./ports/geckolib/gecko_bindings/structs_release.rs",
|
||||
"./ports/geckolib/string_cache/atom_macro.rs",
|
||||
"./components/style/gecko_bindings/bindings.rs",
|
||||
"./components/style/gecko_bindings/structs_debug.rs",
|
||||
"./components/style/gecko_bindings/structs_release.rs",
|
||||
"./components/style/gecko_string_cache/atom_macro.rs",
|
||||
"./resources/hsts_preload.json",
|
||||
"./tests/wpt/metadata/MANIFEST.json",
|
||||
"./tests/wpt/metadata-css/MANIFEST.json",
|
||||
|
|
|
@ -12,6 +12,5 @@ doctest = false
|
|||
[dependencies]
|
||||
app_units = "0.3"
|
||||
cssparser = {version = "0.7", features = ["heap_size"]}
|
||||
gecko_bindings = {path = "../../../ports/geckolib/gecko_bindings"}
|
||||
style = {path = "../../../components/style", features = ["gecko"]}
|
||||
style_traits = {path = "../../../components/style_traits"}
|
||||
|
|
Загрузка…
Ссылка в новой задаче