| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 if (m_shownDOMTreeVersion == m_ownerElement->document().domTreeVersion()) | 152 if (m_shownDOMTreeVersion == m_ownerElement->document().domTreeVersion()) |
| 153 return; | 153 return; |
| 154 m_needsUpdate = true; | 154 m_needsUpdate = true; |
| 155 m_ownerElement->document().postTask(BLINK_FROM_HERE, createSameThreadTask(&E
xternalPopupMenu::update, this)); | 155 m_ownerElement->document().postTask(BLINK_FROM_HERE, createSameThreadTask(&E
xternalPopupMenu::update, this)); |
| 156 } | 156 } |
| 157 | 157 |
| 158 void ExternalPopupMenu::update() | 158 void ExternalPopupMenu::update() |
| 159 { | 159 { |
| 160 if (!m_webExternalPopupMenu || !m_ownerElement) | 160 if (!m_webExternalPopupMenu || !m_ownerElement) |
| 161 return; | 161 return; |
| 162 m_ownerElement->document().updateLayoutTree(); | 162 m_ownerElement->document().updateStyleAndLayoutTree(); |
| 163 // disconnectClient() might have been called. | 163 // disconnectClient() might have been called. |
| 164 if (!m_ownerElement) | 164 if (!m_ownerElement) |
| 165 return; | 165 return; |
| 166 m_needsUpdate = false; | 166 m_needsUpdate = false; |
| 167 | 167 |
| 168 if (showInternal()) | 168 if (showInternal()) |
| 169 return; | 169 return; |
| 170 // We failed to show a popup. Notify it to the owner. | 170 // We failed to show a popup. Notify it to the owner. |
| 171 hide(); | 171 hide(); |
| 172 } | 172 } |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 if (ownerElement.itemIsDisplayNone(*items[i])) | 290 if (ownerElement.itemIsDisplayNone(*items[i])) |
| 291 continue; | 291 continue; |
| 292 if (popupMenuItemIndex == i) | 292 if (popupMenuItemIndex == i) |
| 293 return indexTracker; | 293 return indexTracker; |
| 294 ++indexTracker; | 294 ++indexTracker; |
| 295 } | 295 } |
| 296 return -1; | 296 return -1; |
| 297 } | 297 } |
| 298 | 298 |
| 299 } // namespace blink | 299 } // namespace blink |
| OLD | NEW |