mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
display input caret for textarea. fixes #7758
This commit is contained in:
parent
50ec235384
commit
80e8a674e2
6 changed files with 67 additions and 21 deletions
|
@ -46,6 +46,8 @@ pub struct HTMLTextAreaElement {
|
|||
pub trait LayoutHTMLTextAreaElementHelpers {
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn get_value_for_layout(self) -> String;
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn get_absolute_insertion_point_for_layout(self) -> usize;
|
||||
}
|
||||
|
||||
pub trait RawLayoutHTMLTextAreaElementHelpers {
|
||||
|
@ -61,6 +63,12 @@ impl LayoutHTMLTextAreaElementHelpers for LayoutJS<HTMLTextAreaElement> {
|
|||
unsafe fn get_value_for_layout(self) -> String {
|
||||
(*self.unsafe_get()).textinput.borrow_for_layout().get_content()
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn get_absolute_insertion_point_for_layout(self) -> usize {
|
||||
(*self.unsafe_get()).textinput.borrow_for_layout().get_absolute_insertion_point()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> RawLayoutHTMLTextAreaElementHelpers for &'a HTMLTextAreaElement {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue