forked from pool/MozillaFirefox
339fcf649a
OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=626
1084 lines
46 KiB
Diff
1084 lines
46 KiB
Diff
|
|
# HG changeset patch
|
|
# User Simon Sapin <simon.sapin@exyr.org>
|
|
# Date 1510231769 21600
|
|
# Node ID 3242ac6fdb3879f723145e6b07fff04a5c960d1e
|
|
# Parent bf63b9d8f2410464d5f2526588e380f934e937cc
|
|
servo: Merge #19162 - Allow unused imports for AsciiExt in style code (from emilio:ascii-ext); r=emilio
|
|
|
|
See #19128, this part is cherry-picked so Gecko can build with rust nightly.
|
|
|
|
Source-Repo: https://github.com/servo/servo
|
|
Source-Revision: e7a654dd13f589e127193267bcb576ffd661c11d
|
|
|
|
diff --git a/servo/components/gfx/font.rs b/servo/components/gfx/font.rs
|
|
--- a/servo/components/gfx/font.rs
|
|
+++ b/servo/components/gfx/font.rs
|
|
@@ -5,17 +5,17 @@
|
|
use app_units::Au;
|
|
use euclid::{Point2D, Rect, Size2D};
|
|
use font_template::FontTemplateDescriptor;
|
|
use ordered_float::NotNaN;
|
|
use platform::font::{FontHandle, FontTable};
|
|
use platform::font_context::FontContextHandle;
|
|
use platform::font_template::FontTemplateData;
|
|
use smallvec::SmallVec;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::ToOwned;
|
|
use std::cell::RefCell;
|
|
use std::collections::HashMap;
|
|
use std::rc::Rc;
|
|
use std::str;
|
|
use std::sync::Arc;
|
|
use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
|
|
use style::computed_values::{font_stretch, font_variant_caps, font_weight};
|
|
diff --git a/servo/components/net/fetch/cors_cache.rs b/servo/components/net/fetch/cors_cache.rs
|
|
--- a/servo/components/net/fetch/cors_cache.rs
|
|
+++ b/servo/components/net/fetch/cors_cache.rs
|
|
@@ -7,17 +7,17 @@
|
|
//! For stuff involving `<img>`, `<iframe>`, `<form>`, etc please check what
|
|
//! the request mode should be and compare with the fetch spec
|
|
//! This library will eventually become the core of the Fetch crate
|
|
//! with CORSRequest being expanded into FetchRequest (etc)
|
|
|
|
use hyper::method::Method;
|
|
use net_traits::request::{CredentialsMode, Origin, Request};
|
|
use servo_url::ServoUrl;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use time::{self, Timespec};
|
|
|
|
/// Union type for CORS cache entries
|
|
///
|
|
/// Each entry might pertain to a header or method
|
|
#[derive(Clone, Debug)]
|
|
pub enum HeaderOrMethod {
|
|
HeaderData(String),
|
|
diff --git a/servo/components/net/fetch/methods.rs b/servo/components/net/fetch/methods.rs
|
|
--- a/servo/components/net/fetch/methods.rs
|
|
+++ b/servo/components/net/fetch/methods.rs
|
|
@@ -16,17 +16,17 @@ use hyper::method::Method;
|
|
use hyper::mime::{Mime, SubLevel, TopLevel};
|
|
use hyper::status::StatusCode;
|
|
use mime_guess::guess_mime_type;
|
|
use net_traits::{FetchTaskTarget, NetworkError, ReferrerPolicy};
|
|
use net_traits::request::{CredentialsMode, Referrer, Request, RequestMode, ResponseTainting};
|
|
use net_traits::request::{Type, Origin, Window};
|
|
use net_traits::response::{Response, ResponseBody, ResponseType};
|
|
use servo_url::ServoUrl;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::Cow;
|
|
use std::fmt;
|
|
use std::fs::File;
|
|
use std::io::Read;
|
|
use std::mem;
|
|
use std::str;
|
|
use std::sync::Arc;
|
|
use std::sync::mpsc::{Sender, Receiver};
|
|
diff --git a/servo/components/net/http_loader.rs b/servo/components/net/http_loader.rs
|
|
--- a/servo/components/net/http_loader.rs
|
|
+++ b/servo/components/net/http_loader.rs
|
|
@@ -34,17 +34,17 @@ use log;
|
|
use msg::constellation_msg::PipelineId;
|
|
use net_traits::{CookieSource, FetchMetadata, NetworkError, ReferrerPolicy};
|
|
use net_traits::request::{CacheMode, CredentialsMode, Destination, Origin};
|
|
use net_traits::request::{RedirectMode, Referrer, Request, RequestMode};
|
|
use net_traits::request::{ResponseTainting, ServiceWorkersMode, Type};
|
|
use net_traits::response::{HttpsState, Response, ResponseBody, ResponseType};
|
|
use resource_thread::AuthCache;
|
|
use servo_url::{ImmutableOrigin, ServoUrl};
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::collections::HashSet;
|
|
use std::error::Error;
|
|
use std::io::{self, Read, Write};
|
|
use std::iter::FromIterator;
|
|
use std::mem;
|
|
use std::ops::Deref;
|
|
use std::sync::RwLock;
|
|
use std::sync::mpsc::{channel, Sender};
|
|
diff --git a/servo/components/net/websocket_loader.rs b/servo/components/net/websocket_loader.rs
|
|
--- a/servo/components/net/websocket_loader.rs
|
|
+++ b/servo/components/net/websocket_loader.rs
|
|
@@ -14,17 +14,17 @@ use hyper::http::h1::{LINE_ENDING, parse
|
|
use hyper::method::Method;
|
|
use hyper::net::HttpStream;
|
|
use hyper::status::StatusCode;
|
|
use hyper::version::HttpVersion;
|
|
use net_traits::{CookieSource, MessageData, NetworkError, WebSocketCommunicate, WebSocketConnectData};
|
|
use net_traits::{WebSocketDomAction, WebSocketNetworkEvent};
|
|
use net_traits::request::{Destination, Type};
|
|
use servo_url::ServoUrl;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::io::{self, Write};
|
|
use std::net::TcpStream;
|
|
use std::sync::{Arc, Mutex};
|
|
use std::sync::atomic::{AtomicBool, Ordering};
|
|
use std::thread;
|
|
use url::Position;
|
|
use websocket::{Message, Receiver as WSReceiver, Sender as WSSender};
|
|
use websocket::header::{Origin, WebSocketAccept, WebSocketKey, WebSocketProtocol, WebSocketVersion};
|
|
diff --git a/servo/components/net_traits/response.rs b/servo/components/net_traits/response.rs
|
|
--- a/servo/components/net_traits/response.rs
|
|
+++ b/servo/components/net_traits/response.rs
|
|
@@ -4,17 +4,17 @@
|
|
|
|
//! The [Response](https://fetch.spec.whatwg.org/#responses) object
|
|
//! resulting from a [fetch operation](https://fetch.spec.whatwg.org/#concept-fetch)
|
|
use {FetchMetadata, FilteredMetadata, Metadata, NetworkError, ReferrerPolicy};
|
|
use hyper::header::{AccessControlExposeHeaders, ContentType, Headers};
|
|
use hyper::status::StatusCode;
|
|
use hyper_serde::Serde;
|
|
use servo_url::ServoUrl;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::sync::{Arc, Mutex};
|
|
|
|
/// [Response type](https://fetch.spec.whatwg.org/#concept-response-type)
|
|
#[derive(Clone, Debug, Deserialize, HeapSizeOf, PartialEq, Serialize)]
|
|
pub enum ResponseType {
|
|
Basic,
|
|
Cors,
|
|
Default,
|
|
diff --git a/servo/components/script/dom/bindings/str.rs b/servo/components/script/dom/bindings/str.rs
|
|
--- a/servo/components/script/dom/bindings/str.rs
|
|
+++ b/servo/components/script/dom/bindings/str.rs
|
|
@@ -2,17 +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/. */
|
|
|
|
//! The `ByteString` struct.
|
|
|
|
use cssparser::CowRcStr;
|
|
use html5ever::{LocalName, Namespace};
|
|
use servo_atoms::Atom;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::{Borrow, Cow, ToOwned};
|
|
use std::fmt;
|
|
use std::hash::{Hash, Hasher};
|
|
use std::marker::PhantomData;
|
|
use std::ops;
|
|
use std::ops::{Deref, DerefMut};
|
|
use std::str;
|
|
use std::str::{Bytes, FromStr};
|
|
diff --git a/servo/components/script/dom/blob.rs b/servo/components/script/dom/blob.rs
|
|
--- a/servo/components/script/dom/blob.rs
|
|
+++ b/servo/components/script/dom/blob.rs
|
|
@@ -11,17 +11,17 @@ use dom::bindings::js::{JS, Root};
|
|
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
|
|
use dom::bindings::str::DOMString;
|
|
use dom::globalscope::GlobalScope;
|
|
use dom_struct::dom_struct;
|
|
use ipc_channel::ipc;
|
|
use net_traits::{CoreResourceMsg, IpcSend};
|
|
use net_traits::blob_url_store::{BlobBuf, get_blob_origin};
|
|
use net_traits::filemanager_thread::{FileManagerThreadMsg, ReadFileProgress, RelativePos};
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::mem;
|
|
use std::ops::Index;
|
|
use std::path::PathBuf;
|
|
use uuid::Uuid;
|
|
|
|
/// File-based blob
|
|
#[derive(JSTraceable)]
|
|
pub struct FileBlob {
|
|
diff --git a/servo/components/script/dom/cssstyledeclaration.rs b/servo/components/script/dom/cssstyledeclaration.rs
|
|
--- a/servo/components/script/dom/cssstyledeclaration.rs
|
|
+++ b/servo/components/script/dom/cssstyledeclaration.rs
|
|
@@ -11,17 +11,17 @@ use dom::bindings::reflector::{DomObject
|
|
use dom::bindings::str::DOMString;
|
|
use dom::cssrule::CSSRule;
|
|
use dom::element::Element;
|
|
use dom::node::{Node, window_from_node, document_from_node};
|
|
use dom::window::Window;
|
|
use dom_struct::dom_struct;
|
|
use servo_arc::Arc;
|
|
use servo_url::ServoUrl;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use style::attr::AttrValue;
|
|
use style::properties::{Importance, PropertyDeclarationBlock, PropertyId, LonghandId, ShorthandId};
|
|
use style::properties::{parse_one_declaration_into, parse_style_attribute, SourcePropertyDeclaration};
|
|
use style::selector_parser::PseudoElement;
|
|
use style::shared_lock::Locked;
|
|
use style_traits::{PARSING_MODE_DEFAULT, ToCss};
|
|
|
|
// http://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface
|
|
diff --git a/servo/components/script/dom/document.rs b/servo/components/script/dom/document.rs
|
|
--- a/servo/components/script/dom/document.rs
|
|
+++ b/servo/components/script/dom/document.rs
|
|
@@ -118,17 +118,17 @@ use script_traits::{AnimationState, Comp
|
|
use script_traits::{MouseButton, MouseEventType, MozBrowserEvent};
|
|
use script_traits::{MsDuration, ScriptMsg, TouchpadPressurePhase};
|
|
use script_traits::{TouchEventType, TouchId};
|
|
use script_traits::UntrustedNodeAddress;
|
|
use servo_arc::Arc;
|
|
use servo_atoms::Atom;
|
|
use servo_config::prefs::PREFS;
|
|
use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl};
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::ToOwned;
|
|
use std::cell::{Cell, Ref, RefMut};
|
|
use std::collections::{HashMap, HashSet, VecDeque};
|
|
use std::collections::hash_map::Entry::{Occupied, Vacant};
|
|
use std::default::Default;
|
|
use std::iter::once;
|
|
use std::mem;
|
|
use std::rc::Rc;
|
|
diff --git a/servo/components/script/dom/element.rs b/servo/components/script/dom/element.rs
|
|
--- a/servo/components/script/dom/element.rs
|
|
+++ b/servo/components/script/dom/element.rs
|
|
@@ -90,17 +90,17 @@ use script_layout_interface::message::Re
|
|
use script_thread::ScriptThread;
|
|
use selectors::attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity};
|
|
use selectors::matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext, MatchingMode};
|
|
use selectors::matching::{HAS_EDGE_CHILD_SELECTOR, HAS_SLOW_SELECTOR, HAS_SLOW_SELECTOR_LATER_SIBLINGS};
|
|
use selectors::matching::{RelevantLinkStatus, matches_selector_list};
|
|
use selectors::sink::Push;
|
|
use servo_arc::Arc;
|
|
use servo_atoms::Atom;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::Cow;
|
|
use std::cell::{Cell, Ref};
|
|
use std::convert::TryFrom;
|
|
use std::default::Default;
|
|
use std::fmt;
|
|
use std::mem;
|
|
use std::rc::Rc;
|
|
use style::CaseSensitivityExt;
|
|
diff --git a/servo/components/script/dom/htmlelement.rs b/servo/components/script/dom/htmlelement.rs
|
|
--- a/servo/components/script/dom/htmlelement.rs
|
|
+++ b/servo/components/script/dom/htmlelement.rs
|
|
@@ -25,17 +25,17 @@ use dom::htmlhtmlelement::HTMLHtmlElemen
|
|
use dom::htmlinputelement::HTMLInputElement;
|
|
use dom::htmllabelelement::HTMLLabelElement;
|
|
use dom::node::{Node, SEQUENTIALLY_FOCUSABLE};
|
|
use dom::node::{document_from_node, window_from_node};
|
|
use dom::nodelist::NodeList;
|
|
use dom::virtualmethods::VirtualMethods;
|
|
use dom_struct::dom_struct;
|
|
use html5ever::{LocalName, Prefix};
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::default::Default;
|
|
use std::rc::Rc;
|
|
use style::attr::AttrValue;
|
|
use style::element_state::*;
|
|
|
|
#[dom_struct]
|
|
pub struct HTMLElement {
|
|
element: Element,
|
|
diff --git a/servo/components/script/dom/htmllinkelement.rs b/servo/components/script/dom/htmllinkelement.rs
|
|
--- a/servo/components/script/dom/htmllinkelement.rs
|
|
+++ b/servo/components/script/dom/htmllinkelement.rs
|
|
@@ -21,17 +21,17 @@ use dom::htmlelement::HTMLElement;
|
|
use dom::node::{Node, UnbindContext, document_from_node, window_from_node};
|
|
use dom::stylesheet::StyleSheet as DOMStyleSheet;
|
|
use dom::virtualmethods::VirtualMethods;
|
|
use dom_struct::dom_struct;
|
|
use html5ever::{LocalName, Prefix};
|
|
use net_traits::ReferrerPolicy;
|
|
use script_traits::{MozBrowserEvent, ScriptMsg};
|
|
use servo_arc::Arc;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::ToOwned;
|
|
use std::cell::Cell;
|
|
use std::default::Default;
|
|
use style::attr::AttrValue;
|
|
use style::media_queries::parse_media_query_list;
|
|
use style::parser::ParserContext as CssParserContext;
|
|
use style::str::HTML_SPACE_CHARACTERS;
|
|
use style::stylesheets::{CssRuleType, Stylesheet};
|
|
diff --git a/servo/components/script/dom/htmlmetaelement.rs b/servo/components/script/dom/htmlmetaelement.rs
|
|
--- a/servo/components/script/dom/htmlmetaelement.rs
|
|
+++ b/servo/components/script/dom/htmlmetaelement.rs
|
|
@@ -17,17 +17,17 @@ use dom::htmlelement::HTMLElement;
|
|
use dom::htmlheadelement::HTMLHeadElement;
|
|
use dom::node::{Node, UnbindContext, document_from_node, window_from_node};
|
|
use dom::virtualmethods::VirtualMethods;
|
|
use dom_struct::dom_struct;
|
|
use html5ever::{LocalName, Prefix};
|
|
use parking_lot::RwLock;
|
|
use servo_arc::Arc;
|
|
use servo_config::prefs::PREFS;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::sync::atomic::AtomicBool;
|
|
use style::attr::AttrValue;
|
|
use style::media_queries::MediaList;
|
|
use style::str::HTML_SPACE_CHARACTERS;
|
|
use style::stylesheets::{Stylesheet, StylesheetContents, CssRule, CssRules, Origin, ViewportRule};
|
|
|
|
#[dom_struct]
|
|
pub struct HTMLMetaElement {
|
|
diff --git a/servo/components/script/dom/htmlscriptelement.rs b/servo/components/script/dom/htmlscriptelement.rs
|
|
--- a/servo/components/script/dom/htmlscriptelement.rs
|
|
+++ b/servo/components/script/dom/htmlscriptelement.rs
|
|
@@ -31,17 +31,17 @@ use ipc_channel::ipc;
|
|
use ipc_channel::router::ROUTER;
|
|
use js::jsval::UndefinedValue;
|
|
use net_traits::{FetchMetadata, FetchResponseListener, Metadata, NetworkError};
|
|
use net_traits::request::{CorsSettings, CredentialsMode, Destination, RequestInit, RequestMode, Type as RequestType};
|
|
use network_listener::{NetworkListener, PreInvoke};
|
|
use servo_atoms::Atom;
|
|
use servo_config::opts;
|
|
use servo_url::ServoUrl;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::cell::Cell;
|
|
use std::fs::File;
|
|
use std::io::{Read, Write};
|
|
use std::path::PathBuf;
|
|
use std::process::{Command, Stdio};
|
|
use std::sync::{Arc, Mutex};
|
|
use style::str::{HTML_SPACE_CHARACTERS, StaticStringVec};
|
|
use uuid::Uuid;
|
|
diff --git a/servo/components/script/dom/macros.rs b/servo/components/script/dom/macros.rs
|
|
--- a/servo/components/script/dom/macros.rs
|
|
+++ b/servo/components/script/dom/macros.rs
|
|
@@ -144,17 +144,17 @@ macro_rules! make_string_or_document_url
|
|
);
|
|
|
|
#[macro_export]
|
|
macro_rules! make_enumerated_getter(
|
|
( $attr:ident, $htmlname:tt, $default:expr, $($choices: pat)|+) => (
|
|
fn $attr(&self) -> DOMString {
|
|
use dom::bindings::inheritance::Castable;
|
|
use dom::element::Element;
|
|
- use std::ascii::AsciiExt;
|
|
+ #[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
let element = self.upcast::<Element>();
|
|
let mut val = element.get_string_attribute(&local_name!($htmlname));
|
|
val.make_ascii_lowercase();
|
|
// https://html.spec.whatwg.org/multipage/#attr-fs-method
|
|
match &*val {
|
|
$($choices)|+ => val,
|
|
_ => DOMString::from($default)
|
|
}
|
|
diff --git a/servo/components/script/dom/namednodemap.rs b/servo/components/script/dom/namednodemap.rs
|
|
--- a/servo/components/script/dom/namednodemap.rs
|
|
+++ b/servo/components/script/dom/namednodemap.rs
|
|
@@ -10,17 +10,17 @@ use dom::bindings::error::{Error, Fallib
|
|
use dom::bindings::js::{JS, Root};
|
|
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
|
use dom::bindings::str::DOMString;
|
|
use dom::bindings::xmlname::namespace_from_domstring;
|
|
use dom::element::Element;
|
|
use dom::window::Window;
|
|
use dom_struct::dom_struct;
|
|
use html5ever::LocalName;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
|
|
#[dom_struct]
|
|
pub struct NamedNodeMap {
|
|
reflector_: Reflector,
|
|
owner: JS<Element>,
|
|
}
|
|
|
|
impl NamedNodeMap {
|
|
diff --git a/servo/components/script/dom/serviceworkercontainer.rs b/servo/components/script/dom/serviceworkercontainer.rs
|
|
--- a/servo/components/script/dom/serviceworkercontainer.rs
|
|
+++ b/servo/components/script/dom/serviceworkercontainer.rs
|
|
@@ -11,17 +11,17 @@ use dom::bindings::str::USVString;
|
|
use dom::client::Client;
|
|
use dom::eventtarget::EventTarget;
|
|
use dom::globalscope::GlobalScope;
|
|
use dom::promise::Promise;
|
|
use dom::serviceworker::ServiceWorker;
|
|
use dom_struct::dom_struct;
|
|
use script_thread::ScriptThread;
|
|
use serviceworkerjob::{Job, JobType};
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::default::Default;
|
|
use std::rc::Rc;
|
|
|
|
#[dom_struct]
|
|
pub struct ServiceWorkerContainer {
|
|
eventtarget: EventTarget,
|
|
controller: MutNullableJS<ServiceWorker>,
|
|
client: JS<Client>
|
|
diff --git a/servo/components/script/dom/servoparser/async_html.rs b/servo/components/script/dom/servoparser/async_html.rs
|
|
--- a/servo/components/script/dom/servoparser/async_html.rs
|
|
+++ b/servo/components/script/dom/servoparser/async_html.rs
|
|
@@ -22,17 +22,17 @@ use dom::virtualmethods::vtable_for;
|
|
use html5ever::{Attribute as HtmlAttribute, ExpandedName, LocalName, QualName};
|
|
use html5ever::buffer_queue::BufferQueue;
|
|
use html5ever::tendril::{SendTendril, StrTendril, Tendril};
|
|
use html5ever::tendril::fmt::UTF8;
|
|
use html5ever::tokenizer::{Tokenizer as HtmlTokenizer, TokenizerOpts, TokenizerResult};
|
|
use html5ever::tree_builder::{ElementFlags, NodeOrText as HtmlNodeOrText, NextParserState, QuirksMode, TreeSink};
|
|
use html5ever::tree_builder::{TreeBuilder, TreeBuilderOpts};
|
|
use servo_url::ServoUrl;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::Cow;
|
|
use std::cell::Cell;
|
|
use std::collections::HashMap;
|
|
use std::collections::vec_deque::VecDeque;
|
|
use std::sync::mpsc::{channel, Receiver, Sender};
|
|
use std::thread;
|
|
use style::context::QuirksMode as ServoQuirksMode;
|
|
|
|
diff --git a/servo/components/script/dom/servoparser/mod.rs b/servo/components/script/dom/servoparser/mod.rs
|
|
--- a/servo/components/script/dom/servoparser/mod.rs
|
|
+++ b/servo/components/script/dom/servoparser/mod.rs
|
|
@@ -41,17 +41,17 @@ use net_traits::{FetchMetadata, FetchRes
|
|
use network_listener::PreInvoke;
|
|
use profile_traits::time::{TimerMetadata, TimerMetadataFrameType};
|
|
use profile_traits::time::{TimerMetadataReflowType, ProfilerCategory, profile};
|
|
use script_thread::ScriptThread;
|
|
use script_traits::DocumentActivity;
|
|
use servo_config::prefs::PREFS;
|
|
use servo_config::resource_files::read_resource_file;
|
|
use servo_url::ServoUrl;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::Cow;
|
|
use std::cell::Cell;
|
|
use std::mem;
|
|
use style::context::QuirksMode as ServoQuirksMode;
|
|
|
|
mod async_html;
|
|
mod html;
|
|
mod xml;
|
|
diff --git a/servo/components/script/dom/websocket.rs b/servo/components/script/dom/websocket.rs
|
|
--- a/servo/components/script/dom/websocket.rs
|
|
+++ b/servo/components/script/dom/websocket.rs
|
|
@@ -27,17 +27,17 @@ use js::jsapi::JSAutoCompartment;
|
|
use js::jsval::UndefinedValue;
|
|
use js::typedarray::{ArrayBuffer, CreateWith};
|
|
use net_traits::{WebSocketCommunicate, WebSocketConnectData, WebSocketDomAction, WebSocketNetworkEvent};
|
|
use net_traits::CoreResourceMsg::WebsocketConnect;
|
|
use net_traits::MessageData;
|
|
use script_runtime::CommonScriptMsg;
|
|
use script_runtime::ScriptThreadEventCategory::WebSocketEvent;
|
|
use servo_url::ServoUrl;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::ToOwned;
|
|
use std::cell::Cell;
|
|
use std::ptr;
|
|
use std::thread;
|
|
use task::{TaskOnce, TaskCanceller};
|
|
use task_source::TaskSource;
|
|
use task_source::networking::NetworkingTaskSource;
|
|
|
|
diff --git a/servo/components/script/dom/window.rs b/servo/components/script/dom/window.rs
|
|
--- a/servo/components/script/dom/window.rs
|
|
+++ b/servo/components/script/dom/window.rs
|
|
@@ -82,17 +82,17 @@ use script_traits::{ConstellationControl
|
|
use script_traits::{ScriptToConstellationChan, ScriptMsg, ScrollState, TimerEvent, TimerEventId};
|
|
use script_traits::{TimerSchedulerMsg, UntrustedNodeAddress, WindowSizeData, WindowSizeType};
|
|
use script_traits::webdriver_msg::{WebDriverJSError, WebDriverJSResult};
|
|
use selectors::attr::CaseSensitivity;
|
|
use servo_config::opts;
|
|
use servo_config::prefs::PREFS;
|
|
use servo_geometry::{f32_rect_to_au_rect, max_rect};
|
|
use servo_url::{Host, MutableOrigin, ImmutableOrigin, ServoUrl};
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::ToOwned;
|
|
use std::cell::Cell;
|
|
use std::collections::{HashMap, HashSet};
|
|
use std::collections::hash_map::Entry;
|
|
use std::default::Default;
|
|
use std::env;
|
|
use std::fs;
|
|
use std::io::{Write, stderr, stdout};
|
|
diff --git a/servo/components/script/dom/xmlhttprequest.rs b/servo/components/script/dom/xmlhttprequest.rs
|
|
--- a/servo/components/script/dom/xmlhttprequest.rs
|
|
+++ b/servo/components/script/dom/xmlhttprequest.rs
|
|
@@ -57,17 +57,17 @@ use net_traits::{FetchResponseListener,
|
|
use net_traits::CoreResourceMsg::Fetch;
|
|
use net_traits::request::{CredentialsMode, Destination, RequestInit, RequestMode};
|
|
use net_traits::trim_http_whitespace;
|
|
use network_listener::{NetworkListener, PreInvoke};
|
|
use script_traits::DocumentActivity;
|
|
use servo_atoms::Atom;
|
|
use servo_config::prefs::PREFS;
|
|
use servo_url::ServoUrl;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::ToOwned;
|
|
use std::cell::Cell;
|
|
use std::default::Default;
|
|
use std::str;
|
|
use std::sync::{Arc, Mutex};
|
|
use task_source::networking::NetworkingTaskSource;
|
|
use time;
|
|
use timers::{OneshotTimerCallback, OneshotTimerHandle};
|
|
diff --git a/servo/components/selectors/attr.rs b/servo/components/selectors/attr.rs
|
|
--- a/servo/components/selectors/attr.rs
|
|
+++ b/servo/components/selectors/attr.rs
|
|
@@ -1,15 +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/. */
|
|
|
|
use cssparser::ToCss;
|
|
use parser::SelectorImpl;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] #[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::fmt;
|
|
|
|
#[derive(Clone, Eq, PartialEq)]
|
|
pub struct AttrSelectorWithNamespace<Impl: SelectorImpl> {
|
|
pub namespace: NamespaceConstraint<(Impl::NamespacePrefix, Impl::NamespaceUrl)>,
|
|
pub local_name: Impl::LocalName,
|
|
pub local_name_lower: Impl::LocalName,
|
|
pub operation: ParsedAttrSelectorOperation<Impl::AttrValue>,
|
|
diff --git a/servo/components/selectors/parser.rs b/servo/components/selectors/parser.rs
|
|
--- a/servo/components/selectors/parser.rs
|
|
+++ b/servo/components/selectors/parser.rs
|
|
@@ -8,17 +8,17 @@ use bloom::BLOOM_HASH_MASK;
|
|
use builder::{SelectorBuilder, SpecificityAndFlags};
|
|
use context::QuirksMode;
|
|
use cssparser::{ParseError, BasicParseError, CowRcStr, Delimiter};
|
|
use cssparser::{Token, Parser as CssParser, parse_nth, ToCss, serialize_identifier, CssStringWriter};
|
|
use precomputed_hash::PrecomputedHash;
|
|
use servo_arc::ThinArc;
|
|
use sink::Push;
|
|
use smallvec::SmallVec;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::{Borrow, Cow};
|
|
use std::fmt::{self, Display, Debug, Write};
|
|
use std::iter::Rev;
|
|
use std::slice;
|
|
use visitor::SelectorVisitor;
|
|
|
|
/// A trait that represents a pseudo-element.
|
|
pub trait PseudoElement : Sized + ToCss {
|
|
diff --git a/servo/components/style/attr.rs b/servo/components/style/attr.rs
|
|
--- a/servo/components/style/attr.rs
|
|
+++ b/servo/components/style/attr.rs
|
|
@@ -11,17 +11,17 @@ use app_units::Au;
|
|
use cssparser::{self, Color, RGBA};
|
|
use euclid::num::Zero;
|
|
use num_traits::ToPrimitive;
|
|
use properties::PropertyDeclarationBlock;
|
|
use selectors::attr::AttrSelectorOperation;
|
|
use servo_arc::Arc;
|
|
use servo_url::ServoUrl;
|
|
use shared_lock::Locked;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] #[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::str::FromStr;
|
|
use str::{HTML_SPACE_CHARACTERS, read_exponent, read_fraction};
|
|
use str::{read_numbers, split_commas, split_html_space_chars};
|
|
use str::str_join;
|
|
use values::specified::Length;
|
|
|
|
// Duplicated from script::dom::values.
|
|
const UNSIGNED_LONG_MAX: u32 = 2147483647;
|
|
diff --git a/servo/components/style/counter_style/mod.rs b/servo/components/style/counter_style/mod.rs
|
|
--- a/servo/components/style/counter_style/mod.rs
|
|
+++ b/servo/components/style/counter_style/mod.rs
|
|
@@ -10,17 +10,17 @@ use Atom;
|
|
use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser};
|
|
use cssparser::{Parser, Token, serialize_identifier, BasicParseError, CowRcStr};
|
|
use error_reporting::{ContextualParseError, ParseErrorReporter};
|
|
#[cfg(feature = "gecko")] use gecko::rules::CounterStyleDescriptors;
|
|
#[cfg(feature = "gecko")] use gecko_bindings::structs::nsCSSCounterDesc;
|
|
use parser::{ParserContext, ParserErrorContext, Parse};
|
|
use selectors::parser::SelectorParseError;
|
|
use shared_lock::{SharedRwLockReadGuard, ToCssWithGuard};
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::Cow;
|
|
use std::fmt;
|
|
use std::ops::Range;
|
|
use style_traits::{Comma, OneOrMoreSeparated, ParseError, StyleParseError, ToCss};
|
|
use values::CustomIdent;
|
|
|
|
/// Parse the prelude of an @counter-style rule
|
|
pub fn parse_counter_style_name<'i, 't>(input: &mut Parser<'i, 't>) -> Result<CustomIdent, ParseError<'i>> {
|
|
diff --git a/servo/components/style/custom_properties.rs b/servo/components/style/custom_properties.rs
|
|
--- a/servo/components/style/custom_properties.rs
|
|
+++ b/servo/components/style/custom_properties.rs
|
|
@@ -9,17 +9,17 @@
|
|
use Atom;
|
|
use cssparser::{Delimiter, Parser, ParserInput, SourcePosition, Token, TokenSerializationType};
|
|
use parser::ParserContext;
|
|
use precomputed_hash::PrecomputedHash;
|
|
use properties::{CSSWideKeyword, DeclaredValue};
|
|
use selector_map::{PrecomputedHashSet, PrecomputedHashMap};
|
|
use selectors::parser::SelectorParseError;
|
|
use servo_arc::Arc;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::{Borrow, Cow};
|
|
use std::fmt;
|
|
use std::hash::Hash;
|
|
use style_traits::{ToCss, StyleParseError, ParseError};
|
|
|
|
/// A custom property name is just an `Atom`.
|
|
///
|
|
/// Note that this does not include the `--` prefix
|
|
diff --git a/servo/components/style/gecko/generated/pseudo_element_definition.rs b/servo/components/style/gecko/generated/pseudo_element_definition.rs
|
|
--- a/servo/components/style/gecko/generated/pseudo_element_definition.rs
|
|
+++ b/servo/components/style/gecko/generated/pseudo_element_definition.rs
|
|
@@ -1262,17 +1262,17 @@ None
|
|
/// user-agent stylesheet.
|
|
///
|
|
/// If we're not in a user-agent stylesheet, we will never parse anonymous
|
|
/// box pseudo-elements.
|
|
///
|
|
/// Returns `None` if the pseudo-element is not recognised.
|
|
#[inline]
|
|
pub fn from_slice(s: &str, in_ua_stylesheet: bool) -> Option<Self> {
|
|
- use std::ascii::AsciiExt;
|
|
+ #[allow(unused_imports)] #[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
|
|
// We don't need to support tree pseudos because functional
|
|
// pseudo-elements needs arguments, and thus should be created
|
|
// via other methods.
|
|
if in_ua_stylesheet || PseudoElement::After.exposed_in_non_ua_sheets() {
|
|
if s.eq_ignore_ascii_case("after") {
|
|
return Some(PseudoElement::After);
|
|
}
|
|
@@ -1632,17 +1632,17 @@ None
|
|
}
|
|
|
|
/// Constructs a tree pseudo-element from the given name and arguments.
|
|
/// "name" must start with "-moz-tree-".
|
|
///
|
|
/// Returns `None` if the pseudo-element is not recognized.
|
|
#[inline]
|
|
pub fn tree_pseudo_element(name: &str, args: Box<[String]>) -> Option<Self> {
|
|
- use std::ascii::AsciiExt;
|
|
+ #[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
debug_assert!(name.starts_with("-moz-tree-"));
|
|
let tree_part = &name[10..];
|
|
if tree_part.eq_ignore_ascii_case("column") {
|
|
return Some(PseudoElement::MozTreeColumn(args));
|
|
}
|
|
if tree_part.eq_ignore_ascii_case("row") {
|
|
return Some(PseudoElement::MozTreeRow(args));
|
|
}
|
|
diff --git a/servo/components/style/gecko/pseudo_element_definition.mako.rs b/servo/components/style/gecko/pseudo_element_definition.mako.rs
|
|
--- a/servo/components/style/gecko/pseudo_element_definition.mako.rs
|
|
+++ b/servo/components/style/gecko/pseudo_element_definition.mako.rs
|
|
@@ -181,17 +181,17 @@ impl PseudoElement {
|
|
/// user-agent stylesheet.
|
|
///
|
|
/// If we're not in a user-agent stylesheet, we will never parse anonymous
|
|
/// box pseudo-elements.
|
|
///
|
|
/// Returns `None` if the pseudo-element is not recognised.
|
|
#[inline]
|
|
pub fn from_slice(s: &str, in_ua_stylesheet: bool) -> Option<Self> {
|
|
- use std::ascii::AsciiExt;
|
|
+ #[allow(unused_imports)] #[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
|
|
// We don't need to support tree pseudos because functional
|
|
// pseudo-elements needs arguments, and thus should be created
|
|
// via other methods.
|
|
% for pseudo in SIMPLE_PSEUDOS:
|
|
if in_ua_stylesheet || ${pseudo_element_variant(pseudo)}.exposed_in_non_ua_sheets() {
|
|
if s.eq_ignore_ascii_case("${pseudo.value[1:]}") {
|
|
return Some(${pseudo_element_variant(pseudo)});
|
|
@@ -203,17 +203,17 @@ impl PseudoElement {
|
|
}
|
|
|
|
/// Constructs a tree pseudo-element from the given name and arguments.
|
|
/// "name" must start with "-moz-tree-".
|
|
///
|
|
/// Returns `None` if the pseudo-element is not recognized.
|
|
#[inline]
|
|
pub fn tree_pseudo_element(name: &str, args: Box<[String]>) -> Option<Self> {
|
|
- use std::ascii::AsciiExt;
|
|
+ #[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
debug_assert!(name.starts_with("-moz-tree-"));
|
|
let tree_part = &name[10..];
|
|
% for pseudo in TREE_PSEUDOS:
|
|
if tree_part.eq_ignore_ascii_case("${pseudo.value[11:]}") {
|
|
return Some(${pseudo_element_variant(pseudo, "args")});
|
|
}
|
|
% endfor
|
|
None
|
|
diff --git a/servo/components/style/gecko_string_cache/mod.rs b/servo/components/style/gecko_string_cache/mod.rs
|
|
--- a/servo/components/style/gecko_string_cache/mod.rs
|
|
+++ b/servo/components/style/gecko_string_cache/mod.rs
|
|
@@ -8,17 +8,17 @@
|
|
|
|
use gecko_bindings::bindings::Gecko_AddRefAtom;
|
|
use gecko_bindings::bindings::Gecko_Atomize;
|
|
use gecko_bindings::bindings::Gecko_Atomize16;
|
|
use gecko_bindings::bindings::Gecko_ReleaseAtom;
|
|
use gecko_bindings::structs::{nsIAtom, nsIAtom_AtomKind};
|
|
use nsstring::{nsAString, nsString};
|
|
use precomputed_hash::PrecomputedHash;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::{Cow, Borrow};
|
|
use std::char::{self, DecodeUtf16};
|
|
use std::fmt::{self, Write};
|
|
use std::hash::{Hash, Hasher};
|
|
use std::iter::Cloned;
|
|
use std::mem;
|
|
use std::ops::Deref;
|
|
use std::slice;
|
|
diff --git a/servo/components/style/properties/longhand/font.mako.rs b/servo/components/style/properties/longhand/font.mako.rs
|
|
--- a/servo/components/style/properties/longhand/font.mako.rs
|
|
+++ b/servo/components/style/properties/longhand/font.mako.rs
|
|
@@ -2137,17 +2137,17 @@ https://drafts.csswg.org/css-fonts-4/#lo
|
|
SpecifiedValue::Normal
|
|
}
|
|
|
|
impl ToComputedValue for SpecifiedValue {
|
|
type ComputedValue = computed_value::T;
|
|
|
|
#[inline]
|
|
fn to_computed_value(&self, _context: &Context) -> computed_value::T {
|
|
- use std::ascii::AsciiExt;
|
|
+ #[allow(unused_imports)] #[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
match *self {
|
|
SpecifiedValue::Normal => computed_value::T(0),
|
|
SpecifiedValue::Override(ref lang) => {
|
|
if lang.is_empty() || lang.len() > 4 || !lang.is_ascii() {
|
|
return computed_value::T(0)
|
|
}
|
|
let mut computed_lang = lang.clone();
|
|
while computed_lang.len() < 4 {
|
|
diff --git a/servo/components/style/properties/longhand/pointing.mako.rs b/servo/components/style/properties/longhand/pointing.mako.rs
|
|
--- a/servo/components/style/properties/longhand/pointing.mako.rs
|
|
+++ b/servo/components/style/properties/longhand/pointing.mako.rs
|
|
@@ -85,17 +85,17 @@
|
|
images: vec![],
|
|
keyword: computed_value::Keyword::Auto
|
|
}
|
|
}
|
|
|
|
impl Parse for computed_value::Keyword {
|
|
fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
|
|
-> Result<computed_value::Keyword, ParseError<'i>> {
|
|
- use std::ascii::AsciiExt;
|
|
+ #[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use style_traits::cursor::Cursor;
|
|
let ident = input.expect_ident()?;
|
|
if ident.eq_ignore_ascii_case("auto") {
|
|
Ok(computed_value::Keyword::Auto)
|
|
} else {
|
|
Cursor::from_css_keyword(&ident)
|
|
.map(computed_value::Keyword::Cursor)
|
|
.map_err(|()| SelectorParseError::UnexpectedIdent(ident.clone()).into())
|
|
diff --git a/servo/components/style/servo/selector_parser.rs b/servo/components/style/servo/selector_parser.rs
|
|
--- a/servo/components/style/servo/selector_parser.rs
|
|
+++ b/servo/components/style/servo/selector_parser.rs
|
|
@@ -16,17 +16,17 @@ use invalidation::element::element_wrapp
|
|
use properties::ComputedValues;
|
|
use properties::PropertyFlags;
|
|
use properties::longhands::display::computed_value as display;
|
|
use selector_parser::{AttrValue as SelectorAttrValue, ElementExt, PseudoElementCascadeType, SelectorParser};
|
|
use selectors::Element;
|
|
use selectors::attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity};
|
|
use selectors::parser::{SelectorMethods, SelectorParseError};
|
|
use selectors::visitor::SelectorVisitor;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::fmt;
|
|
use std::fmt::Debug;
|
|
use std::mem;
|
|
use std::ops::{Deref, DerefMut};
|
|
use style_traits::{ParseError, StyleParseError};
|
|
|
|
/// A pseudo-element, both public and private.
|
|
///
|
|
diff --git a/servo/components/style/str.rs b/servo/components/style/str.rs
|
|
--- a/servo/components/style/str.rs
|
|
+++ b/servo/components/style/str.rs
|
|
@@ -2,17 +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/. */
|
|
|
|
//! String utils for attributes and similar stuff.
|
|
|
|
#![deny(missing_docs)]
|
|
|
|
use num_traits::ToPrimitive;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] #[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::Cow;
|
|
use std::convert::AsRef;
|
|
use std::iter::{Filter, Peekable};
|
|
use std::str::Split;
|
|
|
|
/// A static slice of characters.
|
|
pub type StaticCharVec = &'static [char];
|
|
|
|
diff --git a/servo/components/style/stylesheets/viewport_rule.rs b/servo/components/style/stylesheets/viewport_rule.rs
|
|
--- a/servo/components/style/stylesheets/viewport_rule.rs
|
|
+++ b/servo/components/style/stylesheets/viewport_rule.rs
|
|
@@ -15,17 +15,17 @@ use error_reporting::{ContextualParseErr
|
|
use euclid::TypedSize2D;
|
|
use font_metrics::get_metrics_provider_for_product;
|
|
use media_queries::Device;
|
|
use parser::{ParserContext, ParserErrorContext};
|
|
use properties::StyleBuilder;
|
|
use rule_cache::RuleCacheConditions;
|
|
use selectors::parser::SelectorParseError;
|
|
use shared_lock::{SharedRwLockReadGuard, StylesheetGuards, ToCssWithGuard};
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::borrow::Cow;
|
|
use std::cell::RefCell;
|
|
use std::fmt;
|
|
use std::iter::Enumerate;
|
|
use std::str::Chars;
|
|
use style_traits::{PinchZoomFactor, ToCss, ParseError, StyleParseError};
|
|
use style_traits::viewport::{Orientation, UserZoom, ViewportConstraints, Zoom};
|
|
use stylesheets::{StylesheetInDocument, Origin};
|
|
diff --git a/servo/components/style/values/mod.rs b/servo/components/style/values/mod.rs
|
|
--- a/servo/components/style/values/mod.rs
|
|
+++ b/servo/components/style/values/mod.rs
|
|
@@ -7,17 +7,17 @@
|
|
//! [values]: https://drafts.csswg.org/css-values/
|
|
|
|
#![deny(missing_docs)]
|
|
|
|
use Atom;
|
|
pub use cssparser::{RGBA, Token, Parser, serialize_identifier, BasicParseError, CowRcStr};
|
|
use parser::{Parse, ParserContext};
|
|
use selectors::parser::SelectorParseError;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::fmt::{self, Debug};
|
|
use std::hash;
|
|
use style_traits::{ToCss, ParseError, StyleParseError};
|
|
|
|
pub mod animated;
|
|
pub mod computed;
|
|
pub mod distance;
|
|
pub mod generics;
|
|
diff --git a/servo/components/style/values/specified/align.rs b/servo/components/style/values/specified/align.rs
|
|
--- a/servo/components/style/values/specified/align.rs
|
|
+++ b/servo/components/style/values/specified/align.rs
|
|
@@ -5,17 +5,17 @@
|
|
//! Values for CSS Box Alignment properties
|
|
//!
|
|
//! https://drafts.csswg.org/css-align/
|
|
|
|
use cssparser::Parser;
|
|
use gecko_bindings::structs;
|
|
use parser::{Parse, ParserContext};
|
|
use selectors::parser::SelectorParseError;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::fmt;
|
|
use style_traits::{ToCss, ParseError, StyleParseError};
|
|
|
|
bitflags! {
|
|
/// Constants shared by multiple CSS Box Alignment properties
|
|
///
|
|
/// These constants match Gecko's `NS_STYLE_ALIGN_*` constants.
|
|
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
|
diff --git a/servo/components/style/values/specified/angle.rs b/servo/components/style/values/specified/angle.rs
|
|
--- a/servo/components/style/values/specified/angle.rs
|
|
+++ b/servo/components/style/values/specified/angle.rs
|
|
@@ -1,17 +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/. */
|
|
|
|
//! Specified angles.
|
|
|
|
use cssparser::{Parser, Token, BasicParseError};
|
|
use parser::{ParserContext, Parse};
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::fmt;
|
|
use style_traits::{ToCss, ParseError};
|
|
use values::CSSFloat;
|
|
use values::computed::{Context, ToComputedValue};
|
|
use values::computed::angle::Angle as ComputedAngle;
|
|
use values::specified::calc::CalcNode;
|
|
|
|
/// A specified angle.
|
|
diff --git a/servo/components/style/values/specified/calc.rs b/servo/components/style/values/specified/calc.rs
|
|
--- a/servo/components/style/values/specified/calc.rs
|
|
+++ b/servo/components/style/values/specified/calc.rs
|
|
@@ -3,17 +3,17 @@
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
//! [Calc expressions][calc].
|
|
//!
|
|
//! [calc]: https://drafts.csswg.org/css-values/#calc-notation
|
|
|
|
use cssparser::{Parser, Token, BasicParseError};
|
|
use parser::ParserContext;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::fmt;
|
|
use style_traits::{ToCss, ParseError, StyleParseError};
|
|
use style_traits::values::specified::AllowedNumericType;
|
|
use values::{CSSInteger, CSSFloat};
|
|
use values::computed;
|
|
use values::specified::{Angle, Time};
|
|
use values::specified::length::{AbsoluteLength, FontRelativeLength, NoCalcLength};
|
|
use values::specified::length::ViewportPercentageLength;
|
|
diff --git a/servo/components/style/values/specified/grid.rs b/servo/components/style/values/specified/grid.rs
|
|
--- a/servo/components/style/values/specified/grid.rs
|
|
+++ b/servo/components/style/values/specified/grid.rs
|
|
@@ -2,17 +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/. */
|
|
|
|
//! CSS handling for the computed value of
|
|
//! [grids](https://drafts.csswg.org/css-grid/)
|
|
|
|
use cssparser::{Parser, Token, BasicParseError};
|
|
use parser::{Parse, ParserContext};
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::mem;
|
|
use style_traits::{ParseError, StyleParseError};
|
|
use values::{CSSFloat, CustomIdent};
|
|
use values::computed::{self, Context, ToComputedValue};
|
|
use values::generics::grid::{GridTemplateComponent, RepeatCount, TrackBreadth, TrackKeyword, TrackRepeat};
|
|
use values::generics::grid::{LineNameList, TrackSize, TrackList, TrackListType, TrackListValue};
|
|
use values::specified::{LengthOrPercentage, Integer};
|
|
|
|
diff --git a/servo/components/style/values/specified/length.rs b/servo/components/style/values/specified/length.rs
|
|
--- a/servo/components/style/values/specified/length.rs
|
|
+++ b/servo/components/style/values/specified/length.rs
|
|
@@ -7,17 +7,17 @@
|
|
//! [length]: https://drafts.csswg.org/css-values/#lengths
|
|
|
|
use app_units::Au;
|
|
use cssparser::{Parser, Token, BasicParseError};
|
|
use euclid::Size2D;
|
|
use font_metrics::FontMetricsQueryResult;
|
|
use parser::{Parse, ParserContext};
|
|
use std::{cmp, fmt, mem};
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::ops::{Add, Mul};
|
|
use style_traits::{ToCss, ParseError, StyleParseError};
|
|
use style_traits::values::specified::AllowedNumericType;
|
|
use stylesheets::CssRuleType;
|
|
use super::{AllowQuirks, Number, ToComputedValue, Percentage};
|
|
use values::{Auto, CSSFloat, Either, FONT_MEDIUM_PX, None_, Normal};
|
|
use values::{ExtremumLength, serialize_dimension};
|
|
use values::computed::{self, CSSPixelLength, Context};
|
|
diff --git a/servo/components/style/values/specified/mod.rs b/servo/components/style/values/specified/mod.rs
|
|
--- a/servo/components/style/values/specified/mod.rs
|
|
+++ b/servo/components/style/values/specified/mod.rs
|
|
@@ -6,17 +6,17 @@
|
|
//!
|
|
//! TODO(emilio): Enhance docs.
|
|
|
|
use Namespace;
|
|
use context::QuirksMode;
|
|
use cssparser::{Parser, Token, serialize_identifier, BasicParseError};
|
|
use parser::{ParserContext, Parse};
|
|
use self::url::SpecifiedUrl;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::f32;
|
|
use std::fmt;
|
|
use style_traits::{ToCss, ParseError, StyleParseError};
|
|
use style_traits::values::specified::AllowedNumericType;
|
|
use super::{Auto, CSSFloat, CSSInteger, Either, None_};
|
|
use super::computed::{Context, ToComputedValue};
|
|
use super::generics::{GreaterThanOrEqualToOne, NonNegative};
|
|
use super::generics::grid::{GridLine as GenericGridLine, TrackBreadth as GenericTrackBreadth};
|
|
diff --git a/servo/components/style/values/specified/percentage.rs b/servo/components/style/values/specified/percentage.rs
|
|
--- a/servo/components/style/values/specified/percentage.rs
|
|
+++ b/servo/components/style/values/specified/percentage.rs
|
|
@@ -1,17 +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/. */
|
|
|
|
//! Specified percentages.
|
|
|
|
use cssparser::{BasicParseError, Parser, Token};
|
|
use parser::{Parse, ParserContext};
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::fmt;
|
|
use style_traits::{ParseError, ToCss};
|
|
use style_traits::values::specified::AllowedNumericType;
|
|
use values::{CSSFloat, serialize_percentage};
|
|
use values::computed::{Context, ToComputedValue};
|
|
use values::computed::percentage::Percentage as ComputedPercentage;
|
|
use values::specified::calc::CalcNode;
|
|
|
|
diff --git a/servo/components/style/values/specified/text.rs b/servo/components/style/values/specified/text.rs
|
|
--- a/servo/components/style/values/specified/text.rs
|
|
+++ b/servo/components/style/values/specified/text.rs
|
|
@@ -2,17 +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/. */
|
|
|
|
//! Specified types for text properties.
|
|
|
|
use cssparser::Parser;
|
|
use parser::{Parse, ParserContext};
|
|
use selectors::parser::SelectorParseError;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use style_traits::ParseError;
|
|
use values::computed::{Context, ToComputedValue};
|
|
use values::computed::text::LineHeight as ComputedLineHeight;
|
|
use values::generics::text::InitialLetter as GenericInitialLetter;
|
|
use values::generics::text::LineHeight as GenericLineHeight;
|
|
use values::generics::text::Spacing;
|
|
use values::specified::{AllowQuirks, Integer, NonNegativeNumber, Number};
|
|
use values::specified::length::{FontRelativeLength, Length, LengthOrPercentage, NoCalcLength};
|
|
diff --git a/servo/components/style/values/specified/time.rs b/servo/components/style/values/specified/time.rs
|
|
--- a/servo/components/style/values/specified/time.rs
|
|
+++ b/servo/components/style/values/specified/time.rs
|
|
@@ -1,17 +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/. */
|
|
|
|
//! Specified time values.
|
|
|
|
use cssparser::{Parser, Token, BasicParseError};
|
|
use parser::{ParserContext, Parse};
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::fmt;
|
|
use style_traits::{ToCss, ParseError, StyleParseError};
|
|
use style_traits::values::specified::AllowedNumericType;
|
|
use values::CSSFloat;
|
|
use values::computed::{Context, ToComputedValue};
|
|
use values::computed::time::Time as ComputedTime;
|
|
use values::specified::calc::CalcNode;
|
|
|
|
diff --git a/servo/components/style_traits/viewport.rs b/servo/components/style_traits/viewport.rs
|
|
--- a/servo/components/style_traits/viewport.rs
|
|
+++ b/servo/components/style_traits/viewport.rs
|
|
@@ -2,17 +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/. */
|
|
|
|
//! Helper types for the `@viewport` rule.
|
|
|
|
use {CSSPixel, PinchZoomFactor, ParseError};
|
|
use cssparser::{Parser, ToCss, ParseError as CssParseError, BasicParseError};
|
|
use euclid::TypedSize2D;
|
|
-use std::ascii::AsciiExt;
|
|
+#[allow(unused_imports)] use std::ascii::AsciiExt;
|
|
use std::fmt;
|
|
|
|
define_css_keyword_enum!(UserZoom:
|
|
"zoom" => Zoom,
|
|
"fixed" => Fixed);
|
|
|
|
define_css_keyword_enum!(Orientation:
|
|
"auto" => Auto,
|