fix some code

This commit is contained in:
patrick kim 2013-12-10 08:55:55 +09:00
parent f187035e25
commit 301df201c3
2 changed files with 3 additions and 3 deletions

View file

@ -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,
};

View file

@ -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)