| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 return; | 206 return; |
| 207 } | 207 } |
| 208 | 208 |
| 209 HTMLSelectElement* ownerElement = m_ownerElement; | 209 HTMLSelectElement* ownerElement = m_ownerElement; |
| 210 ownerElement->popupDidHide(); | 210 ownerElement->popupDidHide(); |
| 211 | 211 |
| 212 if (indices.size() == 0) { | 212 if (indices.size() == 0) { |
| 213 ownerElement->valueChanged(static_cast<unsigned>(-1)); | 213 ownerElement->valueChanged(static_cast<unsigned>(-1)); |
| 214 } else { | 214 } else { |
| 215 for (size_t i = 0; i < indices.size(); ++i) | 215 for (size_t i = 0; i < indices.size(); ++i) |
| 216 ownerElement->listBoxSelectItem(toPopupMenuItemIndex(indices[i], *ow
nerElement), (i > 0), false, (i == indices.size() - 1)); | 216 ownerElement->listBoxSelectItem(toPopupMenuItemIndex(indices[i], *ow
nerElement), (i > 0), (i == indices.size() - 1)); |
| 217 } | 217 } |
| 218 | 218 |
| 219 m_webExternalPopupMenu = 0; | 219 m_webExternalPopupMenu = 0; |
| 220 } | 220 } |
| 221 | 221 |
| 222 void ExternalPopupMenu::didCancel() | 222 void ExternalPopupMenu::didCancel() |
| 223 { | 223 { |
| 224 if (m_ownerElement) | 224 if (m_ownerElement) |
| 225 m_ownerElement->popupDidHide(); | 225 m_ownerElement->popupDidHide(); |
| 226 m_webExternalPopupMenu = 0; | 226 m_webExternalPopupMenu = 0; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 if (ownerElement.itemIsDisplayNone(*items[i])) | 294 if (ownerElement.itemIsDisplayNone(*items[i])) |
| 295 continue; | 295 continue; |
| 296 if (popupMenuItemIndex == i) | 296 if (popupMenuItemIndex == i) |
| 297 return indexTracker; | 297 return indexTracker; |
| 298 ++indexTracker; | 298 ++indexTracker; |
| 299 } | 299 } |
| 300 return -1; | 300 return -1; |
| 301 } | 301 } |
| 302 | 302 |
| 303 } // namespace blink | 303 } // namespace blink |
| OLD | NEW |