Diff
Modified: trunk/LayoutTests/ChangeLog (248372 => 248373)
--- trunk/LayoutTests/ChangeLog 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/LayoutTests/ChangeLog 2019-08-07 17:24:19 UTC (rev 248373)
@@ -1,3 +1,24 @@
+2019-08-07 Priyanka Agarwal <[email protected]>
+
+ Allow clients to toggle a text input field between being viewable and having characters hidden while maintaining
+ a yellow auto-filled appearance
+ https://bugs.webkit.org/show_bug.cgi?id=200037
+ rdar://problem/51900961
+
+ Reviewed by Daniel Bates.
+
+ * fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset.html: Added.
+ Test for when the form is reset to no longer be autofilled.
+
+ * fast/forms/auto-fill-button/input-strong-password-viewable.html: Added.
+ Test for when the form is set to being autofilled and viewable.
+
+ * fast/forms/auto-fill-button/resources/process-auto-fill-button-type-and-invoke-runTest.js:
+ (window.onload): _javascript_ used by test to set the element to be autofilled and viewable added
+
+ * platform/mac/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset-expected.txt: Added.
+ * platform/mac/fast/forms/auto-fill-button/input-strong-password-viewable-expected.txt:
+
2019-08-07 Wenson Hsieh <[email protected]>
Extra space inserted at start of line when inserting a newline in Mail compose
Added: trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset.html (0 => 248373)
--- trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset.html 2019-08-07 17:24:19 UTC (rev 248373)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+function runTest()
+{
+ document.forms[0].reset();
+ if (window.internals)
+ internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+</script>
+</head>
+<body>
+<p>This tests that that an autofilled and viewable Strong Password decorated text field reverts to its original appearance when the form is reset. It can only be tested in the test tool.</p>
+<form>
+<input type="password" value="Cupertino" data-auto-fill-button-type="StrongPassword" data-autofilled="true">
+</form>
+</body>
+</html>
Added: trunk/LayoutTests/fast/forms/auto-fill-button/input-strong-password-viewable.html (0 => 248373)
--- trunk/LayoutTests/fast/forms/auto-fill-button/input-strong-password-viewable.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/input-strong-password-viewable.html 2019-08-07 17:24:19 UTC (rev 248373)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests that the Strong Password AutoFill and viewable visual treatment renders in an auto-filled input. It can only be tested in the test tool.</p>
+<div id="container">
+ <input type="text" value="A quick brown fox jumped over the lazy dog.">
+ <input type="password" value="A quick brown fox jumped over the lazy dog.">
+ <input type="password" value="A quick brown fox jumped over the lazy dog." style="width:300px">
+ <input type="password" value="A quick brown fox jumped over the lazy dog." style="width:20px">
+ <input type="password" value="A quick brown fox jumped over the lazy dog." style="height:100px">
+ <input type="password" value="A quick brown fox jumped over the lazy dog." style="width:20px; height:100px">
+</div>
+<script>
+if (window.internals) {
+ var inputs = document.querySelectorAll("input");
+ for (var i = 0; i < inputs.length; ++i) {
+ window.internals.setAutoFilledAndViewable(inputs[i], true);
+ }
+
+ var dynamicInput = document.createElement("input");
+ window.internals.setAutoFilledAndViewable(dynamicInput, true);
+ document.querySelector("#container").appendChild(dynamicInput);
+}
+</script>
+</body>
+</html>
+
Modified: trunk/LayoutTests/fast/forms/auto-fill-button/resources/process-auto-fill-button-type-and-invoke-runTest.js (248372 => 248373)
--- trunk/LayoutTests/fast/forms/auto-fill-button/resources/process-auto-fill-button-type-and-invoke-runTest.js 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/resources/process-auto-fill-button-type-and-invoke-runTest.js 2019-08-07 17:24:19 UTC (rev 248373)
@@ -7,6 +7,7 @@
let inputElements = document.getElementsByTagName("input");
for (let inputElement of inputElements) {
internals.setAutofilled(inputElement, inputElement.dataset.autofilled == "true");
+ internals.setAutoFilledAndViewable(inputElement, inputElement.dataset.autoFilledAndViewable == "true");
internals.setShowAutoFillButton(inputElement, inputElement.dataset.autoFillButtonType);
}
if (window.runTest)
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (248372 => 248373)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2019-08-07 17:24:19 UTC (rev 248373)
@@ -3399,6 +3399,8 @@
webkit.org/b/180803 imported/w3c/web-platform-tests/media-source/mediasource-duration-boundaryconditions.html [ Failure ]
webkit.org/b/181662 fast/forms/auto-fill-button/input-strong-password-auto-fill-button.html [ Missing Failure ]
+webkit.org/b/200037 fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset.html [ Missing Failure ]
+webkit.org/b/200037 fast/forms/auto-fill-button/input-strong-password-viewable.html [ Missing Failure ]
webkit.org/b/182050 http/wpt/fetch/response-opaque-clone.html [ Pass Crash ]
Added: trunk/LayoutTests/platform/ios-simulator/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset-expected.txt (0 => 248373)
--- trunk/LayoutTests/platform/ios-simulator/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset-expected.txt 2019-08-07 17:24:19 UTC (rev 248373)
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x105
+ RenderBlock {HTML} at (0,0) size 800x105
+ RenderBody {BODY} at (8,16) size 784x81
+ RenderBlock {P} at (0,0) size 784x40
+ RenderText {#text} at (0,0) size 782x39
+ text run at (0,0) width 782: "This tests that that an autofilled and viewable Strong Password decorated text field reverts to its original appearance when"
+ text run at (0,20) width 340: "the form is reset. It can only be tested in the test tool."
+ RenderBlock {FORM} at (0,56) size 784x25
+ RenderTextControl {INPUT} at (2,2) size 136x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+ RenderFlexibleBox {DIV} at (6,3) size 123x15
+ RenderBlock {DIV} at (0,0) size 123x14
+ RenderText {#text} at (0,0) size 0x0
+layer at (17,77) size 122x14
+ RenderBlock {DIV} at (0,0) size 123x14
+ RenderText {#text} at (0,0) size 60x14
+ text run at (0,0) width 60: "\x{25CF}\x{25CF}\x{25CF}\x{25CF}\x{25CF}\x{25CF}\x{25CF}\x{25CF}\x{25CF}"
Added: trunk/LayoutTests/platform/ios-simulator/fast/forms/auto-fill-button/input-strong-password-viewable-expected.txt (0 => 248373)
--- trunk/LayoutTests/platform/ios-simulator/fast/forms/auto-fill-button/input-strong-password-viewable-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/fast/forms/auto-fill-button/input-strong-password-viewable-expected.txt 2019-08-07 17:24:19 UTC (rev 248373)
@@ -0,0 +1,64 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x211
+ RenderBlock {HTML} at (0,0) size 800x211
+ RenderBody {BODY} at (8,16) size 784x187
+ RenderBlock {P} at (0,0) size 784x40
+ RenderText {#text} at (0,0) size 768x39
+ text run at (0,0) width 768: "This tests that the Strong Password AutoFill and viewable visual treatment renders in an auto-filled input. It can only be"
+ text run at (0,20) width 137: "tested in the test tool."
+ RenderBlock {DIV} at (0,56) size 784x131
+ RenderTextControl {INPUT} at (2,3) size 153x20 [bgcolor=#FAFFBD] [border: (1px solid #4C4C4C)]
+ RenderText {#text} at (157,0) size 4x19
+ text run at (157,0) width 4: " "
+ RenderTextControl {INPUT} at (163,3) size 153x20 [bgcolor=#FAFFBD] [border: (1px solid #4C4C4C)]
+ RenderFlexibleBox {DIV} at (6,3) size 141x13
+ RenderBlock {DIV} at (0,0) size 140x12
+ RenderText {#text} at (318,0) size 4x19
+ text run at (318,0) width 4: " "
+ RenderTextControl {INPUT} at (322,3) size 313x20 [bgcolor=#FAFFBD] [border: (1px solid #4C4C4C)]
+ RenderFlexibleBox {DIV} at (6,3) size 301x13
+ RenderBlock {DIV} at (0,0) size 300x12
+ RenderText {#text} at (635,0) size 4x19
+ text run at (635,0) width 4: " "
+ RenderTextControl {INPUT} at (639,3) size 33x20 [bgcolor=#FAFFBD] [border: (1px solid #4C4C4C)]
+ RenderFlexibleBox {DIV} at (6,3) size 21x13
+ RenderBlock {DIV} at (0,0) size 20x12
+ RenderText {#text} at (0,0) size 0x0
+ RenderTextControl {INPUT} at (2,24) size 153x108 [bgcolor=#FAFFBD] [border: (1px solid #4C4C4C)]
+ RenderFlexibleBox {DIV} at (6,3) size 141x101
+ RenderBlock {DIV} at (0,44) size 140x12
+ RenderText {#text} at (157,65) size 4x19
+ text run at (157,65) width 4: " "
+ RenderTextControl {INPUT} at (161,24) size 33x108 [bgcolor=#FAFFBD] [border: (1px solid #4C4C4C)]
+ RenderFlexibleBox {DIV} at (6,3) size 21x101
+ RenderBlock {DIV} at (0,44) size 20x12
+ RenderText {#text} at (194,65) size 4x19
+ text run at (194,65) width 4: " "
+ RenderTextControl {INPUT} at (200,68) size 153x20 [bgcolor=#FAFFBD] [border: (1px solid #4C4C4C)]
+layer at (17,78) size 140x12 scrollWidth 285
+ RenderBlock {DIV} at (6,3) size 141x13
+ RenderText {#text} at (0,0) size 284x12
+ text run at (0,0) width 284: "A quick brown fox jumped over the lazy dog."
+layer at (178,78) size 140x12 scrollWidth 285
+ RenderBlock {DIV} at (0,0) size 140x12
+ RenderText {#text} at (0,0) size 284x12
+ text run at (0,0) width 284: "A quick brown fox jumped over the lazy dog."
+layer at (337,78) size 300x12
+ RenderBlock {DIV} at (0,0) size 300x12
+ RenderText {#text} at (0,0) size 284x12
+ text run at (0,0) width 284: "A quick brown fox jumped over the lazy dog."
+layer at (654,78) size 20x12 scrollWidth 285
+ RenderBlock {DIV} at (0,0) size 20x12
+ RenderText {#text} at (0,0) size 284x12
+ text run at (0,0) width 284: "A quick brown fox jumped over the lazy dog."
+layer at (17,143) size 140x12 scrollWidth 285
+ RenderBlock {DIV} at (0,0) size 140x12
+ RenderText {#text} at (0,0) size 284x12
+ text run at (0,0) width 284: "A quick brown fox jumped over the lazy dog."
+layer at (176,143) size 20x12 scrollWidth 285
+ RenderBlock {DIV} at (0,0) size 20x12
+ RenderText {#text} at (0,0) size 284x12
+ text run at (0,0) width 284: "A quick brown fox jumped over the lazy dog."
+layer at (215,143) size 140x12
+ RenderBlock {DIV} at (6,3) size 141x13
Added: trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset-expected.png
(Binary files differ)
Index: trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset-expected.png
===================================================================
--- trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset-expected.png 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset-expected.png 2019-08-07 17:24:19 UTC (rev 248373)
Property changes on: trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset-expected.png
___________________________________________________________________
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset-expected.txt (0 => 248373)
--- trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset-expected.txt 2019-08-07 17:24:19 UTC (rev 248373)
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x99
+ RenderBlock {HTML} at (0,0) size 800x99
+ RenderBody {BODY} at (8,16) size 784x75
+ RenderBlock {P} at (0,0) size 784x36
+ RenderText {#text} at (0,0) size 780x36
+ text run at (0,0) width 780: "This tests that that an autofilled and viewable Strong Password decorated text field reverts to its original appearance when"
+ text run at (0,18) width 340: "the form is reset. It can only be tested in the test tool."
+ RenderBlock {FORM} at (0,52) size 784x23
+ RenderTextControl {INPUT} at (2,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 140x13
+ RenderBlock {DIV} at (0,0) size 140x13
+ RenderText {#text} at (0,0) size 0x0
+layer at (13,73) size 140x13
+ RenderBlock {DIV} at (0,0) size 140x13
+ RenderText {#text} at (0,0) size 47x13
+ text run at (0,0) width 47: "\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}"
Added: trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/input-strong-password-viewable-expected.png
(Binary files differ)
Index: trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/input-strong-password-viewable-expected.png
===================================================================
--- trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/input-strong-password-viewable-expected.png 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/input-strong-password-viewable-expected.png 2019-08-07 17:24:19 UTC (rev 248373)
Property changes on: trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/input-strong-password-viewable-expected.png
___________________________________________________________________
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/input-strong-password-viewable-expected.txt (0 => 248373)
--- trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/input-strong-password-viewable-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/forms/auto-fill-button/input-strong-password-viewable-expected.txt 2019-08-07 17:24:19 UTC (rev 248373)
@@ -0,0 +1,64 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x205
+ RenderBlock {HTML} at (0,0) size 800x205
+ RenderBody {BODY} at (8,16) size 784x181
+ RenderBlock {P} at (0,0) size 784x36
+ RenderText {#text} at (0,0) size 767x36
+ text run at (0,0) width 767: "This tests that the Strong Password AutoFill and viewable visual treatment renders in an auto-filled input. It can only be"
+ text run at (0,18) width 137: "tested in the test tool."
+ RenderBlock {DIV} at (0,52) size 784x129
+ RenderTextControl {INPUT} at (2,2) size 158x19 [bgcolor=#FAFFBD] [border: (2px inset #000000)]
+ RenderText {#text} at (162,1) size 4x18
+ text run at (162,1) width 4: " "
+ RenderTextControl {INPUT} at (168,2) size 158x19 [bgcolor=#FAFFBD] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 152x13
+ RenderBlock {DIV} at (0,0) size 152x13
+ RenderText {#text} at (328,1) size 4x18
+ text run at (328,1) width 4: " "
+ RenderTextControl {INPUT} at (332,2) size 306x19 [bgcolor=#FAFFBD] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 300x13
+ RenderBlock {DIV} at (0,0) size 300x13
+ RenderText {#text} at (638,1) size 4x18
+ text run at (638,1) width 4: " "
+ RenderTextControl {INPUT} at (642,2) size 26x19 [bgcolor=#FAFFBD] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 20x13
+ RenderBlock {DIV} at (0,0) size 20x13
+ RenderText {#text} at (0,0) size 0x0
+ RenderTextControl {INPUT} at (2,23) size 158x106 [bgcolor=#FAFFBD] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 152x100
+ RenderBlock {DIV} at (0,43) size 152x14
+ RenderText {#text} at (162,65) size 4x18
+ text run at (162,65) width 4: " "
+ RenderTextControl {INPUT} at (166,23) size 26x106 [bgcolor=#FAFFBD] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 20x100
+ RenderBlock {DIV} at (0,43) size 20x14
+ RenderText {#text} at (192,65) size 4x18
+ text run at (192,65) width 4: " "
+ RenderTextControl {INPUT} at (198,66) size 158x19 [bgcolor=#FAFFBD] [border: (2px inset #000000)]
+layer at (13,73) size 152x13 scrollWidth 285
+ RenderBlock {DIV} at (3,3) size 152x13
+ RenderText {#text} at (0,0) size 284x13
+ text run at (0,0) width 284: "A quick brown fox jumped over the lazy dog."
+layer at (179,73) size 152x13 scrollWidth 285
+ RenderBlock {DIV} at (0,0) size 152x13
+ RenderText {#text} at (0,0) size 284x13
+ text run at (0,0) width 284: "A quick brown fox jumped over the lazy dog."
+layer at (343,73) size 300x13
+ RenderBlock {DIV} at (0,0) size 300x13
+ RenderText {#text} at (0,0) size 284x13
+ text run at (0,0) width 284: "A quick brown fox jumped over the lazy dog."
+layer at (653,73) size 20x13 scrollWidth 285
+ RenderBlock {DIV} at (0,0) size 20x13
+ RenderText {#text} at (0,0) size 284x13
+ text run at (0,0) width 284: "A quick brown fox jumped over the lazy dog."
+layer at (13,138) size 152x13 scrollWidth 285
+ RenderBlock {DIV} at (0,0) size 152x13
+ RenderText {#text} at (0,0) size 284x13
+ text run at (0,0) width 284: "A quick brown fox jumped over the lazy dog."
+layer at (177,138) size 20x13 scrollWidth 285
+ RenderBlock {DIV} at (0,0) size 20x13
+ RenderText {#text} at (0,0) size 284x13
+ text run at (0,0) width 284: "A quick brown fox jumped over the lazy dog."
+layer at (209,137) size 152x13
+ RenderBlock {DIV} at (3,3) size 152x13
Modified: trunk/LayoutTests/platform/win/TestExpectations (248372 => 248373)
--- trunk/LayoutTests/platform/win/TestExpectations 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/LayoutTests/platform/win/TestExpectations 2019-08-07 17:24:19 UTC (rev 248373)
@@ -3930,6 +3930,8 @@
webkit.org/b/181501 accessibility/table-header-calculation-for-header-rows.html [ Failure ]
webkit.org/b/181662 fast/forms/auto-fill-button/input-strong-password-auto-fill-button.html [ Failure ]
+webkit.org/b/200037 fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset.html [ Missing Failure ]
+webkit.org/b/200037 fast/forms/auto-fill-button/input-strong-password-viewable.html [ Missing Failure ]
webkit.org/b/181854 svg/filters/feDiffuseLighting-bottomRightPixel.html [ ImageOnlyFailure ]
Modified: trunk/Source/WebCore/ChangeLog (248372 => 248373)
--- trunk/Source/WebCore/ChangeLog 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebCore/ChangeLog 2019-08-07 17:24:19 UTC (rev 248373)
@@ -1,3 +1,66 @@
+2019-08-07 Priyanka Agarwal <[email protected]>
+
+ Allow clients to toggle a text input field between being viewable and having characters hidden while maintaining
+ a yellow auto-filled appearance
+ https://bugs.webkit.org/show_bug.cgi?id=200037
+ rdar://problem/51900961
+
+ Reviewed by Daniel Bates.
+
+ Tests: fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset.html
+ fast/forms/auto-fill-button/input-strong-password-viewable.html
+
+ * css/CSSSelector.cpp:
+ (WebCore::CSSSelector::selectorText const):
+ Adding CSSSelector case for new pseudo class of AutofillStrongPasswordViewable.
+
+ * css/CSSSelector.h: Added PseudoClassAutofillStrongPasswordViewable
+
+ * css/SelectorChecker.cpp:
+ (WebCore::SelectorChecker::checkOne const): Added handling for SelectorChecker.cpp
+
+ * css/SelectorCheckerTestFunctions.h:
+ (WebCore::isAutofilledStrongPasswordViewable):
+ Checking if the element is an input element and considered to be
+ AutoFilled and Viewable. Returns a boolean accordingly.
+
+ * css/SelectorPseudoClassAndCompatibilityElementMap.in:
+ Add -webkit-autofill-strong-password-viewable css class.
+
+ * css/html.css:
+ (input:-webkit-autofill, input:-webkit-autofill-strong-password, input:-webkit-autofill-strong-password-viewable):
+ (input:-webkit-autofill-strong-password-viewable):
+ (input:-webkit-autofill, input:-webkit-autofill-strong-password): Deleted. Updated to include viewable pseudo class.
+
+ * cssjit/SelectorCompiler.cpp:
+ (WebCore::SelectorCompiler::addPseudoClassType):
+ Add case handling for PseudoClassAutofillStrongPasswordViewable.
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::HTMLInputElement):
+ Add boolean m_isAutoFilledAndViewable for representing if the
+ input element is both AutoFilled and should be viewable.
+ Don't update the viewable treatment in setValueFromRenderer() because even if the user makes edits to the input field
+ the visual treatment should still be applied.
+
+ (WebCore::HTMLInputElement::resignStrongPasswordAppearance):
+ Updates boolean representing if input element is autofilled and viewable to false.
+
+ (WebCore::HTMLInputElement::reset):
+ Updates boolean representing if input element is autofilled and viewable to false.
+
+ (WebCore::HTMLInputElement::setAutoFilledAndViewable):
+ Setter function for the boolean of m_isAutoFilledAndViewable.
+
+ * html/HTMLInputElement.h:
+ (WebCore::HTMLInputElement::isAutoFilledAndViewable const):
+ Creating boolean value for m_isAutoFilledAndViewable.
+
+ * testing/Internals.cpp:
+ (WebCore::Internals::setAutoFilledAndViewable): Adding for testing purposes.
+ * testing/Internals.h: Adding for testing purposes.
+ * testing/Internals.idl:
+
2019-08-07 Wenson Hsieh <[email protected]>
Declarations and implementations of findCaret(Min|Max)imumOffset have inconsistent signatures
Modified: trunk/Source/WebCore/css/CSSSelector.cpp (248372 => 248373)
--- trunk/Source/WebCore/css/CSSSelector.cpp 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebCore/css/CSSSelector.cpp 2019-08-07 17:24:19 UTC (rev 248373)
@@ -430,6 +430,9 @@
case CSSSelector::PseudoClassAutofillStrongPassword:
str.appendLiteral(":-webkit-autofill-strong-password");
break;
+ case CSSSelector::PseudoClassAutofillStrongPasswordViewable:
+ str.appendLiteral(":-webkit-autofill-strong-password-viewable");
+ break;
case CSSSelector::PseudoClassDrag:
str.appendLiteral(":-webkit-drag");
break;
Modified: trunk/Source/WebCore/css/CSSSelector.h (248372 => 248373)
--- trunk/Source/WebCore/css/CSSSelector.h 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebCore/css/CSSSelector.h 2019-08-07 17:24:19 UTC (rev 248373)
@@ -108,6 +108,7 @@
PseudoClassAnyLinkDeprecated,
PseudoClassAutofill,
PseudoClassAutofillStrongPassword,
+ PseudoClassAutofillStrongPasswordViewable,
PseudoClassHover,
PseudoClassDrag,
PseudoClassFocus,
Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (248372 => 248373)
--- trunk/Source/WebCore/css/SelectorChecker.cpp 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp 2019-08-07 17:24:19 UTC (rev 248373)
@@ -971,6 +971,8 @@
return isAutofilled(element);
case CSSSelector::PseudoClassAutofillStrongPassword:
return isAutofilledStrongPassword(element);
+ case CSSSelector::PseudoClassAutofillStrongPasswordViewable:
+ return isAutofilledStrongPasswordViewable(element);
case CSSSelector::PseudoClassAnyLink:
case CSSSelector::PseudoClassAnyLinkDeprecated:
case CSSSelector::PseudoClassLink:
Modified: trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h (248372 => 248373)
--- trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h 2019-08-07 17:24:19 UTC (rev 248373)
@@ -57,6 +57,11 @@
return is<HTMLInputElement>(element) && downcast<HTMLInputElement>(element).isAutoFilled() && downcast<HTMLInputElement>(element).hasAutoFillStrongPasswordButton();
}
+ALWAYS_INLINE bool isAutofilledStrongPasswordViewable(const Element& element)
+{
+ return is<HTMLInputElement>(element) && downcast<HTMLInputElement>(element).isAutoFilledAndViewable();
+}
+
ALWAYS_INLINE bool matchesDefaultPseudoClass(const Element& element)
{
return element.matchesDefaultPseudoClass();
Modified: trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in (248372 => 248373)
--- trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in 2019-08-07 17:24:19 UTC (rev 248373)
@@ -3,6 +3,7 @@
-webkit-any-link, PseudoClassAnyLinkDeprecated, PseudoElementUnknown
-webkit-autofill
-webkit-autofill-strong-password
+-webkit-autofill-strong-password-viewable
-webkit-drag
-webkit-full-page-media
active
Modified: trunk/Source/WebCore/css/html.css (248372 => 248373)
--- trunk/Source/WebCore/css/html.css 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebCore/css/html.css 2019-08-07 17:24:19 UTC (rev 248373)
@@ -722,13 +722,16 @@
}
input:-webkit-autofill-strong-password {
+ -webkit-user-select: none !important;
+}
+
+input:-webkit-autofill-strong-password, input:-webkit-autofill-strong-password-viewable {
-webkit-text-security: none !important;
- -webkit-user-select: none !important;
cursor: default !important;
font-family: monospace;
}
-input:-webkit-autofill, input:-webkit-autofill-strong-password {
+input:-webkit-autofill, input:-webkit-autofill-strong-password, input:-webkit-autofill-strong-password-viewable {
background-color: #FAFFBD !important;
background-image: none !important;
color: #000000 !important;
Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.cpp (248372 => 248373)
--- trunk/Source/WebCore/cssjit/SelectorCompiler.cpp 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.cpp 2019-08-07 17:24:19 UTC (rev 248373)
@@ -540,6 +540,9 @@
case CSSSelector::PseudoClassAutofillStrongPassword:
fragment.unoptimizedPseudoClasses.append(JSC::FunctionPtr<CSSOperationPtrTag>(isAutofilledStrongPassword));
return FunctionType::SimpleSelectorChecker;
+ case CSSSelector::PseudoClassAutofillStrongPasswordViewable:
+ fragment.unoptimizedPseudoClasses.append(JSC::FunctionPtr<CSSOperationPtrTag>(isAutofilledStrongPasswordViewable));
+ return FunctionType::SimpleSelectorChecker;
case CSSSelector::PseudoClassChecked:
fragment.unoptimizedPseudoClasses.append(JSC::FunctionPtr<CSSOperationPtrTag>(isChecked));
return FunctionType::SimpleSelectorChecker;
Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (248372 => 248373)
--- trunk/Source/WebCore/html/HTMLInputElement.cpp 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp 2019-08-07 17:24:19 UTC (rev 248373)
@@ -110,6 +110,7 @@
, m_isActivatedSubmit(false)
, m_autocomplete(Uninitialized)
, m_isAutoFilled(false)
+ , m_isAutoFilledAndViewable(false)
, m_autoFillButtonType(static_cast<uint8_t>(AutoFillButtonType::None))
, m_lastAutoFillButtonType(static_cast<uint8_t>(AutoFillButtonType::None))
, m_isAutoFillAvailable(false)
@@ -517,6 +518,7 @@
if (!hasAutoFillStrongPasswordButton())
return;
setAutoFilled(false);
+ setAutoFilledAndViewable(false);
setShowAutoFillButton(AutoFillButtonType::None);
if (auto* page = document().page())
page->chrome().client().inputElementDidResignStrongPasswordAppearance(*this);
@@ -915,6 +917,7 @@
setValue(String());
setAutoFilled(false);
+ setAutoFilledAndViewable(false);
setShowAutoFillButton(AutoFillButtonType::None);
setChecked(hasAttributeWithoutSynchronization(checkedAttr));
m_dirtyCheckednessFlag = false;
@@ -1343,6 +1346,15 @@
invalidateStyleForSubtree();
}
+void HTMLInputElement::setAutoFilledAndViewable(bool autoFilledAndViewable)
+{
+ if (autoFilledAndViewable == m_isAutoFilledAndViewable)
+ return;
+
+ m_isAutoFilledAndViewable = autoFilledAndViewable;
+ invalidateStyleForSubtree();
+}
+
void HTMLInputElement::setShowAutoFillButton(AutoFillButtonType autoFillButtonType)
{
if (static_cast<uint8_t>(autoFillButtonType) == m_autoFillButtonType)
Modified: trunk/Source/WebCore/html/HTMLInputElement.h (248372 => 248373)
--- trunk/Source/WebCore/html/HTMLInputElement.h 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebCore/html/HTMLInputElement.h 2019-08-07 17:24:19 UTC (rev 248373)
@@ -240,6 +240,9 @@
bool isAutoFilled() const { return m_isAutoFilled; }
WEBCORE_EXPORT void setAutoFilled(bool = true);
+ bool isAutoFilledAndViewable() const { return m_isAutoFilledAndViewable; }
+ WEBCORE_EXPORT void setAutoFilledAndViewable(bool = true);
+
AutoFillButtonType lastAutoFillButtonType() const { return static_cast<AutoFillButtonType>(m_lastAutoFillButtonType); }
AutoFillButtonType autoFillButtonType() const { return static_cast<AutoFillButtonType>(m_autoFillButtonType); }
WEBCORE_EXPORT void setShowAutoFillButton(AutoFillButtonType);
@@ -465,6 +468,7 @@
bool m_isActivatedSubmit : 1;
unsigned m_autocomplete : 2; // AutoCompleteSetting
bool m_isAutoFilled : 1;
+ bool m_isAutoFilledAndViewable : 1;
unsigned m_autoFillButtonType : 3; // AutoFillButtonType
unsigned m_lastAutoFillButtonType : 3; // AutoFillButtonType
bool m_isAutoFillAvailable : 1;
Modified: trunk/Source/WebCore/testing/Internals.cpp (248372 => 248373)
--- trunk/Source/WebCore/testing/Internals.cpp 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebCore/testing/Internals.cpp 2019-08-07 17:24:19 UTC (rev 248373)
@@ -1863,6 +1863,11 @@
element.setAutoFilled(enabled);
}
+void Internals::setAutoFilledAndViewable(HTMLInputElement& element, bool enabled)
+{
+ element.setAutoFilledAndViewable(enabled);
+}
+
static AutoFillButtonType toAutoFillButtonType(Internals::AutoFillButtonType type)
{
switch (type) {
Modified: trunk/Source/WebCore/testing/Internals.h (248372 => 248373)
--- trunk/Source/WebCore/testing/Internals.h 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebCore/testing/Internals.h 2019-08-07 17:24:19 UTC (rev 248373)
@@ -265,6 +265,7 @@
ExceptionOr<bool> wasLastChangeUserEdit(Element& textField);
bool elementShouldAutoComplete(HTMLInputElement&);
void setAutofilled(HTMLInputElement&, bool enabled);
+ void setAutoFilledAndViewable(HTMLInputElement&, bool enabled);
enum class AutoFillButtonType { None, Contacts, Credentials, StrongPassword, CreditCard };
void setShowAutoFillButton(HTMLInputElement&, AutoFillButtonType);
AutoFillButtonType autoFillButtonType(const HTMLInputElement&);
Modified: trunk/Source/WebCore/testing/Internals.idl (248372 => 248373)
--- trunk/Source/WebCore/testing/Internals.idl 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebCore/testing/Internals.idl 2019-08-07 17:24:19 UTC (rev 248373)
@@ -292,6 +292,7 @@
[MayThrowException] boolean wasLastChangeUserEdit(Element textField);
boolean elementShouldAutoComplete(HTMLInputElement inputElement);
void setAutofilled(HTMLInputElement inputElement, boolean enabled);
+ void setAutoFilledAndViewable(HTMLInputElement inputElement, boolean enabled);
void setShowAutoFillButton(HTMLInputElement inputElement, AutoFillButtonType autoFillButtonType);
AutoFillButtonType autoFillButtonType(HTMLInputElement inputElement);
AutoFillButtonType lastAutoFillButtonType(HTMLInputElement inputElement);
Modified: trunk/Source/WebKit/ChangeLog (248372 => 248373)
--- trunk/Source/WebKit/ChangeLog 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebKit/ChangeLog 2019-08-07 17:24:19 UTC (rev 248373)
@@ -1,3 +1,40 @@
+2019-08-07 Priyanka Agarwal <[email protected]>
+
+ Allow clients to toggle a text input field between being viewable and having characters hidden while maintaining
+ a yellow auto-filled appearance
+ https://bugs.webkit.org/show_bug.cgi?id=200037
+ rdar://problem/51900961
+
+ Reviewed by Daniel Bates.
+
+ * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
+ * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
+ (-[WKWebProcessPlugInNodeHandle HTMLInputElementIsAutoFilledAndViewable]):
+ Accessor function for boolean which represents if the input element is autofilled and viewable.
+
+ (-[WKWebProcessPlugInNodeHandle setHTMLInputElementIsAutoFilledAndViewable:]):
+ Setter function for boolean which represents if the input element is autofilled and viewable.
+
+ * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
+ (WKBundleNodeHandleSetHTMLInputElementAutoFilledAndViewable):
+ Accessor function for boolean which represents if the input element is autofilled and viewable.
+
+ * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
+ Creating function declaration for boolean setter.
+
+ * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
+ Accessor function for boolean which represents if the input element is autofilled and viewable.
+
+ (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFilledAndViewable const):
+ Setter function for boolean which represents if the input element is autofilled and viewable.
+
+ (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFilledAndViewable):
+ Setter function for boolean which represents if the input element is autofilled and viewable.
+
+ * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
+ Adding setter and getter functions for the boolean which represents if the input element is autofilled
+ and viewable.
+
2019-08-07 Chris Dumez <[email protected]>
Add more threading assertions to ITP code
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h (248372 => 248373)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h 2019-08-07 17:24:19 UTC (rev 248373)
@@ -51,6 +51,7 @@
@property (nonatomic, readonly) CGRect elementBounds;
@property (nonatomic) BOOL HTMLInputElementIsAutoFilled;
+@property (nonatomic) BOOL HTMLInputElementIsAutoFilledAndViewable;
@property (nonatomic, readonly) BOOL HTMLInputElementIsUserEdited;
@property (nonatomic, readonly) BOOL HTMLTextAreaElementIsUserEdited;
@property (nonatomic, readonly) WKWebProcessPlugInNodeHandle *HTMLTableCellElementCellAbove;
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm (248372 => 248373)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm 2019-08-07 17:24:19 UTC (rev 248373)
@@ -104,11 +104,21 @@
return _nodeHandle->isHTMLInputElementAutoFilled();
}
+- (BOOL)HTMLInputElementIsAutoFilledAndViewable
+{
+ return _nodeHandle->isHTMLInputElementAutoFilledAndViewable();
+}
+
- (void)setHTMLInputElementIsAutoFilled:(BOOL)isAutoFilled
{
_nodeHandle->setHTMLInputElementAutoFilled(isAutoFilled);
}
+- (void)setHTMLInputElementIsAutoFilledAndViewable:(BOOL)isAutoFilledAndViewable
+{
+ _nodeHandle->setHTMLInputElementAutoFilledAndViewable(isAutoFilledAndViewable);
+}
+
- (BOOL)isHTMLInputElementAutoFillButtonEnabled
{
return _nodeHandle->isHTMLInputElementAutoFillButtonEnabled();
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp (248372 => 248373)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp 2019-08-07 17:24:19 UTC (rev 248373)
@@ -130,6 +130,11 @@
WebKit::toImpl(htmlInputElementHandleRef)->setHTMLInputElementAutoFilled(filled);
}
+void WKBundleNodeHandleSetHTMLInputElementAutoFilledAndViewable(WKBundleNodeHandleRef htmlInputElementHandleRef, bool autoFilledAndViewable)
+{
+ WebKit::toImpl(htmlInputElementHandleRef)->setHTMLInputElementAutoFilledAndViewable(autoFilledAndViewable);
+}
+
bool WKBundleNodeHandleGetHTMLInputElementAutoFillButtonEnabled(WKBundleNodeHandleRef htmlInputElementHandleRef)
{
return WebKit::toImpl(htmlInputElementHandleRef)->isHTMLInputElementAutoFillButtonEnabled();
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h (248372 => 248373)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h 2019-08-07 17:24:19 UTC (rev 248373)
@@ -64,6 +64,7 @@
WK_EXPORT void WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled(WKBundleNodeHandleRef htmlInputElementHandle, bool enabled);
WK_EXPORT bool WKBundleNodeHandleGetHTMLInputElementAutoFilled(WKBundleNodeHandleRef htmlInputElementHandle);
WK_EXPORT void WKBundleNodeHandleSetHTMLInputElementAutoFilled(WKBundleNodeHandleRef htmlInputElementHandle, bool filled);
+WK_EXPORT void WKBundleNodeHandleSetHTMLInputElementAutoFilledAndViewable(WKBundleNodeHandleRef htmlInputElementHandle, bool autoFilledAndViewable);
WK_EXPORT bool WKBundleNodeHandleGetHTMLInputElementAutoFillButtonEnabled(WKBundleNodeHandleRef htmlInputElementHandle);
WK_EXPORT void WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabledWithButtonType(WKBundleNodeHandleRef htmlInputElementHandle, WKAutoFillButtonType autoFillButtonType);
WK_EXPORT WKAutoFillButtonType WKBundleNodeHandleGetHTMLInputElementAutoFillButtonType(WKBundleNodeHandleRef htmlInputElementHandle);
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp (248372 => 248373)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp 2019-08-07 17:24:19 UTC (rev 248373)
@@ -250,6 +250,14 @@
return downcast<HTMLInputElement>(m_node.get()).isAutoFilled();
}
+bool InjectedBundleNodeHandle::isHTMLInputElementAutoFilledAndViewable() const
+{
+ if (!is<HTMLInputElement>(m_node))
+ return false;
+
+ return downcast<HTMLInputElement>(m_node.get()).isAutoFilledAndViewable();
+}
+
void InjectedBundleNodeHandle::setHTMLInputElementAutoFilled(bool filled)
{
if (!is<HTMLInputElement>(m_node))
@@ -258,6 +266,14 @@
downcast<HTMLInputElement>(m_node.get()).setAutoFilled(filled);
}
+void InjectedBundleNodeHandle::setHTMLInputElementAutoFilledAndViewable(bool autoFilledAndViewable)
+{
+ if (!is<HTMLInputElement>(m_node))
+ return;
+
+ downcast<HTMLInputElement>(m_node.get()).setAutoFilledAndViewable(autoFilledAndViewable);
+}
+
bool InjectedBundleNodeHandle::isHTMLInputElementAutoFillButtonEnabled() const
{
if (!is<HTMLInputElement>(m_node))
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h (248372 => 248373)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h 2019-08-07 17:24:19 UTC (rev 248373)
@@ -67,7 +67,9 @@
void setHTMLInputElementValueForUser(const String&);
void setHTMLInputElementSpellcheckEnabled(bool);
bool isHTMLInputElementAutoFilled() const;
+ bool isHTMLInputElementAutoFilledAndViewable() const;
void setHTMLInputElementAutoFilled(bool);
+ void setHTMLInputElementAutoFilledAndViewable(bool);
bool isHTMLInputElementAutoFillButtonEnabled() const;
void setHTMLInputElementAutoFillButtonEnabled(WebCore::AutoFillButtonType);
WebCore::AutoFillButtonType htmlInputElementAutoFillButtonType() const;
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (248372 => 248373)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2019-08-07 17:24:19 UTC (rev 248373)
@@ -1,3 +1,17 @@
+2019-08-07 Priyanka Agarwal <[email protected]>
+
+ Allow clients to toggle a text input field between being viewable and having characters hidden while maintaining
+ a yellow auto-filled appearance
+ https://bugs.webkit.org/show_bug.cgi?id=200037
+ rdar://problem/51900961
+
+ Reviewed by Daniel Bates.
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMHTMLInputElement _isAutoFilledAndViewable]):
+ (-[DOMHTMLInputElement _setAutoFilledAndViewable:]):
+ * DOM/WebDOMOperationsPrivate.h:
+
2019-08-02 Keith Rollin <[email protected]>
Consistently use Obj-C boolean literals
Modified: trunk/Source/WebKitLegacy/mac/DOM/WebDOMOperations.mm (248372 => 248373)
--- trunk/Source/WebKitLegacy/mac/DOM/WebDOMOperations.mm 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebKitLegacy/mac/DOM/WebDOMOperations.mm 2019-08-07 17:24:19 UTC (rev 248373)
@@ -225,11 +225,21 @@
return downcast<HTMLInputElement>(core((DOMElement *)self))->isAutoFilled();
}
+- (BOOL)_isAutoFilledAndViewable
+{
+ return downcast<HTMLInputElement>(core((DOMElement *)self))->isAutoFilledAndViewable();
+}
+
- (void)_setAutofilled:(BOOL)autofilled
{
downcast<HTMLInputElement>(core((DOMElement *)self))->setAutoFilled(autofilled);
}
+- (void)_setAutoFilledAndViewable:(BOOL)autoFilledAndViewable
+{
+ downcast<HTMLInputElement>(core((DOMElement *)self))->setAutoFilledAndViewable(autoFilledAndViewable);
+}
+
@end
@implementation DOMHTMLObjectElement (WebDOMHTMLObjectElementOperations)
Modified: trunk/Source/WebKitLegacy/mac/DOM/WebDOMOperationsPrivate.h (248372 => 248373)
--- trunk/Source/WebKitLegacy/mac/DOM/WebDOMOperationsPrivate.h 2019-08-07 17:22:38 UTC (rev 248372)
+++ trunk/Source/WebKitLegacy/mac/DOM/WebDOMOperationsPrivate.h 2019-08-07 17:24:19 UTC (rev 248373)
@@ -43,6 +43,9 @@
@interface DOMHTMLInputElement (WebDOMHTMLInputElementOperationsPrivate)
- (BOOL)_isAutofilled;
- (void)_setAutofilled:(BOOL)autofilled;
+
+- (BOOL)_isAutoFilledAndViewable;
+- (void)_setAutoFilledAndViewable:(BOOL)autoFilledAndViewable;
@end
@interface DOMNode (WebDOMNodeOperationsPendingPublic)