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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp

Issue 1605233002: Implement PopupMenu::updateFromElement() for ExternalPopupMenu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix crbug.com/579895 Created 4 years, 11 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 | « no previous file | third_party/WebKit/Source/web/ExternalPopupMenu.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 * (C) 1999 Antti Koivisto (koivisto@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * 10 *
(...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 if (document().frameHost()->chromeClient().hasOpenedPopup()) 1977 if (document().frameHost()->chromeClient().hasOpenedPopup())
1978 return; 1978 return;
1979 if (!layoutObject() || !layoutObject()->isMenuList()) 1979 if (!layoutObject() || !layoutObject()->isMenuList())
1980 return; 1980 return;
1981 1981
1982 if (!m_popup) 1982 if (!m_popup)
1983 m_popup = document().frameHost()->chromeClient().openPopupMenu(*document ().frame(), *this); 1983 m_popup = document().frameHost()->chromeClient().openPopupMenu(*document ().frame(), *this);
1984 m_popupIsVisible = true; 1984 m_popupIsVisible = true;
1985 1985
1986 LayoutMenuList* menuList = toLayoutMenuList(layoutObject()); 1986 LayoutMenuList* menuList = toLayoutMenuList(layoutObject());
1987 FloatQuad quad(menuList->localToAbsoluteQuad(FloatQuad(menuList->borderBound ingBox())));
1988 IntSize size = pixelSnappedIntRect(menuList->frameRect()).size(); 1987 IntSize size = pixelSnappedIntRect(menuList->frameRect()).size();
1989 m_popup->show(quad, size, optionToListIndex(selectedIndex())); 1988 // TODO(tkent): Remove show() arguments. They are unused.
1989 m_popup->show(FloatQuad(), size, optionToListIndex(selectedIndex()));
1990 if (AXObjectCache* cache = document().existingAXObjectCache()) 1990 if (AXObjectCache* cache = document().existingAXObjectCache())
1991 cache->didShowMenuListPopup(menuList); 1991 cache->didShowMenuListPopup(menuList);
1992 } 1992 }
1993 1993
1994 void HTMLSelectElement::hidePopup() 1994 void HTMLSelectElement::hidePopup()
1995 { 1995 {
1996 if (m_popup) 1996 if (m_popup)
1997 m_popup->hide(); 1997 m_popup->hide();
1998 } 1998 }
1999 1999
(...skipping 12 matching lines...) Expand all
2012 m_popupIsVisible = false; 2012 m_popupIsVisible = false;
2013 m_popup = nullptr; 2013 m_popup = nullptr;
2014 } 2014 }
2015 2015
2016 void HTMLSelectElement::resetTypeAheadSessionForTesting() 2016 void HTMLSelectElement::resetTypeAheadSessionForTesting()
2017 { 2017 {
2018 m_typeAhead.resetSession(); 2018 m_typeAhead.resetSession();
2019 } 2019 }
2020 2020
2021 } // namespace blink 2021 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/ExternalPopupMenu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698