| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 4 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 4 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
reserved. |
| 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 8 * Copyright (C) 2010 Google Inc. All rights reserved. | 8 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 10 * | 10 * |
| (...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1185 // change events for list boxes whenever the selection change is actually | 1185 // change events for list boxes whenever the selection change is actually |
| 1186 // made. This matches other browsers' behavior. | 1186 // made. This matches other browsers' behavior. |
| 1187 if (usesMenuList()) | 1187 if (usesMenuList()) |
| 1188 dispatchInputAndChangeEventForMenuList(); | 1188 dispatchInputAndChangeEventForMenuList(); |
| 1189 m_lastOnChangeSelection.clear(); | 1189 m_lastOnChangeSelection.clear(); |
| 1190 HTMLFormControlElementWithState::dispatchBlurEvent(newFocusedElement, type,
sourceCapabilities); | 1190 HTMLFormControlElementWithState::dispatchBlurEvent(newFocusedElement, type,
sourceCapabilities); |
| 1191 } | 1191 } |
| 1192 | 1192 |
| 1193 void HTMLSelectElement::deselectItemsWithoutValidation(HTMLElement* excludeEleme
nt) | 1193 void HTMLSelectElement::deselectItemsWithoutValidation(HTMLElement* excludeEleme
nt) |
| 1194 { | 1194 { |
| 1195 if (!multiple() && usesMenuList() && m_lastOnChangeOption && m_lastOnChangeO
ption != excludeElement) { |
| 1196 m_lastOnChangeOption->setSelectedState(false); |
| 1197 return; |
| 1198 } |
| 1195 for (auto& element : listItems()) { | 1199 for (auto& element : listItems()) { |
| 1196 if (element != excludeElement && isHTMLOptionElement(*element)) | 1200 if (element != excludeElement && isHTMLOptionElement(*element)) |
| 1197 toHTMLOptionElement(element)->setSelectedState(false); | 1201 toHTMLOptionElement(element)->setSelectedState(false); |
| 1198 } | 1202 } |
| 1199 } | 1203 } |
| 1200 | 1204 |
| 1201 FormControlState HTMLSelectElement::saveFormControlState() const | 1205 FormControlState HTMLSelectElement::saveFormControlState() const |
| 1202 { | 1206 { |
| 1203 const ListItems& items = listItems(); | 1207 const ListItems& items = listItems(); |
| 1204 size_t length = items.size(); | 1208 size_t length = items.size(); |
| (...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2136 } | 2140 } |
| 2137 | 2141 |
| 2138 void HTMLSelectElement::didMutateSubtree() | 2142 void HTMLSelectElement::didMutateSubtree() |
| 2139 { | 2143 { |
| 2140 DCHECK(popupIsVisible()); | 2144 DCHECK(popupIsVisible()); |
| 2141 DCHECK(m_popup); | 2145 DCHECK(m_popup); |
| 2142 m_popup->updateFromElement(PopupMenu::ByDOMChange); | 2146 m_popup->updateFromElement(PopupMenu::ByDOMChange); |
| 2143 } | 2147 } |
| 2144 | 2148 |
| 2145 } // namespace blink | 2149 } // namespace blink |
| OLD | NEW |