| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 } | 140 } |
| 141 | 141 |
| 142 void ExternalPopupMenu::updateFromElement(UpdateReason reason) | 142 void ExternalPopupMenu::updateFromElement(UpdateReason reason) |
| 143 { | 143 { |
| 144 switch (reason) { | 144 switch (reason) { |
| 145 case BySelectionChange: | 145 case BySelectionChange: |
| 146 case ByDOMChange: | 146 case ByDOMChange: |
| 147 if (m_needsUpdate) | 147 if (m_needsUpdate) |
| 148 return; | 148 return; |
| 149 m_needsUpdate = true; | 149 m_needsUpdate = true; |
| 150 m_ownerElement->document().postTask(BLINK_FROM_HERE, createSameThreadTas
k(&ExternalPopupMenu::update, this)); | 150 m_ownerElement->document().postTask(BLINK_FROM_HERE, createSameThreadTas
k(&ExternalPopupMenu::update, wrapCrossThreadPersistent(this))); |
| 151 break; | 151 break; |
| 152 | 152 |
| 153 case ByStyleChange: | 153 case ByStyleChange: |
| 154 // TOOD(tkent): We should update the popup location/content in some | 154 // TOOD(tkent): We should update the popup location/content in some |
| 155 // cases. e.g. Updating ComputedStyle of the SELECT element affects | 155 // cases. e.g. Updating ComputedStyle of the SELECT element affects |
| 156 // popup position and OPTION style. | 156 // popup position and OPTION style. |
| 157 break; | 157 break; |
| 158 } | 158 } |
| 159 } | 159 } |
| 160 | 160 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 if (ownerElement.itemIsDisplayNone(*items[i])) | 293 if (ownerElement.itemIsDisplayNone(*items[i])) |
| 294 continue; | 294 continue; |
| 295 if (popupMenuItemIndex == i) | 295 if (popupMenuItemIndex == i) |
| 296 return indexTracker; | 296 return indexTracker; |
| 297 ++indexTracker; | 297 ++indexTracker; |
| 298 } | 298 } |
| 299 return -1; | 299 return -1; |
| 300 } | 300 } |
| 301 | 301 |
| 302 } // namespace blink | 302 } // namespace blink |
| OLD | NEW |