Bug 1283915 - Preserve input selection properties after type change. r=smaug

MozReview-Commit-ID: 7xJKc3vIpTY
This commit is contained in:
Decky Coss
2016-07-27 11:04:53 -04:00
parent af36ab2fce
commit 0eb80cd61e
5 changed files with 95 additions and 0 deletions

View File

@@ -1536,6 +1536,19 @@ nsTextEditorState::GetSelectionProperties()
return mSelectionProperties;
}
void
nsTextEditorState::SetSelectionProperties(nsTextEditorState::SelectionProperties& aProps)
{
if (mBoundFrame) {
mBoundFrame->SetSelectionRange(aProps.GetStart(),
aProps.GetEnd(),
aProps.GetDirection());
} else {
mSelectionProperties = aProps;
}
}
HTMLInputElement*
nsTextEditorState::GetParentNumberControl(nsFrame* aFrame) const
{