зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1611661 - Give nsNumberControlFrame a TextInput type. r=mats
LayoutFrameType::NumberControl is unused, and nsNumberControlFrame inherits now from nsTextControlFrame. There are three places that check for LayoutFrameType::TextInput. Two direct ones: * ShouldApplyOverflowCLipping * nsFontInflationData And one indirect via IsTextInputFrame, the one mentioned in comment 2. For all those three, it makes sense for nsNumberControlFrame to be handled in the same way as nsTextControlFrame. Long term we may want to get rid of the concept of frame types and just use queryFrame or some sugar of that sort, as it's error prone. But for now this fixes the bug. Differential Revision: https://phabricator.services.mozilla.com/D61088 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d81e89c89a
Коммит
78ba77f68b
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<html class="reftest-wait">
|
||||
<title>Test reference</title>
|
||||
<script src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<div>
|
||||
<input type="number" value="33">
|
||||
</div>
|
||||
<script>
|
||||
SimpleTest.waitForFocus(function() {
|
||||
document.querySelector('input').focus();
|
||||
requestAnimationFrame(function() {
|
||||
// Move after the 3
|
||||
synthesizeKey("KEY_ArrowRight");
|
||||
document.documentElement.className = "";
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,23 @@
|
|||
<!doctype html>
|
||||
<html class="reftest-wait">
|
||||
<title>Can edit input type=number with a user-select: none ancestor</title>
|
||||
<script src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<div style="user-select: none">
|
||||
<input type="number" value="322223">
|
||||
</div>
|
||||
<script>
|
||||
SimpleTest.waitForFocus(function() {
|
||||
document.querySelector('input').focus();
|
||||
requestAnimationFrame(function() {
|
||||
// Move after the 3
|
||||
synthesizeKey("KEY_ArrowRight");
|
||||
// Select "2222"
|
||||
for (let i = 0; i < 4; ++i)
|
||||
synthesizeKey("KEY_ArrowRight", { shiftKey: true });
|
||||
// Rip it off.
|
||||
synthesizeKey("KEY_Delete");
|
||||
document.documentElement.removeAttribute("class");
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -357,6 +357,8 @@ support-files =
|
|||
bug1550869-2-ref.html
|
||||
bug1591282-1.html
|
||||
bug1591282-1-ref.html
|
||||
bug1611661.html
|
||||
bug1611661-ref.html
|
||||
image_rgrg-256x256.png
|
||||
input-invalid-ref.html
|
||||
input-maxlength-invalid-change.html
|
||||
|
|
|
@ -385,6 +385,8 @@ if (navigator.platform.includes("Linux")) {
|
|||
[ 'bug1524266-3.html' , 'bug1524266-2-ref.html' ] ,
|
||||
// Tries to select and delete non-editable content in a user-select subtree.
|
||||
[ 'bug1524266-4.html' , 'bug1524266-2-ref.html' ] ,
|
||||
// Tries to edit an <input type="number"> with arrows inside a user-select: none element.
|
||||
[ 'bug1611661.html' , 'bug1611661-ref.html' ] ,
|
||||
function() {SpecialPowers.pushPrefEnv({'clear': [['layout.accessiblecaret.enabled_on_touch']]}, nextTest);} ,
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ FRAME_CLASSES = [
|
|||
Frame("nsMenuFrame", "Menu", NOT_LEAF),
|
||||
Frame("nsMenuPopupFrame", "MenuPopup", DYNAMIC_LEAF),
|
||||
Frame("nsMeterFrame", "Meter", LEAF),
|
||||
Frame("nsNumberControlFrame", "NumberControl", LEAF),
|
||||
Frame("nsNumberControlFrame", "TextInput", LEAF),
|
||||
Frame("nsPluginFrame", "Object", LEAF),
|
||||
Frame("nsPageBreakFrame", "PageBreak", LEAF),
|
||||
Frame("nsPageContentFrame", "PageContent", NOT_LEAF),
|
||||
|
|
Загрузка…
Ссылка в новой задаче