OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |