mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Fix style issues
This commit is contained in:
parent
d4b837bba6
commit
e45ae15640
2 changed files with 5 additions and 5 deletions
|
@ -34,7 +34,7 @@ impl SendableTextRun {
|
|||
TextRun {
|
||||
text: copy self.text,
|
||||
font: font,
|
||||
underline: copy self.underline,
|
||||
underline: self.underline,
|
||||
glyphs: copy self.glyphs
|
||||
}
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ pub impl<'self> TextRun {
|
|||
SendableTextRun {
|
||||
text: copy self.text,
|
||||
font: self.font.get_descriptor(),
|
||||
underline: copy self.underline,
|
||||
underline: self.underline,
|
||||
glyphs: copy self.glyphs,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ impl TextRunScanner {
|
|||
let inline = &mut *flow.inline();
|
||||
let in_boxes = &inline.boxes;
|
||||
|
||||
fn hasUnderline(decoration: CSSTextDecoration) -> bool{
|
||||
fn has_underline(decoration: CSSTextDecoration) -> bool{
|
||||
match decoration {
|
||||
CSSTextDecorationUnderline => true,
|
||||
_ => false
|
||||
|
@ -273,7 +273,7 @@ impl TextRunScanner {
|
|||
let old_box = in_boxes[self.clump.begin()];
|
||||
let text = old_box.raw_text();
|
||||
let font_style = old_box.font_style();
|
||||
let underline = hasUnderline(old_box.text_decoration());
|
||||
let underline = has_underline(old_box.text_decoration());
|
||||
|
||||
// TODO(#115): Use the actual CSS `white-space` property of the relevant style.
|
||||
let compression = CompressWhitespaceNewline;
|
||||
|
@ -326,7 +326,7 @@ impl TextRunScanner {
|
|||
// and then letting `FontGroup` decide which `Font` to stick into the text run.
|
||||
let font_style = in_boxes[self.clump.begin()].font_style();
|
||||
let fontgroup = ctx.font_ctx.get_resolved_font_for_style(&font_style);
|
||||
let underline = hasUnderline(in_boxes[self.clump.begin()].text_decoration());
|
||||
let underline = has_underline(in_boxes[self.clump.begin()].text_decoration());
|
||||
|
||||
// TextRuns contain a cycle which is usually resolved by the teardown
|
||||
// sequence. If no clump takes ownership, however, it will leak.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue