| 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 if (m_ownerElement) | 465 if (m_ownerElement) |
| 466 m_ownerElement->popupDidCancel(); | 466 m_ownerElement->popupDidCancel(); |
| 467 } | 467 } |
| 468 | 468 |
| 469 void PopupMenuImpl::dispose() | 469 void PopupMenuImpl::dispose() |
| 470 { | 470 { |
| 471 if (m_popup) | 471 if (m_popup) |
| 472 m_chromeClient->closePagePopup(m_popup); | 472 m_chromeClient->closePagePopup(m_popup); |
| 473 } | 473 } |
| 474 | 474 |
| 475 void PopupMenuImpl::show(const FloatQuad& /*controlPosition*/, const IntSize& /*
controlSize*/, int /*index*/) | 475 void PopupMenuImpl::show() |
| 476 { | 476 { |
| 477 ASSERT(!m_popup); | 477 ASSERT(!m_popup); |
| 478 m_popup = m_chromeClient->openPagePopup(this); | 478 m_popup = m_chromeClient->openPagePopup(this); |
| 479 } | 479 } |
| 480 | 480 |
| 481 void PopupMenuImpl::hide() | 481 void PopupMenuImpl::hide() |
| 482 { | 482 { |
| 483 if (m_popup) | 483 if (m_popup) |
| 484 m_chromeClient->closePagePopup(m_popup); | 484 m_chromeClient->closePagePopup(m_popup); |
| 485 } | 485 } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 | 536 |
| 537 void PopupMenuImpl::disconnectClient() | 537 void PopupMenuImpl::disconnectClient() |
| 538 { | 538 { |
| 539 m_ownerElement = nullptr; | 539 m_ownerElement = nullptr; |
| 540 // Cannot be done during finalization, so instead done when the | 540 // Cannot be done during finalization, so instead done when the |
| 541 // layout object is destroyed and disconnected. | 541 // layout object is destroyed and disconnected. |
| 542 dispose(); | 542 dispose(); |
| 543 } | 543 } |
| 544 | 544 |
| 545 } // namespace blink | 545 } // namespace blink |
| OLD | NEW |