aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-06-16 02:12:15 -0500
committerGitHub <noreply@github.com>2016-06-16 02:12:15 -0500
commitc164a2e41ce7649da570be127b9b148fcb0f78f4 (patch)
treed273d20d9052b71dc79609cf483d359bea74823b
parent033786cd0dd0f74b5e2974aa67e000b832f17d17 (diff)
parent27b05c58f610eaea51690f547560226388890e52 (diff)
downloadservo-c164a2e41ce7649da570be127b9b148fcb0f78f4.tar.gz
servo-c164a2e41ce7649da570be127b9b148fcb0f78f4.zip
Auto merge of #11758 - mskrzypkows:construct, r=SimonSapin
Small performance improvement <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> node.selection() is not used when text_content is equal to TextContent::GeneratedContent(content_items) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11758) <!-- Reviewable:end -->
-rw-r--r--components/layout/construct.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index 3dfcfdf2689..49546fb2663 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -726,7 +726,6 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
return
}
- let selection = node.selection();
let mut style = (*style).clone();
properties::modify_style_for_text(&mut style);
@@ -734,7 +733,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
match text_content {
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);
fragments.fragments.push_back(Fragment::from_opaque_node_and_style(
node.opaque(),