Unreviewed, rolling out r238357.
authorryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2018 01:59:19 +0000 (01:59 +0000)
committerryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2018 01:59:19 +0000 (01:59 +0000)
One of the layout tests added with this change is failing on Mojave.

Reverted changeset:
"REGRESSION (r238078): Do not draw caps lock indicator when Strong Password button is shown"
https://bugs.webkit.org/show_bug.cgi?id=191969
https://trac.webkit.org/changeset/238513

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238540 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-when-after-hiding-auto-fill-strong-password-button-expected.html [deleted file]
LayoutTests/fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-when-after-hiding-auto-fill-strong-password-button.html [deleted file]
LayoutTests/fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible-expected.html [deleted file]
LayoutTests/fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html [deleted file]
LayoutTests/platform/mac-wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/html/TextFieldInputType.cpp

index bccfcea..4c6164e 100644 (file)
@@ -1,3 +1,14 @@
+2018-11-26  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r238357.
+
+        One of the layout tests added with this change is failing on Mojave.
+
+        Reverted changeset:
+        "REGRESSION (r238078): Do not draw caps lock indicator when Strong Password button is shown"
+        https://bugs.webkit.org/show_bug.cgi?id=191969
+        https://trac.webkit.org/changeset/238513
+
 2018-11-26  Tim Horton  <timothy_horton@apple.com>
 
         Insert <attachment> elements under editable images to make their backing data accessible
index a6ddbe1..daa868a 100644 (file)
@@ -399,8 +399,6 @@ fast/canvas/webgl/context-update-on-display-configuration.html [ Skip ]
 fast/misc/valid-primary-screen-displayID.html [ Skip ]
 
 fast/events/detect-caps-lock.html [ Skip ]
-fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-when-after-hiding-auto-fill-strong-password-button.html [ Skip ]
-fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html [ Skip ]
 fast/repaint/placeholder-after-caps-lock-hidden.html [ Skip ]
 fast/forms/password-scrolled-after-caps-lock-toggled.html [ Skip ]
 
diff --git a/LayoutTests/fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-when-after-hiding-auto-fill-strong-password-button-expected.html b/LayoutTests/fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-when-after-hiding-auto-fill-strong-password-button-expected.html
deleted file mode 100644 (file)
index c557c12..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../../resources/ui-helper.js"></script>
-<script>
-if (window.testRunner)
-    testRunner.waitUntilDone();
-</script>
-</head>
-<body>
-<p>This tests that the caps lock indicator is visible after hiding the Strong Password AutoFill button. It can only be tested in the test tool.</p>
-<input type="password" value="A quick brown fox jumped over the lazy dog.">
-<script>
-function done()
-{
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function handleCapsLockEnabled(event)
-{
-    console.assert(event.key === "CapsLock");
-    // FIXME: For some reason it takes up to 100ms for the caps lock indicator to be painted (why?).
-    window.setTimeout(done, 100);
-}
-
-async function runTest()
-{
-    if (!window.testRunner)
-        return;
-
-    let input = document.querySelector("input");
-
-    function handleFocus(event) {
-        console.assert(event.target === input);
-        // Move the caret is at the beginning of the field to ensure consistent test results.
-        input.setSelectionRange(0, 0);
-        input.addEventListener("keydown", handleCapsLockEnabled, { once: true });
-        UIHelper.toggleCapsLock();
-    }
-    input.addEventListener("focus", handleFocus, { once: true });
-    UIHelper.activateElement(input); // Puts caret in the center of the field; we will fix this up.
-}
-
-runTest();
-</script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-when-after-hiding-auto-fill-strong-password-button.html b/LayoutTests/fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-when-after-hiding-auto-fill-strong-password-button.html
deleted file mode 100644 (file)
index b819e9c..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../../resources/ui-helper.js"></script>
-<script>
-if (window.testRunner)
-    testRunner.waitUntilDone();
-</script>
-</head>
-<body>
-<p>This tests that the caps lock indicator is visible after hiding the Strong Password AutoFill button. It can only be tested in the test tool.</p>
-<input type="password" value="A quick brown fox jumped over the lazy dog.">
-<script>
-function done()
-{
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function handleCapsLockEnabled(event)
-{
-    console.assert(event.key === "CapsLock");
-    let input = document.querySelector("input");
-    internals.setAutofilled(input, false);
-    internals.setShowAutoFillButton(input, "None");
-
-    // Move the caret is at the beginning of the field to ensure consistent test results.
-    input.setSelectionRange(0, 0);
-
-    // FIXME: For some reason it takes up to 100ms for the caps lock indicator to be painted (why?).
-    window.setTimeout(done, 100);
-}
-
-async function runTest()
-{
-    if (!window.internals)
-        return;
-
-    let input = document.querySelector("input");
-    internals.setAutofilled(input, true);
-    internals.setShowAutoFillButton(input, "StrongPassword");
-
-    function handleFocus(event) {
-        console.assert(event.target === input);
-        input.addEventListener("keydown", handleCapsLockEnabled, { once: true });
-        UIHelper.toggleCapsLock();
-    }
-    input.addEventListener("focus", handleFocus, { once: true });
-    UIHelper.activateElement(input);
-}
-
-runTest();
-</script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible-expected.html b/LayoutTests/fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible-expected.html
deleted file mode 100644 (file)
index e434ff2..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../../resources/ui-helper.js"></script>
-<script>
-if (window.testRunner)
-    testRunner.waitUntilDone();
-</script>
-</head>
-<body>
-<p>This tests that the caps lock indicator is not visible when the Strong Password AutoFill button is shown. It can only be tested in the test tool.</p>
-<input type="password" value="A quick brown fox jumped over the lazy dog.">
-<script>
-async function runTest()
-{
-    if (!window.internals)
-        return;
-
-    let input = document.querySelector("input");
-    internals.setAutofilled(input, true);
-    internals.setShowAutoFillButton(input, "StrongPassword");
-
-    input.addEventListener("focus", () => testRunner.notifyDone(), { once: true });
-    await UIHelper.activateElement(input);
-}
-
-runTest();
-</script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html b/LayoutTests/fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html
deleted file mode 100644 (file)
index 8fa970e..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../../resources/ui-helper.js"></script>
-<script>
-if (window.testRunner)
-    testRunner.waitUntilDone();
-</script>
-</head>
-<body>
-<p>This tests that the caps lock indicator is not visible when the Strong Password AutoFill button is shown. It can only be tested in the test tool.</p>
-<input type="password" value="A quick brown fox jumped over the lazy dog.">
-<script>
-function done()
-{
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function handleCapsLockEnabled(event)
-{
-    console.assert(event.key === "CapsLock");
-    // FIXME: For some reason it takes up to 100ms for the caps lock indicator to be painted (why?).
-    window.setTimeout(done, 100);
-}
-
-async function runTest()
-{
-    if (!window.internals)
-        return;
-
-    let input = document.querySelector("input");
-    internals.setAutofilled(input, true);
-    internals.setShowAutoFillButton(input, "StrongPassword");
-
-    function handleFocus(event) {
-        console.assert(event.target === input);
-        input.addEventListener("keydown", handleCapsLockEnabled, { once: true });
-        UIHelper.toggleCapsLock();
-    }
-    input.addEventListener("focus", handleFocus, { once: true });
-    UIHelper.activateElement(input);
-}
-
-runTest();
-</script>
-</body>
-</html>
index 76c6e72..76fddc2 100644 (file)
@@ -68,8 +68,6 @@ webkit.org/b/187773 http/tests/webAPIStatistics [ Pass ]
 webkit.org/b/184569 storage/indexeddb/modern/transactions-stop-on-navigation.html [ Pass Failure ]
 
 [ Mojave+ ] fast/events/detect-caps-lock.html [ Pass ]
-[ Mojave+ ] fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-when-after-hiding-auto-fill-strong-password-button.html [ Pass ]
-[ Mojave+ ] fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html [ Pass ]
 [ Mojave+ ] fast/repaint/placeholder-after-caps-lock-hidden.html [ Pass ]
 [ Mojave+ ] fast/forms/password-scrolled-after-caps-lock-toggled.html [ Pass ]
 
index f2c40bb..a9534fe 100644 (file)
@@ -1,3 +1,14 @@
+2018-11-26  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r238357.
+
+        One of the layout tests added with this change is failing on Mojave.
+
+        Reverted changeset:
+        "REGRESSION (r238078): Do not draw caps lock indicator when Strong Password button is shown"
+        https://bugs.webkit.org/show_bug.cgi?id=191969
+        https://trac.webkit.org/changeset/238513
+
 2018-11-26  Tim Horton  <timothy_horton@apple.com>
 
         Insert <attachment> elements under editable images to make their backing data accessible
index 471b77a..ff770a6 100644 (file)
@@ -724,9 +724,6 @@ bool TextFieldInputType::shouldDrawCapsLockIndicator() const
     if (element()->isDisabledOrReadOnly())
         return false;
 
-    if (element()->hasAutoFillStrongPasswordButton())
-        return false;
-
     RefPtr<Frame> frame = element()->document().frame();
     if (!frame)
         return false;
@@ -795,8 +792,6 @@ void TextFieldInputType::createAutoFillButton(AutoFillButtonType autoFillButtonT
 
 void TextFieldInputType::updateAutoFillButton()
 {
-    capsLockStateMayHaveChanged();
-
     if (shouldDrawAutoFillButton()) {
         if (!m_container)
             createContainer();