Bug 1553378 - Devirtualize calls to GetText() / TextLength() when we know we have a Text node. r=smaug,jfkthame

Differential Revision: https://phabricator.services.mozilla.com/D32100
This commit is contained in:
Cameron McCormack
2019-05-22 15:18:48 +10:00
parent a6d96fa7da
commit 8dec0f541b
24 changed files with 141 additions and 163 deletions

View File

@@ -890,8 +890,7 @@ nsresult nsTextControlFrame::SelectAllOrCollapseToEndOfText(bool aSelect) {
child = child->GetPreviousSibling();
if (child && child->IsText()) {
rootNode = child;
const nsTextFragment* fragment = child->GetText();
numChildren = fragment ? fragment->GetLength() : 0;
numChildren = child->AsText()->TextDataLength();
}
}
}