mirror of
https://github.com/servo/servo.git
synced 2025-06-19 06:38:59 +01:00
Move the content of 'script/style' into the new 'style' crate.
This commit is contained in:
parent
c0a5e8f6eb
commit
dc882b8ecf
18 changed files with 49 additions and 52 deletions
17
Makefile.in
17
Makefile.in
|
@ -229,21 +229,22 @@ DEPS_gfx = $(CRATE_gfx) $(SRC_gfx) $(DONE_SUBMODULES) $(DONE_util) $(DONE_net) $
|
||||||
RFLAGS_script = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/gfx -L $(B)src/components/msg
|
RFLAGS_script = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/gfx -L $(B)src/components/msg
|
||||||
WEBIDL_script = $(call rwildcard,$(S)src/components/script/,*.webidl)
|
WEBIDL_script = $(call rwildcard,$(S)src/components/script/,*.webidl)
|
||||||
AUTOGEN_SRC_script = $(patsubst %.webidl, %Binding.rs, $(WEBIDL_script))
|
AUTOGEN_SRC_script = $(patsubst %.webidl, %Binding.rs, $(WEBIDL_script))
|
||||||
MAKO_ZIP = $(S)src/components/script/style/properties/Mako-0.8.1.zip
|
SRC_script = $(call rwildcard,$(S)src/components/script/,*.rs) $(AUTOGEN_SRC_script)
|
||||||
MAKO_script = $(S)src/components/script/style/properties/mod.rs
|
|
||||||
MAKO_SRC_script = $(MAKO_script).mako
|
|
||||||
SRC_script = $(call rwildcard,$(S)src/components/script/,*.rs) $(AUTOGEN_SRC_script) $(MAKO_script)
|
|
||||||
CRATE_script = $(S)src/components/script/script.rc
|
CRATE_script = $(S)src/components/script/script.rc
|
||||||
DONE_script = $(B)src/components/script/libscript.dummy
|
DONE_script = $(B)src/components/script/libscript.dummy
|
||||||
|
|
||||||
DEPS_script = $(CRATE_script) $(SRC_script) $(DONE_SUBMODULES) $(DONE_util) $(DONE_net) $(DONE_gfx) $(DONE_msg)
|
DEPS_script = $(CRATE_script) $(SRC_script) $(DONE_SUBMODULES) $(DONE_util) $(DONE_net) $(DONE_gfx) $(DONE_msg)
|
||||||
|
|
||||||
RFLAGS_style = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util
|
RFLAGS_style = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/script -L $(B)src/components/gfx -L $(B)src/components/net -L $(B)src/components/msg
|
||||||
SRC_style = $(call rwildcard,$(S)src/components/style/,*.rs)
|
MAKO_ZIP = $(S)src/components/style/properties/Mako-0.8.1.zip
|
||||||
|
MAKO_style = $(S)src/components/style/properties/mod.rs
|
||||||
|
MAKO_SRC_style = $(MAKO_style).mako
|
||||||
|
SRC_style = $(call rwildcard,$(S)src/components/style/,*.rs) $(MAKO_style)
|
||||||
CRATE_style = $(S)src/components/style/style.rc
|
CRATE_style = $(S)src/components/style/style.rc
|
||||||
DONE_style = $(B)src/components/style/libstyle.dummy
|
DONE_style = $(B)src/components/style/libstyle.dummy
|
||||||
|
|
||||||
DEPS_style = $(CRATE_style) $(SRC_style) $(DONE_SUBMODULES) $(DONE_util)
|
# TODO: reverse the dependency with script
|
||||||
|
DEPS_style = $(CRATE_style) $(SRC_style) $(DONE_SUBMODULES) $(DONE_util) $(DONE_script)
|
||||||
|
|
||||||
RFLAGS_servo = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/style -L $(B)src/components/msg
|
RFLAGS_servo = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/style -L $(B)src/components/msg
|
||||||
|
|
||||||
|
@ -292,7 +293,7 @@ $(AUTOGEN_SRC_script): %Binding.rs: $(bindinggen_dependencies) \
|
||||||
|
|
||||||
globalgen_dependencies := $(addprefix $(BINDINGS_SRC)/, GlobalGen.py Bindings.conf Configuration.py CodegenRust.py parser/WebIDL.py) $(CACHE_DIR)/.done
|
globalgen_dependencies := $(addprefix $(BINDINGS_SRC)/, GlobalGen.py Bindings.conf Configuration.py CodegenRust.py parser/WebIDL.py) $(CACHE_DIR)/.done
|
||||||
|
|
||||||
$(MAKO_script): $(MAKO_SRC_script)
|
$(MAKO_style): $(MAKO_SRC_style)
|
||||||
PYTHONPATH=$(MAKO_ZIP) python -c "from mako.template import Template; print(Template(filename='$<').render())" > $@
|
PYTHONPATH=$(MAKO_ZIP) python -c "from mako.template import Template; print(Template(filename='$<').render())" > $@
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ extern mod hubbub;
|
||||||
extern mod js;
|
extern mod js;
|
||||||
extern mod netsurfcss;
|
extern mod netsurfcss;
|
||||||
extern mod newcss (name = "css");
|
extern mod newcss (name = "css");
|
||||||
extern mod cssparser;
|
|
||||||
extern mod servo_net (name = "net");
|
extern mod servo_net (name = "net");
|
||||||
extern mod servo_util (name = "util");
|
extern mod servo_util (name = "util");
|
||||||
extern mod servo_msg (name = "msg");
|
extern mod servo_msg (name = "msg");
|
||||||
|
@ -143,7 +142,3 @@ pub mod html {
|
||||||
|
|
||||||
pub mod layout_interface;
|
pub mod layout_interface;
|
||||||
pub mod script_task;
|
pub mod script_task;
|
||||||
|
|
||||||
|
|
||||||
// "New" (as of 2013-08) style system, not used yet but included to avoid bitrot.
|
|
||||||
mod style;
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
/* 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/. */
|
|
||||||
|
|
||||||
// The "real" public API
|
|
||||||
pub use self::selector_matching::{Stylist, StylesheetOrigin};
|
|
||||||
|
|
||||||
|
|
||||||
// Things that need to be public to make the compiler happy
|
|
||||||
pub mod stylesheets;
|
|
||||||
pub mod errors;
|
|
||||||
pub mod selectors;
|
|
||||||
pub mod selector_matching;
|
|
||||||
pub mod properties;
|
|
||||||
pub mod namespaces;
|
|
||||||
pub mod media_queries;
|
|
||||||
pub mod parsing_utils;
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests;
|
|
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
use std::ascii::StrAsciiExt;
|
use std::ascii::StrAsciiExt;
|
||||||
use cssparser::*;
|
use cssparser::*;
|
||||||
use style::errors::{ErrorLoggerIterator, log_css_error};
|
use errors::{ErrorLoggerIterator, log_css_error};
|
||||||
use style::stylesheets::{CSSRule, CSSMediaRule, parse_style_rule, parse_nested_at_rule};
|
use stylesheets::{CSSRule, CSSMediaRule, parse_style_rule, parse_nested_at_rule};
|
||||||
use style::namespaces::NamespaceMap;
|
use namespaces::NamespaceMap;
|
||||||
|
|
||||||
|
|
||||||
pub struct MediaRule {
|
pub struct MediaRule {
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
use std::hashmap::HashMap;
|
use std::hashmap::HashMap;
|
||||||
use cssparser::*;
|
use cssparser::*;
|
||||||
use style::errors::log_css_error;
|
use errors::log_css_error;
|
||||||
|
|
||||||
pub struct NamespaceMap {
|
pub struct NamespaceMap {
|
||||||
default: Option<~str>, // Optional URL
|
default: Option<~str>, // Optional URL
|
|
@ -8,8 +8,8 @@ use std::ascii::StrAsciiExt;
|
||||||
use std::at_vec;
|
use std::at_vec;
|
||||||
pub use std::iterator;
|
pub use std::iterator;
|
||||||
pub use cssparser::*;
|
pub use cssparser::*;
|
||||||
pub use style::errors::{ErrorLoggerIterator, log_css_error};
|
pub use errors::{ErrorLoggerIterator, log_css_error};
|
||||||
pub use style::parsing_utils::*;
|
pub use parsing_utils::*;
|
||||||
pub use self::common_types::*;
|
pub use self::common_types::*;
|
||||||
|
|
||||||
pub mod common_types;
|
pub mod common_types;
|
|
@ -5,12 +5,12 @@
|
||||||
use std::ascii::StrAsciiExt;
|
use std::ascii::StrAsciiExt;
|
||||||
use extra::sort::tim_sort;
|
use extra::sort::tim_sort;
|
||||||
|
|
||||||
use style::selectors::*;
|
use selectors::*;
|
||||||
use style::stylesheets::parse_stylesheet;
|
use stylesheets::parse_stylesheet;
|
||||||
use style::media_queries::{Device, Screen};
|
use media_queries::{Device, Screen};
|
||||||
use style::properties::{ComputedValues, cascade, PropertyDeclaration};
|
use properties::{ComputedValues, cascade, PropertyDeclaration};
|
||||||
use dom::node::{AbstractNode, ScriptView};
|
use script::dom::node::{AbstractNode, ScriptView};
|
||||||
use dom::element::Element;
|
use script::dom::element::Element;
|
||||||
|
|
||||||
|
|
||||||
pub enum StylesheetOrigin {
|
pub enum StylesheetOrigin {
|
|
@ -5,7 +5,7 @@
|
||||||
use std::{vec, iterator};
|
use std::{vec, iterator};
|
||||||
use std::ascii::StrAsciiExt;
|
use std::ascii::StrAsciiExt;
|
||||||
use cssparser::*;
|
use cssparser::*;
|
||||||
use style::namespaces::NamespaceMap;
|
use namespaces::NamespaceMap;
|
||||||
|
|
||||||
|
|
||||||
pub struct Selector {
|
pub struct Selector {
|
|
@ -11,4 +11,25 @@
|
||||||
#[license = "MPL"];
|
#[license = "MPL"];
|
||||||
#[crate_type = "lib"];
|
#[crate_type = "lib"];
|
||||||
|
|
||||||
|
|
||||||
|
extern mod extra;
|
||||||
extern mod cssparser;
|
extern mod cssparser;
|
||||||
|
extern mod script;
|
||||||
|
|
||||||
|
|
||||||
|
// The "real" public API
|
||||||
|
pub use self::selector_matching::{Stylist, StylesheetOrigin};
|
||||||
|
|
||||||
|
|
||||||
|
// Things that need to be public to make the compiler happy
|
||||||
|
pub mod stylesheets;
|
||||||
|
pub mod errors;
|
||||||
|
pub mod selectors;
|
||||||
|
pub mod selector_matching;
|
||||||
|
pub mod properties;
|
||||||
|
pub mod namespaces;
|
||||||
|
pub mod media_queries;
|
||||||
|
pub mod parsing_utils;
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests;
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
use std::iterator::Iterator;
|
use std::iterator::Iterator;
|
||||||
use std::ascii::StrAsciiExt;
|
use std::ascii::StrAsciiExt;
|
||||||
use cssparser::*;
|
use cssparser::*;
|
||||||
use style::selectors;
|
use selectors;
|
||||||
use style::properties;
|
use properties;
|
||||||
use style::errors::{ErrorLoggerIterator, log_css_error};
|
use errors::{ErrorLoggerIterator, log_css_error};
|
||||||
use style::namespaces::{NamespaceMap, parse_namespace_rule};
|
use namespaces::{NamespaceMap, parse_namespace_rule};
|
||||||
use style::media_queries::{MediaRule, parse_media_rule};
|
use media_queries::{MediaRule, parse_media_rule};
|
||||||
use style::media_queries;
|
use media_queries;
|
||||||
|
|
||||||
|
|
||||||
pub struct Stylesheet {
|
pub struct Stylesheet {
|
Loading…
Add table
Add a link
Reference in a new issue