Changeset 57116 in webkit
- Timestamp:
- Apr 5, 2010 8:08:45 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r57113 r57116 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 Mark Rowe <mrowe@apple.com> 2 23 -
trunk/LayoutTests/fast/forms/listbox-selection.html
r57100 r57116 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
r57112 r57116 1 2010-04-05 Dimitri Glazkov <dglazkov@chromium.org> and James Robinson <jamesr@chromium.org> 2 3 Reviewed by Darin Adler and Dimitri Glazkov. 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/Document.cpp: 14 (WebCore::Document::finishedParsing): Added updateStyleIfNeeded() 15 call to ensure that object loads start before firing window load. 16 * dom/Node.cpp: 17 (WebCore::Node::dispatchGenericEvent): Removed invocation of 18 Document::updateStyleForAllDocuments 19 * html/HTMLSelectElement.cpp: 20 (WebCore::HTMLSelectElement::parseMappedAttribute): Added explicit 21 recalc to ensure accuracy of representation, especially for 22 menuList/listBox switches. 23 1 24 2010-04-05 Antonio Gomes <tonikitoo@webkit.org> 2 25 -
trunk/WebCore/dom/Document.cpp
r57045 r57116 4190 4190 setParsing(false); 4191 4191 dispatchEvent(Event::create(eventNames().DOMContentLoadedEvent, true, false)); 4192 4192 4193 if (Frame* f = frame()) { 4194 // FrameLoader::finishedParsing() might end up calling Document::implicitClose() if all 4195 // resource loads are complete. HTMLObjectElements can start loading their resources from 4196 // post attach callbacks triggered by recalcStyle(). This means if we parse out an <object> 4197 // tag and then reach the end of the document without updating styles, we might not have yet 4198 // started the resource load and might fire the window load event too early. To avoid this 4199 // we force the styles to be up to date before calling FrameLoader::finishedParsing(). 4200 // See https://bugs.webkit.org/show_bug.cgi?id=36864 starting around comment 35. 4201 updateStyleIfNeeded(); 4202 4193 4203 f->loader()->finishedParsing(); 4194 4204 -
trunk/WebCore/dom/Node.cpp
r57100 r57116 2706 2706 #endif 2707 2707 2708 Document::updateStyleForAllDocuments();2709 2710 2708 return !event->defaultPrevented(); 2711 2709 } -
trunk/WebCore/html/HTMLSelectElement.cpp
r57100 r57116 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.