Bug 1293570 - Revert parts of bug 1003741 which were added to make selection APIs work on <input type=number>; r=baku

In particular we keep the frame a form control frame so that it gets the
correct CSS box sizing by the layout code.
This commit is contained in:
Ehsan Akhgari
2016-08-10 14:29:00 -04:00
parent 6af078de24
commit c8d154be84
7 changed files with 55 additions and 155 deletions

View File

@@ -30,6 +30,7 @@
#include "nsIInterfaceRequestorUtils.h" #include "nsIInterfaceRequestorUtils.h"
#include "nsILoadContext.h" #include "nsILoadContext.h"
#include "nsITextControlFrame.h" #include "nsITextControlFrame.h"
#include "nsNumberControlFrame.h"
#include "nsUnicharUtils.h" #include "nsUnicharUtils.h"
#include "nsContentList.h" #include "nsContentList.h"
#include "nsCSSPseudoElements.h" #include "nsCSSPseudoElements.h"
@@ -10880,7 +10881,8 @@ nsIDocument::CaretPositionFromPoint(float aX, float aY)
nsCOMPtr<nsIDOMHTMLInputElement> input = do_QueryInterface(nonanon); nsCOMPtr<nsIDOMHTMLInputElement> input = do_QueryInterface(nonanon);
nsCOMPtr<nsIDOMHTMLTextAreaElement> textArea = do_QueryInterface(nonanon); nsCOMPtr<nsIDOMHTMLTextAreaElement> textArea = do_QueryInterface(nonanon);
nsITextControlFrame* textFrame = do_QueryFrame(nonanon->GetPrimaryFrame()); nsITextControlFrame* textFrame = do_QueryFrame(nonanon->GetPrimaryFrame());
if (!!textFrame) { nsNumberControlFrame* numberFrame = do_QueryFrame(nonanon->GetPrimaryFrame());
if (textFrame || numberFrame) {
// If the anonymous content node has a child, then we need to make sure // If the anonymous content node has a child, then we need to make sure
// that we get the appropriate child, as otherwise the offset may not be // that we get the appropriate child, as otherwise the offset may not be
// correct when we construct a range for it. // correct when we construct a range for it.

View File

@@ -1513,7 +1513,7 @@ private:
bool SupportsTextSelection() const { bool SupportsTextSelection() const {
return mType == NS_FORM_INPUT_TEXT || mType == NS_FORM_INPUT_SEARCH || return mType == NS_FORM_INPUT_TEXT || mType == NS_FORM_INPUT_SEARCH ||
mType == NS_FORM_INPUT_URL || mType == NS_FORM_INPUT_TEL || mType == NS_FORM_INPUT_URL || mType == NS_FORM_INPUT_TEL ||
mType == NS_FORM_INPUT_PASSWORD || mType == NS_FORM_INPUT_NUMBER; mType == NS_FORM_INPUT_PASSWORD;
} }
static bool MayFireChangeOnBlur(uint8_t aType) { static bool MayFireChangeOnBlur(uint8_t aType) {

View File

@@ -42,16 +42,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1283915
synthesizeKey("1", {}); synthesizeKey("1", {});
is(nField.value, "1"); is(nField.value, "1");
isCursorAtEnd(nField);
document.body.offsetWidth; document.body.offsetWidth;
synthesizeKey("2", {}); synthesizeKey("2", {});
is(nField.value, "12"); is(nField.value, "12");
isCursorAtEnd(nField);
synthesizeKey("3", {}); synthesizeKey("3", {});
is(nField.value, "123"); is(nField.value, "123");
isCursorAtEnd(nField);
SimpleTest.finish(); SimpleTest.finish();
} }

View File

@@ -20,7 +20,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=850364
<input type="url" id="input_url"></input> <input type="url" id="input_url"></input>
<input type="tel" id="input_tel"></input> <input type="tel" id="input_tel"></input>
<input type="password" id="input_password"></input> <input type="password" id="input_password"></input>
<input type="number" id="input_number"></input>
<textarea id="input_textarea"></textarea> <textarea id="input_textarea"></textarea>
<!-- "SetRangeText() non-supported types" --> <!-- "SetRangeText() non-supported types" -->
@@ -40,7 +39,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=850364
/** Tests for Bug 850364 && Bug 918940**/ /** Tests for Bug 850364 && Bug 918940**/
var SupportedTypes = ["text", "search", "url", "tel", "password", "textarea", "number"]; var SupportedTypes = ["text", "search", "url", "tel", "password", "textarea"];
var NonSupportedTypes = ["button", "submit", "image", "reset", "radio", var NonSupportedTypes = ["button", "submit", "image", "reset", "radio",
"checkbox", "range", "file", "email"]; "checkbox", "range", "file", "email"];
@@ -93,58 +92,58 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=850364
}, false); }, false);
var test = " setRange(replacement), shrink"; var test = " setRange(replacement), shrink";
elem.value = "0123456789123456"; elem.value = "0123456789ABCDEF";
elem.setSelectionRange(1, 6); elem.setSelectionRange(1, 6);
elem.setRangeText("999"); elem.setRangeText("xyz");
is(elem.value, "09996789123456", msg + test); is(elem.value, "0xyz6789ABCDEF", msg + test);
is(elem.selectionStart, 1, msg + test); is(elem.selectionStart, 1, msg + test);
is(elem.selectionEnd, 4, msg + test); is(elem.selectionEnd, 4, msg + test);
elem.setRangeText("222"); elem.setRangeText("mnk");
is(elem.value, "02226789123456", msg + test); is(elem.value, "0mnk6789ABCDEF", msg + test);
expectedNumOfSelectCalls += 3; expectedNumOfSelectCalls += 3;
test = " setRange(replacement), expand"; test = " setRange(replacement), expand";
elem.value = "0123456789123456"; elem.value = "0123456789ABCDEF";
elem.setSelectionRange(1, 2); elem.setSelectionRange(1, 2);
elem.setRangeText("999"); elem.setRangeText("xyz");
is(elem.value, "099923456789123456", msg + test); is(elem.value, "0xyz23456789ABCDEF", msg + test);
is(elem.selectionStart, 1, msg + test); is(elem.selectionStart, 1, msg + test);
is(elem.selectionEnd, 4, msg + test); is(elem.selectionEnd, 4, msg + test);
elem.setRangeText("222"); elem.setRangeText("mnk");
is(elem.value, "022223456789123456", msg + test); is(elem.value, "0mnk23456789ABCDEF", msg + test);
expectedNumOfSelectCalls += 3; expectedNumOfSelectCalls += 3;
test = " setRange(replacement) pure insertion at start"; test = " setRange(replacement) pure insertion at start";
elem.value = "0123456789123456"; elem.value = "0123456789ABCDEF";
elem.setSelectionRange(0, 0); elem.setSelectionRange(0, 0);
elem.setRangeText("999"); elem.setRangeText("xyz");
is(elem.value, "9990123456789123456", msg + test); is(elem.value, "xyz0123456789ABCDEF", msg + test);
is(elem.selectionStart, 0, msg + test); is(elem.selectionStart, 0, msg + test);
is(elem.selectionEnd, 0, msg + test); is(elem.selectionEnd, 0, msg + test);
elem.setRangeText("222"); elem.setRangeText("mnk");
is(elem.value, "2229990123456789123456", msg + test); is(elem.value, "mnkxyz0123456789ABCDEF", msg + test);
expectedNumOfSelectCalls += 3; expectedNumOfSelectCalls += 3;
test = " setRange(replacement) pure insertion in the middle"; test = " setRange(replacement) pure insertion in the middle";
elem.value = "0123456789123456"; elem.value = "0123456789ABCDEF";
elem.setSelectionRange(4, 4); elem.setSelectionRange(4, 4);
elem.setRangeText("999"); elem.setRangeText("xyz");
is(elem.value, "0123999456789123456", msg + test); is(elem.value, "0123xyz456789ABCDEF", msg + test);
is(elem.selectionStart, 4, msg + test); is(elem.selectionStart, 4, msg + test);
is(elem.selectionEnd, 4, msg + test); is(elem.selectionEnd, 4, msg + test);
elem.setRangeText("222"); elem.setRangeText("mnk");
is(elem.value, "0123222999456789123456", msg + test); is(elem.value, "0123mnkxyz456789ABCDEF", msg + test);
expectedNumOfSelectCalls += 3; expectedNumOfSelectCalls += 3;
test = " setRange(replacement) pure insertion at the end"; test = " setRange(replacement) pure insertion at the end";
elem.value = "1123456789123456"; elem.value = "0123456789ABCDEF";
elem.setSelectionRange(16, 16); elem.setSelectionRange(16, 16);
elem.setRangeText("999"); elem.setRangeText("xyz");
is(elem.value, "1123456789123456999", msg + test); is(elem.value, "0123456789ABCDEFxyz", msg + test);
is(elem.selectionStart, 16, msg + test); is(elem.selectionStart, 16, msg + test);
is(elem.selectionEnd, 16, msg + test); is(elem.selectionEnd, 16, msg + test);
elem.setRangeText("222"); elem.setRangeText("mnk");
is(elem.value, "1123456789123456222999", msg + test); is(elem.value, "0123456789ABCDEFmnkxyz", msg + test);
expectedNumOfSelectCalls += 3; expectedNumOfSelectCalls += 3;
//test SetRange(replacement, start, end, mode) with start > end //test SetRange(replacement, start, end, mode) with start > end
@@ -156,43 +155,43 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=850364
is(opThrows, true, msg + " should throw IndexSizeError"); is(opThrows, true, msg + " should throw IndexSizeError");
//test SelectionMode 'select' //test SelectionMode 'select'
elem.value = "1023456789123456"; elem.value = "0123456789ABCDEF";
elem.setRangeText("999", 4, 9, "select"); elem.setRangeText("xyz", 4, 9, "select");
is(elem.value, "10239999123456", msg + ".value == \"10239999123456\""); is(elem.value, "0123xyz9ABCDEF", msg + ".value == \"0123xyz9ABCDEF\"");
is(elem.selectionStart, 4, msg + ".selectionStart == 4, with \"select\""); is(elem.selectionStart, 4, msg + ".selectionStart == 4, with \"select\"");
is(elem.selectionEnd, 7, msg + ".selectionEnd == 7, with \"select\""); is(elem.selectionEnd, 7, msg + ".selectionEnd == 7, with \"select\"");
expectedNumOfSelectCalls += 1; expectedNumOfSelectCalls += 1;
elem.setRangeText("888", 6, 25, "select"); elem.setRangeText("pqm", 6, 25, "select");
is(elem.value, "102399888", msg + ".value == \"102399888\""); is(elem.value, "0123xypqm", msg + ".value == \"0123xypqm\"");
is(elem.selectionStart, 6, msg + ".selectionStart == 6, with \"select\""); is(elem.selectionStart, 6, msg + ".selectionStart == 6, with \"select\"");
is(elem.selectionEnd, 9, msg + ".selectionEnd == 9, with \"select\""); is(elem.selectionEnd, 9, msg + ".selectionEnd == 9, with \"select\"");
expectedNumOfSelectCalls += 1; expectedNumOfSelectCalls += 1;
//test SelectionMode 'start' //test SelectionMode 'start'
elem.value = "0123456789123456"; elem.value = "0123456789ABCDEF";
elem.setRangeText("999", 4, 9, "start"); elem.setRangeText("xyz", 4, 9, "start");
is(elem.value, "01239999123456", msg + ".value == \"01239999123456\""); is(elem.value, "0123xyz9ABCDEF", msg + ".value == \"0123xyz9ABCDEF\"");
is(elem.selectionStart, 4, msg + ".selectionStart == 4, with \"start\""); is(elem.selectionStart, 4, msg + ".selectionStart == 4, with \"start\"");
is(elem.selectionEnd, 4, msg + ".selectionEnd == 4, with \"start\""); is(elem.selectionEnd, 4, msg + ".selectionEnd == 4, with \"start\"");
expectedNumOfSelectCalls += 1; expectedNumOfSelectCalls += 1;
elem.setRangeText("888", 6, 25, "start"); elem.setRangeText("pqm", 6, 25, "start");
is(elem.value, "012399888", msg + ".value == \"012399888\""); is(elem.value, "0123xypqm", msg + ".value == \"0123xypqm\"");
is(elem.selectionStart, 6, msg + ".selectionStart == 6, with \"start\""); is(elem.selectionStart, 6, msg + ".selectionStart == 6, with \"start\"");
is(elem.selectionEnd, 6, msg + ".selectionEnd == 6, with \"start\""); is(elem.selectionEnd, 6, msg + ".selectionEnd == 6, with \"start\"");
expectedNumOfSelectCalls += 1; expectedNumOfSelectCalls += 1;
//test SelectionMode 'end' //test SelectionMode 'end'
elem.value = "1023456789123456"; elem.value = "0123456789ABCDEF";
elem.setRangeText("999", 4, 9, "end"); elem.setRangeText("xyz", 4, 9, "end");
is(elem.value, "10239999123456", msg + ".value == \"10239999123456\""); is(elem.value, "0123xyz9ABCDEF", msg + ".value == \"0123xyz9ABCDEF\"");
is(elem.selectionStart, 7, msg + ".selectionStart == 7, with \"end\""); is(elem.selectionStart, 7, msg + ".selectionStart == 7, with \"end\"");
is(elem.selectionEnd, 7, msg + ".selectionEnd == 7, with \"end\""); is(elem.selectionEnd, 7, msg + ".selectionEnd == 7, with \"end\"");
expectedNumOfSelectCalls += 1; expectedNumOfSelectCalls += 1;
elem.setRangeText("888", 6, 25, "end"); elem.setRangeText("pqm", 6, 25, "end");
is(elem.value, "102399888", msg + ".value == \"102399888\""); is(elem.value, "0123xypqm", msg + ".value == \"0123xypqm\"");
is(elem.selectionStart, 9, msg + ".selectionStart == 9, with \"end\""); is(elem.selectionStart, 9, msg + ".selectionStart == 9, with \"end\"");
is(elem.selectionEnd, 9, msg + ".selectionEnd == 9, with \"end\""); is(elem.selectionEnd, 9, msg + ".selectionEnd == 9, with \"end\"");
expectedNumOfSelectCalls += 1; expectedNumOfSelectCalls += 1;
@@ -202,8 +201,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=850364
//subcase: selection{Start|End} > end //subcase: selection{Start|End} > end
elem.value = "0123456789"; elem.value = "0123456789";
elem.setSelectionRange(6, 9); elem.setSelectionRange(6, 9);
elem.setRangeText("7", 1, 2, "preserve"); elem.setRangeText("Z", 1, 2, "preserve");
is(elem.value, "0723456789", msg + ".value == \"0723456789\""); is(elem.value, "0Z23456789", msg + ".value == \"0Z23456789\"");
is(elem.selectionStart, 6, msg + ".selectionStart == 6, with \"preserve\""); is(elem.selectionStart, 6, msg + ".selectionStart == 6, with \"preserve\"");
is(elem.selectionEnd, 9, msg + ".selectionEnd == 9, with \"preserve\""); is(elem.selectionEnd, 9, msg + ".selectionEnd == 9, with \"preserve\"");
expectedNumOfSelectCalls += 2; expectedNumOfSelectCalls += 2;
@@ -211,8 +210,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=850364
//subcase: selection{Start|End} < end //subcase: selection{Start|End} < end
elem.value = "0123456789"; elem.value = "0123456789";
elem.setSelectionRange(4, 5); elem.setSelectionRange(4, 5);
elem.setRangeText("3456", 2, 9, "preserve"); elem.setRangeText("QRST", 2, 9, "preserve");
is(elem.value, "0134569", msg + ".value == \"0134569\""); is(elem.value, "01QRST9", msg + ".value == \"01QRST9\"");
is(elem.selectionStart, 2, msg + ".selectionStart == 2, with \"preserve\""); is(elem.selectionStart, 2, msg + ".selectionStart == 2, with \"preserve\"");
is(elem.selectionEnd, 6, msg + ".selectionEnd == 6, with \"preserve\""); is(elem.selectionEnd, 6, msg + ".selectionEnd == 6, with \"preserve\"");
expectedNumOfSelectCalls += 2; expectedNumOfSelectCalls += 2;
@@ -220,8 +219,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=850364
//subcase: selectionStart > end, selectionEnd < end //subcase: selectionStart > end, selectionEnd < end
elem.value = "0123456789"; elem.value = "0123456789";
elem.setSelectionRange(8, 4); elem.setSelectionRange(8, 4);
elem.setRangeText("3456", 1, 5); elem.setRangeText("QRST", 1, 5);
is(elem.value, "0345656789", msg + ".value == \"0345656789\""); is(elem.value, "0QRST56789", msg + ".value == \"0QRST56789\"");
is(elem.selectionStart, 1, msg + ".selectionStart == 1, with \"default\""); is(elem.selectionStart, 1, msg + ".selectionStart == 1, with \"default\"");
is(elem.selectionEnd, 5, msg + ".selectionEnd == 5, with \"default\""); is(elem.selectionEnd, 5, msg + ".selectionEnd == 5, with \"default\"");
expectedNumOfSelectCalls += 2; expectedNumOfSelectCalls += 2;
@@ -229,8 +228,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=850364
//subcase: selectionStart < end, selectionEnd > end //subcase: selectionStart < end, selectionEnd > end
elem.value = "0123456789"; elem.value = "0123456789";
elem.setSelectionRange(4, 9); elem.setSelectionRange(4, 9);
elem.setRangeText("3456", 2, 6); elem.setRangeText("QRST", 2, 6);
is(elem.value, "0134566789", msg + ".value == \"0134566789\""); is(elem.value, "01QRST6789", msg + ".value == \"01QRST6789\"");
is(elem.selectionStart, 2, msg + ".selectionStart == 2, with \"default\""); is(elem.selectionStart, 2, msg + ".selectionStart == 2, with \"default\"");
is(elem.selectionEnd, 9, msg + ".selectionEnd == 9, with \"default\""); is(elem.selectionEnd, 9, msg + ".selectionEnd == 9, with \"default\"");
expectedNumOfSelectCalls += 2; expectedNumOfSelectCalls += 2;

View File

@@ -46,7 +46,6 @@ NS_IMPL_FRAMEARENA_HELPERS(nsNumberControlFrame)
NS_QUERYFRAME_HEAD(nsNumberControlFrame) NS_QUERYFRAME_HEAD(nsNumberControlFrame)
NS_QUERYFRAME_ENTRY(nsNumberControlFrame) NS_QUERYFRAME_ENTRY(nsNumberControlFrame)
NS_QUERYFRAME_ENTRY(nsIAnonymousContentCreator) NS_QUERYFRAME_ENTRY(nsIAnonymousContentCreator)
NS_QUERYFRAME_ENTRY(nsITextControlFrame)
NS_QUERYFRAME_ENTRY(nsIFormControlFrame) NS_QUERYFRAME_ENTRY(nsIFormControlFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame) NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
@@ -473,72 +472,6 @@ nsNumberControlFrame::GetType() const
return nsGkAtoms::numberControlFrame; return nsGkAtoms::numberControlFrame;
} }
NS_IMETHODIMP
nsNumberControlFrame::GetEditor(nsIEditor **aEditor)
{
return GetTextFieldFrame()->GetEditor(aEditor);
}
NS_IMETHODIMP
nsNumberControlFrame::SetSelectionStart(int32_t aSelectionStart)
{
return GetTextFieldFrame()->SetSelectionStart(aSelectionStart);
}
NS_IMETHODIMP
nsNumberControlFrame::SetSelectionEnd(int32_t aSelectionEnd)
{
return GetTextFieldFrame()->SetSelectionEnd(aSelectionEnd);
}
NS_IMETHODIMP
nsNumberControlFrame::SetSelectionRange(int32_t aSelectionStart,
int32_t aSelectionEnd,
SelectionDirection aDirection)
{
return GetTextFieldFrame()->SetSelectionRange(aSelectionStart, aSelectionEnd,
aDirection);
}
NS_IMETHODIMP
nsNumberControlFrame::GetSelectionRange(int32_t* aSelectionStart,
int32_t* aSelectionEnd,
SelectionDirection* aDirection)
{
return GetTextFieldFrame()->GetSelectionRange(aSelectionStart, aSelectionEnd,
aDirection);
}
NS_IMETHODIMP
nsNumberControlFrame::GetOwnedSelectionController(nsISelectionController** aSelCon)
{
return GetTextFieldFrame()->GetOwnedSelectionController(aSelCon);
}
nsFrameSelection*
nsNumberControlFrame::GetOwnedFrameSelection()
{
return GetTextFieldFrame()->GetOwnedFrameSelection();
}
nsresult
nsNumberControlFrame::GetPhonetic(nsAString& aPhonetic)
{
return GetTextFieldFrame()->GetPhonetic(aPhonetic);
}
nsresult
nsNumberControlFrame::EnsureEditorInitialized()
{
return GetTextFieldFrame()->EnsureEditorInitialized();
}
nsresult
nsNumberControlFrame::ScrollSelectionIntoView()
{
return GetTextFieldFrame()->ScrollSelectionIntoView();
}
void void
nsNumberControlFrame::SetFocus(bool aOn, bool aRepaint) nsNumberControlFrame::SetFocus(bool aOn, bool aRepaint)
{ {

View File

@@ -9,10 +9,10 @@
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
#include "nsContainerFrame.h" #include "nsContainerFrame.h"
#include "nsIFormControlFrame.h" #include "nsIFormControlFrame.h"
#include "nsITextControlFrame.h"
#include "nsIAnonymousContentCreator.h" #include "nsIAnonymousContentCreator.h"
#include "nsCOMPtr.h" #include "nsCOMPtr.h"
class nsITextControlFrame;
class nsPresContext; class nsPresContext;
namespace mozilla { namespace mozilla {
@@ -29,7 +29,7 @@ class HTMLInputElement;
*/ */
class nsNumberControlFrame final : public nsContainerFrame class nsNumberControlFrame final : public nsContainerFrame
, public nsIAnonymousContentCreator , public nsIAnonymousContentCreator
, public nsITextControlFrame , public nsIFormControlFrame
{ {
friend nsIFrame* friend nsIFrame*
NS_NewNumberControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_NewNumberControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
@@ -87,34 +87,6 @@ public:
~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock)); ~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
} }
// nsITextControlFrame
NS_IMETHOD GetEditor(nsIEditor **aEditor) override;
NS_IMETHOD SetSelectionStart(int32_t aSelectionStart) override;
NS_IMETHOD SetSelectionEnd(int32_t aSelectionEnd) override;
NS_IMETHOD SetSelectionRange(int32_t aSelectionStart,
int32_t aSelectionEnd,
SelectionDirection aDirection = eNone) override;
NS_IMETHOD GetSelectionRange(int32_t* aSelectionStart,
int32_t* aSelectionEnd,
SelectionDirection* aDirection = nullptr) override;
NS_IMETHOD GetOwnedSelectionController(nsISelectionController** aSelCon) override;
virtual nsFrameSelection* GetOwnedFrameSelection() override;
virtual nsresult GetPhonetic(nsAString& aPhonetic) override;
/**
* Ensure mEditor is initialized with the proper flags and the default value.
* @throws NS_ERROR_NOT_INITIALIZED if mEditor has not been created
* @throws various and sundry other things
*/
virtual nsresult EnsureEditorInitialized() override;
virtual nsresult ScrollSelectionIntoView() override;
// nsIFormControlFrame // nsIFormControlFrame
virtual void SetFocus(bool aOn, bool aRepaint) override; virtual void SetFocus(bool aOn, bool aRepaint) override;
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue) override; virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue) override;

View File

@@ -29,6 +29,3 @@
[input type datetime-local should not support variable-length selections] [input type datetime-local should not support variable-length selections]
expected: FAIL expected: FAIL
[input type number should not support variable-length selections]
expected: FAIL