Title: [117556] trunk
- Revision
- 117556
- Author
- [email protected]
- Date
- 2012-05-18 00:42:02 -0700 (Fri, 18 May 2012)
Log Message
WebKit erroneously add 1px padding in input elements
https://bugs.webkit.org/show_bug.cgi?id=86784
Reviewed by Kent Tamura.
Source/WebCore:
Fixed the bug by removing the code that added left and right paddings in input elements.
The code was added in r13567 to match a very old version of Internet Explorer but this quirk
does not seem to exists in IE9 (both in quirks and standard modes).
A lot of tests need to be rebaselined due to 1px difference inside input elements, and 2px
differences for the width of input elements. (In some extreme cases, line breaking changed
due to the width change).
Test: fast/forms/input-textarea-padding-match.html
* css/html.css:
(input::-webkit-input-placeholder, isindex::-webkit-input-placeholder):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::createInnerTextStyle):
LayoutTests:
Add a regression.
Also rebaseline tests in separate commits per getting rid of extra 1px padding on left and right.
Input elements' widths got shrunk by 2px in most cases and the text moved 1px to the start
(left for LTR and right for RTL).
* fast/forms/input-textarea-padding-match-expected.html: Added.
* fast/forms/input-textarea-padding-match.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (117555 => 117556)
--- trunk/LayoutTests/ChangeLog 2012-05-18 07:37:01 UTC (rev 117555)
+++ trunk/LayoutTests/ChangeLog 2012-05-18 07:42:02 UTC (rev 117556)
@@ -1,3 +1,19 @@
+2012-05-17 Ryosuke Niwa <[email protected]>
+
+ WebKit erroneously add 1px padding in input elements
+ https://bugs.webkit.org/show_bug.cgi?id=86784
+
+ Reviewed by Kent Tamura.
+
+ Add a regression.
+
+ Also rebaseline tests in separate commits per getting rid of extra 1px padding on left and right.
+ Input elements' widths got shrunk by 2px in most cases and the text moved 1px to the start
+ (left for LTR and right for RTL).
+
+ * fast/forms/input-textarea-padding-match-expected.html: Added.
+ * fast/forms/input-textarea-padding-match.html: Added.
+
2012-05-18 Ryosuke Niwa <[email protected]>
Chromium rebaselines.
Added: trunk/LayoutTests/fast/forms/input-textarea-padding-match-expected.html (0 => 117556)
--- trunk/LayoutTests/fast/forms/input-textarea-padding-match-expected.html (rev 0)
+++ trunk/LayoutTests/fast/forms/input-textarea-padding-match-expected.html 2012-05-18 07:42:02 UTC (rev 117556)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This test ensures padding inside input and textarea elements match.</p>
+<style type="text/css">
+textarea {
+ display: block;
+ font-family: arial,sans-serif;
+ border: none;
+ padding: 0 0 0 10px;
+ margin: 0;
+ resize: none;
+ width: 20px;
+ height: 10px;
+ overflow: hidden;
+}
+</style>
+<textarea>|</textarea>
+</body>
+</html>
Added: trunk/LayoutTests/fast/forms/input-textarea-padding-match.html (0 => 117556)
--- trunk/LayoutTests/fast/forms/input-textarea-padding-match.html (rev 0)
+++ trunk/LayoutTests/fast/forms/input-textarea-padding-match.html 2012-05-18 07:42:02 UTC (rev 117556)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This test ensures padding inside input and textarea elements match.</p>
+<style type="text/css">
+input {
+ display: block;
+ font-family: arial,sans-serif;
+ border: none;
+ padding: 0 0 0 10px;
+ margin: 0;
+ resize: none;
+ width: 20px;
+ height: 10px;
+ overflow: hidden;
+}
+</style>
+<input type="text" value="|">
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (117555 => 117556)
--- trunk/Source/WebCore/ChangeLog 2012-05-18 07:37:01 UTC (rev 117555)
+++ trunk/Source/WebCore/ChangeLog 2012-05-18 07:42:02 UTC (rev 117556)
@@ -1,3 +1,25 @@
+2012-05-17 Ryosuke Niwa <[email protected]>
+
+ WebKit erroneously add 1px padding in input elements
+ https://bugs.webkit.org/show_bug.cgi?id=86784
+
+ Reviewed by Kent Tamura.
+
+ Fixed the bug by removing the code that added left and right paddings in input elements.
+ The code was added in r13567 to match a very old version of Internet Explorer but this quirk
+ does not seem to exists in IE9 (both in quirks and standard modes).
+
+ A lot of tests need to be rebaselined due to 1px difference inside input elements, and 2px
+ differences for the width of input elements. (In some extreme cases, line breaking changed
+ due to the width change).
+
+ Test: fast/forms/input-textarea-padding-match.html
+
+ * css/html.css:
+ (input::-webkit-input-placeholder, isindex::-webkit-input-placeholder):
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
+
2012-05-18 Zalan Bujtas <[email protected]>
[Qt] Gesture tap highlighter needs to take overflow clip into account.
Modified: trunk/Source/WebCore/css/html.css (117555 => 117556)
--- trunk/Source/WebCore/css/html.css 2012-05-18 07:37:01 UTC (rev 117555)
+++ trunk/Source/WebCore/css/html.css 2012-05-18 07:42:02 UTC (rev 117556)
@@ -510,8 +510,6 @@
white-space: pre;
word-wrap: normal;
overflow: hidden;
- padding-left: 1px;
- padding-right: 1px;
}
input[type="password"] {
Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (117555 => 117556)
--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp 2012-05-18 07:37:01 UTC (rev 117555)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp 2012-05-18 07:42:02 UTC (rev 117556)
@@ -478,10 +478,6 @@
textBlockStyle->setDisplay(BLOCK);
- // We're adding one extra pixel of padding to match WinIE.
- textBlockStyle->setPaddingLeft(Length(1, Fixed));
- textBlockStyle->setPaddingRight(Length(1, Fixed));
-
return textBlockStyle.release();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes