Title: [96134] trunk
- Revision
- 96134
- Author
- commit-qu...@webkit.org
- Date
- 2011-09-27 11:17:32 -0700 (Tue, 27 Sep 2011)
Log Message
Autofocus on readonly inputs does not focus the element.
https://bugs.webkit.org/show_bug.cgi?id=24092
Patch by Kaustubh Atrawalkar <kaust...@motorola.com> on 2011-09-27
Reviewed by Ryosuke Niwa.
Source/WebCore:
Readonly input elements should be autofocusable. Removed the check.
Tests: fast/forms/autofocus-readonly-attribute.html
* html/HTMLFormControlElement.cpp:
(WebCore::shouldAutofocus):
LayoutTests:
* fast/forms/autofocus-readonly-attribute-expected.txt: Added.
* fast/forms/autofocus-readonly-attribute.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (96133 => 96134)
--- trunk/LayoutTests/ChangeLog 2011-09-27 18:06:06 UTC (rev 96133)
+++ trunk/LayoutTests/ChangeLog 2011-09-27 18:17:32 UTC (rev 96134)
@@ -1,3 +1,13 @@
+2011-09-27 Kaustubh Atrawalkar <kaust...@motorola.com>
+
+ Autofocus on readonly inputs does not focus the element.
+ https://bugs.webkit.org/show_bug.cgi?id=24092
+
+ Reviewed by Ryosuke Niwa.
+
+ * fast/forms/autofocus-readonly-attribute-expected.txt: Added.
+ * fast/forms/autofocus-readonly-attribute.html: Added.
+
2011-09-27 Mihai Parparita <mih...@chromium.org>
Remove duplicate of fast/text/international/Geeza-Pro-vertical-metrics-adjustment.html
Added: trunk/LayoutTests/fast/forms/autofocus-readonly-attribute-expected.txt (0 => 96134)
--- trunk/LayoutTests/fast/forms/autofocus-readonly-attribute-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/forms/autofocus-readonly-attribute-expected.txt 2011-09-27 18:17:32 UTC (rev 96134)
@@ -0,0 +1,4 @@
+The text box should have focus console should print PASS
+
+PASS
+
Added: trunk/LayoutTests/fast/forms/autofocus-readonly-attribute.html (0 => 96134)
--- trunk/LayoutTests/fast/forms/autofocus-readonly-attribute.html (rev 0)
+++ trunk/LayoutTests/fast/forms/autofocus-readonly-attribute.html 2011-09-27 18:17:32 UTC (rev 96134)
@@ -0,0 +1,19 @@
+<!DOCYTPE html>
+<html>
+<head>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+function log(msg) {
+ var console = document.getElementById("console");
+ console.innerText = msg;
+}
+</script>
+</head>
+<body>
+<p>The text box should have focus console should print PASS</p>
+<div id="console"></div>
+<p><input type="text" name="test" id="test" readonly autofocus _onfocus_='log("PASS")'></p>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (96133 => 96134)
--- trunk/Source/WebCore/ChangeLog 2011-09-27 18:06:06 UTC (rev 96133)
+++ trunk/Source/WebCore/ChangeLog 2011-09-27 18:17:32 UTC (rev 96134)
@@ -1,3 +1,17 @@
+2011-09-27 Kaustubh Atrawalkar <kaust...@motorola.com>
+
+ Autofocus on readonly inputs does not focus the element.
+ https://bugs.webkit.org/show_bug.cgi?id=24092
+
+ Reviewed by Ryosuke Niwa.
+
+ Readonly input elements should be autofocusable. Removed the check.
+
+ Tests: fast/forms/autofocus-readonly-attribute.html
+
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::shouldAutofocus):
+
2011-09-27 Simon Fraser <simon.fra...@apple.com>
Clean up how FrameView accesses the RenderView
Modified: trunk/Source/WebCore/html/HTMLFormControlElement.cpp (96133 => 96134)
--- trunk/Source/WebCore/html/HTMLFormControlElement.cpp 2011-09-27 18:06:06 UTC (rev 96133)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.cpp 2011-09-27 18:17:32 UTC (rev 96134)
@@ -128,8 +128,6 @@
return false;
if (element->document()->ignoreAutofocus())
return false;
- if (element->isReadOnlyFormControl())
- return false;
if (element->hasAutofocused())
return false;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes