Bug 1842027 - Remove nsTextControlFrame::TextEquals. r=masayuki
It is always called from TextControlState, and always ends up in TextControlState::ValueEquals, so we can avoid some indirection and just use that. Depends on D183282 Differential Revision: https://phabricator.services.mozilla.com/D183283
This commit is contained in:
@@ -1100,24 +1100,6 @@ nsresult nsTextControlFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
return nsContainerFrame::AttributeChanged(aNameSpaceID, aAttribute, aModType);
|
||||
}
|
||||
|
||||
bool nsTextControlFrame::TextEquals(const nsAString& aText) const {
|
||||
if (HTMLInputElement* inputElement = HTMLInputElement::FromNode(mContent)) {
|
||||
if (IsSingleLineTextControl()) {
|
||||
// There will be no line breaks so we can ignore the wrap property.
|
||||
return inputElement->TextEditorValueEquals(aText);
|
||||
}
|
||||
return aText.IsEmpty();
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!IsSingleLineTextControl());
|
||||
if (HTMLTextAreaElement* textAreaElement =
|
||||
HTMLTextAreaElement::FromNode(mContent)) {
|
||||
return textAreaElement->ValueEquals(aText);
|
||||
}
|
||||
|
||||
return aText.IsEmpty();
|
||||
}
|
||||
|
||||
/// END NSIFRAME OVERLOADS
|
||||
|
||||
// NOTE(emilio): This is needed because the root->primary frame map is not set
|
||||
|
||||
Reference in New Issue
Block a user