Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Side by Side Diff: third_party/WebKit/Source/web/PopupMenuImpl.cpp

Issue 2537573003: Merge "SELECT element: Commit a provisional OPTION selection on blur." to M56 (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLSelectElement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 if (m_popup) 484 if (m_popup)
485 m_chromeClient->closePagePopup(m_popup); 485 m_chromeClient->closePagePopup(m_popup);
486 } 486 }
487 487
488 void PopupMenuImpl::show() { 488 void PopupMenuImpl::show() {
489 DCHECK(!m_popup); 489 DCHECK(!m_popup);
490 m_popup = m_chromeClient->openPagePopup(this); 490 m_popup = m_chromeClient->openPagePopup(this);
491 } 491 }
492 492
493 void PopupMenuImpl::hide() { 493 void PopupMenuImpl::hide() {
494 if (m_popup) 494 closePopup();
495 m_chromeClient->closePagePopup(m_popup);
496 } 495 }
497 496
498 void PopupMenuImpl::updateFromElement(UpdateReason) { 497 void PopupMenuImpl::updateFromElement(UpdateReason) {
499 if (m_needsUpdate) 498 if (m_needsUpdate)
500 return; 499 return;
501 m_needsUpdate = true; 500 m_needsUpdate = true;
502 ownerElement().document().postTask( 501 ownerElement().document().postTask(
503 BLINK_FROM_HERE, 502 BLINK_FROM_HERE,
504 createSameThreadTask(&PopupMenuImpl::update, wrapPersistent(this))); 503 createSameThreadTask(&PopupMenuImpl::update, wrapPersistent(this)));
505 } 504 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 } 551 }
553 552
554 void PopupMenuImpl::disconnectClient() { 553 void PopupMenuImpl::disconnectClient() {
555 m_ownerElement = nullptr; 554 m_ownerElement = nullptr;
556 // Cannot be done during finalization, so instead done when the 555 // Cannot be done during finalization, so instead done when the
557 // layout object is destroyed and disconnected. 556 // layout object is destroyed and disconnected.
558 dispose(); 557 dispose();
559 } 558 }
560 559
561 } // namespace blink 560 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLSelectElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698