mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
fix some code
This commit is contained in:
parent
f187035e25
commit
301df201c3
2 changed files with 3 additions and 3 deletions
|
@ -630,13 +630,12 @@ impl Box {
|
|||
|
||||
// Create the text box.
|
||||
do list.with_mut_ref |list| {
|
||||
let run = text_box.run.clone();
|
||||
let text_display_item = ~TextDisplayItem {
|
||||
base: BaseDisplayItem {
|
||||
bounds: absolute_box_bounds,
|
||||
extra: ExtraDisplayListData::new(&self),
|
||||
},
|
||||
text_run: run,
|
||||
text_run: text_box.run.clone(),
|
||||
range: text_box.range,
|
||||
color: color,
|
||||
};
|
||||
|
|
|
@ -132,8 +132,9 @@ impl TextRunScanner {
|
|||
self.clump,
|
||||
*text);
|
||||
let range = Range::new(0, run.get().char_len());
|
||||
let new_text_box_info = ScannedTextBoxInfo::new(run.clone(), range);
|
||||
let new_metrics = run.get().metrics_for_range(&range);
|
||||
let new_text_box_info = ScannedTextBoxInfo::new(run, range);
|
||||
|
||||
let new_box = @old_box.transform(new_metrics.bounding_box.size,
|
||||
ScannedTextBox(new_text_box_info));
|
||||
out_boxes.push(new_box)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue