Rollup merge of #7015 - mbrubeck:arc-box, r=Ms2ger

Replace Arc<Box<TextRun>> with Arc<TextRun>

Removes an extraneous level of indirection.

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7015)
<!-- Reviewable:end -->
This commit is contained in:
Matt Brubeck 2015-08-06 14:07:32 -07:00
commit b5f9c06776
5 changed files with 10 additions and 10 deletions

View file

@ -626,7 +626,7 @@ impl IframeFragmentInfo {
#[derive(Clone)]
pub struct ScannedTextFragmentInfo {
/// The text run that this represents.
pub run: Arc<Box<TextRun>>,
pub run: Arc<TextRun>,
/// The intrinsic size of the text fragment.
pub content_size: LogicalSize<Au>,
@ -646,7 +646,7 @@ pub struct ScannedTextFragmentInfo {
impl ScannedTextFragmentInfo {
/// Creates the information specific to a scanned text fragment from a range and a text run.
pub fn new(run: Arc<Box<TextRun>>,
pub fn new(run: Arc<TextRun>,
range: Range<CharIndex>,
content_size: LogicalSize<Au>,
requires_line_break_afterward_if_wrapping_on_newlines: bool)
@ -689,7 +689,7 @@ pub struct SplitResult {
/// The part of the fragment that goes on the second line.
pub inline_end: Option<SplitInfo>,
/// The text run which is being split.
pub text_run: Arc<Box<TextRun>>,
pub text_run: Arc<TextRun>,
}
/// Describes how a fragment should be truncated.
@ -697,7 +697,7 @@ pub struct TruncationResult {
/// The part of the fragment remaining after truncation.
pub split: SplitInfo,
/// The text run which is being truncated.
pub text_run: Arc<Box<TextRun>>,
pub text_run: Arc<TextRun>,
}
/// Data for an unscanned text fragment. Unscanned text fragments are the results of flow
@ -844,7 +844,7 @@ impl Fragment {
}
/// Transforms this fragment using the given `SplitInfo`, preserving all the other data.
pub fn transform_with_split_info(&self, split: &SplitInfo, text_run: Arc<Box<TextRun>>)
pub fn transform_with_split_info(&self, split: &SplitInfo, text_run: Arc<TextRun>)
-> Fragment {
let size = LogicalSize::new(self.style.writing_mode,
split.inline_size,