diff options
author | Bastien Orivel <eijebong@bananium.fr> | 2017-10-09 17:03:40 +0200 |
---|---|---|
committer | Bastien Orivel <eijebong@bananium.fr> | 2017-10-19 15:01:17 +0200 |
commit | e8e2d0a4b24475b018dbc7e59ea46fdceaf20815 (patch) | |
tree | bd56b4a2fc203150ee5c3b5e163937fb3b4e1989 /components/script/dom/document.rs | |
parent | 4cf2ce66fc4f970a47ab1fb4b9aa1a55282640f7 (diff) | |
download | servo-e8e2d0a4b24475b018dbc7e59ea46fdceaf20815.tar.gz servo-e8e2d0a4b24475b018dbc7e59ea46fdceaf20815.zip |
Update bitflags to 1.0 in every servo crate
It still needs dependencies update to remove all the other bitflags
versions.
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r-- | components/script/dom/document.rs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 2e018bd62f5..731b89a26cb 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -66,7 +66,7 @@ use dom::keyboardevent::KeyboardEvent; use dom::location::Location; use dom::messageevent::MessageEvent; use dom::mouseevent::MouseEvent; -use dom::node::{self, CloneChildrenFlag, Node, NodeDamage, window_from_node, IS_IN_DOC, LayoutNodeHelpers}; +use dom::node::{self, CloneChildrenFlag, Node, NodeDamage, window_from_node, NodeFlags, LayoutNodeHelpers}; use dom::node::VecPreOrderInsertionHelper; use dom::nodeiterator::NodeIterator; use dom::nodelist::NodeList; @@ -99,7 +99,6 @@ use hyper_serde::Serde; use ipc_channel::ipc::{self, IpcSender}; use js::jsapi::{JSContext, JSRuntime}; use js::jsapi::JS_GetRuntime; -use msg::constellation_msg::{ALT, CONTROL, SHIFT, SUPER}; use msg::constellation_msg::{BrowsingContextId, Key, KeyModifiers, KeyState, TopLevelBrowsingContextId}; use net_traits::{FetchResponseMsg, IpcSend, ReferrerPolicy}; use net_traits::CookieSource::NonHTTP; @@ -130,7 +129,7 @@ use std::rc::Rc; use std::time::{Duration, Instant}; use style::attr::AttrValue; use style::context::QuirksMode; -use style::invalidation::element::restyle_hints::{RestyleHint, RESTYLE_SELF, RESTYLE_STYLE_ATTRIBUTE}; +use style::invalidation::element::restyle_hints::RestyleHint; use style::media_queries::{Device, MediaList, MediaType}; use style::selector_parser::{RestyleDamage, Snapshot}; use style::shared_lock::{SharedRwLock as StyleSharedRwLock, SharedRwLockReadGuard}; @@ -1276,10 +1275,10 @@ impl Document { (&None, &None) => self.window.upcast(), }; - let ctrl = modifiers.contains(CONTROL); - let alt = modifiers.contains(ALT); - let shift = modifiers.contains(SHIFT); - let meta = modifiers.contains(SUPER); + let ctrl = modifiers.contains(KeyModifiers::CONTROL); + let alt = modifiers.contains(KeyModifiers::ALT); + let shift = modifiers.contains(KeyModifiers::SHIFT); + let meta = modifiers.contains(KeyModifiers::SUPER); let is_composing = false; let is_repeating = state == KeyState::Repeated; @@ -2019,7 +2018,7 @@ impl LayoutDocumentHelpers for LayoutDom<Document> { // may no longer be true when the next layout occurs. let result = elements.drain() .map(|(k, v)| (k.to_layout(), v)) - .filter(|&(ref k, _)| k.upcast::<Node>().get_flag(IS_IN_DOC)) + .filter(|&(ref k, _)| k.upcast::<Node>().get_flag(NodeFlags::IS_IN_DOC)) .collect(); result } @@ -2466,11 +2465,11 @@ impl Document { entry.snapshot = Some(Snapshot::new(el.html_element_in_html_document())); } if attr.local_name() == &local_name!("style") { - entry.hint.insert(RESTYLE_STYLE_ATTRIBUTE); + entry.hint.insert(RestyleHint::RESTYLE_STYLE_ATTRIBUTE); } if vtable_for(el.upcast()).attribute_affects_presentational_hints(attr) { - entry.hint.insert(RESTYLE_SELF); + entry.hint.insert(RestyleHint::RESTYLE_SELF); } let snapshot = entry.snapshot.as_mut().unwrap(); |