Bug 1391978 - Part 5. Replace nsISelection::GetFocusOffset/GetAnchroOffset with Selection::FocusOffset/AnchorOffset. r=masayuki

MozReview-Commit-ID: 6OpO1GQyhFO

--HG--
extra : rebase_source : 3e57ddbebc7985ec0e5ada4b1e83631d6f1c83b5
extra : histedit_source : 655c5c3e4c4a3f30d028f9b4b316573a187bd0f0
This commit is contained in:
Makoto Kato 2017-08-25 16:12:38 +09:00
Родитель 72387d25cd
Коммит 6f6e4ef550
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -2451,17 +2451,17 @@ HTMLEditor::GetSelectedElement(const nsAString& aTagName,
NS_ENSURE_SUCCESS(rv, rv);
int32_t anchorOffset = -1;
if (anchorNode) {
selection->GetAnchorOffset(&anchorOffset);
anchorOffset = selection->AnchorOffset();
}
nsCOMPtr<nsINode> focusNode = selection->GetFocusNode();
int32_t focusOffset = -1;
if (focusNode) {
selection->GetFocusOffset(&focusOffset);
focusOffset = selection->FocusOffset();
}
// Link node must be the same for both ends of selection
if (NS_SUCCEEDED(rv) && anchorNode) {
if (anchorNode) {
nsCOMPtr<nsIDOMElement> parentLinkOfAnchor;
rv = GetElementOrParentByTagName(NS_LITERAL_STRING("href"),
anchorNode,