| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "web/PopupMenuImpl.h" | 5 #include "web/PopupMenuImpl.h" |
| 6 | 6 |
| 7 #include "core/HTMLNames.h" | 7 #include "core/HTMLNames.h" |
| 8 #include "core/css/CSSFontSelector.h" | 8 #include "core/css/CSSFontSelector.h" |
| 9 #include "core/dom/ElementTraversal.h" | 9 #include "core/dom/ElementTraversal.h" |
| 10 #include "core/dom/ExecutionContextTask.h" | 10 #include "core/dom/ExecutionContextTask.h" |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 DCHECK(!m_popup); | 474 DCHECK(!m_popup); |
| 475 m_popup = m_chromeClient->openPagePopup(this); | 475 m_popup = m_chromeClient->openPagePopup(this); |
| 476 } | 476 } |
| 477 | 477 |
| 478 void PopupMenuImpl::hide() | 478 void PopupMenuImpl::hide() |
| 479 { | 479 { |
| 480 if (m_popup) | 480 if (m_popup) |
| 481 m_chromeClient->closePagePopup(m_popup); | 481 m_chromeClient->closePagePopup(m_popup); |
| 482 } | 482 } |
| 483 | 483 |
| 484 void PopupMenuImpl::updateFromElement() | 484 void PopupMenuImpl::updateFromElement(UpdateReason) |
| 485 { | 485 { |
| 486 if (m_needsUpdate) | 486 if (m_needsUpdate) |
| 487 return; | 487 return; |
| 488 m_needsUpdate = true; | 488 m_needsUpdate = true; |
| 489 ownerElement().document().postTask(BLINK_FROM_HERE, createSameThreadTask(&Po
pupMenuImpl::update, this)); | 489 ownerElement().document().postTask(BLINK_FROM_HERE, createSameThreadTask(&Po
pupMenuImpl::update, this)); |
| 490 } | 490 } |
| 491 | 491 |
| 492 void PopupMenuImpl::update() | 492 void PopupMenuImpl::update() |
| 493 { | 493 { |
| 494 if (!m_popup || !m_ownerElement) | 494 if (!m_popup || !m_ownerElement) |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 | 533 |
| 534 void PopupMenuImpl::disconnectClient() | 534 void PopupMenuImpl::disconnectClient() |
| 535 { | 535 { |
| 536 m_ownerElement = nullptr; | 536 m_ownerElement = nullptr; |
| 537 // Cannot be done during finalization, so instead done when the | 537 // Cannot be done during finalization, so instead done when the |
| 538 // layout object is destroyed and disconnected. | 538 // layout object is destroyed and disconnected. |
| 539 dispose(); | 539 dispose(); |
| 540 } | 540 } |
| 541 | 541 |
| 542 } // namespace blink | 542 } // namespace blink |
| OLD | NEW |