Skip to content

Commit

Permalink
Backed out changeset dbd300f4d75b for build bustage. r=backout on a C…
Browse files Browse the repository at this point in the history
…LOSED TREE

Backs out #19108
  • Loading branch information
Gecko Backout authored and moz-servo-sync committed Nov 3, 2017
1 parent a0cd781 commit 8f8fd51
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 365 deletions.
6 changes: 1 addition & 5 deletions components/layout_thread/dom_wrapper.rs
Expand Up @@ -213,10 +213,6 @@ impl<'ln> TNode for ServoLayoutNode<'ln> {
unsafe { self.node.get_flag(NodeFlags::CAN_BE_FRAGMENTED) }
}

fn is_in_document(&self) -> bool {
unsafe { self.node.get_flag(NodeFlags::IS_IN_DOC) }
}

unsafe fn set_can_be_fragmented(&self, value: bool) {
self.node.set_flag(NodeFlags::CAN_BE_FRAGMENTED, value)
}
Expand Down Expand Up @@ -421,7 +417,7 @@ impl<'le> TElement for ServoLayoutElement<'le> {
}

unsafe fn set_dirty_descendants(&self) {
debug_assert!(self.as_node().is_in_document());
debug_assert!(self.as_node().node.get_flag(NodeFlags::IS_IN_DOC));
self.as_node().node.set_flag(NodeFlags::HAS_DIRTY_DESCENDANTS, true)
}

Expand Down
10 changes: 4 additions & 6 deletions components/selectors/matching.rs
Expand Up @@ -62,7 +62,6 @@ struct LocalMatchingContext<'a, 'b: 'a, Impl: SelectorImpl> {
matches_hover_and_active_quirk: bool,
}

#[inline(always)]
pub fn matches_selector_list<E>(
selector_list: &SelectorList<E::Impl>,
element: &E,
Expand Down Expand Up @@ -374,7 +373,6 @@ where
}

/// Matches a complex selector.
#[inline(always)]
pub fn matches_complex_selector<E, F>(
mut iter: SelectorIter<E::Impl>,
element: &E,
Expand All @@ -387,8 +385,8 @@ where
{
// If this is the special pseudo-element mode, consume the ::pseudo-element
// before proceeding, since the caller has already handled that part.
if context.matching_mode == MatchingMode::ForStatelessPseudoElement &&
context.nesting_level == 0 {
if context.nesting_level == 0 &&
context.matching_mode == MatchingMode::ForStatelessPseudoElement {
// Consume the pseudo.
match *iter.next().unwrap() {
Component::PseudoElement(ref pseudo) => {
Expand Down Expand Up @@ -573,12 +571,12 @@ where
// Only ancestor combinators are allowed while looking for
// relevant links, so switch to not looking.
*relevant_link = RelevantLinkStatus::NotLooking;
SelectorMatchingResult::NotMatchedAndRestartFromClosestDescendant
SelectorMatchingResult::NotMatchedAndRestartFromClosestDescendant
}
Combinator::Child |
Combinator::Descendant |
Combinator::PseudoElement => {
SelectorMatchingResult::NotMatchedGlobally
SelectorMatchingResult::NotMatchedGlobally
}
};

Expand Down
17 changes: 0 additions & 17 deletions components/style/dom.rs
Expand Up @@ -122,7 +122,6 @@ where
{
type Item = N;

#[inline]
fn next(&mut self) -> Option<N> {
let prev = match self.previous.take() {
None => return None,
Expand All @@ -147,18 +146,6 @@ pub trait TDocument : Sized + Copy + Clone {

/// Returns the quirks mode of this document.
fn quirks_mode(&self) -> QuirksMode;

/// Get a list of elements with a given ID in this document, sorted by
/// document position.
///
/// Can return an error to signal that this list is not available, or also
/// return an empty slice.
fn elements_with_id(
&self,
_id: &Atom,
) -> Result<&[<Self::ConcreteNode as TNode>::ConcreteElement], ()> {
Err(())
}
}

/// The `TNode` trait. This is the main generic trait over which the style
Expand Down Expand Up @@ -193,9 +180,6 @@ pub trait TNode : Sized + Copy + Clone + Debug + NodeInfo + PartialEq {
DomChildren(self.first_child())
}

/// Returns whether the node is attached to a document.
fn is_in_document(&self) -> bool;

/// Iterate over the DOM children of a node, in preorder.
fn dom_descendants(&self) -> DomDescendants<Self> {
DomDescendants {
Expand All @@ -206,7 +190,6 @@ pub trait TNode : Sized + Copy + Clone + Debug + NodeInfo + PartialEq {

/// Returns the next children in pre-order, optionally scoped to a subtree
/// root.
#[inline]
fn next_in_preorder(&self, scoped_to: Option<Self>) -> Option<Self> {
if let Some(c) = self.first_child() {
return Some(c);
Expand Down

0 comments on commit 8f8fd51

Please sign in to comment.