aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
diff options
context:
space:
mode:
authorMatt Brubeck <mbrubeck@limpet.net>2016-03-18 16:38:17 -0700
committerMatt Brubeck <mbrubeck@limpet.net>2016-03-24 18:33:26 -0700
commit61710008750f03f1f66ce0b24ea92c2b0286e0e0 (patch)
treeca9565958734bdba5210691aae2f8da477685b1a /components/layout/construct.rs
parentf2f05869d6ccd445df9b73e2e8d038c6cfa9e687 (diff)
downloadservo-61710008750f03f1f66ce0b24ea92c2b0286e0e0.tar.gz
servo-61710008750f03f1f66ce0b24ea92c2b0286e0e0.zip
Highlight selected text in input fields
Fixes #9993. This does not yet allow stylesheets to set the selection colors; instead it uses a hard-coded orange background and white foreground.
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r--components/layout/construct.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index 25988b7eb11..cc40db0174d 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -709,13 +709,13 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
return
}
- let insertion_point = node.insertion_point();
+ let selection = node.selection();
let mut style = (*style).clone();
properties::modify_style_for_text(&mut style);
match text_content {
TextContent::Text(string) => {
- let info = UnscannedTextFragmentInfo::new(string, insertion_point);
+ let info = UnscannedTextFragmentInfo::new(string, selection);
let specific_fragment_info = SpecificFragmentInfo::UnscannedText(info);
fragments.fragments.push_back(Fragment::from_opaque_node_and_style(
node.opaque(),