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:
bors-servo 2016-04-12 07:56:38 +05:30
commit 934ae41fc9
4 changed files with 55 additions and 66 deletions

View file

@ -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())));
}