Auto merge of #10751 - zwn:tidy-start-operator, r=Wafflespeanut

Report lines starting with && in tidy

Partial implementation of the issue #10692 (the easy part).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10751)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-04-22 10:40:06 -07:00
commit d926b5d376
14 changed files with 37 additions and 31 deletions

View file

@ -161,8 +161,8 @@ impl HTMLCollection {
}
impl CollectionFilter for TagNameNSFilter {
fn filter(&self, elem: &Element, _root: &Node) -> bool {
((self.qname.ns == Namespace(atom!("*"))) || (self.qname.ns == *elem.namespace()))
&& ((self.qname.local == atom!("*")) || (self.qname.local == *elem.local_name()))
((self.qname.ns == Namespace(atom!("*"))) || (self.qname.ns == *elem.namespace())) &&
((self.qname.local == atom!("*")) || (self.qname.local == *elem.local_name()))
}
}
let filter = TagNameNSFilter {

View file

@ -244,8 +244,8 @@ impl HTMLFormElement {
let base = doc.url();
// TODO: Handle browsing contexts
// Step 4
if submit_method_flag == SubmittedFrom::NotFromFormSubmitMethod
&& !submitter.no_validate(self)
if submit_method_flag == SubmittedFrom::NotFromFormSubmitMethod &&
!submitter.no_validate(self)
{
if self.interactive_validation().is_err() {
// TODO: Implement event handlers on all form control elements

View file

@ -132,8 +132,8 @@ impl HTMLTableElementMethods for HTMLTableElement {
impl CollectionFilter for TableRowFilter {
fn filter(&self, elem: &Element, root: &Node) -> bool {
elem.is::<HTMLTableRowElement>()
&& (root.is_parent_of(elem.upcast())
elem.is::<HTMLTableRowElement>() &&
(root.is_parent_of(elem.upcast())
|| self.sections.iter().any(|ref section| section.is_parent_of(elem.upcast())))
}
}
@ -250,9 +250,9 @@ impl HTMLTableElementMethods for HTMLTableElement {
struct TBodiesFilter;
impl CollectionFilter for TBodiesFilter {
fn filter(&self, elem: &Element, root: &Node) -> bool {
elem.is::<HTMLTableSectionElement>()
&& elem.local_name() == &atom!("tbody")
&& elem.upcast::<Node>().GetParentNode().r() == Some(root)
elem.is::<HTMLTableSectionElement>() &&
elem.local_name() == &atom!("tbody") &&
elem.upcast::<Node>().GetParentNode().r() == Some(root)
}
}

View file

@ -29,8 +29,8 @@ use util::str::DOMString;
struct CellsFilter;
impl CollectionFilter for CellsFilter {
fn filter(&self, elem: &Element, root: &Node) -> bool {
(elem.is::<HTMLTableHeaderCellElement>() || elem.is::<HTMLTableDataCellElement>())
&& elem.upcast::<Node>().GetParentNode().r() == Some(root)
(elem.is::<HTMLTableHeaderCellElement>() || elem.is::<HTMLTableDataCellElement>()) &&
elem.upcast::<Node>().GetParentNode().r() == Some(root)
}
}

View file

@ -44,8 +44,8 @@ impl HTMLTableSectionElement {
struct RowsFilter;
impl CollectionFilter for RowsFilter {
fn filter(&self, elem: &Element, root: &Node) -> bool {
elem.is::<HTMLTableRowElement>()
&& elem.upcast::<Node>().GetParentNode().r() == Some(root)
elem.is::<HTMLTableRowElement>() &&
elem.upcast::<Node>().GetParentNode().r() == Some(root)
}
}