|
1 |
|
2 # HG changeset patch |
|
3 # User Simon Sapin <simon.sapin@exyr.org> |
|
4 # Date 1510231769 21600 |
|
5 # Node ID 3242ac6fdb3879f723145e6b07fff04a5c960d1e |
|
6 # Parent bf63b9d8f2410464d5f2526588e380f934e937cc |
|
7 servo: Merge #19162 - Allow unused imports for AsciiExt in style code (from emilio:ascii-ext); r=emilio |
|
8 |
|
9 See #19128, this part is cherry-picked so Gecko can build with rust nightly. |
|
10 |
|
11 Source-Repo: https://github.com/servo/servo |
|
12 Source-Revision: e7a654dd13f589e127193267bcb576ffd661c11d |
|
13 |
|
14 diff --git a/servo/components/gfx/font.rs b/servo/components/gfx/font.rs |
|
15 --- a/servo/components/gfx/font.rs |
|
16 +++ b/servo/components/gfx/font.rs |
|
17 @@ -5,17 +5,17 @@ |
|
18 use app_units::Au; |
|
19 use euclid::{Point2D, Rect, Size2D}; |
|
20 use font_template::FontTemplateDescriptor; |
|
21 use ordered_float::NotNaN; |
|
22 use platform::font::{FontHandle, FontTable}; |
|
23 use platform::font_context::FontContextHandle; |
|
24 use platform::font_template::FontTemplateData; |
|
25 use smallvec::SmallVec; |
|
26 -use std::ascii::AsciiExt; |
|
27 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
28 use std::borrow::ToOwned; |
|
29 use std::cell::RefCell; |
|
30 use std::collections::HashMap; |
|
31 use std::rc::Rc; |
|
32 use std::str; |
|
33 use std::sync::Arc; |
|
34 use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering}; |
|
35 use style::computed_values::{font_stretch, font_variant_caps, font_weight}; |
|
36 diff --git a/servo/components/net/fetch/cors_cache.rs b/servo/components/net/fetch/cors_cache.rs |
|
37 --- a/servo/components/net/fetch/cors_cache.rs |
|
38 +++ b/servo/components/net/fetch/cors_cache.rs |
|
39 @@ -7,17 +7,17 @@ |
|
40 //! For stuff involving `<img>`, `<iframe>`, `<form>`, etc please check what |
|
41 //! the request mode should be and compare with the fetch spec |
|
42 //! This library will eventually become the core of the Fetch crate |
|
43 //! with CORSRequest being expanded into FetchRequest (etc) |
|
44 |
|
45 use hyper::method::Method; |
|
46 use net_traits::request::{CredentialsMode, Origin, Request}; |
|
47 use servo_url::ServoUrl; |
|
48 -use std::ascii::AsciiExt; |
|
49 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
50 use time::{self, Timespec}; |
|
51 |
|
52 /// Union type for CORS cache entries |
|
53 /// |
|
54 /// Each entry might pertain to a header or method |
|
55 #[derive(Clone, Debug)] |
|
56 pub enum HeaderOrMethod { |
|
57 HeaderData(String), |
|
58 diff --git a/servo/components/net/fetch/methods.rs b/servo/components/net/fetch/methods.rs |
|
59 --- a/servo/components/net/fetch/methods.rs |
|
60 +++ b/servo/components/net/fetch/methods.rs |
|
61 @@ -16,17 +16,17 @@ use hyper::method::Method; |
|
62 use hyper::mime::{Mime, SubLevel, TopLevel}; |
|
63 use hyper::status::StatusCode; |
|
64 use mime_guess::guess_mime_type; |
|
65 use net_traits::{FetchTaskTarget, NetworkError, ReferrerPolicy}; |
|
66 use net_traits::request::{CredentialsMode, Referrer, Request, RequestMode, ResponseTainting}; |
|
67 use net_traits::request::{Type, Origin, Window}; |
|
68 use net_traits::response::{Response, ResponseBody, ResponseType}; |
|
69 use servo_url::ServoUrl; |
|
70 -use std::ascii::AsciiExt; |
|
71 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
72 use std::borrow::Cow; |
|
73 use std::fmt; |
|
74 use std::fs::File; |
|
75 use std::io::Read; |
|
76 use std::mem; |
|
77 use std::str; |
|
78 use std::sync::Arc; |
|
79 use std::sync::mpsc::{Sender, Receiver}; |
|
80 diff --git a/servo/components/net/http_loader.rs b/servo/components/net/http_loader.rs |
|
81 --- a/servo/components/net/http_loader.rs |
|
82 +++ b/servo/components/net/http_loader.rs |
|
83 @@ -34,17 +34,17 @@ use log; |
|
84 use msg::constellation_msg::PipelineId; |
|
85 use net_traits::{CookieSource, FetchMetadata, NetworkError, ReferrerPolicy}; |
|
86 use net_traits::request::{CacheMode, CredentialsMode, Destination, Origin}; |
|
87 use net_traits::request::{RedirectMode, Referrer, Request, RequestMode}; |
|
88 use net_traits::request::{ResponseTainting, ServiceWorkersMode, Type}; |
|
89 use net_traits::response::{HttpsState, Response, ResponseBody, ResponseType}; |
|
90 use resource_thread::AuthCache; |
|
91 use servo_url::{ImmutableOrigin, ServoUrl}; |
|
92 -use std::ascii::AsciiExt; |
|
93 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
94 use std::collections::HashSet; |
|
95 use std::error::Error; |
|
96 use std::io::{self, Read, Write}; |
|
97 use std::iter::FromIterator; |
|
98 use std::mem; |
|
99 use std::ops::Deref; |
|
100 use std::sync::RwLock; |
|
101 use std::sync::mpsc::{channel, Sender}; |
|
102 diff --git a/servo/components/net/websocket_loader.rs b/servo/components/net/websocket_loader.rs |
|
103 --- a/servo/components/net/websocket_loader.rs |
|
104 +++ b/servo/components/net/websocket_loader.rs |
|
105 @@ -14,17 +14,17 @@ use hyper::http::h1::{LINE_ENDING, parse |
|
106 use hyper::method::Method; |
|
107 use hyper::net::HttpStream; |
|
108 use hyper::status::StatusCode; |
|
109 use hyper::version::HttpVersion; |
|
110 use net_traits::{CookieSource, MessageData, NetworkError, WebSocketCommunicate, WebSocketConnectData}; |
|
111 use net_traits::{WebSocketDomAction, WebSocketNetworkEvent}; |
|
112 use net_traits::request::{Destination, Type}; |
|
113 use servo_url::ServoUrl; |
|
114 -use std::ascii::AsciiExt; |
|
115 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
116 use std::io::{self, Write}; |
|
117 use std::net::TcpStream; |
|
118 use std::sync::{Arc, Mutex}; |
|
119 use std::sync::atomic::{AtomicBool, Ordering}; |
|
120 use std::thread; |
|
121 use url::Position; |
|
122 use websocket::{Message, Receiver as WSReceiver, Sender as WSSender}; |
|
123 use websocket::header::{Origin, WebSocketAccept, WebSocketKey, WebSocketProtocol, WebSocketVersion}; |
|
124 diff --git a/servo/components/net_traits/response.rs b/servo/components/net_traits/response.rs |
|
125 --- a/servo/components/net_traits/response.rs |
|
126 +++ b/servo/components/net_traits/response.rs |
|
127 @@ -4,17 +4,17 @@ |
|
128 |
|
129 //! The [Response](https://fetch.spec.whatwg.org/#responses) object |
|
130 //! resulting from a [fetch operation](https://fetch.spec.whatwg.org/#concept-fetch) |
|
131 use {FetchMetadata, FilteredMetadata, Metadata, NetworkError, ReferrerPolicy}; |
|
132 use hyper::header::{AccessControlExposeHeaders, ContentType, Headers}; |
|
133 use hyper::status::StatusCode; |
|
134 use hyper_serde::Serde; |
|
135 use servo_url::ServoUrl; |
|
136 -use std::ascii::AsciiExt; |
|
137 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
138 use std::sync::{Arc, Mutex}; |
|
139 |
|
140 /// [Response type](https://fetch.spec.whatwg.org/#concept-response-type) |
|
141 #[derive(Clone, Debug, Deserialize, HeapSizeOf, PartialEq, Serialize)] |
|
142 pub enum ResponseType { |
|
143 Basic, |
|
144 Cors, |
|
145 Default, |
|
146 diff --git a/servo/components/script/dom/bindings/str.rs b/servo/components/script/dom/bindings/str.rs |
|
147 --- a/servo/components/script/dom/bindings/str.rs |
|
148 +++ b/servo/components/script/dom/bindings/str.rs |
|
149 @@ -2,17 +2,17 @@ |
|
150 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
151 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
152 |
|
153 //! The `ByteString` struct. |
|
154 |
|
155 use cssparser::CowRcStr; |
|
156 use html5ever::{LocalName, Namespace}; |
|
157 use servo_atoms::Atom; |
|
158 -use std::ascii::AsciiExt; |
|
159 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
160 use std::borrow::{Borrow, Cow, ToOwned}; |
|
161 use std::fmt; |
|
162 use std::hash::{Hash, Hasher}; |
|
163 use std::marker::PhantomData; |
|
164 use std::ops; |
|
165 use std::ops::{Deref, DerefMut}; |
|
166 use std::str; |
|
167 use std::str::{Bytes, FromStr}; |
|
168 diff --git a/servo/components/script/dom/blob.rs b/servo/components/script/dom/blob.rs |
|
169 --- a/servo/components/script/dom/blob.rs |
|
170 +++ b/servo/components/script/dom/blob.rs |
|
171 @@ -11,17 +11,17 @@ use dom::bindings::js::{JS, Root}; |
|
172 use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object}; |
|
173 use dom::bindings::str::DOMString; |
|
174 use dom::globalscope::GlobalScope; |
|
175 use dom_struct::dom_struct; |
|
176 use ipc_channel::ipc; |
|
177 use net_traits::{CoreResourceMsg, IpcSend}; |
|
178 use net_traits::blob_url_store::{BlobBuf, get_blob_origin}; |
|
179 use net_traits::filemanager_thread::{FileManagerThreadMsg, ReadFileProgress, RelativePos}; |
|
180 -use std::ascii::AsciiExt; |
|
181 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
182 use std::mem; |
|
183 use std::ops::Index; |
|
184 use std::path::PathBuf; |
|
185 use uuid::Uuid; |
|
186 |
|
187 /// File-based blob |
|
188 #[derive(JSTraceable)] |
|
189 pub struct FileBlob { |
|
190 diff --git a/servo/components/script/dom/cssstyledeclaration.rs b/servo/components/script/dom/cssstyledeclaration.rs |
|
191 --- a/servo/components/script/dom/cssstyledeclaration.rs |
|
192 +++ b/servo/components/script/dom/cssstyledeclaration.rs |
|
193 @@ -11,17 +11,17 @@ use dom::bindings::reflector::{DomObject |
|
194 use dom::bindings::str::DOMString; |
|
195 use dom::cssrule::CSSRule; |
|
196 use dom::element::Element; |
|
197 use dom::node::{Node, window_from_node, document_from_node}; |
|
198 use dom::window::Window; |
|
199 use dom_struct::dom_struct; |
|
200 use servo_arc::Arc; |
|
201 use servo_url::ServoUrl; |
|
202 -use std::ascii::AsciiExt; |
|
203 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
204 use style::attr::AttrValue; |
|
205 use style::properties::{Importance, PropertyDeclarationBlock, PropertyId, LonghandId, ShorthandId}; |
|
206 use style::properties::{parse_one_declaration_into, parse_style_attribute, SourcePropertyDeclaration}; |
|
207 use style::selector_parser::PseudoElement; |
|
208 use style::shared_lock::Locked; |
|
209 use style_traits::{PARSING_MODE_DEFAULT, ToCss}; |
|
210 |
|
211 // http://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface |
|
212 diff --git a/servo/components/script/dom/document.rs b/servo/components/script/dom/document.rs |
|
213 --- a/servo/components/script/dom/document.rs |
|
214 +++ b/servo/components/script/dom/document.rs |
|
215 @@ -118,17 +118,17 @@ use script_traits::{AnimationState, Comp |
|
216 use script_traits::{MouseButton, MouseEventType, MozBrowserEvent}; |
|
217 use script_traits::{MsDuration, ScriptMsg, TouchpadPressurePhase}; |
|
218 use script_traits::{TouchEventType, TouchId}; |
|
219 use script_traits::UntrustedNodeAddress; |
|
220 use servo_arc::Arc; |
|
221 use servo_atoms::Atom; |
|
222 use servo_config::prefs::PREFS; |
|
223 use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl}; |
|
224 -use std::ascii::AsciiExt; |
|
225 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
226 use std::borrow::ToOwned; |
|
227 use std::cell::{Cell, Ref, RefMut}; |
|
228 use std::collections::{HashMap, HashSet, VecDeque}; |
|
229 use std::collections::hash_map::Entry::{Occupied, Vacant}; |
|
230 use std::default::Default; |
|
231 use std::iter::once; |
|
232 use std::mem; |
|
233 use std::rc::Rc; |
|
234 diff --git a/servo/components/script/dom/element.rs b/servo/components/script/dom/element.rs |
|
235 --- a/servo/components/script/dom/element.rs |
|
236 +++ b/servo/components/script/dom/element.rs |
|
237 @@ -90,17 +90,17 @@ use script_layout_interface::message::Re |
|
238 use script_thread::ScriptThread; |
|
239 use selectors::attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity}; |
|
240 use selectors::matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext, MatchingMode}; |
|
241 use selectors::matching::{HAS_EDGE_CHILD_SELECTOR, HAS_SLOW_SELECTOR, HAS_SLOW_SELECTOR_LATER_SIBLINGS}; |
|
242 use selectors::matching::{RelevantLinkStatus, matches_selector_list}; |
|
243 use selectors::sink::Push; |
|
244 use servo_arc::Arc; |
|
245 use servo_atoms::Atom; |
|
246 -use std::ascii::AsciiExt; |
|
247 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
248 use std::borrow::Cow; |
|
249 use std::cell::{Cell, Ref}; |
|
250 use std::convert::TryFrom; |
|
251 use std::default::Default; |
|
252 use std::fmt; |
|
253 use std::mem; |
|
254 use std::rc::Rc; |
|
255 use style::CaseSensitivityExt; |
|
256 diff --git a/servo/components/script/dom/htmlelement.rs b/servo/components/script/dom/htmlelement.rs |
|
257 --- a/servo/components/script/dom/htmlelement.rs |
|
258 +++ b/servo/components/script/dom/htmlelement.rs |
|
259 @@ -25,17 +25,17 @@ use dom::htmlhtmlelement::HTMLHtmlElemen |
|
260 use dom::htmlinputelement::HTMLInputElement; |
|
261 use dom::htmllabelelement::HTMLLabelElement; |
|
262 use dom::node::{Node, SEQUENTIALLY_FOCUSABLE}; |
|
263 use dom::node::{document_from_node, window_from_node}; |
|
264 use dom::nodelist::NodeList; |
|
265 use dom::virtualmethods::VirtualMethods; |
|
266 use dom_struct::dom_struct; |
|
267 use html5ever::{LocalName, Prefix}; |
|
268 -use std::ascii::AsciiExt; |
|
269 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
270 use std::default::Default; |
|
271 use std::rc::Rc; |
|
272 use style::attr::AttrValue; |
|
273 use style::element_state::*; |
|
274 |
|
275 #[dom_struct] |
|
276 pub struct HTMLElement { |
|
277 element: Element, |
|
278 diff --git a/servo/components/script/dom/htmllinkelement.rs b/servo/components/script/dom/htmllinkelement.rs |
|
279 --- a/servo/components/script/dom/htmllinkelement.rs |
|
280 +++ b/servo/components/script/dom/htmllinkelement.rs |
|
281 @@ -21,17 +21,17 @@ use dom::htmlelement::HTMLElement; |
|
282 use dom::node::{Node, UnbindContext, document_from_node, window_from_node}; |
|
283 use dom::stylesheet::StyleSheet as DOMStyleSheet; |
|
284 use dom::virtualmethods::VirtualMethods; |
|
285 use dom_struct::dom_struct; |
|
286 use html5ever::{LocalName, Prefix}; |
|
287 use net_traits::ReferrerPolicy; |
|
288 use script_traits::{MozBrowserEvent, ScriptMsg}; |
|
289 use servo_arc::Arc; |
|
290 -use std::ascii::AsciiExt; |
|
291 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
292 use std::borrow::ToOwned; |
|
293 use std::cell::Cell; |
|
294 use std::default::Default; |
|
295 use style::attr::AttrValue; |
|
296 use style::media_queries::parse_media_query_list; |
|
297 use style::parser::ParserContext as CssParserContext; |
|
298 use style::str::HTML_SPACE_CHARACTERS; |
|
299 use style::stylesheets::{CssRuleType, Stylesheet}; |
|
300 diff --git a/servo/components/script/dom/htmlmetaelement.rs b/servo/components/script/dom/htmlmetaelement.rs |
|
301 --- a/servo/components/script/dom/htmlmetaelement.rs |
|
302 +++ b/servo/components/script/dom/htmlmetaelement.rs |
|
303 @@ -17,17 +17,17 @@ use dom::htmlelement::HTMLElement; |
|
304 use dom::htmlheadelement::HTMLHeadElement; |
|
305 use dom::node::{Node, UnbindContext, document_from_node, window_from_node}; |
|
306 use dom::virtualmethods::VirtualMethods; |
|
307 use dom_struct::dom_struct; |
|
308 use html5ever::{LocalName, Prefix}; |
|
309 use parking_lot::RwLock; |
|
310 use servo_arc::Arc; |
|
311 use servo_config::prefs::PREFS; |
|
312 -use std::ascii::AsciiExt; |
|
313 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
314 use std::sync::atomic::AtomicBool; |
|
315 use style::attr::AttrValue; |
|
316 use style::media_queries::MediaList; |
|
317 use style::str::HTML_SPACE_CHARACTERS; |
|
318 use style::stylesheets::{Stylesheet, StylesheetContents, CssRule, CssRules, Origin, ViewportRule}; |
|
319 |
|
320 #[dom_struct] |
|
321 pub struct HTMLMetaElement { |
|
322 diff --git a/servo/components/script/dom/htmlscriptelement.rs b/servo/components/script/dom/htmlscriptelement.rs |
|
323 --- a/servo/components/script/dom/htmlscriptelement.rs |
|
324 +++ b/servo/components/script/dom/htmlscriptelement.rs |
|
325 @@ -31,17 +31,17 @@ use ipc_channel::ipc; |
|
326 use ipc_channel::router::ROUTER; |
|
327 use js::jsval::UndefinedValue; |
|
328 use net_traits::{FetchMetadata, FetchResponseListener, Metadata, NetworkError}; |
|
329 use net_traits::request::{CorsSettings, CredentialsMode, Destination, RequestInit, RequestMode, Type as RequestType}; |
|
330 use network_listener::{NetworkListener, PreInvoke}; |
|
331 use servo_atoms::Atom; |
|
332 use servo_config::opts; |
|
333 use servo_url::ServoUrl; |
|
334 -use std::ascii::AsciiExt; |
|
335 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
336 use std::cell::Cell; |
|
337 use std::fs::File; |
|
338 use std::io::{Read, Write}; |
|
339 use std::path::PathBuf; |
|
340 use std::process::{Command, Stdio}; |
|
341 use std::sync::{Arc, Mutex}; |
|
342 use style::str::{HTML_SPACE_CHARACTERS, StaticStringVec}; |
|
343 use uuid::Uuid; |
|
344 diff --git a/servo/components/script/dom/macros.rs b/servo/components/script/dom/macros.rs |
|
345 --- a/servo/components/script/dom/macros.rs |
|
346 +++ b/servo/components/script/dom/macros.rs |
|
347 @@ -144,17 +144,17 @@ macro_rules! make_string_or_document_url |
|
348 ); |
|
349 |
|
350 #[macro_export] |
|
351 macro_rules! make_enumerated_getter( |
|
352 ( $attr:ident, $htmlname:tt, $default:expr, $($choices: pat)|+) => ( |
|
353 fn $attr(&self) -> DOMString { |
|
354 use dom::bindings::inheritance::Castable; |
|
355 use dom::element::Element; |
|
356 - use std::ascii::AsciiExt; |
|
357 + #[allow(unused_imports)] use std::ascii::AsciiExt; |
|
358 let element = self.upcast::<Element>(); |
|
359 let mut val = element.get_string_attribute(&local_name!($htmlname)); |
|
360 val.make_ascii_lowercase(); |
|
361 // https://html.spec.whatwg.org/multipage/#attr-fs-method |
|
362 match &*val { |
|
363 $($choices)|+ => val, |
|
364 _ => DOMString::from($default) |
|
365 } |
|
366 diff --git a/servo/components/script/dom/namednodemap.rs b/servo/components/script/dom/namednodemap.rs |
|
367 --- a/servo/components/script/dom/namednodemap.rs |
|
368 +++ b/servo/components/script/dom/namednodemap.rs |
|
369 @@ -10,17 +10,17 @@ use dom::bindings::error::{Error, Fallib |
|
370 use dom::bindings::js::{JS, Root}; |
|
371 use dom::bindings::reflector::{Reflector, reflect_dom_object}; |
|
372 use dom::bindings::str::DOMString; |
|
373 use dom::bindings::xmlname::namespace_from_domstring; |
|
374 use dom::element::Element; |
|
375 use dom::window::Window; |
|
376 use dom_struct::dom_struct; |
|
377 use html5ever::LocalName; |
|
378 -use std::ascii::AsciiExt; |
|
379 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
380 |
|
381 #[dom_struct] |
|
382 pub struct NamedNodeMap { |
|
383 reflector_: Reflector, |
|
384 owner: JS<Element>, |
|
385 } |
|
386 |
|
387 impl NamedNodeMap { |
|
388 diff --git a/servo/components/script/dom/serviceworkercontainer.rs b/servo/components/script/dom/serviceworkercontainer.rs |
|
389 --- a/servo/components/script/dom/serviceworkercontainer.rs |
|
390 +++ b/servo/components/script/dom/serviceworkercontainer.rs |
|
391 @@ -11,17 +11,17 @@ use dom::bindings::str::USVString; |
|
392 use dom::client::Client; |
|
393 use dom::eventtarget::EventTarget; |
|
394 use dom::globalscope::GlobalScope; |
|
395 use dom::promise::Promise; |
|
396 use dom::serviceworker::ServiceWorker; |
|
397 use dom_struct::dom_struct; |
|
398 use script_thread::ScriptThread; |
|
399 use serviceworkerjob::{Job, JobType}; |
|
400 -use std::ascii::AsciiExt; |
|
401 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
402 use std::default::Default; |
|
403 use std::rc::Rc; |
|
404 |
|
405 #[dom_struct] |
|
406 pub struct ServiceWorkerContainer { |
|
407 eventtarget: EventTarget, |
|
408 controller: MutNullableJS<ServiceWorker>, |
|
409 client: JS<Client> |
|
410 diff --git a/servo/components/script/dom/servoparser/async_html.rs b/servo/components/script/dom/servoparser/async_html.rs |
|
411 --- a/servo/components/script/dom/servoparser/async_html.rs |
|
412 +++ b/servo/components/script/dom/servoparser/async_html.rs |
|
413 @@ -22,17 +22,17 @@ use dom::virtualmethods::vtable_for; |
|
414 use html5ever::{Attribute as HtmlAttribute, ExpandedName, LocalName, QualName}; |
|
415 use html5ever::buffer_queue::BufferQueue; |
|
416 use html5ever::tendril::{SendTendril, StrTendril, Tendril}; |
|
417 use html5ever::tendril::fmt::UTF8; |
|
418 use html5ever::tokenizer::{Tokenizer as HtmlTokenizer, TokenizerOpts, TokenizerResult}; |
|
419 use html5ever::tree_builder::{ElementFlags, NodeOrText as HtmlNodeOrText, NextParserState, QuirksMode, TreeSink}; |
|
420 use html5ever::tree_builder::{TreeBuilder, TreeBuilderOpts}; |
|
421 use servo_url::ServoUrl; |
|
422 -use std::ascii::AsciiExt; |
|
423 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
424 use std::borrow::Cow; |
|
425 use std::cell::Cell; |
|
426 use std::collections::HashMap; |
|
427 use std::collections::vec_deque::VecDeque; |
|
428 use std::sync::mpsc::{channel, Receiver, Sender}; |
|
429 use std::thread; |
|
430 use style::context::QuirksMode as ServoQuirksMode; |
|
431 |
|
432 diff --git a/servo/components/script/dom/servoparser/mod.rs b/servo/components/script/dom/servoparser/mod.rs |
|
433 --- a/servo/components/script/dom/servoparser/mod.rs |
|
434 +++ b/servo/components/script/dom/servoparser/mod.rs |
|
435 @@ -41,17 +41,17 @@ use net_traits::{FetchMetadata, FetchRes |
|
436 use network_listener::PreInvoke; |
|
437 use profile_traits::time::{TimerMetadata, TimerMetadataFrameType}; |
|
438 use profile_traits::time::{TimerMetadataReflowType, ProfilerCategory, profile}; |
|
439 use script_thread::ScriptThread; |
|
440 use script_traits::DocumentActivity; |
|
441 use servo_config::prefs::PREFS; |
|
442 use servo_config::resource_files::read_resource_file; |
|
443 use servo_url::ServoUrl; |
|
444 -use std::ascii::AsciiExt; |
|
445 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
446 use std::borrow::Cow; |
|
447 use std::cell::Cell; |
|
448 use std::mem; |
|
449 use style::context::QuirksMode as ServoQuirksMode; |
|
450 |
|
451 mod async_html; |
|
452 mod html; |
|
453 mod xml; |
|
454 diff --git a/servo/components/script/dom/websocket.rs b/servo/components/script/dom/websocket.rs |
|
455 --- a/servo/components/script/dom/websocket.rs |
|
456 +++ b/servo/components/script/dom/websocket.rs |
|
457 @@ -27,17 +27,17 @@ use js::jsapi::JSAutoCompartment; |
|
458 use js::jsval::UndefinedValue; |
|
459 use js::typedarray::{ArrayBuffer, CreateWith}; |
|
460 use net_traits::{WebSocketCommunicate, WebSocketConnectData, WebSocketDomAction, WebSocketNetworkEvent}; |
|
461 use net_traits::CoreResourceMsg::WebsocketConnect; |
|
462 use net_traits::MessageData; |
|
463 use script_runtime::CommonScriptMsg; |
|
464 use script_runtime::ScriptThreadEventCategory::WebSocketEvent; |
|
465 use servo_url::ServoUrl; |
|
466 -use std::ascii::AsciiExt; |
|
467 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
468 use std::borrow::ToOwned; |
|
469 use std::cell::Cell; |
|
470 use std::ptr; |
|
471 use std::thread; |
|
472 use task::{TaskOnce, TaskCanceller}; |
|
473 use task_source::TaskSource; |
|
474 use task_source::networking::NetworkingTaskSource; |
|
475 |
|
476 diff --git a/servo/components/script/dom/window.rs b/servo/components/script/dom/window.rs |
|
477 --- a/servo/components/script/dom/window.rs |
|
478 +++ b/servo/components/script/dom/window.rs |
|
479 @@ -82,17 +82,17 @@ use script_traits::{ConstellationControl |
|
480 use script_traits::{ScriptToConstellationChan, ScriptMsg, ScrollState, TimerEvent, TimerEventId}; |
|
481 use script_traits::{TimerSchedulerMsg, UntrustedNodeAddress, WindowSizeData, WindowSizeType}; |
|
482 use script_traits::webdriver_msg::{WebDriverJSError, WebDriverJSResult}; |
|
483 use selectors::attr::CaseSensitivity; |
|
484 use servo_config::opts; |
|
485 use servo_config::prefs::PREFS; |
|
486 use servo_geometry::{f32_rect_to_au_rect, max_rect}; |
|
487 use servo_url::{Host, MutableOrigin, ImmutableOrigin, ServoUrl}; |
|
488 -use std::ascii::AsciiExt; |
|
489 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
490 use std::borrow::ToOwned; |
|
491 use std::cell::Cell; |
|
492 use std::collections::{HashMap, HashSet}; |
|
493 use std::collections::hash_map::Entry; |
|
494 use std::default::Default; |
|
495 use std::env; |
|
496 use std::fs; |
|
497 use std::io::{Write, stderr, stdout}; |
|
498 diff --git a/servo/components/script/dom/xmlhttprequest.rs b/servo/components/script/dom/xmlhttprequest.rs |
|
499 --- a/servo/components/script/dom/xmlhttprequest.rs |
|
500 +++ b/servo/components/script/dom/xmlhttprequest.rs |
|
501 @@ -57,17 +57,17 @@ use net_traits::{FetchResponseListener, |
|
502 use net_traits::CoreResourceMsg::Fetch; |
|
503 use net_traits::request::{CredentialsMode, Destination, RequestInit, RequestMode}; |
|
504 use net_traits::trim_http_whitespace; |
|
505 use network_listener::{NetworkListener, PreInvoke}; |
|
506 use script_traits::DocumentActivity; |
|
507 use servo_atoms::Atom; |
|
508 use servo_config::prefs::PREFS; |
|
509 use servo_url::ServoUrl; |
|
510 -use std::ascii::AsciiExt; |
|
511 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
512 use std::borrow::ToOwned; |
|
513 use std::cell::Cell; |
|
514 use std::default::Default; |
|
515 use std::str; |
|
516 use std::sync::{Arc, Mutex}; |
|
517 use task_source::networking::NetworkingTaskSource; |
|
518 use time; |
|
519 use timers::{OneshotTimerCallback, OneshotTimerHandle}; |
|
520 diff --git a/servo/components/selectors/attr.rs b/servo/components/selectors/attr.rs |
|
521 --- a/servo/components/selectors/attr.rs |
|
522 +++ b/servo/components/selectors/attr.rs |
|
523 @@ -1,15 +1,15 @@ |
|
524 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
525 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
526 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
527 |
|
528 use cssparser::ToCss; |
|
529 use parser::SelectorImpl; |
|
530 -use std::ascii::AsciiExt; |
|
531 +#[allow(unused_imports)] #[allow(unused_imports)] use std::ascii::AsciiExt; |
|
532 use std::fmt; |
|
533 |
|
534 #[derive(Clone, Eq, PartialEq)] |
|
535 pub struct AttrSelectorWithNamespace<Impl: SelectorImpl> { |
|
536 pub namespace: NamespaceConstraint<(Impl::NamespacePrefix, Impl::NamespaceUrl)>, |
|
537 pub local_name: Impl::LocalName, |
|
538 pub local_name_lower: Impl::LocalName, |
|
539 pub operation: ParsedAttrSelectorOperation<Impl::AttrValue>, |
|
540 diff --git a/servo/components/selectors/parser.rs b/servo/components/selectors/parser.rs |
|
541 --- a/servo/components/selectors/parser.rs |
|
542 +++ b/servo/components/selectors/parser.rs |
|
543 @@ -8,17 +8,17 @@ use bloom::BLOOM_HASH_MASK; |
|
544 use builder::{SelectorBuilder, SpecificityAndFlags}; |
|
545 use context::QuirksMode; |
|
546 use cssparser::{ParseError, BasicParseError, CowRcStr, Delimiter}; |
|
547 use cssparser::{Token, Parser as CssParser, parse_nth, ToCss, serialize_identifier, CssStringWriter}; |
|
548 use precomputed_hash::PrecomputedHash; |
|
549 use servo_arc::ThinArc; |
|
550 use sink::Push; |
|
551 use smallvec::SmallVec; |
|
552 -use std::ascii::AsciiExt; |
|
553 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
554 use std::borrow::{Borrow, Cow}; |
|
555 use std::fmt::{self, Display, Debug, Write}; |
|
556 use std::iter::Rev; |
|
557 use std::slice; |
|
558 use visitor::SelectorVisitor; |
|
559 |
|
560 /// A trait that represents a pseudo-element. |
|
561 pub trait PseudoElement : Sized + ToCss { |
|
562 diff --git a/servo/components/style/attr.rs b/servo/components/style/attr.rs |
|
563 --- a/servo/components/style/attr.rs |
|
564 +++ b/servo/components/style/attr.rs |
|
565 @@ -11,17 +11,17 @@ use app_units::Au; |
|
566 use cssparser::{self, Color, RGBA}; |
|
567 use euclid::num::Zero; |
|
568 use num_traits::ToPrimitive; |
|
569 use properties::PropertyDeclarationBlock; |
|
570 use selectors::attr::AttrSelectorOperation; |
|
571 use servo_arc::Arc; |
|
572 use servo_url::ServoUrl; |
|
573 use shared_lock::Locked; |
|
574 -use std::ascii::AsciiExt; |
|
575 +#[allow(unused_imports)] #[allow(unused_imports)] use std::ascii::AsciiExt; |
|
576 use std::str::FromStr; |
|
577 use str::{HTML_SPACE_CHARACTERS, read_exponent, read_fraction}; |
|
578 use str::{read_numbers, split_commas, split_html_space_chars}; |
|
579 use str::str_join; |
|
580 use values::specified::Length; |
|
581 |
|
582 // Duplicated from script::dom::values. |
|
583 const UNSIGNED_LONG_MAX: u32 = 2147483647; |
|
584 diff --git a/servo/components/style/counter_style/mod.rs b/servo/components/style/counter_style/mod.rs |
|
585 --- a/servo/components/style/counter_style/mod.rs |
|
586 +++ b/servo/components/style/counter_style/mod.rs |
|
587 @@ -10,17 +10,17 @@ use Atom; |
|
588 use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser}; |
|
589 use cssparser::{Parser, Token, serialize_identifier, BasicParseError, CowRcStr}; |
|
590 use error_reporting::{ContextualParseError, ParseErrorReporter}; |
|
591 #[cfg(feature = "gecko")] use gecko::rules::CounterStyleDescriptors; |
|
592 #[cfg(feature = "gecko")] use gecko_bindings::structs::nsCSSCounterDesc; |
|
593 use parser::{ParserContext, ParserErrorContext, Parse}; |
|
594 use selectors::parser::SelectorParseError; |
|
595 use shared_lock::{SharedRwLockReadGuard, ToCssWithGuard}; |
|
596 -use std::ascii::AsciiExt; |
|
597 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
598 use std::borrow::Cow; |
|
599 use std::fmt; |
|
600 use std::ops::Range; |
|
601 use style_traits::{Comma, OneOrMoreSeparated, ParseError, StyleParseError, ToCss}; |
|
602 use values::CustomIdent; |
|
603 |
|
604 /// Parse the prelude of an @counter-style rule |
|
605 pub fn parse_counter_style_name<'i, 't>(input: &mut Parser<'i, 't>) -> Result<CustomIdent, ParseError<'i>> { |
|
606 diff --git a/servo/components/style/custom_properties.rs b/servo/components/style/custom_properties.rs |
|
607 --- a/servo/components/style/custom_properties.rs |
|
608 +++ b/servo/components/style/custom_properties.rs |
|
609 @@ -9,17 +9,17 @@ |
|
610 use Atom; |
|
611 use cssparser::{Delimiter, Parser, ParserInput, SourcePosition, Token, TokenSerializationType}; |
|
612 use parser::ParserContext; |
|
613 use precomputed_hash::PrecomputedHash; |
|
614 use properties::{CSSWideKeyword, DeclaredValue}; |
|
615 use selector_map::{PrecomputedHashSet, PrecomputedHashMap}; |
|
616 use selectors::parser::SelectorParseError; |
|
617 use servo_arc::Arc; |
|
618 -use std::ascii::AsciiExt; |
|
619 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
620 use std::borrow::{Borrow, Cow}; |
|
621 use std::fmt; |
|
622 use std::hash::Hash; |
|
623 use style_traits::{ToCss, StyleParseError, ParseError}; |
|
624 |
|
625 /// A custom property name is just an `Atom`. |
|
626 /// |
|
627 /// Note that this does not include the `--` prefix |
|
628 diff --git a/servo/components/style/gecko/generated/pseudo_element_definition.rs b/servo/components/style/gecko/generated/pseudo_element_definition.rs |
|
629 --- a/servo/components/style/gecko/generated/pseudo_element_definition.rs |
|
630 +++ b/servo/components/style/gecko/generated/pseudo_element_definition.rs |
|
631 @@ -1262,17 +1262,17 @@ None |
|
632 /// user-agent stylesheet. |
|
633 /// |
|
634 /// If we're not in a user-agent stylesheet, we will never parse anonymous |
|
635 /// box pseudo-elements. |
|
636 /// |
|
637 /// Returns `None` if the pseudo-element is not recognised. |
|
638 #[inline] |
|
639 pub fn from_slice(s: &str, in_ua_stylesheet: bool) -> Option<Self> { |
|
640 - use std::ascii::AsciiExt; |
|
641 + #[allow(unused_imports)] #[allow(unused_imports)] use std::ascii::AsciiExt; |
|
642 |
|
643 // We don't need to support tree pseudos because functional |
|
644 // pseudo-elements needs arguments, and thus should be created |
|
645 // via other methods. |
|
646 if in_ua_stylesheet || PseudoElement::After.exposed_in_non_ua_sheets() { |
|
647 if s.eq_ignore_ascii_case("after") { |
|
648 return Some(PseudoElement::After); |
|
649 } |
|
650 @@ -1632,17 +1632,17 @@ None |
|
651 } |
|
652 |
|
653 /// Constructs a tree pseudo-element from the given name and arguments. |
|
654 /// "name" must start with "-moz-tree-". |
|
655 /// |
|
656 /// Returns `None` if the pseudo-element is not recognized. |
|
657 #[inline] |
|
658 pub fn tree_pseudo_element(name: &str, args: Box<[String]>) -> Option<Self> { |
|
659 - use std::ascii::AsciiExt; |
|
660 + #[allow(unused_imports)] use std::ascii::AsciiExt; |
|
661 debug_assert!(name.starts_with("-moz-tree-")); |
|
662 let tree_part = &name[10..]; |
|
663 if tree_part.eq_ignore_ascii_case("column") { |
|
664 return Some(PseudoElement::MozTreeColumn(args)); |
|
665 } |
|
666 if tree_part.eq_ignore_ascii_case("row") { |
|
667 return Some(PseudoElement::MozTreeRow(args)); |
|
668 } |
|
669 diff --git a/servo/components/style/gecko/pseudo_element_definition.mako.rs b/servo/components/style/gecko/pseudo_element_definition.mako.rs |
|
670 --- a/servo/components/style/gecko/pseudo_element_definition.mako.rs |
|
671 +++ b/servo/components/style/gecko/pseudo_element_definition.mako.rs |
|
672 @@ -181,17 +181,17 @@ impl PseudoElement { |
|
673 /// user-agent stylesheet. |
|
674 /// |
|
675 /// If we're not in a user-agent stylesheet, we will never parse anonymous |
|
676 /// box pseudo-elements. |
|
677 /// |
|
678 /// Returns `None` if the pseudo-element is not recognised. |
|
679 #[inline] |
|
680 pub fn from_slice(s: &str, in_ua_stylesheet: bool) -> Option<Self> { |
|
681 - use std::ascii::AsciiExt; |
|
682 + #[allow(unused_imports)] #[allow(unused_imports)] use std::ascii::AsciiExt; |
|
683 |
|
684 // We don't need to support tree pseudos because functional |
|
685 // pseudo-elements needs arguments, and thus should be created |
|
686 // via other methods. |
|
687 % for pseudo in SIMPLE_PSEUDOS: |
|
688 if in_ua_stylesheet || ${pseudo_element_variant(pseudo)}.exposed_in_non_ua_sheets() { |
|
689 if s.eq_ignore_ascii_case("${pseudo.value[1:]}") { |
|
690 return Some(${pseudo_element_variant(pseudo)}); |
|
691 @@ -203,17 +203,17 @@ impl PseudoElement { |
|
692 } |
|
693 |
|
694 /// Constructs a tree pseudo-element from the given name and arguments. |
|
695 /// "name" must start with "-moz-tree-". |
|
696 /// |
|
697 /// Returns `None` if the pseudo-element is not recognized. |
|
698 #[inline] |
|
699 pub fn tree_pseudo_element(name: &str, args: Box<[String]>) -> Option<Self> { |
|
700 - use std::ascii::AsciiExt; |
|
701 + #[allow(unused_imports)] use std::ascii::AsciiExt; |
|
702 debug_assert!(name.starts_with("-moz-tree-")); |
|
703 let tree_part = &name[10..]; |
|
704 % for pseudo in TREE_PSEUDOS: |
|
705 if tree_part.eq_ignore_ascii_case("${pseudo.value[11:]}") { |
|
706 return Some(${pseudo_element_variant(pseudo, "args")}); |
|
707 } |
|
708 % endfor |
|
709 None |
|
710 diff --git a/servo/components/style/gecko_string_cache/mod.rs b/servo/components/style/gecko_string_cache/mod.rs |
|
711 --- a/servo/components/style/gecko_string_cache/mod.rs |
|
712 +++ b/servo/components/style/gecko_string_cache/mod.rs |
|
713 @@ -8,17 +8,17 @@ |
|
714 |
|
715 use gecko_bindings::bindings::Gecko_AddRefAtom; |
|
716 use gecko_bindings::bindings::Gecko_Atomize; |
|
717 use gecko_bindings::bindings::Gecko_Atomize16; |
|
718 use gecko_bindings::bindings::Gecko_ReleaseAtom; |
|
719 use gecko_bindings::structs::{nsIAtom, nsIAtom_AtomKind}; |
|
720 use nsstring::{nsAString, nsString}; |
|
721 use precomputed_hash::PrecomputedHash; |
|
722 -use std::ascii::AsciiExt; |
|
723 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
724 use std::borrow::{Cow, Borrow}; |
|
725 use std::char::{self, DecodeUtf16}; |
|
726 use std::fmt::{self, Write}; |
|
727 use std::hash::{Hash, Hasher}; |
|
728 use std::iter::Cloned; |
|
729 use std::mem; |
|
730 use std::ops::Deref; |
|
731 use std::slice; |
|
732 diff --git a/servo/components/style/properties/longhand/font.mako.rs b/servo/components/style/properties/longhand/font.mako.rs |
|
733 --- a/servo/components/style/properties/longhand/font.mako.rs |
|
734 +++ b/servo/components/style/properties/longhand/font.mako.rs |
|
735 @@ -2137,17 +2137,17 @@ https://drafts.csswg.org/css-fonts-4/#lo |
|
736 SpecifiedValue::Normal |
|
737 } |
|
738 |
|
739 impl ToComputedValue for SpecifiedValue { |
|
740 type ComputedValue = computed_value::T; |
|
741 |
|
742 #[inline] |
|
743 fn to_computed_value(&self, _context: &Context) -> computed_value::T { |
|
744 - use std::ascii::AsciiExt; |
|
745 + #[allow(unused_imports)] #[allow(unused_imports)] use std::ascii::AsciiExt; |
|
746 match *self { |
|
747 SpecifiedValue::Normal => computed_value::T(0), |
|
748 SpecifiedValue::Override(ref lang) => { |
|
749 if lang.is_empty() || lang.len() > 4 || !lang.is_ascii() { |
|
750 return computed_value::T(0) |
|
751 } |
|
752 let mut computed_lang = lang.clone(); |
|
753 while computed_lang.len() < 4 { |
|
754 diff --git a/servo/components/style/properties/longhand/pointing.mako.rs b/servo/components/style/properties/longhand/pointing.mako.rs |
|
755 --- a/servo/components/style/properties/longhand/pointing.mako.rs |
|
756 +++ b/servo/components/style/properties/longhand/pointing.mako.rs |
|
757 @@ -85,17 +85,17 @@ |
|
758 images: vec![], |
|
759 keyword: computed_value::Keyword::Auto |
|
760 } |
|
761 } |
|
762 |
|
763 impl Parse for computed_value::Keyword { |
|
764 fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>) |
|
765 -> Result<computed_value::Keyword, ParseError<'i>> { |
|
766 - use std::ascii::AsciiExt; |
|
767 + #[allow(unused_imports)] use std::ascii::AsciiExt; |
|
768 use style_traits::cursor::Cursor; |
|
769 let ident = input.expect_ident()?; |
|
770 if ident.eq_ignore_ascii_case("auto") { |
|
771 Ok(computed_value::Keyword::Auto) |
|
772 } else { |
|
773 Cursor::from_css_keyword(&ident) |
|
774 .map(computed_value::Keyword::Cursor) |
|
775 .map_err(|()| SelectorParseError::UnexpectedIdent(ident.clone()).into()) |
|
776 diff --git a/servo/components/style/servo/selector_parser.rs b/servo/components/style/servo/selector_parser.rs |
|
777 --- a/servo/components/style/servo/selector_parser.rs |
|
778 +++ b/servo/components/style/servo/selector_parser.rs |
|
779 @@ -16,17 +16,17 @@ use invalidation::element::element_wrapp |
|
780 use properties::ComputedValues; |
|
781 use properties::PropertyFlags; |
|
782 use properties::longhands::display::computed_value as display; |
|
783 use selector_parser::{AttrValue as SelectorAttrValue, ElementExt, PseudoElementCascadeType, SelectorParser}; |
|
784 use selectors::Element; |
|
785 use selectors::attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity}; |
|
786 use selectors::parser::{SelectorMethods, SelectorParseError}; |
|
787 use selectors::visitor::SelectorVisitor; |
|
788 -use std::ascii::AsciiExt; |
|
789 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
790 use std::fmt; |
|
791 use std::fmt::Debug; |
|
792 use std::mem; |
|
793 use std::ops::{Deref, DerefMut}; |
|
794 use style_traits::{ParseError, StyleParseError}; |
|
795 |
|
796 /// A pseudo-element, both public and private. |
|
797 /// |
|
798 diff --git a/servo/components/style/str.rs b/servo/components/style/str.rs |
|
799 --- a/servo/components/style/str.rs |
|
800 +++ b/servo/components/style/str.rs |
|
801 @@ -2,17 +2,17 @@ |
|
802 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
803 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
804 |
|
805 //! String utils for attributes and similar stuff. |
|
806 |
|
807 #![deny(missing_docs)] |
|
808 |
|
809 use num_traits::ToPrimitive; |
|
810 -use std::ascii::AsciiExt; |
|
811 +#[allow(unused_imports)] #[allow(unused_imports)] use std::ascii::AsciiExt; |
|
812 use std::borrow::Cow; |
|
813 use std::convert::AsRef; |
|
814 use std::iter::{Filter, Peekable}; |
|
815 use std::str::Split; |
|
816 |
|
817 /// A static slice of characters. |
|
818 pub type StaticCharVec = &'static [char]; |
|
819 |
|
820 diff --git a/servo/components/style/stylesheets/viewport_rule.rs b/servo/components/style/stylesheets/viewport_rule.rs |
|
821 --- a/servo/components/style/stylesheets/viewport_rule.rs |
|
822 +++ b/servo/components/style/stylesheets/viewport_rule.rs |
|
823 @@ -15,17 +15,17 @@ use error_reporting::{ContextualParseErr |
|
824 use euclid::TypedSize2D; |
|
825 use font_metrics::get_metrics_provider_for_product; |
|
826 use media_queries::Device; |
|
827 use parser::{ParserContext, ParserErrorContext}; |
|
828 use properties::StyleBuilder; |
|
829 use rule_cache::RuleCacheConditions; |
|
830 use selectors::parser::SelectorParseError; |
|
831 use shared_lock::{SharedRwLockReadGuard, StylesheetGuards, ToCssWithGuard}; |
|
832 -use std::ascii::AsciiExt; |
|
833 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
834 use std::borrow::Cow; |
|
835 use std::cell::RefCell; |
|
836 use std::fmt; |
|
837 use std::iter::Enumerate; |
|
838 use std::str::Chars; |
|
839 use style_traits::{PinchZoomFactor, ToCss, ParseError, StyleParseError}; |
|
840 use style_traits::viewport::{Orientation, UserZoom, ViewportConstraints, Zoom}; |
|
841 use stylesheets::{StylesheetInDocument, Origin}; |
|
842 diff --git a/servo/components/style/values/mod.rs b/servo/components/style/values/mod.rs |
|
843 --- a/servo/components/style/values/mod.rs |
|
844 +++ b/servo/components/style/values/mod.rs |
|
845 @@ -7,17 +7,17 @@ |
|
846 //! [values]: https://drafts.csswg.org/css-values/ |
|
847 |
|
848 #![deny(missing_docs)] |
|
849 |
|
850 use Atom; |
|
851 pub use cssparser::{RGBA, Token, Parser, serialize_identifier, BasicParseError, CowRcStr}; |
|
852 use parser::{Parse, ParserContext}; |
|
853 use selectors::parser::SelectorParseError; |
|
854 -use std::ascii::AsciiExt; |
|
855 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
856 use std::fmt::{self, Debug}; |
|
857 use std::hash; |
|
858 use style_traits::{ToCss, ParseError, StyleParseError}; |
|
859 |
|
860 pub mod animated; |
|
861 pub mod computed; |
|
862 pub mod distance; |
|
863 pub mod generics; |
|
864 diff --git a/servo/components/style/values/specified/align.rs b/servo/components/style/values/specified/align.rs |
|
865 --- a/servo/components/style/values/specified/align.rs |
|
866 +++ b/servo/components/style/values/specified/align.rs |
|
867 @@ -5,17 +5,17 @@ |
|
868 //! Values for CSS Box Alignment properties |
|
869 //! |
|
870 //! https://drafts.csswg.org/css-align/ |
|
871 |
|
872 use cssparser::Parser; |
|
873 use gecko_bindings::structs; |
|
874 use parser::{Parse, ParserContext}; |
|
875 use selectors::parser::SelectorParseError; |
|
876 -use std::ascii::AsciiExt; |
|
877 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
878 use std::fmt; |
|
879 use style_traits::{ToCss, ParseError, StyleParseError}; |
|
880 |
|
881 bitflags! { |
|
882 /// Constants shared by multiple CSS Box Alignment properties |
|
883 /// |
|
884 /// These constants match Gecko's `NS_STYLE_ALIGN_*` constants. |
|
885 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))] |
|
886 diff --git a/servo/components/style/values/specified/angle.rs b/servo/components/style/values/specified/angle.rs |
|
887 --- a/servo/components/style/values/specified/angle.rs |
|
888 +++ b/servo/components/style/values/specified/angle.rs |
|
889 @@ -1,17 +1,17 @@ |
|
890 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
891 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
892 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
893 |
|
894 //! Specified angles. |
|
895 |
|
896 use cssparser::{Parser, Token, BasicParseError}; |
|
897 use parser::{ParserContext, Parse}; |
|
898 -use std::ascii::AsciiExt; |
|
899 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
900 use std::fmt; |
|
901 use style_traits::{ToCss, ParseError}; |
|
902 use values::CSSFloat; |
|
903 use values::computed::{Context, ToComputedValue}; |
|
904 use values::computed::angle::Angle as ComputedAngle; |
|
905 use values::specified::calc::CalcNode; |
|
906 |
|
907 /// A specified angle. |
|
908 diff --git a/servo/components/style/values/specified/calc.rs b/servo/components/style/values/specified/calc.rs |
|
909 --- a/servo/components/style/values/specified/calc.rs |
|
910 +++ b/servo/components/style/values/specified/calc.rs |
|
911 @@ -3,17 +3,17 @@ |
|
912 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
913 |
|
914 //! [Calc expressions][calc]. |
|
915 //! |
|
916 //! [calc]: https://drafts.csswg.org/css-values/#calc-notation |
|
917 |
|
918 use cssparser::{Parser, Token, BasicParseError}; |
|
919 use parser::ParserContext; |
|
920 -use std::ascii::AsciiExt; |
|
921 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
922 use std::fmt; |
|
923 use style_traits::{ToCss, ParseError, StyleParseError}; |
|
924 use style_traits::values::specified::AllowedNumericType; |
|
925 use values::{CSSInteger, CSSFloat}; |
|
926 use values::computed; |
|
927 use values::specified::{Angle, Time}; |
|
928 use values::specified::length::{AbsoluteLength, FontRelativeLength, NoCalcLength}; |
|
929 use values::specified::length::ViewportPercentageLength; |
|
930 diff --git a/servo/components/style/values/specified/grid.rs b/servo/components/style/values/specified/grid.rs |
|
931 --- a/servo/components/style/values/specified/grid.rs |
|
932 +++ b/servo/components/style/values/specified/grid.rs |
|
933 @@ -2,17 +2,17 @@ |
|
934 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
935 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
936 |
|
937 //! CSS handling for the computed value of |
|
938 //! [grids](https://drafts.csswg.org/css-grid/) |
|
939 |
|
940 use cssparser::{Parser, Token, BasicParseError}; |
|
941 use parser::{Parse, ParserContext}; |
|
942 -use std::ascii::AsciiExt; |
|
943 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
944 use std::mem; |
|
945 use style_traits::{ParseError, StyleParseError}; |
|
946 use values::{CSSFloat, CustomIdent}; |
|
947 use values::computed::{self, Context, ToComputedValue}; |
|
948 use values::generics::grid::{GridTemplateComponent, RepeatCount, TrackBreadth, TrackKeyword, TrackRepeat}; |
|
949 use values::generics::grid::{LineNameList, TrackSize, TrackList, TrackListType, TrackListValue}; |
|
950 use values::specified::{LengthOrPercentage, Integer}; |
|
951 |
|
952 diff --git a/servo/components/style/values/specified/length.rs b/servo/components/style/values/specified/length.rs |
|
953 --- a/servo/components/style/values/specified/length.rs |
|
954 +++ b/servo/components/style/values/specified/length.rs |
|
955 @@ -7,17 +7,17 @@ |
|
956 //! [length]: https://drafts.csswg.org/css-values/#lengths |
|
957 |
|
958 use app_units::Au; |
|
959 use cssparser::{Parser, Token, BasicParseError}; |
|
960 use euclid::Size2D; |
|
961 use font_metrics::FontMetricsQueryResult; |
|
962 use parser::{Parse, ParserContext}; |
|
963 use std::{cmp, fmt, mem}; |
|
964 -use std::ascii::AsciiExt; |
|
965 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
966 use std::ops::{Add, Mul}; |
|
967 use style_traits::{ToCss, ParseError, StyleParseError}; |
|
968 use style_traits::values::specified::AllowedNumericType; |
|
969 use stylesheets::CssRuleType; |
|
970 use super::{AllowQuirks, Number, ToComputedValue, Percentage}; |
|
971 use values::{Auto, CSSFloat, Either, FONT_MEDIUM_PX, None_, Normal}; |
|
972 use values::{ExtremumLength, serialize_dimension}; |
|
973 use values::computed::{self, CSSPixelLength, Context}; |
|
974 diff --git a/servo/components/style/values/specified/mod.rs b/servo/components/style/values/specified/mod.rs |
|
975 --- a/servo/components/style/values/specified/mod.rs |
|
976 +++ b/servo/components/style/values/specified/mod.rs |
|
977 @@ -6,17 +6,17 @@ |
|
978 //! |
|
979 //! TODO(emilio): Enhance docs. |
|
980 |
|
981 use Namespace; |
|
982 use context::QuirksMode; |
|
983 use cssparser::{Parser, Token, serialize_identifier, BasicParseError}; |
|
984 use parser::{ParserContext, Parse}; |
|
985 use self::url::SpecifiedUrl; |
|
986 -use std::ascii::AsciiExt; |
|
987 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
988 use std::f32; |
|
989 use std::fmt; |
|
990 use style_traits::{ToCss, ParseError, StyleParseError}; |
|
991 use style_traits::values::specified::AllowedNumericType; |
|
992 use super::{Auto, CSSFloat, CSSInteger, Either, None_}; |
|
993 use super::computed::{Context, ToComputedValue}; |
|
994 use super::generics::{GreaterThanOrEqualToOne, NonNegative}; |
|
995 use super::generics::grid::{GridLine as GenericGridLine, TrackBreadth as GenericTrackBreadth}; |
|
996 diff --git a/servo/components/style/values/specified/percentage.rs b/servo/components/style/values/specified/percentage.rs |
|
997 --- a/servo/components/style/values/specified/percentage.rs |
|
998 +++ b/servo/components/style/values/specified/percentage.rs |
|
999 @@ -1,17 +1,17 @@ |
|
1000 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
1001 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
1002 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
1003 |
|
1004 //! Specified percentages. |
|
1005 |
|
1006 use cssparser::{BasicParseError, Parser, Token}; |
|
1007 use parser::{Parse, ParserContext}; |
|
1008 -use std::ascii::AsciiExt; |
|
1009 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
1010 use std::fmt; |
|
1011 use style_traits::{ParseError, ToCss}; |
|
1012 use style_traits::values::specified::AllowedNumericType; |
|
1013 use values::{CSSFloat, serialize_percentage}; |
|
1014 use values::computed::{Context, ToComputedValue}; |
|
1015 use values::computed::percentage::Percentage as ComputedPercentage; |
|
1016 use values::specified::calc::CalcNode; |
|
1017 |
|
1018 diff --git a/servo/components/style/values/specified/text.rs b/servo/components/style/values/specified/text.rs |
|
1019 --- a/servo/components/style/values/specified/text.rs |
|
1020 +++ b/servo/components/style/values/specified/text.rs |
|
1021 @@ -2,17 +2,17 @@ |
|
1022 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
1023 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
1024 |
|
1025 //! Specified types for text properties. |
|
1026 |
|
1027 use cssparser::Parser; |
|
1028 use parser::{Parse, ParserContext}; |
|
1029 use selectors::parser::SelectorParseError; |
|
1030 -use std::ascii::AsciiExt; |
|
1031 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
1032 use style_traits::ParseError; |
|
1033 use values::computed::{Context, ToComputedValue}; |
|
1034 use values::computed::text::LineHeight as ComputedLineHeight; |
|
1035 use values::generics::text::InitialLetter as GenericInitialLetter; |
|
1036 use values::generics::text::LineHeight as GenericLineHeight; |
|
1037 use values::generics::text::Spacing; |
|
1038 use values::specified::{AllowQuirks, Integer, NonNegativeNumber, Number}; |
|
1039 use values::specified::length::{FontRelativeLength, Length, LengthOrPercentage, NoCalcLength}; |
|
1040 diff --git a/servo/components/style/values/specified/time.rs b/servo/components/style/values/specified/time.rs |
|
1041 --- a/servo/components/style/values/specified/time.rs |
|
1042 +++ b/servo/components/style/values/specified/time.rs |
|
1043 @@ -1,17 +1,17 @@ |
|
1044 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
1045 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
1046 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
1047 |
|
1048 //! Specified time values. |
|
1049 |
|
1050 use cssparser::{Parser, Token, BasicParseError}; |
|
1051 use parser::{ParserContext, Parse}; |
|
1052 -use std::ascii::AsciiExt; |
|
1053 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
1054 use std::fmt; |
|
1055 use style_traits::{ToCss, ParseError, StyleParseError}; |
|
1056 use style_traits::values::specified::AllowedNumericType; |
|
1057 use values::CSSFloat; |
|
1058 use values::computed::{Context, ToComputedValue}; |
|
1059 use values::computed::time::Time as ComputedTime; |
|
1060 use values::specified::calc::CalcNode; |
|
1061 |
|
1062 diff --git a/servo/components/style_traits/viewport.rs b/servo/components/style_traits/viewport.rs |
|
1063 --- a/servo/components/style_traits/viewport.rs |
|
1064 +++ b/servo/components/style_traits/viewport.rs |
|
1065 @@ -2,17 +2,17 @@ |
|
1066 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
1067 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
1068 |
|
1069 //! Helper types for the `@viewport` rule. |
|
1070 |
|
1071 use {CSSPixel, PinchZoomFactor, ParseError}; |
|
1072 use cssparser::{Parser, ToCss, ParseError as CssParseError, BasicParseError}; |
|
1073 use euclid::TypedSize2D; |
|
1074 -use std::ascii::AsciiExt; |
|
1075 +#[allow(unused_imports)] use std::ascii::AsciiExt; |
|
1076 use std::fmt; |
|
1077 |
|
1078 define_css_keyword_enum!(UserZoom: |
|
1079 "zoom" => Zoom, |
|
1080 "fixed" => Fixed); |
|
1081 |
|
1082 define_css_keyword_enum!(Orientation: |
|
1083 "auto" => Auto, |