Diff
Modified: trunk/LayoutTests/ChangeLog (185165 => 185166)
--- trunk/LayoutTests/ChangeLog 2015-06-03 20:39:52 UTC (rev 185165)
+++ trunk/LayoutTests/ChangeLog 2015-06-03 20:44:56 UTC (rev 185166)
@@ -1,3 +1,34 @@
+2015-06-03 Daniel Bates <daba...@apple.com>
+
+ AutoFill button should not be shown in read-only or disabled field
+ https://bugs.webkit.org/show_bug.cgi?id=145579
+ <rdar://problem/21212494>
+
+ Reviewed by Darin Adler.
+
+ Add tests to ensure that we do no show the AutoFill button in a read-only or disabled field.
+
+ Additionally, create directory LayoutTests/fast/forms/auto-fill-button and move existing test
+ LayoutTests/fast/forms/input-auto-fill-button.html and associated test results into this directory
+ or the platform-specific variant of this directory.
+
+ * fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled-expected.html: Added.
+ * fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html: Added.
+ * fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly-expected.html: Added.
+ * fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html: Added.
+ * fast/forms/auto-fill-button/input-auto-fill-button-expected.txt: Renamed from LayoutTests/fast/forms/input-auto-fill-button-expected.txt.
+ * fast/forms/auto-fill-button/input-auto-fill-button.html: Renamed from LayoutTests/fast/forms/input-auto-fill-button.html.
+ * fast/forms/auto-fill-button/input-disabled-auto-fill-button-expected.html: Added.
+ * fast/forms/auto-fill-button/input-disabled-auto-fill-button.html: Added.
+ * fast/forms/auto-fill-button/input-readonly-auto-fill-button-expected.html: Added.
+ * fast/forms/auto-fill-button/input-readonly-auto-fill-button.html: Added.
+ * fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button-expected.html: Added.
+ * fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html: Added.
+ * platform/ios-simulator/fast/forms/auto-fill-button/input-auto-fill-button-expected.png: Renamed from LayoutTests/platform/ios-simulator/fast/forms/input-auto-fill-button-expected.png.
+ * platform/ios-simulator/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt: Renamed from LayoutTests/platform/ios-simulator/fast/forms/input-auto-fill-button-expected.txt.
+ * platform/mac-mavericks/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt: Renamed from LayoutTests/platform/mac-mavericks/fast/forms/input-auto-fill-button-expected.txt.
+ * platform/win/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt: Renamed from LayoutTests/platform/win/fast/forms/input-auto-fill-button-expected.txt.
+
2015-06-02 Filip Pizlo <fpi...@apple.com>
GetById and PutById profiling should be more precise about it takes slow path
Added: trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled-expected.html (0 => 185166)
--- trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled-expected.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled-expected.html 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests that the AutoFill button does not render when the field becomes disabled.</p>
+<input type="password" id="password" disabled>
+</body>
+</html>
Added: trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html (0 => 185166)
--- trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests that the AutoFill button does not render when the field becomes disabled.</p>
+<input type="password" id="password">
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+var password = document.getElementById("password");
+
+if (window.internals)
+ internals.setShowAutoFillButton(password, true);
+
+function makeFieldDisabledAndNotifyDone()
+{
+ password.disabled = true;
+ if (window.internals)
+ internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+window.setTimeout(makeFieldDisabledAndNotifyDone, 0);
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly-expected.html (0 => 185166)
--- trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly-expected.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly-expected.html 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests that the AutoFill button does not render when the field becomes read only.</p>
+<input type="password" id="password" readonly>
+</body>
+</html>
Added: trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html (0 => 185166)
--- trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests that the AutoFill button does not render when the field becomes read only.</p>
+<input type="password" id="password">
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+var password = document.getElementById("password");
+
+if (window.internals)
+ internals.setShowAutoFillButton(password, true);
+
+function makeFieldReadOnlyAndNotifyDone()
+{
+ password.readOnly = true;
+ if (window.internals)
+ internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+window.setTimeout(makeFieldReadOnlyAndNotifyDone, 0);
+</script>
+</body>
+</html>
Copied: trunk/LayoutTests/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt (from rev 185165, trunk/LayoutTests/fast/forms/input-auto-fill-button-expected.txt) (0 => 185166)
--- trunk/LayoutTests/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,41 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {P} at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 503x18
+ text run at (0,0) width 503: "This tests that the AutoFill button renders. It can only be tested in the test tool."
+ RenderBlock {DIV} at (0,34) size 784x23
+ RenderTextControl {INPUT} at (2,2) size 137x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 131x13
+ RenderBlock {DIV} at (0,0) size 111x13
+ RenderText {#text} at (140,2) size 5x18
+ text run at (140,2) width 5: " "
+ RenderTextControl {INPUT} at (146,2) size 137x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 131x13
+ RenderBlock {DIV} at (0,0) size 111x13
+ RenderText {#text} at (284,2) size 5x18
+ text run at (284,2) width 5: " "
+ RenderTextControl {INPUT} at (290,2) size 138x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 131x13
+ RenderBlock {DIV} at (0,0) size 111x13
+ RenderTextControl {INPUT} at (431,2) size 137x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 131x13
+ RenderBlock {DIV} at (0,0) size 111x13
+layer at (13,47) size 110x13
+ RenderBlock {DIV} at (0,0) size 111x13
+layer at (157,47) size 110x13
+ RenderBlock {DIV} at (0,0) size 111x13
+layer at (302,47) size 110x13
+ RenderBlock {DIV} at (0,0) size 111x13
+layer at (442,47) size 110x13
+ RenderBlock {DIV} at (0,0) size 111x13
+layer at (126,48) size 15x12
+ RenderBlock {DIV} at (113,0) size 16x13 [bgcolor=#000000]
+layer at (271,48) size 15x12
+ RenderBlock {DIV} at (113,0) size 16x13 [bgcolor=#000000]
+layer at (415,48) size 15x12
+ RenderBlock {DIV} at (113,0) size 16x13 [bgcolor=#000000]
+layer at (555,48) size 15x12
+ RenderBlock {DIV} at (113,0) size 16x13 [bgcolor=#000000]
Copied: trunk/LayoutTests/fast/forms/auto-fill-button/input-auto-fill-button.html (from rev 185165, trunk/LayoutTests/fast/forms/input-auto-fill-button.html) (0 => 185166)
--- trunk/LayoutTests/fast/forms/auto-fill-button/input-auto-fill-button.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/input-auto-fill-button.html 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,22 @@
+<p>This tests that the AutoFill button renders. It can only be tested in the test tool.</p>
+<div id='container'>
+ <input type='text'>
+ <input type='password'>
+</div>
+<script>
+
+if (window.internals) {
+ var inputs = document.querySelectorAll("input");
+ for (var i = 0; i < inputs.length; ++i)
+ window.internals.setShowAutoFillButton(inputs[i], true);
+
+ var dynamicInput = document.createElement("input");
+ window.internals.setShowAutoFillButton(dynamicInput, true);
+ document.querySelector("#container").appendChild(dynamicInput);
+
+ var dynamicInput2 = document.createElement("input");
+ window.internals.setShowAutoFillButton(dynamicInput2, true);
+ document.querySelector("#container").appendChild(dynamicInput2);
+ dynamicInput2.setAttribute("type", "password");
+}
+</script>
Added: trunk/LayoutTests/fast/forms/auto-fill-button/input-disabled-auto-fill-button-expected.html (0 => 185166)
--- trunk/LayoutTests/fast/forms/auto-fill-button/input-disabled-auto-fill-button-expected.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/input-disabled-auto-fill-button-expected.html 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests that the AutoFill button does not render in a disabled field. It can only be tested in the test tool.</p>
+<input type="password" placeholder="disabled" disabled>
+</body>
+</html>
Added: trunk/LayoutTests/fast/forms/auto-fill-button/input-disabled-auto-fill-button.html (0 => 185166)
--- trunk/LayoutTests/fast/forms/auto-fill-button/input-disabled-auto-fill-button.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/input-disabled-auto-fill-button.html 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests that the AutoFill button does not render in a disabled field. It can only be tested in the test tool.</p>
+<input type="password" id="password" placeholder="disabled" disabled autofocus>
+<script>
+if (window.internals)
+ internals.setShowAutoFillButton(document.getElementById("password"), true);
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-auto-fill-button-expected.html (0 => 185166)
--- trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-auto-fill-button-expected.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-auto-fill-button-expected.html 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests that the AutoFill button does not render in a read only field. It can only be tested in the test tool.</p>
+<input type="password" placeholder="read only" readonly>
+</body>
+</html>
Added: trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-auto-fill-button.html (0 => 185166)
--- trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-auto-fill-button.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-auto-fill-button.html 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests that the AutoFill button does not render in a read only field. It can only be tested in the test tool.</p>
+<input type="password" id="password" placeholder="read only" readonly autofocus>
+<script>
+if (window.internals)
+ internals.setShowAutoFillButton(document.getElementById("password"), true);
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button-expected.html (0 => 185166)
--- trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button-expected.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button-expected.html 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests that the AutoFill button does not render in a non-empty read only field. It can only be tested in the test tool.</p>
+<input type="password" value="read only" readonly autofocus>
+</body>
+</html>
Added: trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html (0 => 185166)
--- trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests that the AutoFill button does not render in a non-empty read only field. It can only be tested in the test tool.</p>
+<input type="password" id="password" value="read only" readonly autofocus>
+<script>
+if (window.internals)
+ internals.setShowAutoFillButton(document.getElementById("password"), true);
+</script>
+</body>
+</html>
Deleted: trunk/LayoutTests/fast/forms/input-auto-fill-button-expected.txt (185165 => 185166)
--- trunk/LayoutTests/fast/forms/input-auto-fill-button-expected.txt 2015-06-03 20:39:52 UTC (rev 185165)
+++ trunk/LayoutTests/fast/forms/input-auto-fill-button-expected.txt 2015-06-03 20:44:56 UTC (rev 185166)
@@ -1,41 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x584
- RenderBlock {P} at (0,0) size 784x18
- RenderText {#text} at (0,0) size 503x18
- text run at (0,0) width 503: "This tests that the AutoFill button renders. It can only be tested in the test tool."
- RenderBlock {DIV} at (0,34) size 784x23
- RenderTextControl {INPUT} at (2,2) size 137x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
- RenderFlexibleBox {DIV} at (3,3) size 131x13
- RenderBlock {DIV} at (0,0) size 111x13
- RenderText {#text} at (140,2) size 5x18
- text run at (140,2) width 5: " "
- RenderTextControl {INPUT} at (146,2) size 137x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
- RenderFlexibleBox {DIV} at (3,3) size 131x13
- RenderBlock {DIV} at (0,0) size 111x13
- RenderText {#text} at (284,2) size 5x18
- text run at (284,2) width 5: " "
- RenderTextControl {INPUT} at (290,2) size 138x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
- RenderFlexibleBox {DIV} at (3,3) size 131x13
- RenderBlock {DIV} at (0,0) size 111x13
- RenderTextControl {INPUT} at (431,2) size 137x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
- RenderFlexibleBox {DIV} at (3,3) size 131x13
- RenderBlock {DIV} at (0,0) size 111x13
-layer at (13,47) size 110x13
- RenderBlock {DIV} at (0,0) size 111x13
-layer at (157,47) size 110x13
- RenderBlock {DIV} at (0,0) size 111x13
-layer at (302,47) size 110x13
- RenderBlock {DIV} at (0,0) size 111x13
-layer at (442,47) size 110x13
- RenderBlock {DIV} at (0,0) size 111x13
-layer at (126,48) size 15x12
- RenderBlock {DIV} at (113,0) size 16x13 [bgcolor=#000000]
-layer at (271,48) size 15x12
- RenderBlock {DIV} at (113,0) size 16x13 [bgcolor=#000000]
-layer at (415,48) size 15x12
- RenderBlock {DIV} at (113,0) size 16x13 [bgcolor=#000000]
-layer at (555,48) size 15x12
- RenderBlock {DIV} at (113,0) size 16x13 [bgcolor=#000000]
Deleted: trunk/LayoutTests/fast/forms/input-auto-fill-button.html (185165 => 185166)
--- trunk/LayoutTests/fast/forms/input-auto-fill-button.html 2015-06-03 20:39:52 UTC (rev 185165)
+++ trunk/LayoutTests/fast/forms/input-auto-fill-button.html 2015-06-03 20:44:56 UTC (rev 185166)
@@ -1,22 +0,0 @@
-<p>This tests that the AutoFill button renders. It can only be tested in the test tool.</p>
-<div id='container'>
- <input type='text'>
- <input type='password'>
-</div>
-<script>
-
-if (window.internals) {
- var inputs = document.querySelectorAll("input");
- for (var i = 0; i < inputs.length; ++i)
- window.internals.setShowAutoFillButton(inputs[i], true);
-
- var dynamicInput = document.createElement("input");
- window.internals.setShowAutoFillButton(dynamicInput, true);
- document.querySelector("#container").appendChild(dynamicInput);
-
- var dynamicInput2 = document.createElement("input");
- window.internals.setShowAutoFillButton(dynamicInput2, true);
- document.querySelector("#container").appendChild(dynamicInput2);
- dynamicInput2.setAttribute("type", "password");
-}
-</script>
Copied: trunk/LayoutTests/platform/ios-simulator/fast/forms/auto-fill-button/input-auto-fill-button-expected.png (from rev 185165, trunk/LayoutTests/platform/ios-simulator/fast/forms/input-auto-fill-button-expected.png)
(Binary files differ)
Property changes: trunk/LayoutTests/platform/ios-simulator/fast/forms/auto-fill-button/input-auto-fill-button-expected.png
Added: svn:mime-type
Copied: trunk/LayoutTests/platform/ios-simulator/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt (from rev 185165, trunk/LayoutTests/platform/ios-simulator/fast/forms/input-auto-fill-button-expected.txt) (0 => 185166)
--- trunk/LayoutTests/platform/ios-simulator/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,37 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {P} at (0,0) size 784x20
+ RenderText {#text} at (0,0) size 503x19
+ text run at (0,0) width 503: "This tests that the AutoFill button renders. It can only be tested in the test tool."
+ RenderBlock {DIV} at (0,36) 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 107x14
+ RenderText {#text} at (139,1) size 5x19
+ text run at (139,1) width 5: " "
+ RenderTextControl {INPUT} at (145,2) size 136x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+ RenderFlexibleBox {DIV} at (6,3) size 123x15
+ RenderBlock {DIV} at (0,0) size 107x14
+ RenderText {#text} at (282,1) size 5x19
+ text run at (282,1) width 5: " "
+ RenderTextControl {INPUT} at (288,2) size 137x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+ RenderFlexibleBox {DIV} at (6,3) size 123x15
+ RenderBlock {DIV} at (0,0) size 107x14
+ RenderTextControl {INPUT} at (428,2) size 136x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+layer at (17,49) size 106x14
+ RenderBlock {DIV} at (0,0) size 107x14
+layer at (160,49) size 106x14
+ RenderBlock {DIV} at (0,0) size 107x14
+layer at (303,49) size 106x14
+ RenderBlock {DIV} at (0,0) size 107x14
+layer at (443,49) size 122x14
+ RenderBlock {DIV} at (6,3) size 123x15
+layer at (123,49) size 16x14
+ RenderImage {DIV} at (106,0) size 17x14
+layer at (266,49) size 16x14
+ RenderImage {DIV} at (106,0) size 17x14
+layer at (410,49) size 16x14
+ RenderImage {DIV} at (106,0) size 17x14
Deleted: trunk/LayoutTests/platform/ios-simulator/fast/forms/input-auto-fill-button-expected.png
(Binary files differ)
Deleted: trunk/LayoutTests/platform/ios-simulator/fast/forms/input-auto-fill-button-expected.txt (185165 => 185166)
--- trunk/LayoutTests/platform/ios-simulator/fast/forms/input-auto-fill-button-expected.txt 2015-06-03 20:39:52 UTC (rev 185165)
+++ trunk/LayoutTests/platform/ios-simulator/fast/forms/input-auto-fill-button-expected.txt 2015-06-03 20:44:56 UTC (rev 185166)
@@ -1,37 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x584
- RenderBlock {P} at (0,0) size 784x20
- RenderText {#text} at (0,0) size 503x19
- text run at (0,0) width 503: "This tests that the AutoFill button renders. It can only be tested in the test tool."
- RenderBlock {DIV} at (0,36) 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 107x14
- RenderText {#text} at (139,1) size 5x19
- text run at (139,1) width 5: " "
- RenderTextControl {INPUT} at (145,2) size 136x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
- RenderFlexibleBox {DIV} at (6,3) size 123x15
- RenderBlock {DIV} at (0,0) size 107x14
- RenderText {#text} at (282,1) size 5x19
- text run at (282,1) width 5: " "
- RenderTextControl {INPUT} at (288,2) size 137x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
- RenderFlexibleBox {DIV} at (6,3) size 123x15
- RenderBlock {DIV} at (0,0) size 107x14
- RenderTextControl {INPUT} at (428,2) size 136x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
-layer at (17,49) size 106x14
- RenderBlock {DIV} at (0,0) size 107x14
-layer at (160,49) size 106x14
- RenderBlock {DIV} at (0,0) size 107x14
-layer at (303,49) size 106x14
- RenderBlock {DIV} at (0,0) size 107x14
-layer at (443,49) size 122x14
- RenderBlock {DIV} at (6,3) size 123x15
-layer at (123,49) size 16x14
- RenderImage {DIV} at (106,0) size 17x14
-layer at (266,49) size 16x14
- RenderImage {DIV} at (106,0) size 17x14
-layer at (410,49) size 16x14
- RenderImage {DIV} at (106,0) size 17x14
Copied: trunk/LayoutTests/platform/mac-mavericks/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt (from rev 185165, trunk/LayoutTests/platform/mac-mavericks/fast/forms/input-auto-fill-button-expected.txt) (0 => 185166)
--- trunk/LayoutTests/platform/mac-mavericks/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac-mavericks/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,41 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {P} at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 503x18
+ text run at (0,0) width 503: "This tests that the AutoFill button renders. It can only be tested in the test tool."
+ RenderBlock {DIV} at (0,34) 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 120x13
+ RenderText {#text} at (149,2) size 5x18
+ text run at (149,2) width 5: " "
+ RenderTextControl {INPUT} at (155,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 140x13
+ RenderBlock {DIV} at (0,0) size 120x13
+ RenderText {#text} at (302,2) size 5x18
+ text run at (302,2) width 5: " "
+ RenderTextControl {INPUT} at (308,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 140x13
+ RenderBlock {DIV} at (0,0) size 120x13
+ RenderTextControl {INPUT} at (457,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 140x13
+ RenderBlock {DIV} at (0,0) size 120x13
+layer at (13,47) size 119x13
+ RenderBlock {DIV} at (0,0) size 120x13
+layer at (166,47) size 119x13
+ RenderBlock {DIV} at (0,0) size 120x13
+layer at (319,47) size 119x13
+ RenderBlock {DIV} at (0,0) size 120x13
+layer at (468,47) size 119x13
+ RenderBlock {DIV} at (0,0) size 120x13
+layer at (135,48) size 15x12
+ RenderBlock {DIV} at (122,0) size 16x13 [bgcolor=#000000]
+layer at (288,48) size 15x12
+ RenderBlock {DIV} at (122,0) size 16x13 [bgcolor=#000000]
+layer at (441,48) size 15x12
+ RenderBlock {DIV} at (122,0) size 16x13 [bgcolor=#000000]
+layer at (591,48) size 15x12
+ RenderBlock {DIV} at (122,0) size 16x13 [bgcolor=#000000]
Deleted: trunk/LayoutTests/platform/mac-mavericks/fast/forms/input-auto-fill-button-expected.txt (185165 => 185166)
--- trunk/LayoutTests/platform/mac-mavericks/fast/forms/input-auto-fill-button-expected.txt 2015-06-03 20:39:52 UTC (rev 185165)
+++ trunk/LayoutTests/platform/mac-mavericks/fast/forms/input-auto-fill-button-expected.txt 2015-06-03 20:44:56 UTC (rev 185166)
@@ -1,41 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x584
- RenderBlock {P} at (0,0) size 784x18
- RenderText {#text} at (0,0) size 503x18
- text run at (0,0) width 503: "This tests that the AutoFill button renders. It can only be tested in the test tool."
- RenderBlock {DIV} at (0,34) 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 120x13
- RenderText {#text} at (149,2) size 5x18
- text run at (149,2) width 5: " "
- RenderTextControl {INPUT} at (155,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
- RenderFlexibleBox {DIV} at (3,3) size 140x13
- RenderBlock {DIV} at (0,0) size 120x13
- RenderText {#text} at (302,2) size 5x18
- text run at (302,2) width 5: " "
- RenderTextControl {INPUT} at (308,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
- RenderFlexibleBox {DIV} at (3,3) size 140x13
- RenderBlock {DIV} at (0,0) size 120x13
- RenderTextControl {INPUT} at (457,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
- RenderFlexibleBox {DIV} at (3,3) size 140x13
- RenderBlock {DIV} at (0,0) size 120x13
-layer at (13,47) size 119x13
- RenderBlock {DIV} at (0,0) size 120x13
-layer at (166,47) size 119x13
- RenderBlock {DIV} at (0,0) size 120x13
-layer at (319,47) size 119x13
- RenderBlock {DIV} at (0,0) size 120x13
-layer at (468,47) size 119x13
- RenderBlock {DIV} at (0,0) size 120x13
-layer at (135,48) size 15x12
- RenderBlock {DIV} at (122,0) size 16x13 [bgcolor=#000000]
-layer at (288,48) size 15x12
- RenderBlock {DIV} at (122,0) size 16x13 [bgcolor=#000000]
-layer at (441,48) size 15x12
- RenderBlock {DIV} at (122,0) size 16x13 [bgcolor=#000000]
-layer at (591,48) size 15x12
- RenderBlock {DIV} at (122,0) size 16x13 [bgcolor=#000000]
Copied: trunk/LayoutTests/platform/win/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt (from rev 185165, trunk/LayoutTests/platform/win/fast/forms/input-auto-fill-button-expected.txt) (0 => 185166)
--- trunk/LayoutTests/platform/win/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/win/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt 2015-06-03 20:44:56 UTC (rev 185166)
@@ -0,0 +1,37 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {P} at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 490x18
+ text run at (0,0) width 490: "This tests that the AutoFill button renders. It can only be tested in the test tool."
+ RenderBlock {DIV} at (0,34) size 784x25
+ RenderTextControl {INPUT} at (2,2) size 149x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (2,3) size 145x15
+ RenderBlock {DIV} at (0,0) size 129x15
+ RenderText {#text} at (153,3) size 4x18
+ text run at (153,3) width 4: " "
+ RenderTextControl {INPUT} at (159,2) size 149x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (2,3) size 145x15
+ RenderBlock {DIV} at (0,0) size 129x15
+ RenderText {#text} at (310,3) size 4x18
+ text run at (310,3) width 4: " "
+ RenderTextControl {INPUT} at (316,2) size 149x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (2,3) size 145x15
+ RenderBlock {DIV} at (0,0) size 129x15
+ RenderTextControl {INPUT} at (469,2) size 149x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+layer at (12,47) size 129x15
+ RenderBlock {DIV} at (0,0) size 129x15
+layer at (169,47) size 129x15
+ RenderBlock {DIV} at (0,0) size 129x15
+layer at (326,47) size 129x15
+ RenderBlock {DIV} at (0,0) size 129x15
+layer at (479,47) size 145x15
+ RenderBlock {DIV} at (2,3) size 145x15
+layer at (141,47) size 16x15
+ RenderImage {DIV} at (129,0) size 16x15
+layer at (298,47) size 16x15
+ RenderImage {DIV} at (129,0) size 16x15
+layer at (455,47) size 16x15
+ RenderImage {DIV} at (129,0) size 16x15
Deleted: trunk/LayoutTests/platform/win/fast/forms/input-auto-fill-button-expected.txt (185165 => 185166)
--- trunk/LayoutTests/platform/win/fast/forms/input-auto-fill-button-expected.txt 2015-06-03 20:39:52 UTC (rev 185165)
+++ trunk/LayoutTests/platform/win/fast/forms/input-auto-fill-button-expected.txt 2015-06-03 20:44:56 UTC (rev 185166)
@@ -1,37 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x584
- RenderBlock {P} at (0,0) size 784x18
- RenderText {#text} at (0,0) size 490x18
- text run at (0,0) width 490: "This tests that the AutoFill button renders. It can only be tested in the test tool."
- RenderBlock {DIV} at (0,34) size 784x25
- RenderTextControl {INPUT} at (2,2) size 149x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
- RenderFlexibleBox {DIV} at (2,3) size 145x15
- RenderBlock {DIV} at (0,0) size 125x15
- RenderText {#text} at (153,3) size 4x18
- text run at (153,3) width 4: " "
- RenderTextControl {INPUT} at (159,2) size 149x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
- RenderFlexibleBox {DIV} at (2,3) size 145x15
- RenderBlock {DIV} at (0,0) size 125x15
- RenderText {#text} at (310,3) size 4x18
- text run at (310,3) width 4: " "
- RenderTextControl {INPUT} at (316,2) size 149x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
- RenderFlexibleBox {DIV} at (2,3) size 145x15
- RenderBlock {DIV} at (0,0) size 125x15
- RenderTextControl {INPUT} at (469,2) size 149x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
-layer at (12,47) size 125x15
- RenderBlock {DIV} at (0,0) size 125x15
-layer at (169,47) size 125x15
- RenderBlock {DIV} at (0,0) size 125x15
-layer at (326,47) size 125x15
- RenderBlock {DIV} at (0,0) size 125x15
-layer at (479,47) size 145x15
- RenderBlock {DIV} at (2,3) size 145x15
-layer at (140,49) size 15x12
- RenderBlock {DIV} at (128,1) size 15x13 [bgcolor=#000000]
-layer at (297,49) size 15x12
- RenderBlock {DIV} at (128,1) size 15x13 [bgcolor=#000000]
-layer at (454,49) size 15x12
- RenderBlock {DIV} at (128,1) size 15x13 [bgcolor=#000000]
Modified: trunk/Source/WebCore/ChangeLog (185165 => 185166)
--- trunk/Source/WebCore/ChangeLog 2015-06-03 20:39:52 UTC (rev 185165)
+++ trunk/Source/WebCore/ChangeLog 2015-06-03 20:44:56 UTC (rev 185166)
@@ -1,3 +1,27 @@
+2015-06-03 Daniel Bates <daba...@apple.com>
+
+ AutoFill button should not be shown in read-only or disabled field
+ https://bugs.webkit.org/show_bug.cgi?id=145579
+ <rdar://problem/21212494>
+
+ Reviewed by Darin Adler.
+
+ Fixes an issue where the AutoFill button is shown in a read-only or disabled
+ field. We should not show the AutoFill button in such cases.
+
+ Tests: 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-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
+
+ * html/TextFieldInputType.cpp:
+ (WebCore::TextFieldInputType::disabledAttributeChanged): Update AutoFill button state.
+ (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
+ (WebCore::TextFieldInputType::shouldDrawAutoFillButton): Do not draw AutoFill button
+ when the field is disabled or read-only.
+
2015-06-03 Brent Fulgham <bfulg...@apple.com>
REGRESSION: (r181879): Scrolling in select/option region in iFrame scrolls both select and iframe
Modified: trunk/Source/WebCore/html/TextFieldInputType.cpp (185165 => 185166)
--- trunk/Source/WebCore/html/TextFieldInputType.cpp 2015-06-03 20:39:52 UTC (rev 185165)
+++ trunk/Source/WebCore/html/TextFieldInputType.cpp 2015-06-03 20:44:56 UTC (rev 185166)
@@ -358,12 +358,14 @@
{
if (m_innerSpinButton)
m_innerSpinButton->releaseCapture();
+ updateAutoFillButton();
}
void TextFieldInputType::readonlyAttributeChanged()
{
if (m_innerSpinButton)
m_innerSpinButton->releaseCapture();
+ updateAutoFillButton();
}
bool TextFieldInputType::supportsReadOnly() const
@@ -570,7 +572,7 @@
bool TextFieldInputType::shouldDrawAutoFillButton() const
{
- return element().showAutoFillButton();
+ return !element().isDisabledOrReadOnly() && element().showAutoFillButton();
}
void TextFieldInputType::autoFillButtonElementWasClicked()