RESOLVED FIXED 25558
Rendering fix for <select> elements.
https://bugs.webkit.org/show_bug.cgi?id=25558
Summary Rendering fix for <select> elements.
Adam Langley
Reported 2009-05-04 19:38:30 PDT
Rendering fix for <select> elements. When switching a <select> element from display:none to default display, we would fail to invalidate the parent's pref widths in some situations: When attaching the element, RenderMenuList::updateOptionsWidth would call setNeedsLayoutAndPrefWidthsRecalc before the parent pointer was set. This would mark the pref widths as dirty, but not for any parent objects. When RenderObjectChildList::appendChildNode later calls setNeedsLayoutAndPrefWidthsRecalc again, with a valid parent pointer, nothing would be done because the pref widths were already dirty for the RenderMenuList. Without this patch, the <select> element will spill outside of the table in the layout test. This issue was often hidden because, depending on whitespace, the presence of <option> elements etc, there would often be an empty RenderText node after the <select> element. This could do the job of invalidating the parent's pref widths. It's only when this element isn't present that the bug bites.
Attachments
patch (5.45 KB, patch)
2009-05-04 19:41 PDT, Adam Langley
darin: review+
Adam Langley
Comment 1 2009-05-04 19:41:09 PDT
Darin Adler
Comment 2 2009-05-04 20:01:20 PDT
Comment on attachment 30007 [details] patch Looks fine, r=me
Eric Seidel (no email)
Comment 3 2009-05-05 22:30:57 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ... M LayoutTests/ChangeLog A LayoutTests/fast/forms/select-dirty-parent-pref-widths.html A LayoutTests/platform/mac/fast/forms/select-dirty-parent-pref-widths-expected.checksum A LayoutTests/platform/mac/fast/forms/select-dirty-parent-pref-widths-expected.txt M WebCore/ChangeLog M WebCore/rendering/RenderMenuList.cpp Committed r43278
Note You need to log in before you can comment on or make changes to this bug.