Reduce max line length from 150 to 120 characters

Part of https://github.com/servo/servo/issues/6041
This commit is contained in:
Corey Farwell 2015-05-23 19:49:53 -04:00
parent 7561f7b83f
commit 8e3f4bba85
141 changed files with 1161 additions and 497 deletions

View file

@ -1344,7 +1344,8 @@ impl<'a> PostorderNodeMutTraversal for FlowConstructor<'a> {
};
(munged_display, style.get_box().float, style.get_box().position)
}
Some(NodeTypeId::CharacterData(CharacterDataTypeId::Text)) => (display::T::inline, float::T::none, position::T::static_),
Some(NodeTypeId::CharacterData(CharacterDataTypeId::Text)) =>
(display::T::inline, float::T::none, position::T::static_),
Some(NodeTypeId::CharacterData(CharacterDataTypeId::Comment)) |
Some(NodeTypeId::CharacterData(CharacterDataTypeId::ProcessingInstruction)) |
Some(NodeTypeId::DocumentType) |

View file

@ -42,7 +42,8 @@ use std::iter::repeat;
use std::sync::Arc;
use style::computed_values::filter::Filter;
use style::computed_values::transform::ComputedMatrix;
use style::computed_values::{background_attachment, background_clip, background_origin, background_repeat, background_size};
use style::computed_values::{background_attachment, background_clip, background_origin,
background_repeat, background_size};
use style::computed_values::{border_style, image_rendering, overflow_x, position, visibility};
use style::properties::ComputedValues;
use style::properties::style_structs::Border;
@ -477,7 +478,8 @@ impl FragmentDisplayListBuilding for Fragment {
(absolute_bounds.origin.x, absolute_bounds.origin.y)
}
background_attachment::T::fixed => {
// If the background-attachment value for this image is fixed, then 'background-origin' has no effect.
// If the background-attachment value for this image is fixed, then
// 'background-origin' has no effect.
origin_x = Au(0);
origin_y = Au(0);
(Au(0), Au(0))

View file

@ -131,7 +131,8 @@ impl MarginCollapseInfo {
let state = match self.state {
MarginCollapseState::AccumulatingCollapsibleTopMargin => {
match fragment.style().content_block_size() {
LengthOrPercentageOrAuto::Auto | LengthOrPercentageOrAuto::Length(Au(0)) | LengthOrPercentageOrAuto::Percentage(0.) => {
LengthOrPercentageOrAuto::Auto | LengthOrPercentageOrAuto::Length(Au(0)) |
LengthOrPercentageOrAuto::Percentage(0.) => {
match fragment.style().min_block_size() {
LengthOrPercentage::Length(Au(0)) | LengthOrPercentage::Percentage(0.) => {
FinalMarginState::MarginsCollapseThrough

View file

@ -50,7 +50,8 @@ type Generation = u32;
/// Since a work-stealing queue is used for styling, sometimes, the bloom filter
/// will no longer be the for the parent of the node we're currently on. When
/// this happens, the task local bloom filter will be thrown away and rebuilt.
thread_local!(static STYLE_BLOOM: RefCell<Option<(Box<BloomFilter>, UnsafeLayoutNode, Generation)>> = RefCell::new(None));
thread_local!(
static STYLE_BLOOM: RefCell<Option<(Box<BloomFilter>, UnsafeLayoutNode, Generation)>> = RefCell::new(None));
/// Returns the task local bloom filter.
///

View file

@ -125,21 +125,24 @@ pub trait TLayoutNode {
fn get_renderer(&self) -> Option<Sender<CanvasMsg>> {
unsafe {
let canvas_element: Option<LayoutJS<HTMLCanvasElement>> = HTMLCanvasElementCast::to_layout_js(self.get_jsmanaged());
let canvas_element: Option<LayoutJS<HTMLCanvasElement>> =
HTMLCanvasElementCast::to_layout_js(self.get_jsmanaged());
canvas_element.and_then(|elem| elem.get_renderer())
}
}
fn get_canvas_width(&self) -> u32 {
unsafe {
let canvas_element: Option<LayoutJS<HTMLCanvasElement>> = HTMLCanvasElementCast::to_layout_js(self.get_jsmanaged());
let canvas_element: Option<LayoutJS<HTMLCanvasElement>> =
HTMLCanvasElementCast::to_layout_js(self.get_jsmanaged());
canvas_element.unwrap().get_canvas_width()
}
}
fn get_canvas_height(&self) -> u32 {
unsafe {
let canvas_element: Option<LayoutJS<HTMLCanvasElement>> = HTMLCanvasElementCast::to_layout_js(self.get_jsmanaged());
let canvas_element: Option<LayoutJS<HTMLCanvasElement>> =
HTMLCanvasElementCast::to_layout_js(self.get_jsmanaged());
canvas_element.unwrap().get_canvas_height()
}
}