mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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.
|
// Create the text box.
|
||||||
do list.with_mut_ref |list| {
|
do list.with_mut_ref |list| {
|
||||||
let run = text_box.run.clone();
|
|
||||||
let text_display_item = ~TextDisplayItem {
|
let text_display_item = ~TextDisplayItem {
|
||||||
base: BaseDisplayItem {
|
base: BaseDisplayItem {
|
||||||
bounds: absolute_box_bounds,
|
bounds: absolute_box_bounds,
|
||||||
extra: ExtraDisplayListData::new(&self),
|
extra: ExtraDisplayListData::new(&self),
|
||||||
},
|
},
|
||||||
text_run: run,
|
text_run: text_box.run.clone(),
|
||||||
range: text_box.range,
|
range: text_box.range,
|
||||||
color: color,
|
color: color,
|
||||||
};
|
};
|
||||||
|
|
|
@ -132,8 +132,9 @@ impl TextRunScanner {
|
||||||
self.clump,
|
self.clump,
|
||||||
*text);
|
*text);
|
||||||
let range = Range::new(0, run.get().char_len());
|
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_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,
|
let new_box = @old_box.transform(new_metrics.bounding_box.size,
|
||||||
ScannedTextBox(new_text_box_info));
|
ScannedTextBox(new_text_box_info));
|
||||||
out_boxes.push(new_box)
|
out_boxes.push(new_box)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue