Bug 981248 - Rewrite <input type=number> to avoid an anonymous input. r=masayuki,surkov,jwatt,ntim,jfkthame,smaug

Instead, subclass nsTextControlFrame. This simplifies the code and avoids
correctness issues.

I kept the localization functionality though it is not spec compliant. But I
filed a bug to remove it in a followup.

Differential Revision: https://phabricator.services.mozilla.com/D57193
This commit is contained in:
Emilio Cobos Álvarez
2020-01-14 19:01:05 +00:00
parent 6ffb9ec6f9
commit 0534b20fd6
45 changed files with 367 additions and 1169 deletions

View File

@@ -39,7 +39,6 @@
#include "mozilla/dom/HTMLTextAreaElement.h"
#include "mozilla/dom/Text.h"
#include "mozilla/StaticPrefs_dom.h"
#include "nsNumberControlFrame.h"
#include "nsFrameSelection.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/Telemetry.h"
@@ -3090,8 +3089,7 @@ void TextControlState::InitializeKeyboardEventListeners() {
TrustedEventsAtSystemGroupBubble());
}
mSelCon->SetScrollableFrame(
do_QueryFrame(mBoundFrame->PrincipalChildList().FirstChild()));
mSelCon->SetScrollableFrame(mBoundFrame->GetScrollTargetFrame());
}
void TextControlState::ValueWasChanged(bool aNotify) {