| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 161 void ExternalPopupMenu::update() | 161 void ExternalPopupMenu::update() |
| 162 { | 162 { |
| 163 if (!m_webExternalPopupMenu || !m_ownerElement) | 163 if (!m_webExternalPopupMenu || !m_ownerElement) |
| 164 return; | 164 return; |
| 165 m_ownerElement->document().updateLayoutTree(); | 165 m_ownerElement->document().updateStyleAndLayoutTree(); |
| 166 // disconnectClient() might have been called. | 166 // disconnectClient() might have been called. |
| 167 if (!m_ownerElement) | 167 if (!m_ownerElement) |
| 168 return; | 168 return; |
| 169 m_needsUpdate = false; | 169 m_needsUpdate = false; |
| 170 | 170 |
| 171 if (showInternal()) | 171 if (showInternal()) |
| 172 return; | 172 return; |
| 173 // We failed to show a popup. Notify it to the owner. | 173 // We failed to show a popup. Notify it to the owner. |
| 174 hide(); | 174 hide(); |
| 175 } | 175 } |
| (...skipping 117 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 |