commit 194051e8a7f99d6f2882c127b32db5503666b4ef
parent 1ad1b18a5248e58d3b99163587656b2d16fe58af
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date: Thu, 9 Oct 2025 11:53:49 +0000
Bug 1993353 - Remove NS_FRAME_INDEPENDENT_SELECTION from nsListControlFrame. r=layout-reviewers,dshin
It doesn't have an independent selection. Only nsTextControlFrame has a
different nsISelectionController.
Differential Revision: https://phabricator.services.mozilla.com/D268105
Diffstat:
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp
@@ -41,12 +41,8 @@ using namespace mozilla::dom;
//---------------------------------------------------------
nsListControlFrame* NS_NewListControlFrame(PresShell* aPresShell,
ComputedStyle* aStyle) {
- nsListControlFrame* it =
- new (aPresShell) nsListControlFrame(aStyle, aPresShell->GetPresContext());
-
- it->AddStateBits(NS_FRAME_INDEPENDENT_SELECTION);
-
- return it;
+ return new (aPresShell)
+ nsListControlFrame(aStyle, aPresShell->GetPresContext());
}
NS_IMPL_FRAMEARENA_HELPERS(nsListControlFrame)
diff --git a/layout/generic/nsIFrame.cpp b/layout/generic/nsIFrame.cpp
@@ -5682,7 +5682,7 @@ static bool FrameContentCanHaveParentSelectionRange(nsIFrame* aFrame) {
// control, but the focus didn't work right anyway; it'd probably be enough
// if the left and right arrows could enter textboxes (which I don't believe
// they can at the moment)
- if (aFrame->IsTextInputFrame() || aFrame->IsListControlFrame()) {
+ if (aFrame->IsTextInputFrame()) {
MOZ_ASSERT(aFrame->HasAnyStateBits(NS_FRAME_INDEPENDENT_SELECTION));
return false;
}