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

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

Issue 1970653003: ExternalPopupMenu should recreate its popup only if a SELECT subtree is updated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add an enum argument to updateFromElement Created 4 years, 7 months 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/web/PopupMenuImpl.h ('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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 DCHECK(!m_popup); 461 DCHECK(!m_popup);
462 m_popup = m_chromeClient->openPagePopup(this); 462 m_popup = m_chromeClient->openPagePopup(this);
463 } 463 }
464 464
465 void PopupMenuImpl::hide() 465 void PopupMenuImpl::hide()
466 { 466 {
467 if (m_popup) 467 if (m_popup)
468 m_chromeClient->closePagePopup(m_popup); 468 m_chromeClient->closePagePopup(m_popup);
469 } 469 }
470 470
471 void PopupMenuImpl::updateFromElement() 471 void PopupMenuImpl::updateFromElement(UpdateReason)
472 { 472 {
473 if (m_needsUpdate) 473 if (m_needsUpdate)
474 return; 474 return;
475 m_needsUpdate = true; 475 m_needsUpdate = true;
476 ownerElement().document().postTask(BLINK_FROM_HERE, createSameThreadTask(&Po pupMenuImpl::update, this)); 476 ownerElement().document().postTask(BLINK_FROM_HERE, createSameThreadTask(&Po pupMenuImpl::update, this));
477 } 477 }
478 478
479 void PopupMenuImpl::update() 479 void PopupMenuImpl::update()
480 { 480 {
481 if (!m_popup || !m_ownerElement) 481 if (!m_popup || !m_ownerElement)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 520
521 void PopupMenuImpl::disconnectClient() 521 void PopupMenuImpl::disconnectClient()
522 { 522 {
523 m_ownerElement = nullptr; 523 m_ownerElement = nullptr;
524 // Cannot be done during finalization, so instead done when the 524 // Cannot be done during finalization, so instead done when the
525 // layout object is destroyed and disconnected. 525 // layout object is destroyed and disconnected.
526 dispose(); 526 dispose();
527 } 527 }
528 528
529 } // namespace blink 529 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/PopupMenuImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698