Bug 1714640 - Add AdjustFrameForLineStart call in Selection::ScrollIntoView r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D117009
This commit is contained in:
Kagami Sascha Rosylight
2021-06-08 16:21:36 +00:00
parent a6321e91eb
commit 3bd6c78fdc
6 changed files with 69 additions and 31 deletions

View File

@@ -2865,6 +2865,8 @@ nsIFrame* Selection::GetSelectionEndPointGeometry(SelectionRegion aRegion,
content, nodeOffset, mFrameSelection->GetHint(), &frameOffset);
if (!frame) return nullptr;
nsFrameSelection::AdjustFrameForLineStart(frame, frameOffset);
// Figure out what node type we have, then get the
// appropriate rect for it's nodeOffset.
bool isText = node->IsText();