Changeset 57081 in webkit
- Timestamp:
- Apr 5, 2010 10:27:18 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r57078 r57081 1 2010-04-05 Dimitri Glazkov <dglazkov@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Style update done due to mutation event dispatching in textarea can be 6 used to corrupt the render tree. 7 https://bugs.webkit.org/show_bug.cgi?id=36864 8 9 Modified listbox-selection.html to correctly set the size during 10 creation. Otherwise, options added to it as a menuList, resulting 11 in a default selection of the first item. 12 13 Added a few more tests to ensure we capture correct behavior for 14 select elements and their default selection, as well as the influence 15 of when layout occurs. 16 17 * fast/forms/listbox-selection.html: 18 * fast/forms/select-change-listbox-to-popup-roundtrip.html: Added. 19 * fast/forms/select-change-popup-to-listbox-roundtrip.html: Added. 20 * fast/forms/textarea-and-mutation-events.html: Added. 21 1 22 2010-04-05 Yury Semikhatsky <yurys@chromium.org> 2 23 -
trunk/LayoutTests/fast/forms/listbox-selection.html
r28620 r57081 151 151 var sl = document.createElement("select"); 152 152 var i = 0; 153 sl.size = sz; 153 154 while (i < sz) { 154 155 var opt = document.createElement("option"); 155 156 if (i == selIndex) 156 157 opt.selected = true; 157 opt. innerText = "item " + i;158 opt.textContent = "item " + i; 158 159 sl.appendChild(opt); 159 160 i++; 160 161 } 161 sl.size = sz;162 162 sl.multiple = mlt; 163 163 sl.id = idName; -
trunk/WebCore/ChangeLog
r57080 r57081 1 2010-04-05 Dimitri Glazkov <dglazkov@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Style update done due to mutation event dispatching in textarea can be 6 used to corrupt the render tree. 7 https://bugs.webkit.org/show_bug.cgi?id=36864 8 9 Tests: fast/forms/select-change-listbox-to-popup-roundtrip.html 10 fast/forms/select-change-popup-to-listbox-roundtrip.html 11 fast/forms/textarea-and-mutation-events.html 12 13 * dom/Node.cpp: 14 (WebCore::Node::dispatchGenericEvent): Removed invocation of 15 Document::updateStyleForAllDocuments 16 * html/HTMLSelectElement.cpp: 17 (WebCore::HTMLSelectElement::parseMappedAttribute): Added explicit 18 recalc to ensure accuracy of representation, especially for 19 menuList/listBox switches. 20 1 21 2010-04-01 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 22 -
trunk/WebCore/dom/Node.cpp
r57077 r57081 2706 2706 #endif 2707 2707 2708 Document::updateStyleForAllDocuments();2709 2710 2708 return !event->defaultPrevented(); 2711 2709 } -
trunk/WebCore/html/HTMLSelectElement.cpp
r56402 r57081 201 201 if (attrSize != attr->value()) 202 202 attr->setValue(attrSize); 203 204 m_data.setSize(max(size, 1)); 203 size = max(size, 1); 204 205 // Ensure that we've determined selectedness of the items at least once prior to changing the size. 206 if (oldSize != size) 207 recalcListItemsIfNeeded(); 208 209 m_data.setSize(size); 205 210 if ((oldUsesMenuList != m_data.usesMenuList() || (!oldUsesMenuList && m_data.size() != oldSize)) && attached()) { 206 211 detach();
Note: See TracChangeset
for help on using the changeset viewer.