[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 11:54:45 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 09255dd08c2240c1aa2624a2afa5d0f2e43823c2
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Aug 11 07:13:53 2010 +0000
2010-08-11 Yoshiki Hayashi <yhayashi at google.com>
Reviewed by Shinichiro Hamaji.
Make form controls, textarea, legend and datagrid treat width:
auto as specified in stretching vertical flexbox. Otherwise it's
treated as intrinsic as before.
https://bugs.webkit.org/show_bug.cgi?id=17918
* fast/flexbox/vertical-box-form-controls-expected.txt: Added.
* fast/flexbox/vertical-box-form-controls.html: Added.
2010-08-11 Yoshiki Hayashi <yhayashi at google.com>
Reviewed by Shinichiro Hamaji.
Make form controls, textarea, legend and datagrid treat width:
auto as specified in stretching vertical flexbox. Otherwise it's
treated as intrinsic as before.
https://bugs.webkit.org/show_bug.cgi?id=17918
Test: fast/flexbox/vertical-box-form-controls.html
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::adjustRenderStyle):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::sizesToIntrinsicWidth):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5d7aeef..99212ee 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-11 Yoshiki Hayashi <yhayashi at google.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Make form controls, textarea, legend and datagrid treat width:
+ auto as specified in stretching vertical flexbox. Otherwise it's
+ treated as intrinsic as before.
+ https://bugs.webkit.org/show_bug.cgi?id=17918
+
+ * fast/flexbox/vertical-box-form-controls-expected.txt: Added.
+ * fast/flexbox/vertical-box-form-controls.html: Added.
+
2010-08-10 Shinichiro Hamaji <hamaji at chromium.org>
Add a suppression of animations/suspend-resume-animation.html for chromium.
diff --git a/LayoutTests/fast/flexbox/vertical-box-form-controls-expected.txt b/LayoutTests/fast/flexbox/vertical-box-form-controls-expected.txt
new file mode 100644
index 0000000..6e0384e
--- /dev/null
+++ b/LayoutTests/fast/flexbox/vertical-box-form-controls-expected.txt
@@ -0,0 +1,25 @@
+
+
+
+
+Check if form controls in vertical flex box will stretch horizontally when rendered as box as opposed to inline-box. If you see any red, then the test has failed.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Button
+PASS element.offsetHeight is 100
+PASS element.offsetWidth is 100
+Text input
+PASS element.offsetHeight is 100
+PASS element.offsetWidth is 100
+Textarea
+PASS element.offsetHeight is 100
+PASS element.offsetWidth is 100
+Submit
+PASS element.offsetHeight is 100
+PASS element.offsetWidth is 100
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/flexbox/vertical-box-form-controls.html b/LayoutTests/fast/flexbox/vertical-box-form-controls.html
new file mode 100644
index 0000000..3f3822b
--- /dev/null
+++ b/LayoutTests/fast/flexbox/vertical-box-form-controls.html
@@ -0,0 +1,80 @@
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+<style>
+div.box {
+ display: -moz-box;
+ display: -webkit-box;
+ display: box;
+}
+
+div.outer {
+ width: 100px;
+ height: 100px;
+ background-color: red;
+ box-orient: vertical;
+ -moz-box-orient: vertical;
+ -webkit-box-orient: vertical;
+}
+
+.inner {
+ display: -webkit-box;
+ display: -moz-box;
+ display: box;
+ box-align: stretch;
+ -moz-box-align: stretch;
+ -webkit-box-align: stretch;
+ margin: 0;
+ border: 0;
+ padding: 0;
+ height: 100px;
+ background-color: green;
+}
+</style>
+</head>
+<body>
+<div class="box outer">
+<button class="inner" type="submit" id="button"></button>
+</div>
+<div class="box outer">
+<input class="inner" type="text" value="" id="inputText">
+</div>
+<div class="box outer">
+<textarea class="inner" id="textarea"></textarea>
+</div>
+<div class="box outer">
+<input class="inner" type="submit" value="" id="submit">
+</div>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description("Check if form controls in vertical flex box will stretch horizontally when rendered as box as opposed to inline-box. If you see any red, then the test has failed.");
+
+var element = null;
+
+debug("Button");
+element = document.getElementById("button");
+shouldBe("element.offsetHeight", "100");
+shouldBe("element.offsetWidth", "100");
+
+debug("Text input");
+element = document.getElementById("inputText");
+shouldBe("element.offsetHeight", "100");
+shouldBe("element.offsetWidth", "100");
+
+debug("Textarea");
+element = document.getElementById("textarea");
+shouldBe("element.offsetHeight", "100");
+shouldBe("element.offsetWidth", "100");
+
+debug("Submit");
+element = document.getElementById("submit");
+shouldBe("element.offsetHeight", "100");
+shouldBe("element.offsetWidth", "100");
+
+successfullyParsed = true;
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 05427d5..cb8f8d8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-11 Yoshiki Hayashi <yhayashi at google.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Make form controls, textarea, legend and datagrid treat width:
+ auto as specified in stretching vertical flexbox. Otherwise it's
+ treated as intrinsic as before.
+ https://bugs.webkit.org/show_bug.cgi?id=17918
+
+ Test: fast/flexbox/vertical-box-form-controls.html
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::adjustRenderStyle):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::sizesToIntrinsicWidth):
+
2010-08-10 Darin Adler <darin at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index 5810b00..c3f5159 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -1737,23 +1737,17 @@ void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, Element *e)
style->hasTransformRelatedProperty() || style->hasMask() || style->boxReflect()))
style->setZIndex(0);
- // Button, legend, input, select and textarea all consider width values of 'auto' to be 'intrinsic'.
- // This will be important when we use block flows for all form controls.
- if (e && (e->hasTagName(legendTag) || e->hasTagName(buttonTag) || e->hasTagName(inputTag) ||
- e->hasTagName(selectTag) || e->hasTagName(textareaTag) || e->hasTagName(datagridTag)
#if ENABLE(WML)
- || e->hasTagName(WMLNames::insertedLegendTag)
- || e->hasTagName(WMLNames::inputTag)
+ if (e && (e->hasTagName(WMLNames::insertedLegendTag)
+ || e->hasTagName(WMLNames::inputTag))
+ && style->width().isAuto())
+ style->setWidth(Length(Intrinsic));
#endif
- )) {
- if (style->width().isAuto())
- style->setWidth(Length(Intrinsic));
- // Textarea considers overflow visible as auto.
- if (e && e->hasTagName(textareaTag)) {
- style->setOverflowX(style->overflowX() == OVISIBLE ? OAUTO : style->overflowX());
- style->setOverflowY(style->overflowY() == OVISIBLE ? OAUTO : style->overflowY());
- }
+ // Textarea considers overflow visible as auto.
+ if (e && e->hasTagName(textareaTag)) {
+ style->setOverflowX(style->overflowX() == OVISIBLE ? OAUTO : style->overflowX());
+ style->setOverflowY(style->overflowY() == OVISIBLE ? OAUTO : style->overflowY());
}
// Finally update our text decorations in effect, but don't allow text-decoration to percolate through
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index ba29776..2ab63bf 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -1412,6 +1412,12 @@ bool RenderBox::sizesToIntrinsicWidth(WidthType widthType) const
&& (parent()->style()->boxOrient() == HORIZONTAL || parent()->style()->boxAlign() != BSTRETCH))
return true;
+ // Button, input, select, textarea, legend and datagrid treat
+ // width value of 'auto' as 'intrinsic' unless it's in a
+ // stretching vertical flexbox.
+ if (width.type() == Auto && !(parent()->isFlexibleBox() && parent()->style()->boxOrient() == VERTICAL && parent()->style()->boxAlign() == BSTRETCH) && node() && (node()->hasTagName(inputTag) || node()->hasTagName(selectTag) || node()->hasTagName(buttonTag) || node()->hasTagName(textareaTag) || node()->hasTagName(legendTag) || node()->hasTagName(datagridTag)))
+ return true;
+
return false;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list