mirror of
https://github.com/servo/servo.git
synced 2025-06-09 00:53:26 +00:00
layout: Minor whitespace cleanup.
This commit is contained in:
parent
d2511e33c6
commit
2bef5606bd
2 changed files with 7 additions and 4 deletions
|
@ -686,7 +686,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
|
||||||
/// FIXME(pcwalton): It is not clear to me that there isn't a cleaner way to handle
|
/// FIXME(pcwalton): It is not clear to me that there isn't a cleaner way to handle
|
||||||
/// `<textarea>`.
|
/// `<textarea>`.
|
||||||
fn build_flow_for_block_like(&mut self, flow: FlowRef, node: &ConcreteThreadSafeLayoutNode)
|
fn build_flow_for_block_like(&mut self, flow: FlowRef, node: &ConcreteThreadSafeLayoutNode)
|
||||||
-> ConstructionResult {
|
-> ConstructionResult {
|
||||||
let mut initial_fragments = IntermediateInlineFragments::new();
|
let mut initial_fragments = IntermediateInlineFragments::new();
|
||||||
let node_is_input_or_text_area =
|
let node_is_input_or_text_area =
|
||||||
node.type_id() == Some(NodeTypeId::Element(ElementTypeId::HTMLElement(
|
node.type_id() == Some(NodeTypeId::Element(ElementTypeId::HTMLElement(
|
||||||
|
@ -1023,7 +1023,8 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
|
||||||
|
|
||||||
/// This is an annoying case, because the computed `display` value is `block`, but the
|
/// This is an annoying case, because the computed `display` value is `block`, but the
|
||||||
/// hypothetical box is inline.
|
/// hypothetical box is inline.
|
||||||
fn build_fragment_for_absolutely_positioned_inline(&mut self, node: &ConcreteThreadSafeLayoutNode)
|
fn build_fragment_for_absolutely_positioned_inline(&mut self,
|
||||||
|
node: &ConcreteThreadSafeLayoutNode)
|
||||||
-> ConstructionResult {
|
-> ConstructionResult {
|
||||||
let block_flow_result = self.build_flow_for_block(node, None);
|
let block_flow_result = self.build_flow_for_block(node, None);
|
||||||
let (block_flow, abs_descendants) = match block_flow_result {
|
let (block_flow, abs_descendants) = match block_flow_result {
|
||||||
|
|
|
@ -1031,7 +1031,8 @@ impl Fragment {
|
||||||
let mut specified = Au(0);
|
let mut specified = Au(0);
|
||||||
|
|
||||||
if flags.contains(INTRINSIC_INLINE_SIZE_INCLUDES_SPECIFIED) {
|
if flags.contains(INTRINSIC_INLINE_SIZE_INCLUDES_SPECIFIED) {
|
||||||
specified = MaybeAuto::from_style(style.content_inline_size(), Au(0)).specified_or_zero();
|
specified = MaybeAuto::from_style(style.content_inline_size(),
|
||||||
|
Au(0)).specified_or_zero();
|
||||||
specified = max(model::specified(style.min_inline_size(), Au(0)), specified);
|
specified = max(model::specified(style.min_inline_size(), Au(0)), specified);
|
||||||
if let Some(max) = model::specified_or_none(style.max_inline_size(), Au(0)) {
|
if let Some(max) = model::specified_or_none(style.max_inline_size(), Au(0)) {
|
||||||
specified = min(specified, max)
|
specified = min(specified, max)
|
||||||
|
@ -1070,7 +1071,8 @@ impl Fragment {
|
||||||
|
|
||||||
pub fn calculate_line_height(&self, layout_context: &LayoutContext) -> Au {
|
pub fn calculate_line_height(&self, layout_context: &LayoutContext) -> Au {
|
||||||
let font_style = self.style.get_font_arc();
|
let font_style = self.style.get_font_arc();
|
||||||
let font_metrics = text::font_metrics_for_style(&mut layout_context.font_context(), font_style);
|
let font_metrics = text::font_metrics_for_style(&mut layout_context.font_context(),
|
||||||
|
font_style);
|
||||||
text::line_height_from_style(&*self.style, &font_metrics)
|
text::line_height_from_style(&*self.style, &font_metrics)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue