Title: [143434] trunk
- Revision
- 143434
- Author
- [email protected]
- Date
- 2013-02-20 00:10:10 -0800 (Wed, 20 Feb 2013)
Log Message
File upload control doesn't apply CSS vertical padding or border to file name
https://bugs.webkit.org/show_bug.cgi?id=109011
Patch by Nils Barth <[email protected]> on 2013-02-20
Reviewed by Hajime Morrita.
Source/WebCore:
Test: fast/forms/file/file-vertical-padding-border.html
* rendering/RenderFileUploadControl.cpp:
Add borderTop() and paddingTop() when computing position.
(WebCore::RenderFileUploadControl::paintObject):
LayoutTests:
* fast/forms/file/file-vertical-padding-border.html: Added.
* fast/forms/file/file-vertical-padding-border-expected.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (143433 => 143434)
--- trunk/LayoutTests/ChangeLog 2013-02-20 07:42:09 UTC (rev 143433)
+++ trunk/LayoutTests/ChangeLog 2013-02-20 08:10:10 UTC (rev 143434)
@@ -1,3 +1,13 @@
+2013-02-20 Nils Barth <[email protected]>
+
+ File upload control doesn't apply CSS vertical padding or border to file name
+ https://bugs.webkit.org/show_bug.cgi?id=109011
+
+ Reviewed by Hajime Morrita.
+
+ * fast/forms/file/file-vertical-padding-border.html: Added.
+ * fast/forms/file/file-vertical-padding-border-expected.html: Added.
+
2013-02-19 KwangYong Choi <[email protected]>
[EFL] Mark fast/regions/seamless-iframe-flowed-into-regions.html failure
Added: trunk/LayoutTests/fast/forms/file/file-vertical-padding-border-expected.html (0 => 143434)
--- trunk/LayoutTests/fast/forms/file/file-vertical-padding-border-expected.html (rev 0)
+++ trunk/LayoutTests/fast/forms/file/file-vertical-padding-border-expected.html 2013-02-20 08:10:10 UTC (rev 143434)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>File input alignment with CSS padding and border</title>
+<style type="text/css">
+ span, input {
+ display: inline-block;
+ vertical-align: top;
+ margin: 0px;
+ }
+ .pad-all { padding: 10px; }
+ .pad-top { padding-top: 10px; }
+ .bor-all { border: 10px solid DarkGray; }
+ .bor-top { border-top: 10px solid DarkGray; }
+</style>
+</head>
+<body>
+<p>Bug <a href="" File upload control doesn't apply CSS vertical padding or border to file name</p>
+<p>For this test to pass, the file name (or "No file chosen") should line up with the button text below, with CSS padding and borders overall or on the top, and in combinations thereof.</p>
+<span class="pad-all"><input type="file"/></span>
+<span class="pad-top"><input type="file"/></span>
+<br/>
+<span class="bor-all"><input type="file"/></span>
+<span class="bor-top"><input type="file"/></span>
+<br/>
+<span class="pad-all bor-all"><input type="file"/></span>
+<span class="pad-all bor-top"><input type="file"/></span>
+<br/>
+<span class="pad-top bor-all"><input type="file"/></span>
+<span class="pad-top bor-top"><input type="file"/></span>
+</body>
+</html>
Added: trunk/LayoutTests/fast/forms/file/file-vertical-padding-border.html (0 => 143434)
--- trunk/LayoutTests/fast/forms/file/file-vertical-padding-border.html (rev 0)
+++ trunk/LayoutTests/fast/forms/file/file-vertical-padding-border.html 2013-02-20 08:10:10 UTC (rev 143434)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>File input alignment with CSS padding and border</title>
+<style type="text/css">
+ span, input {
+ display: inline-block;
+ vertical-align: top;
+ margin: 0px;
+ }
+ .pad-all { padding: 10px; }
+ .pad-top { padding-top: 10px; }
+ .bor-all { border: 10px solid DarkGray; }
+ .bor-top { border-top: 10px solid DarkGray; }
+</style>
+</head>
+<body>
+<p>Bug <a href="" File upload control doesn't apply CSS vertical padding or border to file name</p>
+<p>For this test to pass, the file name (or "No file chosen") should line up with the button text below, with CSS padding and borders overall or on the top, and in combinations thereof.</p>
+<span><input type="file" class="pad-all"/></span>
+<span><input type="file" class="pad-top"/></span>
+<br/>
+<span><input type="file" class="bor-all"/></span>
+<span><input type="file" class="bor-top"/></span>
+<br/>
+<span><input type="file" class="pad-all bor-all"/></span>
+<span><input type="file" class="pad-all bor-top"/></span>
+<br/>
+<span><input type="file" class="pad-top bor-all"/></span>
+<span><input type="file" class="pad-top bor-top"/></span>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (143433 => 143434)
--- trunk/Source/WebCore/ChangeLog 2013-02-20 07:42:09 UTC (rev 143433)
+++ trunk/Source/WebCore/ChangeLog 2013-02-20 08:10:10 UTC (rev 143434)
@@ -1,3 +1,16 @@
+2013-02-20 Nils Barth <[email protected]>
+
+ File upload control doesn't apply CSS vertical padding or border to file name
+ https://bugs.webkit.org/show_bug.cgi?id=109011
+
+ Reviewed by Hajime Morrita.
+
+ Test: fast/forms/file/file-vertical-padding-border.html
+
+ * rendering/RenderFileUploadControl.cpp:
+ Add borderTop() and paddingTop() when computing position.
+ (WebCore::RenderFileUploadControl::paintObject):
+
2013-02-19 Andrey Adaikin <[email protected]>
Few methods in WebGLRenderingContext.idl have incorrect signatures
Modified: trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp (143433 => 143434)
--- trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp 2013-02-20 07:42:09 UTC (rev 143433)
+++ trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp 2013-02-20 08:10:10 UTC (rev 143434)
@@ -141,7 +141,7 @@
// We want to match the button's baseline
// FIXME: Make this work with transforms.
if (RenderButton* buttonRenderer = toRenderButton(button->renderer()))
- textY = paintOffset.y() + buttonRenderer->baselinePosition(AlphabeticBaseline, true, HorizontalLine, PositionOnContainingLine);
+ textY = paintOffset.y() + borderTop() + paddingTop() + buttonRenderer->baselinePosition(AlphabeticBaseline, true, HorizontalLine, PositionOnContainingLine);
else
textY = baselinePosition(AlphabeticBaseline, true, HorizontalLine, PositionOnContainingLine);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes