Title: [94268] trunk
- Revision
- 94268
- Author
- tk...@chromium.org
- Date
- 2011-08-31 19:40:01 -0700 (Wed, 31 Aug 2011)
Log Message
REGRESSION(r88115): "Choose File" button doesn't respect font-size property for the <input>
https://bugs.webkit.org/show_bug.cgi?id=67181
Reviewed by Dimitri Glazkov.
Source/WebCore:
r88115 removed the code to make inherited style of the owner input
element, and html.css contains "font: -webkit-small-control" for
input element. So -webkit-file-upload-button always had
-webkit-small-control font.
Test: fast/forms/file/file-style-inheritance.html
* css/html.css:
(input[type="file"]::-webkit-file-upload-button):
Specify font-size:inherit explicitly.
LayoutTests:
* fast/forms/file/file-style-inheritance-expected.txt: Added.
* fast/forms/file/file-style-inheritance.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (94267 => 94268)
--- trunk/LayoutTests/ChangeLog 2011-09-01 02:28:43 UTC (rev 94267)
+++ trunk/LayoutTests/ChangeLog 2011-09-01 02:40:01 UTC (rev 94268)
@@ -1,3 +1,13 @@
+2011-08-31 Kent Tamura <tk...@chromium.org>
+
+ REGRESSION(r88115): "Choose File" button doesn't respect font-size property for the <input>
+ https://bugs.webkit.org/show_bug.cgi?id=67181
+
+ Reviewed by Dimitri Glazkov.
+
+ * fast/forms/file/file-style-inheritance-expected.txt: Added.
+ * fast/forms/file/file-style-inheritance.html: Added.
+
2011-08-31 Erik Arvidsson <a...@chromium.org>
shouldBeEqualToString should encode special characters
Added: trunk/LayoutTests/fast/forms/file/file-style-inheritance-expected.txt (0 => 94268)
--- trunk/LayoutTests/fast/forms/file/file-style-inheritance-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/forms/file/file-style-inheritance-expected.txt 2011-09-01 02:40:01 UTC (rev 94268)
@@ -0,0 +1,8 @@
+Tests internal components of a file upload control correctly inherit the style of the container input element.
+
+
+PASS document.defaultView.getComputedStyle(button1, null).getPropertyValue("font-size") is "30px"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/forms/file/file-style-inheritance.html (0 => 94268)
--- trunk/LayoutTests/fast/forms/file/file-style-inheritance.html (rev 0)
+++ trunk/LayoutTests/fast/forms/file/file-style-inheritance.html 2011-09-01 02:40:01 UTC (rev 94268)
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<script src=""
+<style>
+#large {
+ font-size: 30px;
+}
+#large::-webkit-file-upload-button {
+ /* Uses square-button for ease of testing on Mac. */
+ -webkit-appearance: square-button;
+}
+</style>
+
+<p>Tests internal components of a file upload control correctly inherit the style of the container input element.</p>
+<div><input type=file id=large></div>
+<div id=console></div>
+<script>
+if (!window.internals) {
+ debug('Check if the "Choose File" button of the first file upload control is large.');
+} else {
+ var file1 = document.getElementById('large');
+ var button1 = internals.shadowRoot(file1).firstChild;
+ shouldBe('document.defaultView.getComputedStyle(button1, null).getPropertyValue("font-size")', '"30px"');
+}
+var successfullyParsed = true;
+</script>
+<script src=""
Modified: trunk/Source/WebCore/ChangeLog (94267 => 94268)
--- trunk/Source/WebCore/ChangeLog 2011-09-01 02:28:43 UTC (rev 94267)
+++ trunk/Source/WebCore/ChangeLog 2011-09-01 02:40:01 UTC (rev 94268)
@@ -1,3 +1,21 @@
+2011-08-31 Kent Tamura <tk...@chromium.org>
+
+ REGRESSION(r88115): "Choose File" button doesn't respect font-size property for the <input>
+ https://bugs.webkit.org/show_bug.cgi?id=67181
+
+ Reviewed by Dimitri Glazkov.
+
+ r88115 removed the code to make inherited style of the owner input
+ element, and html.css contains "font: -webkit-small-control" for
+ input element. So -webkit-file-upload-button always had
+ -webkit-small-control font.
+
+ Test: fast/forms/file/file-style-inheritance.html
+
+ * css/html.css:
+ (input[type="file"]::-webkit-file-upload-button):
+ Specify font-size:inherit explicitly.
+
2011-08-31 Chris Rogers <crog...@google.com>
Do more rigorous bounds checking in AudioBufferSourceNode::renderFromBuffer()
Modified: trunk/Source/WebCore/css/html.css (94267 => 94268)
--- trunk/Source/WebCore/css/html.css 2011-09-01 02:28:43 UTC (rev 94267)
+++ trunk/Source/WebCore/css/html.css 2011-09-01 02:40:01 UTC (rev 94268)
@@ -554,6 +554,7 @@
-webkit-appearance: push-button;
white-space: nowrap;
margin: 0;
+ font-size: inherit;
}
input[type="button"], input[type="submit"], input[type="reset"], input[type="file"]::-webkit-file-upload-button, button {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes