Put UnscannedTextFragmentInfo in a Box

This reduces the size of the SpecificFragmentInfo enum from 48 to 24.
This commit is contained in:
Matt Brubeck 2016-03-28 22:03:25 -07:00
parent 14e945f09a
commit 31261f045e
5 changed files with 14 additions and 13 deletions

View file

@ -434,7 +434,8 @@ fn render_text(layout_context: &LayoutContext,
string: String)
-> Option<SpecificFragmentInfo> {
let mut fragments = LinkedList::new();
let info = SpecificFragmentInfo::UnscannedText(UnscannedTextFragmentInfo::new(string, None));
let info = SpecificFragmentInfo::UnscannedText(
box UnscannedTextFragmentInfo::new(string, None));
fragments.push_back(Fragment::from_opaque_node_and_style(node,
pseudo,
style,