mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix up script and layout.
This commit is contained in:
parent
d78ca4c4f9
commit
7b0679848b
49 changed files with 99 additions and 85 deletions
|
@ -99,6 +99,7 @@ use style::media_queries::MediaList;
|
|||
use style::properties::PropertyDeclarationBlock;
|
||||
use style::selector_parser::{PseudoElement, Snapshot};
|
||||
use style::shared_lock::{SharedRwLock as StyleSharedRwLock, Locked as StyleLocked};
|
||||
use style::stylearc::Arc as StyleArc;
|
||||
use style::stylesheets::{CssRules, FontFaceRule, KeyframesRule, MediaRule};
|
||||
use style::stylesheets::{NamespaceRule, StyleRule, ImportRule, SupportsRule};
|
||||
use style::values::specified::Length;
|
||||
|
@ -166,6 +167,12 @@ unsafe impl<T: JSTraceable> JSTraceable for Arc<T> {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl<T: JSTraceable> JSTraceable for StyleArc<T> {
|
||||
unsafe fn trace(&self, trc: *mut JSTracer) {
|
||||
(**self).trace(trc)
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<T: JSTraceable + ?Sized> JSTraceable for Box<T> {
|
||||
unsafe fn trace(&self, trc: *mut JSTracer) {
|
||||
(**self).trace(trc)
|
||||
|
|
|
@ -10,8 +10,8 @@ use dom::cssmediarule::CSSMediaRule;
|
|||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::csssupportsrule::CSSSupportsRule;
|
||||
use dom_struct::dom_struct;
|
||||
use std::sync::Arc;
|
||||
use style::shared_lock::{SharedRwLock, Locked};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::CssRules as StyleCssRules;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -10,8 +10,8 @@ use dom::cssrule::{CSSRule, SpecificCSSRule};
|
|||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use std::sync::Arc;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::FontFaceRule;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -12,8 +12,8 @@ use dom::cssrule::CSSRule;
|
|||
use dom::cssrulelist::{CSSRuleList, RulesSource};
|
||||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom_struct::dom_struct;
|
||||
use std::sync::Arc;
|
||||
use style::shared_lock::{SharedRwLock, Locked};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::CssRules as StyleCssRules;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -10,8 +10,8 @@ use dom::cssrule::{CSSRule, SpecificCSSRule};
|
|||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use std::sync::Arc;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::ImportRule;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -12,9 +12,9 @@ use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSSt
|
|||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use std::sync::Arc;
|
||||
use style::keyframes::Keyframe;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct CSSKeyframeRule {
|
||||
|
|
|
@ -16,9 +16,9 @@ use dom::cssrulelist::{CSSRuleList, RulesSource};
|
|||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use std::sync::Arc;
|
||||
use style::keyframes::{Keyframe, KeyframeSelector};
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::KeyframesRule;
|
||||
use style::values::KeyframesName;
|
||||
|
||||
|
|
|
@ -15,10 +15,10 @@ use dom::cssstylesheet::CSSStyleSheet;
|
|||
use dom::medialist::MediaList;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use std::sync::Arc;
|
||||
use style::media_queries::parse_media_query_list;
|
||||
use style::parser::{LengthParsingMode, ParserContext};
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{CssRuleType, MediaRule};
|
||||
use style_traits::ToCss;
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ use dom::cssrule::{CSSRule, SpecificCSSRule};
|
|||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use std::sync::Arc;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::NamespaceRule;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -13,8 +13,8 @@ use dom::cssrule::CSSRule;
|
|||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use std::sync::Arc;
|
||||
use style::shared_lock::Locked;
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{CssRules, CssRulesHelpers, KeyframesRule, RulesMutateError};
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
|
|
@ -16,13 +16,13 @@ use dom::window::Window;
|
|||
use dom_struct::dom_struct;
|
||||
use servo_url::ServoUrl;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::sync::Arc;
|
||||
use style::attr::AttrValue;
|
||||
use style::parser::LengthParsingMode;
|
||||
use style::properties::{Importance, PropertyDeclarationBlock, PropertyId, LonghandId, ShorthandId};
|
||||
use style::properties::{parse_one_declaration, parse_style_attribute};
|
||||
use style::selector_parser::PseudoElement;
|
||||
use style::shared_lock::Locked;
|
||||
use style::stylearc::Arc;
|
||||
use style_traits::ToCss;
|
||||
|
||||
// http://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface
|
||||
|
|
|
@ -12,8 +12,8 @@ use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSSt
|
|||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use std::sync::Arc;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::StyleRule;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -15,8 +15,8 @@ use dom::stylesheet::StyleSheet;
|
|||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use std::cell::Cell;
|
||||
use std::sync::Arc;
|
||||
use style::shared_lock::SharedRwLock;
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::Stylesheet as StyleStyleSheet;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -13,9 +13,9 @@ use dom::cssrule::SpecificCSSRule;
|
|||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use std::sync::Arc;
|
||||
use style::parser::{LengthParsingMode, ParserContext};
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{CssRuleType, SupportsRule};
|
||||
use style::supports::SupportsCondition;
|
||||
use style_traits::ToCss;
|
||||
|
|
|
@ -10,8 +10,8 @@ use dom::cssrule::{CSSRule, SpecificCSSRule};
|
|||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use std::sync::Arc;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::viewport::ViewportRule;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -128,7 +128,6 @@ use std::default::Default;
|
|||
use std::iter::once;
|
||||
use std::mem;
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
use std::time::{Duration, Instant};
|
||||
use style::attr::AttrValue;
|
||||
use style::context::{QuirksMode, ReflowGoal};
|
||||
|
@ -136,6 +135,7 @@ use style::restyle_hints::{RestyleHint, RESTYLE_SELF, RESTYLE_STYLE_ATTRIBUTE};
|
|||
use style::selector_parser::{RestyleDamage, Snapshot};
|
||||
use style::shared_lock::SharedRwLock as StyleSharedRwLock;
|
||||
use style::str::{HTML_SPACE_CHARACTERS, split_html_space_chars, str_join};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::Stylesheet;
|
||||
use task_source::TaskSource;
|
||||
use time;
|
||||
|
|
|
@ -96,7 +96,6 @@ use std::convert::TryFrom;
|
|||
use std::default::Default;
|
||||
use std::fmt;
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
use style::context::{QuirksMode, ReflowGoal};
|
||||
use style::element_state::*;
|
||||
|
@ -107,6 +106,7 @@ use style::rule_tree::CascadeLevel;
|
|||
use style::selector_parser::{NonTSPseudoClass, RestyleDamage, SelectorImpl, SelectorParser};
|
||||
use style::shared_lock::{SharedRwLock, Locked};
|
||||
use style::sink::Push;
|
||||
use style::stylearc::Arc;
|
||||
use style::stylist::ApplicableDeclarationBlock;
|
||||
use style::thread_state;
|
||||
use style::values::CSSFloat;
|
||||
|
|
|
@ -30,11 +30,11 @@ use std::ascii::AsciiExt;
|
|||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
use std::default::Default;
|
||||
use std::sync::Arc;
|
||||
use style::attr::AttrValue;
|
||||
use style::media_queries::parse_media_query_list;
|
||||
use style::parser::{LengthParsingMode, ParserContext as CssParserContext};
|
||||
use style::str::HTML_SPACE_CHARACTERS;
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{CssRuleType, Stylesheet};
|
||||
use stylesheet_loader::{StylesheetLoader, StylesheetContextSource, StylesheetOwner};
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@ use dom_struct::dom_struct;
|
|||
use html5ever_atoms::LocalName;
|
||||
use servo_config::prefs::PREFS;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use style::attr::AttrValue;
|
||||
use style::media_queries::MediaList;
|
||||
use style::str::HTML_SPACE_CHARACTERS;
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{Stylesheet, CssRule, CssRules, Origin};
|
||||
use style::viewport::ViewportRule;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ use dom_struct::dom_struct;
|
|||
use html5ever_atoms::LocalName;
|
||||
use net_traits::image::base::Image;
|
||||
use std::default::Default;
|
||||
use std::sync::Arc;
|
||||
use style::stylearc::Arc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLObjectElement {
|
||||
|
|
|
@ -23,9 +23,9 @@ use html5ever_atoms::LocalName;
|
|||
use net_traits::ReferrerPolicy;
|
||||
use script_layout_interface::message::Msg;
|
||||
use std::cell::Cell;
|
||||
use std::sync::Arc;
|
||||
use style::media_queries::parse_media_query_list;
|
||||
use style::parser::{LengthParsingMode, ParserContext as CssParserContext};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{CssRuleType, Stylesheet, Origin};
|
||||
use stylesheet_loader::{StylesheetLoader, StylesheetOwner};
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@ use dom::bindings::str::DOMString;
|
|||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use std::sync::Arc;
|
||||
use style::media_queries::{MediaQuery, parse_media_query_list};
|
||||
use style::media_queries::MediaList as StyleMediaList;
|
||||
use style::parser::{LengthParsingMode, ParserContext};
|
||||
use style::shared_lock::{SharedRwLock, Locked};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::CssRuleType;
|
||||
use style_traits::ToCss;
|
||||
|
||||
|
|
|
@ -78,10 +78,10 @@ use std::default::Default;
|
|||
use std::iter;
|
||||
use std::mem;
|
||||
use std::ops::Range;
|
||||
use std::sync::Arc;
|
||||
use style::context::QuirksMode;
|
||||
use style::dom::OpaqueNode;
|
||||
use style::selector_parser::{SelectorImpl, SelectorParser};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::Stylesheet;
|
||||
use style::thread_state;
|
||||
use uuid::Uuid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue