[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
dbates at webkit.org
dbates at webkit.org
Thu Feb 4 21:28:55 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit fbfa45be23bac5bdce87176ddc13fc4ba7c994f3
Author: dbates at webkit.org <dbates at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 27 05:29:08 2010 +0000
2010-01-26 Daniel Bates <dbates at webkit.org>
Reviewed by Tor Arne Vestbø.
https://bugs.webkit.org/show_bug.cgi?id=29564
[Qt] Fixes an issue where the height of <button>- and
<input type="button">- elements are fixed to the height of the
button label font plus padding. That is, the CSS height property
is being ignored.
Instead, we should honor the user-specified height, if appropriate
for the platform and context. Notice, the Mac ports do not honor the
height for <input type="button"> elements unless a border and/or
background is also specified.
Test: fast/css/button-height.html
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::adjustButtonStyle):
2010-01-26 Daniel Bates <dbates at webkit.org>
Reviewed by Tor Arne Vestbø.
https://bugs.webkit.org/show_bug.cgi?id=29564
Tests that the user-specified height for <button>- and <input type="button">-
elements are honored, if appropriate for the platform and context.
* fast/css/button-height-expected.txt: Added.
* fast/css/button-height.html: Added.
* fast/replaced/table-percent-height-expected.txt: Added notice about failing tests
in Windows ports.
* fast/replaced/table-percent-height.html: Ditto.
* platform/qt/fast/replaced/table-percent-height-expected.txt: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8809f0f..9da69fb 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-01-26 Daniel Bates <dbates at webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29564
+
+ Tests that the user-specified height for <button>- and <input type="button">-
+ elements are honored, if appropriate for the platform and context.
+
+ * fast/css/button-height-expected.txt: Added.
+ * fast/css/button-height.html: Added.
+ * fast/replaced/table-percent-height-expected.txt: Added notice about failing tests
+ in Windows ports.
+ * fast/replaced/table-percent-height.html: Ditto.
+ * platform/qt/fast/replaced/table-percent-height-expected.txt: Added.
+
2010-01-26 Diego Gonzalez <diego.gonzalez at openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/LayoutTests/fast/css/button-height-expected.txt b/LayoutTests/fast/css/button-height-expected.txt
new file mode 100644
index 0000000..3f3b68e
--- /dev/null
+++ b/LayoutTests/fast/css/button-height-expected.txt
@@ -0,0 +1,13 @@
+This tests that the specified height is honored (*) for <input> and <button> elements.
+(*) The Mac ports ignore the specified height for <input type="button"> elements unless a border and/or background CSS property is also specified (see the fifth button below). Disregarding padding, they render the button with a height equal to the height of the font used for the button label.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.getElementById('button1').offsetHeight is document.getElementById('button2').offsetHeight
+PASS document.getElementById('button3').offsetHeight is 40
+PASS document.getElementById('button4').offsetHeight is 40
+PASS document.getElementById('button5').offsetHeight is correct for this platform.
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/css/button-height.html b/LayoutTests/fast/css/button-height.html
new file mode 100644
index 0000000..b08d2e0
--- /dev/null
+++ b/LayoutTests/fast/css/button-height.html
@@ -0,0 +1,56 @@
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+<style>
+#button3, #button5 { height: 40px; }
+#button4 { height: 40px; background-color: yellow; }
+</style>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+window.onload = function()
+{
+ shouldBe("document.getElementById('button1').offsetHeight", "document.getElementById('button2').offsetHeight");
+ shouldEvaluateTo("document.getElementById('button3').offsetHeight", 40);
+ shouldEvaluateTo("document.getElementById('button4').offsetHeight", 40);
+
+ // Note, the expected height is the height of button 1 for the Mac ports, and 40 otherwise.
+ var expectedButton5Height = (navigator.platform.indexOf("Mac") !== -1) ? document.getElementById("button1").offsetHeight : 40;
+ if (document.getElementById('button5').offsetHeight == expectedButton5Height)
+ testPassed("document.getElementById('button5').offsetHeight is correct for this platform.");
+ else
+ testFailed("document.getElementById('button5').offsetHeight is incorrect for this platform. Should be the same height as button 1 for the Mac ports and 40 otherwise.");
+
+ if (window.layoutTestController) {
+ var testContainer = document.getElementById("test-container");
+ if (testContainer)
+ document.body.removeChild(testContainer);
+ }
+ debug('<br /><span class="pass">TEST COMPLETE</span>');
+}
+</script>
+</head>
+<body>
+<p id="description"></p>
+<div id="test-container">
+ <ol>
+ <li><input id="button1" type="button" value="unspecified height"/><p><strong>Expected height:</strong> height of button label font.</p></li>
+ <li><button id="button2">unspecified height</button><p><strong>Expected height:</strong> height of button label font.</p></li>
+ <li><button id="button3">height 40 pixels</button><p><strong>Expected height:</strong> 40 pixels.</p></li>
+ <li><input id="button4" type="button" value="height 40 pixels, background yellow"/><p><strong>Expected height:</strong> 40 pixels.</p></li>
+ <li><input id="button5" type="button" value="height 40 pixels (*)"/><p><strong>(*) Expected height:</strong><br/>Mac: height of button label font.<br/>Other: 40 pixels.</p></li>
+ </ol>
+</div>
+<hr/>
+<div id="console"></div>
+<script>
+ description("This tests that the specified height is honored (*) for <input> and <button> elements.<br/>" +
+ "(*) The Mac ports ignore the specified height for <input type="button"> elements unless a " +
+ "border and/or background CSS property is also specified (see the fifth button below). Disregarding " +
+ "padding, they render the button with a height equal to the height of the font used for the button label.");
+ var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/LayoutTests/fast/replaced/table-percent-height-expected.txt b/LayoutTests/fast/replaced/table-percent-height-expected.txt
index c0d6447..d3fde71 100644
--- a/LayoutTests/fast/replaced/table-percent-height-expected.txt
+++ b/LayoutTests/fast/replaced/table-percent-height-expected.txt
@@ -23,6 +23,7 @@ Button
This test checks that replaced elements with percentage heights within table cells have the correct height.
+Note, some of the button height tests fail on the Windows ports. See bug #34071.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
diff --git a/LayoutTests/fast/replaced/table-percent-height.html b/LayoutTests/fast/replaced/table-percent-height.html
index 42e49f8..4171650 100644
--- a/LayoutTests/fast/replaced/table-percent-height.html
+++ b/LayoutTests/fast/replaced/table-percent-height.html
@@ -59,7 +59,7 @@ function is75PercentOf(expression75, expression100)
function test()
{
- description("This test checks that replaced elements with percentage heights within table cells have the correct height.");
+ description("This test checks that replaced elements with percentage heights within table cells have the correct height.<br>Note, some of the button height tests fail on the Windows ports. See bug #34071.");
shouldBe("getWidth('canvas-75')", "'300px'");
shouldBe("getHeight('canvas-75')", "'112px'");
diff --git a/LayoutTests/platform/qt/fast/replaced/table-percent-height-expected.txt b/LayoutTests/platform/qt/fast/replaced/table-percent-height-expected.txt
new file mode 100644
index 0000000..576f21d
--- /dev/null
+++ b/LayoutTests/platform/qt/fast/replaced/table-percent-height-expected.txt
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+Button
+Button
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+This test checks that replaced elements with percentage heights within table cells have the correct height.
+Note, some of the button height tests fail on the Windows ports. See bug #34071.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS getWidth('canvas-75') is '300px'
+PASS getHeight('canvas-75') is '112px'
+PASS getWidth('canvas-100') is '300px'
+PASS getHeight('canvas-100') is '150px'
+PASS getWidth('embed-75') is '300px'
+PASS getHeight('embed-75') is '112px'
+PASS getWidth('embed-100') is '300px'
+PASS getHeight('embed-100') is '150px'
+PASS getWidth('img-75') is '75px'
+PASS getHeight('img-75') is '75px'
+PASS getWidth('img-100') is '100px'
+PASS getHeight('img-100') is '100px'
+PASS getWidth('object-75') is '300px'
+PASS getHeight('object-75') is '112px'
+PASS getWidth('object-100') is '300px'
+PASS getHeight('object-100') is '150px'
+PASS getWidth('button-75') is getWidth('button-100')
+PASS getHeight('button-75') != '0px' is true
+FAIL getHeight('button-75') should be 21px. Was 15px.
+PASS getWidth('input-button-75') is getWidth('input-button-100')
+PASS getHeight('input-button-75') != '0px' is true
+FAIL getHeight('input-button-75') should be 21px. Was 15px.
+PASS getWidth('input-checkbox-75') is getWidth('input-checkbox-100')
+PASS getHeight('input-checkbox-75') != '0px' is true
+PASS getHeight('input-checkbox-75') is 75% of getHeight('input-checkbox-100').
+PASS getWidth('input-file-75') is getWidth('input-file-100')
+PASS getHeight('input-file-75') != '0px' is true
+PASS getHeight('input-file-75') is 75% of getHeight('input-file-100').
+PASS getWidth('input-image-75') is '75px'
+PASS getHeight('input-image-75') is '75px'
+PASS getWidth('input-image-100') is '100px'
+PASS getHeight('input-image-100') is '100px'
+PASS getWidth('input-radio-75') is getWidth('input-radio-100')
+PASS getHeight('input-radio-75') != '0px' is true
+PASS getHeight('input-radio-75') is 75% of getHeight('input-radio-100').
+PASS getWidth('input-reset-75') is getWidth('input-reset-100')
+PASS getHeight('input-reset-75') != '0px' is true
+FAIL getHeight('input-reset-75') should be 21px. Was 15px.
+PASS getWidth('input-submit-75') is getWidth('input-submit-100')
+PASS getHeight('input-submit-75') != '0px' is true
+FAIL getHeight('input-submit-75') should be 21px. Was 15px.
+PASS getWidth('select-75') is getWidth('select-100')
+PASS getHeight('select-75') != '0px' is true
+PASS getHeight('select-75') is getHeight('select-100')
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 28699fd..2be935e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-01-26 Daniel Bates <dbates at webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29564
+
+ [Qt] Fixes an issue where the height of <button>- and
+ <input type="button">- elements are fixed to the height of the
+ button label font plus padding. That is, the CSS height property
+ is being ignored.
+
+ Instead, we should honor the user-specified height, if appropriate
+ for the platform and context. Notice, the Mac ports do not honor the
+ height for <input type="button"> elements unless a border and/or
+ background is also specified.
+
+ Test: fast/css/button-height.html
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::adjustButtonStyle):
+
2010-01-26 Alexander Pavlov <apavlov at chromium.org>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/platform/qt/RenderThemeQt.cpp b/WebCore/platform/qt/RenderThemeQt.cpp
index e474f1b..83e3746 100644
--- a/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/WebCore/platform/qt/RenderThemeQt.cpp
@@ -395,8 +395,13 @@ void RenderThemeQt::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* s
// Ditch the border.
style->resetBorder();
- // Height is locked to auto.
- style->setHeight(Length(Auto));
+#ifdef Q_WS_MAC
+ if (style->appearance() == PushButtonPart) {
+ // The Mac ports ignore the specified height for <input type="button"> elements
+ // unless a border and/or background CSS property is also specified.
+ style->setHeight(Length(Auto));
+ }
+#endif
// White-space is locked to pre
style->setWhiteSpace(PRE);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list