Title: [94382] trunk
- Revision
- 94382
- Author
- [email protected]
- Date
- 2011-09-01 19:12:28 -0700 (Thu, 01 Sep 2011)
Log Message
The filename text color of a file upload control should be inherited.
https://bugs.webkit.org/show_bug.cgi?id=67368
Reviewed by Darin Adler.
Source/WebCore:
* css/html.css:
(input[type="file"]):
Add 'color: inherit'.
The declaration for 'input' contains 'color: initial;'. So a file
upload control has had black foreground color unless it has been
specified 'color' property explicitly.
Because a file upload control uses inherited background color, the
foreground color also should be inherited.
LayoutTests:
* fast/forms/file/file-style-inheritance-expected.txt:
* fast/forms/file/file-style-inheritance.html: Add a testcase.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (94381 => 94382)
--- trunk/LayoutTests/ChangeLog 2011-09-02 01:37:55 UTC (rev 94381)
+++ trunk/LayoutTests/ChangeLog 2011-09-02 02:12:28 UTC (rev 94382)
@@ -1,3 +1,13 @@
+2011-09-01 Kent Tamura <[email protected]>
+
+ The filename text color of a file upload control should be inherited.
+ https://bugs.webkit.org/show_bug.cgi?id=67368
+
+ Reviewed by Darin Adler.
+
+ * fast/forms/file/file-style-inheritance-expected.txt:
+ * fast/forms/file/file-style-inheritance.html: Add a testcase.
+
2011-09-01 James Robinson <[email protected]>
[chromium] Add chromium leopard baselines
Modified: trunk/LayoutTests/fast/forms/file/file-style-inheritance-expected.txt (94381 => 94382)
--- trunk/LayoutTests/fast/forms/file/file-style-inheritance-expected.txt 2011-09-02 01:37:55 UTC (rev 94381)
+++ trunk/LayoutTests/fast/forms/file/file-style-inheritance-expected.txt 2011-09-02 02:12:28 UTC (rev 94382)
@@ -1,7 +1,10 @@
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 document.defaultView.getComputedStyle(document.getElementById("darkFile"), null).getPropertyValue("background-color") is "rgba(0, 0, 0, 0)"
+PASS document.defaultView.getComputedStyle(document.getElementById("darkFile"), null).getPropertyValue("color") is "rgb(255, 255, 255)"
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/forms/file/file-style-inheritance.html (94381 => 94382)
--- trunk/LayoutTests/fast/forms/file/file-style-inheritance.html 2011-09-02 01:37:55 UTC (rev 94381)
+++ trunk/LayoutTests/fast/forms/file/file-style-inheritance.html 2011-09-02 02:12:28 UTC (rev 94382)
@@ -8,18 +8,27 @@
/* Uses square-button for ease of testing on Mac. */
-webkit-appearance: square-button;
}
+
+#dark {
+ background-color: black;
+ color: white;
+}
</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=dark><input type=file id=darkFile></div>
<div id=console></div>
<script>
if (!window.internals) {
- debug('Check if the "Choose File" button of the first file upload control is large.');
+ debug('1. Check if the "Choose File" button of the first file upload control is large.');
+ debug('2. Check if the "no file selected" text of the second file upload control is visible.');
} else {
var file1 = document.getElementById('large');
var button1 = internals.shadowRoot(file1).firstChild;
shouldBe('document.defaultView.getComputedStyle(button1, null).getPropertyValue("font-size")', '"30px"');
+ shouldBe('document.defaultView.getComputedStyle(document.getElementById("darkFile"), null).getPropertyValue("background-color")', '"rgba(0, 0, 0, 0)"');
+ shouldBe('document.defaultView.getComputedStyle(document.getElementById("darkFile"), null).getPropertyValue("color")', '"rgb(255, 255, 255)"');
}
var successfullyParsed = true;
</script>
Modified: trunk/Source/WebCore/ChangeLog (94381 => 94382)
--- trunk/Source/WebCore/ChangeLog 2011-09-02 01:37:55 UTC (rev 94381)
+++ trunk/Source/WebCore/ChangeLog 2011-09-02 02:12:28 UTC (rev 94382)
@@ -1,3 +1,19 @@
+2011-09-01 Kent Tamura <[email protected]>
+
+ The filename text color of a file upload control should be inherited.
+ https://bugs.webkit.org/show_bug.cgi?id=67368
+
+ Reviewed by Darin Adler.
+
+ * css/html.css:
+ (input[type="file"]):
+ Add 'color: inherit'.
+ The declaration for 'input' contains 'color: initial;'. So a file
+ upload control has had black foreground color unless it has been
+ specified 'color' property explicitly.
+ Because a file upload control uses inherited background color, the
+ foreground color also should be inherited.
+
2011-09-01 Kentaro Hara <[email protected]>
Generate a Worker constructor of V8 using the IDL 'Constructor' extended attribute
Modified: trunk/Source/WebCore/css/html.css (94381 => 94382)
--- trunk/Source/WebCore/css/html.css 2011-09-02 01:37:55 UTC (rev 94381)
+++ trunk/Source/WebCore/css/html.css 2011-09-02 02:12:28 UTC (rev 94382)
@@ -529,6 +529,7 @@
input[type="file"] {
-webkit-box-align: baseline;
+ color: inherit;
text-align: start !important;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes