mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Small performance improvement
node.selection() is not used text_content is equal to TextContent::GeneratedContent(content_items)
This commit is contained in:
parent
033786cd0d
commit
27b05c58f6
1 changed files with 1 additions and 2 deletions
|
@ -726,7 +726,6 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let selection = node.selection();
|
|
||||||
let mut style = (*style).clone();
|
let mut style = (*style).clone();
|
||||||
properties::modify_style_for_text(&mut style);
|
properties::modify_style_for_text(&mut style);
|
||||||
|
|
||||||
|
@ -734,7 +733,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
|
||||||
|
|
||||||
match text_content {
|
match text_content {
|
||||||
TextContent::Text(string) => {
|
TextContent::Text(string) => {
|
||||||
let info = box UnscannedTextFragmentInfo::new(string, selection);
|
let info = box UnscannedTextFragmentInfo::new(string, node.selection());
|
||||||
let specific_fragment_info = SpecificFragmentInfo::UnscannedText(info);
|
let specific_fragment_info = SpecificFragmentInfo::UnscannedText(info);
|
||||||
fragments.fragments.push_back(Fragment::from_opaque_node_and_style(
|
fragments.fragments.push_back(Fragment::from_opaque_node_and_style(
|
||||||
node.opaque(),
|
node.opaque(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue