mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
gfx: Show the text in the display item when debugging.
This commit is contained in:
parent
58c6aad1f0
commit
ebdc6f69b1
1 changed files with 5 additions and 1 deletions
|
@ -1222,7 +1222,11 @@ impl fmt::Debug for DisplayItem {
|
|||
solid_color.color.g,
|
||||
solid_color.color.b,
|
||||
solid_color.color.a),
|
||||
DisplayItem::Text(_) => "Text".to_owned(),
|
||||
DisplayItem::Text(ref text) => {
|
||||
format!("Text ({:?})",
|
||||
&text.text_run.text[
|
||||
text.range.begin().0 as usize..(text.range.begin().0 + text.range.length().0) as usize])
|
||||
}
|
||||
DisplayItem::Image(_) => "Image".to_owned(),
|
||||
DisplayItem::WebGL(_) => "WebGL".to_owned(),
|
||||
DisplayItem::Border(_) => "Border".to_owned(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue