Diff
Modified: trunk/LayoutTests/ChangeLog (225706 => 225707)
--- trunk/LayoutTests/ChangeLog 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/LayoutTests/ChangeLog 2017-12-08 22:51:26 UTC (rev 225707)
@@ -1,3 +1,23 @@
+2017-12-08 Daniel Bates <daba...@apple.com>
+
+ Remove unnecessary prefix from AutoFillButtonType enumerators
+ https://bugs.webkit.org/show_bug.cgi?id=180512
+
+ Reviewed by Tim Horton.
+
+ * accessibility/auto-fill-crash.html:
+ * accessibility/auto-fill-types.html:
+ * fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html:
+ * fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html:
+ * fast/forms/auto-fill-button/input-auto-fill-button.html:
+ * fast/forms/auto-fill-button/input-contacts-auto-fill-button.html:
+ * fast/forms/auto-fill-button/input-disabled-auto-fill-button.html:
+ * fast/forms/auto-fill-button/input-readonly-auto-fill-button.html:
+ * fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html:
+ * fast/forms/auto-fill-button/mouse-down-input-mouse-release-auto-fill-button.html:
+ * fast/forms/auto-fill-button/show-correct-auto-fill-button-when-auto-fill-button-type-changes-expected.html:
+ * fast/forms/auto-fill-button/show-correct-auto-fill-button-when-auto-fill-button-type-changes.html:
+
2017-12-08 Dean Jackson <d...@apple.com>
Implement transferToImageBitmap for WebGL offscreen canvas objects
Modified: trunk/LayoutTests/accessibility/auto-fill-crash.html (225706 => 225707)
--- trunk/LayoutTests/accessibility/auto-fill-crash.html 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/LayoutTests/accessibility/auto-fill-crash.html 2017-12-08 22:51:26 UTC (rev 225707)
@@ -18,12 +18,12 @@
if (window.accessibilityController) {
var axTextField = accessibilityController.accessibleElementById("textfield");
var childrenCountExpected = accessibilityController.platformName == "atk" ? "2" : "3";
- window.internals.setShowAutoFillButton(document.getElementById("textfield"), "AutoFillButtonTypeContacts");
+ window.internals.setShowAutoFillButton(document.getElementById("textfield"), "Contacts");
shouldBe("accessibilityController.accessibleElementById('textfield').childrenCount", childrenCountExpected);
// Don't crash!
childrenCountExpected = accessibilityController.platformName == "atk" ? "0" : "1";
- window.internals.setShowAutoFillButton(document.getElementById("textfield"), "AutoFillButtonTypeNone");
+ window.internals.setShowAutoFillButton(document.getElementById("textfield"), "None");
shouldBe("accessibilityController.accessibleElementById('textfield').childrenCount", childrenCountExpected);
}
Modified: trunk/LayoutTests/accessibility/auto-fill-types.html (225706 => 225707)
--- trunk/LayoutTests/accessibility/auto-fill-types.html 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/LayoutTests/accessibility/auto-fill-types.html 2017-12-08 22:51:26 UTC (rev 225707)
@@ -21,13 +21,13 @@
debug("Initial auto-fill available: " + axTextField.boolAttributeValue("AXValueAutofillAvailable"));
debug("Auto-fill type: " + axTextField.stringAttributeValue("AXValueAutofillType"));
- window.internals.setShowAutoFillButton(document.getElementById("textfield"), "AutoFillButtonTypeContacts");
+ window.internals.setShowAutoFillButton(document.getElementById("textfield"), "Contacts");
var contactsButton = axTextField.childAtIndex(1);
debug("Contact button role: " + contactsButton.role);
debug("Contact button label: " + contactsButton.description);
debug("Auto-fill type: " + axTextField.stringAttributeValue("AXValueAutofillType"));
- window.internals.setShowAutoFillButton(document.getElementById("textfield"), "AutoFillButtonTypeCredentials");
+ window.internals.setShowAutoFillButton(document.getElementById("textfield"), "Credentials");
var credentialsButton = axTextField.childAtIndex(1);
debug("Credentials button role: " + credentialsButton.role);
debug("Credentials button label: " + credentialsButton.description);
Modified: trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html (225706 => 225707)
--- trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html 2017-12-08 22:51:26 UTC (rev 225707)
@@ -10,7 +10,7 @@
var password = document.getElementById("password");
if (window.internals)
- internals.setShowAutoFillButton(password, "AutoFillButtonTypeCredentials");
+ internals.setShowAutoFillButton(password, "Credentials");
function makeFieldDisabledAndNotifyDone()
{
Modified: trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html (225706 => 225707)
--- trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html 2017-12-08 22:51:26 UTC (rev 225707)
@@ -10,7 +10,7 @@
var password = document.getElementById("password");
if (window.internals)
- internals.setShowAutoFillButton(password, "AutoFillButtonTypeCredentials");
+ internals.setShowAutoFillButton(password, "Credentials");
function makeFieldReadOnlyAndNotifyDone()
{
Modified: trunk/LayoutTests/fast/forms/auto-fill-button/input-auto-fill-button.html (225706 => 225707)
--- trunk/LayoutTests/fast/forms/auto-fill-button/input-auto-fill-button.html 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/input-auto-fill-button.html 2017-12-08 22:51:26 UTC (rev 225707)
@@ -8,14 +8,14 @@
if (window.internals) {
var inputs = document.querySelectorAll("input");
for (var i = 0; i < inputs.length; ++i)
- window.internals.setShowAutoFillButton(inputs[i], "AutoFillButtonTypeCredentials");
+ window.internals.setShowAutoFillButton(inputs[i], "Credentials");
var dynamicInput = document.createElement("input");
- window.internals.setShowAutoFillButton(dynamicInput, "AutoFillButtonTypeCredentials");
+ window.internals.setShowAutoFillButton(dynamicInput, "Credentials");
document.querySelector("#container").appendChild(dynamicInput);
var dynamicInput2 = document.createElement("input");
- window.internals.setShowAutoFillButton(dynamicInput2, "AutoFillButtonTypeCredentials");
+ window.internals.setShowAutoFillButton(dynamicInput2, "Credentials");
document.querySelector("#container").appendChild(dynamicInput2);
dynamicInput2.setAttribute("type", "password");
}
Modified: trunk/LayoutTests/fast/forms/auto-fill-button/input-contacts-auto-fill-button.html (225706 => 225707)
--- trunk/LayoutTests/fast/forms/auto-fill-button/input-contacts-auto-fill-button.html 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/input-contacts-auto-fill-button.html 2017-12-08 22:51:26 UTC (rev 225707)
@@ -11,19 +11,19 @@
if (window.internals) {
var inputs = document.querySelectorAll("input");
for (var i = 0; i < inputs.length; ++i)
- window.internals.setShowAutoFillButton(inputs[i], "AutoFillButtonTypeContacts");
+ window.internals.setShowAutoFillButton(inputs[i], "Contacts");
var dynamicInput = document.createElement("input");
- window.internals.setShowAutoFillButton(dynamicInput, "AutoFillButtonTypeContacts");
+ window.internals.setShowAutoFillButton(dynamicInput, "Contacts");
document.querySelector("#container").appendChild(dynamicInput);
var dynamicInput2 = document.createElement("input");
- window.internals.setShowAutoFillButton(dynamicInput2, "AutoFillButtonTypeContacts");
+ window.internals.setShowAutoFillButton(dynamicInput2, "Contacts");
document.querySelector("#container").appendChild(dynamicInput2);
dynamicInput2.setAttribute("name", "address");
var dynamicInput3 = document.createElement("input");
- window.internals.setShowAutoFillButton(dynamicInput3, "AutoFillButtonTypeContacts");
+ window.internals.setShowAutoFillButton(dynamicInput3, "Contacts");
document.querySelector("#container").appendChild(dynamicInput3);
dynamicInput3.setAttribute("name", "phone_number");
}
Modified: trunk/LayoutTests/fast/forms/auto-fill-button/input-disabled-auto-fill-button.html (225706 => 225707)
--- trunk/LayoutTests/fast/forms/auto-fill-button/input-disabled-auto-fill-button.html 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/input-disabled-auto-fill-button.html 2017-12-08 22:51:26 UTC (rev 225707)
@@ -5,7 +5,7 @@
<input type="password" id="password" placeholder="disabled" disabled autofocus>
<script>
if (window.internals)
- internals.setShowAutoFillButton(document.getElementById("password"), "AutoFillButtonTypeCredentials");
+ internals.setShowAutoFillButton(document.getElementById("password"), "Credentials");
</script>
</body>
</html>
Modified: trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-auto-fill-button.html (225706 => 225707)
--- trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-auto-fill-button.html 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-auto-fill-button.html 2017-12-08 22:51:26 UTC (rev 225707)
@@ -5,7 +5,7 @@
<input type="password" id="password" placeholder="read only" readonly autofocus>
<script>
if (window.internals)
- internals.setShowAutoFillButton(document.getElementById("password"), "AutoFillButtonTypeCredentials");
+ internals.setShowAutoFillButton(document.getElementById("password"), "Credentials");
</script>
</body>
</html>
Modified: trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html (225706 => 225707)
--- trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html 2017-12-08 22:51:26 UTC (rev 225707)
@@ -5,7 +5,7 @@
<input type="password" id="password" value="read only" readonly autofocus>
<script>
if (window.internals)
- internals.setShowAutoFillButton(document.getElementById("password"), "AutoFillButtonTypeCredentials");
+ internals.setShowAutoFillButton(document.getElementById("password"), "Credentials");
</script>
</body>
</html>
Modified: trunk/LayoutTests/fast/forms/auto-fill-button/mouse-down-input-mouse-release-auto-fill-button.html (225706 => 225707)
--- trunk/LayoutTests/fast/forms/auto-fill-button/mouse-down-input-mouse-release-auto-fill-button.html 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/mouse-down-input-mouse-release-auto-fill-button.html 2017-12-08 22:51:26 UTC (rev 225707)
@@ -22,7 +22,7 @@
if (!window.internals || !window.eventSender)
return;
- internals.setShowAutoFillButton(password, "AutoFillButtonTypeCredentials");
+ internals.setShowAutoFillButton(password, "Credentials");
var autoFillButton = getElementByPseudoId(internals.shadowRoot(password), "-webkit-credentials-auto-fill-button");
autoFillButton._onclick_ = checkEventAndDone;
Modified: trunk/LayoutTests/fast/forms/auto-fill-button/show-correct-auto-fill-button-when-auto-fill-button-type-changes-expected.html (225706 => 225707)
--- trunk/LayoutTests/fast/forms/auto-fill-button/show-correct-auto-fill-button-when-auto-fill-button-type-changes-expected.html 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/show-correct-auto-fill-button-when-auto-fill-button-type-changes-expected.html 2017-12-08 22:51:26 UTC (rev 225707)
@@ -6,8 +6,8 @@
<input id="contacts">
<script>
if (window.internals) {
- internals.setShowAutoFillButton(document.getElementById("credentials"), "AutoFillButtonTypeContacts");
- internals.setShowAutoFillButton(document.getElementById("contacts"), "AutoFillButtonTypeCredentials");
+ internals.setShowAutoFillButton(document.getElementById("credentials"), "Contacts");
+ internals.setShowAutoFillButton(document.getElementById("contacts"), "Credentials");
}
</script>
</body>
Modified: trunk/LayoutTests/fast/forms/auto-fill-button/show-correct-auto-fill-button-when-auto-fill-button-type-changes.html (225706 => 225707)
--- trunk/LayoutTests/fast/forms/auto-fill-button/show-correct-auto-fill-button-when-auto-fill-button-type-changes.html 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/show-correct-auto-fill-button-when-auto-fill-button-type-changes.html 2017-12-08 22:51:26 UTC (rev 225707)
@@ -6,11 +6,11 @@
<input id="contacts">
<script>
if (window.internals) {
- internals.setShowAutoFillButton(document.getElementById("credentials"), "AutoFillButtonTypeCredentials");
- internals.setShowAutoFillButton(document.getElementById("credentials"), "AutoFillButtonTypeContacts");
+ internals.setShowAutoFillButton(document.getElementById("credentials"), "Credentials");
+ internals.setShowAutoFillButton(document.getElementById("credentials"), "Contacts");
- internals.setShowAutoFillButton(document.getElementById("contacts"), "AutoFillButtonTypeContacts");
- internals.setShowAutoFillButton(document.getElementById("contacts"), "AutoFillButtonTypeCredentials");
+ internals.setShowAutoFillButton(document.getElementById("contacts"), "Contacts");
+ internals.setShowAutoFillButton(document.getElementById("contacts"), "Credentials");
}
</script>
</body>
Modified: trunk/Source/WebCore/ChangeLog (225706 => 225707)
--- trunk/Source/WebCore/ChangeLog 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/Source/WebCore/ChangeLog 2017-12-08 22:51:26 UTC (rev 225707)
@@ -1,3 +1,15 @@
+2017-12-08 Daniel Bates <daba...@apple.com>
+
+ Remove unnecessary prefix from AutoFillButtonType enumerators
+ https://bugs.webkit.org/show_bug.cgi?id=180512
+
+ Reviewed by Tim Horton.
+
+ * testing/Internals.cpp:
+ (WebCore::toAutoFillButtonType):
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
2017-12-08 Dean Jackson <d...@apple.com>
Implement transferToImageBitmap for WebGL offscreen canvas objects
Modified: trunk/Source/WebCore/testing/Internals.cpp (225706 => 225707)
--- trunk/Source/WebCore/testing/Internals.cpp 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/Source/WebCore/testing/Internals.cpp 2017-12-08 22:51:26 UTC (rev 225707)
@@ -1657,11 +1657,11 @@
static AutoFillButtonType toAutoFillButtonType(Internals::AutoFillButtonType type)
{
switch (type) {
- case Internals::AutoFillButtonType::AutoFillButtonTypeNone:
+ case Internals::AutoFillButtonType::None:
return AutoFillButtonType::None;
- case Internals::AutoFillButtonType::AutoFillButtonTypeCredentials:
+ case Internals::AutoFillButtonType::Credentials:
return AutoFillButtonType::Credentials;
- case Internals::AutoFillButtonType::AutoFillButtonTypeContacts:
+ case Internals::AutoFillButtonType::Contacts:
return AutoFillButtonType::Contacts;
}
ASSERT_NOT_REACHED();
Modified: trunk/Source/WebCore/testing/Internals.h (225706 => 225707)
--- trunk/Source/WebCore/testing/Internals.h 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/Source/WebCore/testing/Internals.h 2017-12-08 22:51:26 UTC (rev 225707)
@@ -234,7 +234,7 @@
bool elementShouldAutoComplete(HTMLInputElement&);
void setEditingValue(HTMLInputElement&, const String&);
void setAutofilled(HTMLInputElement&, bool enabled);
- enum class AutoFillButtonType { AutoFillButtonTypeNone, AutoFillButtonTypeContacts, AutoFillButtonTypeCredentials };
+ enum class AutoFillButtonType { None, Contacts, Credentials };
void setShowAutoFillButton(HTMLInputElement&, AutoFillButtonType);
ExceptionOr<void> scrollElementToRect(Element&, int x, int y, int w, int h);
Modified: trunk/Source/WebCore/testing/Internals.idl (225706 => 225707)
--- trunk/Source/WebCore/testing/Internals.idl 2017-12-08 22:46:50 UTC (rev 225706)
+++ trunk/Source/WebCore/testing/Internals.idl 2017-12-08 22:51:26 UTC (rev 225707)
@@ -58,11 +58,10 @@
"previous-track"
};
-// FIXME: Strings in an enum should not have the name of the enum as a prefix.
enum AutoFillButtonType {
- "AutoFillButtonTypeNone",
- "AutoFillButtonTypeContacts",
- "AutoFillButtonTypeCredentials"
+ "None",
+ "Contacts",
+ "Credentials"
};
enum UserInterfaceLayoutDirection {