| 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 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1967 } | 1967 } |
| 1968 | 1968 |
| 1969 void HTMLSelectElement::showPopup() | 1969 void HTMLSelectElement::showPopup() |
| 1970 { | 1970 { |
| 1971 if (popupIsVisible()) | 1971 if (popupIsVisible()) |
| 1972 return; | 1972 return; |
| 1973 if (document().frameHost()->chromeClient().hasOpenedPopup()) | 1973 if (document().frameHost()->chromeClient().hasOpenedPopup()) |
| 1974 return; | 1974 return; |
| 1975 if (!layoutObject() || !layoutObject()->isMenuList()) | 1975 if (!layoutObject() || !layoutObject()->isMenuList()) |
| 1976 return; | 1976 return; |
| 1977 // Disable visibility check on Android. elementRectRelativeToViewport() |
| 1978 // doesn't work well on Android WebView. crbug.com/632561 |
| 1979 #if !OS(ANDROID) |
| 1977 if (elementRectRelativeToViewport().isEmpty()) | 1980 if (elementRectRelativeToViewport().isEmpty()) |
| 1978 return; | 1981 return; |
| 1982 #endif |
| 1979 | 1983 |
| 1980 if (!m_popup) | 1984 if (!m_popup) |
| 1981 m_popup = document().frameHost()->chromeClient().openPopupMenu(*document
().frame(), *this); | 1985 m_popup = document().frameHost()->chromeClient().openPopupMenu(*document
().frame(), *this); |
| 1982 m_popupIsVisible = true; | 1986 m_popupIsVisible = true; |
| 1983 observeTreeMutation(); | 1987 observeTreeMutation(); |
| 1984 | 1988 |
| 1985 LayoutMenuList* menuList = toLayoutMenuList(layoutObject()); | 1989 LayoutMenuList* menuList = toLayoutMenuList(layoutObject()); |
| 1986 m_popup->show(); | 1990 m_popup->show(); |
| 1987 if (AXObjectCache* cache = document().existingAXObjectCache()) | 1991 if (AXObjectCache* cache = document().existingAXObjectCache()) |
| 1988 cache->didShowMenuListPopup(menuList); | 1992 cache->didShowMenuListPopup(menuList); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2089 } | 2093 } |
| 2090 | 2094 |
| 2091 void HTMLSelectElement::didMutateSubtree() | 2095 void HTMLSelectElement::didMutateSubtree() |
| 2092 { | 2096 { |
| 2093 DCHECK(popupIsVisible()); | 2097 DCHECK(popupIsVisible()); |
| 2094 DCHECK(m_popup); | 2098 DCHECK(m_popup); |
| 2095 m_popup->updateFromElement(PopupMenu::ByDOMChange); | 2099 m_popup->updateFromElement(PopupMenu::ByDOMChange); |
| 2096 } | 2100 } |
| 2097 | 2101 |
| 2098 } // namespace blink | 2102 } // namespace blink |
| OLD | NEW |