mirror of
https://github.com/servo/servo.git
synced 2025-06-13 10:54:29 +00:00
Move '&&' to the end of the previous line.
Following https://github.com/servo/servo/issues/10692 this is just a formating change to satisfy a new tidy requirement of not having '&&' at the beginning of a line.
This commit is contained in:
parent
01b111c43e
commit
924d804583
11 changed files with 29 additions and 29 deletions
|
@ -469,9 +469,9 @@ impl<'a> GlyphStore {
|
||||||
character: char,
|
character: char,
|
||||||
data: &GlyphData) {
|
data: &GlyphData) {
|
||||||
let glyph_is_compressible = is_simple_glyph_id(data.id) &&
|
let glyph_is_compressible = is_simple_glyph_id(data.id) &&
|
||||||
is_simple_advance(data.advance)
|
is_simple_advance(data.advance) &&
|
||||||
&& data.offset == Point2D::zero()
|
data.offset == Point2D::zero() &&
|
||||||
&& data.cluster_start; // others are stored in detail buffer
|
data.cluster_start; // others are stored in detail buffer
|
||||||
|
|
||||||
debug_assert!(data.ligature_start); // can't compress ligature continuation glyphs.
|
debug_assert!(data.ligature_start); // can't compress ligature continuation glyphs.
|
||||||
debug_assert!(i < self.char_len());
|
debug_assert!(i < self.char_len());
|
||||||
|
|
|
@ -412,8 +412,8 @@ impl Shaper {
|
||||||
|
|
||||||
let mut covered_byte_span = char_byte_span.clone();
|
let mut covered_byte_span = char_byte_span.clone();
|
||||||
// extend, clipping at end of text range.
|
// extend, clipping at end of text range.
|
||||||
while covered_byte_span.end() < byte_max
|
while covered_byte_span.end() < byte_max &&
|
||||||
&& byte_to_glyph[covered_byte_span.end()] == NO_GLYPH {
|
byte_to_glyph[covered_byte_span.end()] == NO_GLYPH {
|
||||||
let range = text.char_range_at(covered_byte_span.end());
|
let range = text.char_range_at(covered_byte_span.end());
|
||||||
drop(range.ch);
|
drop(range.ch);
|
||||||
covered_byte_span.extend_to(range.next);
|
covered_byte_span.extend_to(range.next);
|
||||||
|
|
|
@ -194,9 +194,9 @@ impl<'a> PostorderFlowTraversal for AssignBSizes<'a> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn should_process(&self, flow: &mut Flow) -> bool {
|
fn should_process(&self, flow: &mut Flow) -> bool {
|
||||||
let base = flow::base(flow);
|
let base = flow::base(flow);
|
||||||
base.restyle_damage.intersects(REFLOW_OUT_OF_FLOW | REFLOW)
|
base.restyle_damage.intersects(REFLOW_OUT_OF_FLOW | REFLOW) &&
|
||||||
// The fragmentation countainer is responsible for calling Flow::fragment recursively
|
// The fragmentation countainer is responsible for calling Flow::fragment recursively
|
||||||
&& !base.flags.contains(CAN_BE_FRAGMENTED)
|
!base.flags.contains(CAN_BE_FRAGMENTED)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,10 +136,10 @@ impl Cookie {
|
||||||
if string == domain_string {
|
if string == domain_string {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if string.ends_with(domain_string)
|
if string.ends_with(domain_string) &&
|
||||||
&& string.as_bytes()[string.len()-domain_string.len()-1] == b'.'
|
string.as_bytes()[string.len()-domain_string.len()-1] == b'.' &&
|
||||||
&& string.parse::<Ipv4Addr>().is_err()
|
string.parse::<Ipv4Addr>().is_err() &&
|
||||||
&& string.parse::<Ipv6Addr>().is_err() {
|
string.parse::<Ipv6Addr>().is_err() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
|
|
|
@ -28,8 +28,8 @@ impl LateLintPass for TransmutePass {
|
||||||
match expr.node {
|
match expr.node {
|
||||||
hir::ExprPath(_, ref path) => {
|
hir::ExprPath(_, ref path) => {
|
||||||
if path.segments.last()
|
if path.segments.last()
|
||||||
.map_or(false, |ref segment| segment.identifier.name.as_str() == "transmute")
|
.map_or(false, |ref segment| segment.identifier.name.as_str() == "transmute") &&
|
||||||
&& args.len() == 1 {
|
args.len() == 1 {
|
||||||
let tcx = cx.tcx;
|
let tcx = cx.tcx;
|
||||||
cx.span_lint(TRANSMUTE_TYPE_LINT, ex.span,
|
cx.span_lint(TRANSMUTE_TYPE_LINT, ex.span,
|
||||||
&format!("Transmute to {:?} from {:?} detected",
|
&format!("Transmute to {:?} from {:?} detected",
|
||||||
|
|
|
@ -161,8 +161,8 @@ impl HTMLCollection {
|
||||||
}
|
}
|
||||||
impl CollectionFilter for TagNameNSFilter {
|
impl CollectionFilter for TagNameNSFilter {
|
||||||
fn filter(&self, elem: &Element, _root: &Node) -> bool {
|
fn filter(&self, elem: &Element, _root: &Node) -> bool {
|
||||||
((self.qname.ns == Namespace(atom!("*"))) || (self.qname.ns == *elem.namespace()))
|
((self.qname.ns == Namespace(atom!("*"))) || (self.qname.ns == *elem.namespace())) &&
|
||||||
&& ((self.qname.local == atom!("*")) || (self.qname.local == *elem.local_name()))
|
((self.qname.local == atom!("*")) || (self.qname.local == *elem.local_name()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let filter = TagNameNSFilter {
|
let filter = TagNameNSFilter {
|
||||||
|
|
|
@ -244,8 +244,8 @@ impl HTMLFormElement {
|
||||||
let base = doc.url();
|
let base = doc.url();
|
||||||
// TODO: Handle browsing contexts
|
// TODO: Handle browsing contexts
|
||||||
// Step 4
|
// Step 4
|
||||||
if submit_method_flag == SubmittedFrom::NotFromFormSubmitMethod
|
if submit_method_flag == SubmittedFrom::NotFromFormSubmitMethod &&
|
||||||
&& !submitter.no_validate(self)
|
!submitter.no_validate(self)
|
||||||
{
|
{
|
||||||
if self.interactive_validation().is_err() {
|
if self.interactive_validation().is_err() {
|
||||||
// TODO: Implement event handlers on all form control elements
|
// TODO: Implement event handlers on all form control elements
|
||||||
|
|
|
@ -132,8 +132,8 @@ impl HTMLTableElementMethods for HTMLTableElement {
|
||||||
|
|
||||||
impl CollectionFilter for TableRowFilter {
|
impl CollectionFilter for TableRowFilter {
|
||||||
fn filter(&self, elem: &Element, root: &Node) -> bool {
|
fn filter(&self, elem: &Element, root: &Node) -> bool {
|
||||||
elem.is::<HTMLTableRowElement>()
|
elem.is::<HTMLTableRowElement>() &&
|
||||||
&& (root.is_parent_of(elem.upcast())
|
(root.is_parent_of(elem.upcast())
|
||||||
|| self.sections.iter().any(|ref section| section.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;
|
struct TBodiesFilter;
|
||||||
impl CollectionFilter for TBodiesFilter {
|
impl CollectionFilter for TBodiesFilter {
|
||||||
fn filter(&self, elem: &Element, root: &Node) -> bool {
|
fn filter(&self, elem: &Element, root: &Node) -> bool {
|
||||||
elem.is::<HTMLTableSectionElement>()
|
elem.is::<HTMLTableSectionElement>() &&
|
||||||
&& elem.local_name() == &atom!("tbody")
|
elem.local_name() == &atom!("tbody") &&
|
||||||
&& elem.upcast::<Node>().GetParentNode().r() == Some(root)
|
elem.upcast::<Node>().GetParentNode().r() == Some(root)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@ use util::str::DOMString;
|
||||||
struct CellsFilter;
|
struct CellsFilter;
|
||||||
impl CollectionFilter for CellsFilter {
|
impl CollectionFilter for CellsFilter {
|
||||||
fn filter(&self, elem: &Element, root: &Node) -> bool {
|
fn filter(&self, elem: &Element, root: &Node) -> bool {
|
||||||
(elem.is::<HTMLTableHeaderCellElement>() || elem.is::<HTMLTableDataCellElement>())
|
(elem.is::<HTMLTableHeaderCellElement>() || elem.is::<HTMLTableDataCellElement>()) &&
|
||||||
&& elem.upcast::<Node>().GetParentNode().r() == Some(root)
|
elem.upcast::<Node>().GetParentNode().r() == Some(root)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,8 @@ impl HTMLTableSectionElement {
|
||||||
struct RowsFilter;
|
struct RowsFilter;
|
||||||
impl CollectionFilter for RowsFilter {
|
impl CollectionFilter for RowsFilter {
|
||||||
fn filter(&self, elem: &Element, root: &Node) -> bool {
|
fn filter(&self, elem: &Element, root: &Node) -> bool {
|
||||||
elem.is::<HTMLTableRowElement>()
|
elem.is::<HTMLTableRowElement>() &&
|
||||||
&& elem.upcast::<Node>().GetParentNode().r() == Some(root)
|
elem.upcast::<Node>().GetParentNode().r() == Some(root)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -274,9 +274,9 @@ fn find_native_libs(args: &Args) -> HashMap<String, PathBuf> {
|
||||||
(Some(file_name), Some(extension)) => {
|
(Some(file_name), Some(extension)) => {
|
||||||
let file_name = file_name.to_str().unwrap();
|
let file_name = file_name.to_str().unwrap();
|
||||||
|
|
||||||
if file_name.starts_with("lib")
|
if file_name.starts_with("lib") &&
|
||||||
&& extension == "so"
|
extension == "so" &&
|
||||||
&& args.shared_libraries.contains(file_name) {
|
args.shared_libraries.contains(file_name) {
|
||||||
println!("Adding the file {:?}", file_name);
|
println!("Adding the file {:?}", file_name);
|
||||||
native_shared_libs.insert(file_name.to_string(), path.to_path_buf().clone());
|
native_shared_libs.insert(file_name.to_string(), path.to_path_buf().clone());
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue