mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
Auto merge of #10522 - KiChjang:input-cleanup, r=frewsxcv
Various cleanups in HTMLInputElement <!-- 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/10522) <!-- Reviewable:end -->
This commit is contained in:
commit
934ae41fc9
4 changed files with 55 additions and 66 deletions
|
@ -1050,7 +1050,7 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
|
|||
return TextContent::Text(data);
|
||||
}
|
||||
if let Some(input) = this.downcast::<HTMLInputElement>() {
|
||||
let data = unsafe { input.get_value_for_layout() };
|
||||
let data = unsafe { input.value_for_layout() };
|
||||
return TextContent::Text(data);
|
||||
}
|
||||
if let Some(area) = this.downcast::<HTMLTextAreaElement>() {
|
||||
|
@ -1076,7 +1076,7 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
|
|||
}
|
||||
}
|
||||
if let Some(input) = this.downcast::<HTMLInputElement>() {
|
||||
if let Some(selection) = unsafe { input.get_selection_for_layout() } {
|
||||
if let Some(selection) = unsafe { input.selection_for_layout() } {
|
||||
return Some(Range::new(CharIndex(selection.begin()),
|
||||
CharIndex(selection.length())));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue