| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 } | 141 } |
| 142 | 142 |
| 143 void ExternalPopupMenu::updateFromElement(UpdateReason reason) | 143 void ExternalPopupMenu::updateFromElement(UpdateReason reason) |
| 144 { | 144 { |
| 145 switch (reason) { | 145 switch (reason) { |
| 146 case BySelectionChange: | 146 case BySelectionChange: |
| 147 case ByDOMChange: | 147 case ByDOMChange: |
| 148 if (m_needsUpdate) | 148 if (m_needsUpdate) |
| 149 return; | 149 return; |
| 150 m_needsUpdate = true; | 150 m_needsUpdate = true; |
| 151 m_ownerElement->document().postTask(BLINK_FROM_HERE, createSameThreadTas
k(&ExternalPopupMenu::update, this)); | 151 m_ownerElement->document().postTask(BLINK_FROM_HERE, createSameThreadTas
k(&ExternalPopupMenu::update, wrapPersistent(this))); |
| 152 break; | 152 break; |
| 153 | 153 |
| 154 case ByStyleChange: | 154 case ByStyleChange: |
| 155 // TOOD(tkent): We should update the popup location/content in some | 155 // TOOD(tkent): We should update the popup location/content in some |
| 156 // cases. e.g. Updating ComputedStyle of the SELECT element affects | 156 // cases. e.g. Updating ComputedStyle of the SELECT element affects |
| 157 // popup position and OPTION style. | 157 // popup position and OPTION style. |
| 158 break; | 158 break; |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 | 161 |
| (...skipping 132 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 |