Title: [109503] trunk
- Revision
- 109503
- Author
- [email protected]
- Date
- 2012-03-01 21:43:01 -0800 (Thu, 01 Mar 2012)
Log Message
REGRESSION(90089): Input type='search' text shakes up and down when the style is changed.
https://bugs.webkit.org/show_bug.cgi?id=79445
Reviewed by Dimitri Glazkov.
Source/WebCore:
If the inner text height of a search field is smaller than the
content box height of the <input>, the height of the container
element should be same as the content box height.
When the element style is changed, the RenderStyle height of the
container element is cleared, but the renderer height of the
container element remains. We had a bug that layout() didn't set
the RenderStyle height in a case that the renderer height was the
desired height. It shrunk the renderer height as the result of
layout for children.
Tests: fast/forms/search/search-shaking-text.html
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::layout):
Always set the RenderStyle height explicitly.
LayoutTests:
* fast/forms/search/search-shaking-text-expected.html: Added.
* fast/forms/search/search-shaking-text.html: Added.
* platform/chromium/test_expectations.txt:
This change might need a rebaseline of fast/repaint/search-field-cancel.html
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (109502 => 109503)
--- trunk/LayoutTests/ChangeLog 2012-03-02 05:40:00 UTC (rev 109502)
+++ trunk/LayoutTests/ChangeLog 2012-03-02 05:43:01 UTC (rev 109503)
@@ -1,3 +1,15 @@
+2012-03-01 Kent Tamura <[email protected]>
+
+ REGRESSION(90089): Input type='search' text shakes up and down when the style is changed.
+ https://bugs.webkit.org/show_bug.cgi?id=79445
+
+ Reviewed by Dimitri Glazkov.
+
+ * fast/forms/search/search-shaking-text-expected.html: Added.
+ * fast/forms/search/search-shaking-text.html: Added.
+ * platform/chromium/test_expectations.txt:
+ This change might need a rebaseline of fast/repaint/search-field-cancel.html
+
2012-03-01 Kentaro Hara <[email protected]>
Unreviewed, gardening.
Added: trunk/LayoutTests/fast/forms/search/search-shaking-text-expected.html (0 => 109503)
--- trunk/LayoutTests/fast/forms/search/search-shaking-text-expected.html (rev 0)
+++ trunk/LayoutTests/fast/forms/search/search-shaking-text-expected.html 2012-03-02 05:43:01 UTC (rev 109503)
@@ -0,0 +1,11 @@
+<!DOCTYPE>
+<body>
+<style>
+#testField {
+ width: 200px;
+ height: 30px;
+ -webkit-appearance: none;
+}
+</style>
+<input type="search" id="testField" value="Shaking!">
+</body>
Property changes on: trunk/LayoutTests/fast/forms/search/search-shaking-text-expected.html
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/fast/forms/search/search-shaking-text.html (0 => 109503)
--- trunk/LayoutTests/fast/forms/search/search-shaking-text.html (rev 0)
+++ trunk/LayoutTests/fast/forms/search/search-shaking-text.html 2012-03-02 05:43:01 UTC (rev 109503)
@@ -0,0 +1,23 @@
+<!DOCTYPE>
+<body _onload_="startTest()">
+<style>
+#testField {
+ width: 100px;
+ height: 30px;
+ -webkit-appearance: none;
+}
+</style>
+<input type="search" id="testField" value="Shaking!">
+
+<script>
+function startTest() {
+ document.getElementById('testField').offsetTop;
+ document.getElementById('testField').style.width = '200px';
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+}
+
+if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+</script>
+</body>
Property changes on: trunk/LayoutTests/fast/forms/search/search-shaking-text.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (109502 => 109503)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-03-02 05:40:00 UTC (rev 109502)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-03-02 05:43:01 UTC (rev 109503)
@@ -4260,6 +4260,8 @@
BUGWK78902 : svg/transforms/svg-css-transforms-clip-path.xhtml = TEXT IMAGE IMAGE+TEXT PASS
BUGWK78902 : svg/zoom/page/zoom-mask-with-percentages.svg = TEXT IMAGE IMAGE+TEXT PASS
+BUGWK79445 LINUX WIN : fast/repaint/search-field-cancel.html = FAIL
+
// Need rebaselining.
BUGWK69210 MAC : fast/encoding/utf-16-big-endian.html = IMAGE+TEXT
BUGWK69210 MAC : fast/encoding/utf-16-little-endian.html = IMAGE+TEXT
Modified: trunk/Source/WebCore/ChangeLog (109502 => 109503)
--- trunk/Source/WebCore/ChangeLog 2012-03-02 05:40:00 UTC (rev 109502)
+++ trunk/Source/WebCore/ChangeLog 2012-03-02 05:43:01 UTC (rev 109503)
@@ -1,3 +1,27 @@
+2012-03-01 Kent Tamura <[email protected]>
+
+ REGRESSION(90089): Input type='search' text shakes up and down when the style is changed.
+ https://bugs.webkit.org/show_bug.cgi?id=79445
+
+ Reviewed by Dimitri Glazkov.
+
+ If the inner text height of a search field is smaller than the
+ content box height of the <input>, the height of the container
+ element should be same as the content box height.
+
+ When the element style is changed, the RenderStyle height of the
+ container element is cleared, but the renderer height of the
+ container element remains. We had a bug that layout() didn't set
+ the RenderStyle height in a case that the renderer height was the
+ desired height. It shrunk the renderer height as the result of
+ layout for children.
+
+ Tests: fast/forms/search/search-shaking-text.html
+
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::layout):
+ Always set the RenderStyle height explicitly.
+
2012-03-01 Kentaro Hara <[email protected]>
Unreviewed, rebaselined run-bindings-tests results.
Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (109502 => 109503)
--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp 2012-03-02 05:40:00 UTC (rev 109502)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp 2012-03-02 05:43:01 UTC (rev 109503)
@@ -250,7 +250,8 @@
} else if (containerRenderer->height() < contentHeight()) {
containerRenderer->style()->setHeight(Length(contentHeight(), Fixed));
relayoutChildren = true;
- }
+ } else
+ containerRenderer->style()->setHeight(Length(containerHeight, Fixed));
}
RenderBlock::layoutBlock(relayoutChildren);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes