commit d5bae296c2f3b89bfa43772ad002509e4da05acd
parent f4ee9ffe0839d5db2fed0a17a110d38c698fe07f
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date: Fri, 3 Oct 2025 08:55:23 +0000
Bug 1787062 - Remove unneeded check. r=masayuki,layout-reviewers,dshin
The comment just isn't true, the anonymous content is created by
UpdateValueDisplay unconditionally now.
Differential Revision: https://phabricator.services.mozilla.com/D267254
Diffstat:
1 file changed, 0 insertions(+), 16 deletions(-)
diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp
@@ -451,22 +451,6 @@ bool nsTextControlFrame::ShouldInitializeEagerly() const {
}
}
- // If text in the editor is being dragged, we need the editor to create
- // new source node for the drag session (TextEditor creates the text node
- // in the anonymous <div> element.
- // XXX UpdateValueDisplay creates it now, is this needed?
- if (nsCOMPtr<nsIDragSession> dragSession =
- nsContentUtils::GetDragSession(PresContext())) {
- if (dragSession->IsDraggingTextInTextControl()) {
- nsCOMPtr<nsINode> sourceNode;
- if (NS_SUCCEEDED(
- dragSession->GetSourceNode(getter_AddRefs(sourceNode))) &&
- sourceNode == textControlElement) {
- return true;
- }
- }
- }
-
return false;
}