From f2835bb68cb99f89d89a7aa863f47d7219f5f177 Mon Sep 17 00:00:00 2001 From: Kent Tamura Date: Mon, 16 Sep 2019 21:29:59 -0700 Subject: [PATCH] Move 'autofocus' IDL attribute to HTMLOrSVGElement crrev.com/697042 changed the autofocus behavior, and this CL just changes the IDL attribute. Note: We need to add 'autofocus' to svg_attribute_names.json5 because generated code for 'Reflect' needs svg_names::kAutofocusAttr. html_names::kAutofocusAttr and svg_names::kAutofocusAttr have an identical value. I2IS: https://groups.google.com/a/chromium.org/d/msg/blink-dev/g8MP8KUf96w/360rLewrDwAJ Bug: 995679 Change-Id: I4c7a1ad72d14c4e1e54d8455935b1255805fb384 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808617 Commit-Queue: Kent Tamura Reviewed-by: Keishi Hattori Cr-Commit-Position: refs/heads/master@{#697087} --- html/dom/elements-forms.js | 4 ---- html/dom/reflection.js | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/html/dom/elements-forms.js b/html/dom/elements-forms.js index 051bc2087f3155..448a72f5ed6070 100644 --- a/html/dom/elements-forms.js +++ b/html/dom/elements-forms.js @@ -27,7 +27,6 @@ var formElements = { accept: "string", alt: "string", autocomplete: {type: "string", customGetter: true}, - autofocus: "boolean", defaultChecked: {type: "boolean", domAttrName: "checked"}, dirName: "string", disabled: "boolean", @@ -65,7 +64,6 @@ var formElements = { useMap: "string", }, button: { - autofocus: "boolean", disabled: "boolean", // "formAction" has magic hard-coded in reflection.js formAction: "url", @@ -79,7 +77,6 @@ var formElements = { }, select: { autocomplete: {type: "string", customGetter: true}, - autofocus: "boolean", disabled: "boolean", multiple: "boolean", name: "string", @@ -99,7 +96,6 @@ var formElements = { }, textarea: { autocomplete: {type: "string", customGetter: true}, - autofocus: "boolean", cols: {type: "limited unsigned long with fallback", defaultVal: 20}, dirName: "string", disabled: "boolean", diff --git a/html/dom/reflection.js b/html/dom/reflection.js index 5209762660bb46..fca9e43f245a97 100644 --- a/html/dom/reflection.js +++ b/html/dom/reflection.js @@ -900,6 +900,7 @@ for (var element in elements) { ReflectionTests.reflects({type: "enum", keywords: ["ltr", "rtl", "auto"]}, "dir", element); ReflectionTests.reflects("string", "className", element, "class"); ReflectionTests.reflects("tokenlist", "classList", element, "class"); + ReflectionTests.reflects("boolean", "autofocus", element); ReflectionTests.reflects("boolean", "hidden", element); ReflectionTests.reflects("string", "accessKey", element); // Don't try to test the defaultVal -- it should be either 0 or -1, but the