Commit 041a496f authored by adele's avatar adele

LayoutTests:

        Reviewed by Anders and John.

        Test for http://bugs.webkit.org/show_bug.cgi?id=11278
        <rdar://problem/4826875> REGRESSION: Popup width doesn't change to accommodate dynamic changes to options

        * fast/forms/menulist-width-change-expected.checksum: Added.
        * fast/forms/menulist-width-change-expected.png: Added.
        * fast/forms/menulist-width-change-expected.txt: Added.
        * fast/forms/menulist-width-change.html: Added.

WebCore:

        Reviewed by Anders and John.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=11278
        <rdar://problem/4826875> REGRESSION: Popup width doesn't change to accommodate dynamic changes to options

        Test: fast/forms/menulist-width-change.html

        * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
          When the options change, call setNeedsLayoutAndMinMaxRecalc.



git-svn-id: svn://svn.chromium.org/blink/trunk@18913 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 6b02c313
2007-01-17 Adele Peterson <adele@apple.com>
Reviewed by Anders and John.
Test for http://bugs.webkit.org/show_bug.cgi?id=11278
<rdar://problem/4826875> REGRESSION: Popup width doesn't change to accommodate dynamic changes to options
* fast/forms/menulist-width-change-expected.checksum: Added.
* fast/forms/menulist-width-change-expected.png: Added.
* fast/forms/menulist-width-change-expected.txt: Added.
* fast/forms/menulist-width-change.html: Added.
2007-01-16 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Maciej.
984600652e43fc2a1e4158cfd8c318b7
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock (anonymous) at (0,0) size 784x58
RenderText {#text} at (0,0) size 663x18
text run at (0,0) width 663: "This tests that when an option is dynamically added to a menu list, and it is too long for the current width,"
RenderBR {BR} at (663,14) size 0x0
RenderText {#text} at (0,18) size 364x18
text run at (0,18) width 364: "that the select automatically recalculates the correct width."
RenderBR {BR} at (364,32) size 0x0
RenderMenuList {SELECT} at (2,38) size 139x18 [bgcolor=#FFFFFF]
RenderBlock (anonymous) at (8,2) size 108x13
RenderText at (0,0) size 29x13
text run at (0,0) width 29: "Short"
RenderText {#text} at (0,0) size 0x0
RenderBlock {DIV} at (0,58) size 784x0
<html>
<head>
<script>
function test() {
if (window.layoutTestController)
layoutTestController.waitUntilDone();
setTimeout('addLongOption();', 100);
}
function addLongOption()
{
var newOpt = document.createElement("option");
newOpt.appendChild(document.createTextNode("I require more room"));
var sl = document.getElementById("t");
sl.appendChild(newOpt);
if (window.layoutTestController)
layoutTestController.notifyDone();
}
</script>
</head>
<body onload="test()">
This tests that when an option is dynamically added to a menu list, and it is too long for the current width,<br>
that the select automatically recalculates the correct width.<br>
<select id="t">
<option id="short">Short</option>
<option id="medium">Medium</option>
</select>
<div id="res"></div>
</body>
</html>
2007-01-17 Adele Peterson <adele@apple.com>
Reviewed by Anders and John.
Fix for http://bugs.webkit.org/show_bug.cgi?id=11278
<rdar://problem/4826875> REGRESSION: Popup width doesn't change to accommodate dynamic changes to options
Test: fast/forms/menulist-width-change.html
* rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
When the options change, call setNeedsLayoutAndMinMaxRecalc.
2007-01-16 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Maciej.
......@@ -1503,7 +1515,6 @@
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle):
>>>>>>> .r18876
2007-01-13 Lars Knoll <lars@trolltech.com>
Reviewed by Alexey
......
......@@ -120,6 +120,7 @@ void RenderMenuList::updateFromElement()
}
m_optionsWidth = static_cast<int>(ceilf(width));
m_optionsChanged = false;
setNeedsLayoutAndMinMaxRecalc();
}
setTextFromOption(select->selectedIndex());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment