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 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1912 } | 1912 } |
1913 | 1913 |
1914 void HTMLSelectElement::showPopup() | 1914 void HTMLSelectElement::showPopup() |
1915 { | 1915 { |
1916 if (popupIsVisible()) | 1916 if (popupIsVisible()) |
1917 return; | 1917 return; |
1918 if (document().frameHost()->chromeClient().hasOpenedPopup()) | 1918 if (document().frameHost()->chromeClient().hasOpenedPopup()) |
1919 return; | 1919 return; |
1920 if (!layoutObject() || !layoutObject()->isMenuList()) | 1920 if (!layoutObject() || !layoutObject()->isMenuList()) |
1921 return; | 1921 return; |
| 1922 // Disable visibility check on Android. elementRectRelativeToViewport() |
| 1923 // doesn't work well on Android WebView. crbug.com/632561 |
| 1924 #if !OS(ANDROID) |
1922 if (elementRectRelativeToViewport().isEmpty()) | 1925 if (elementRectRelativeToViewport().isEmpty()) |
1923 return; | 1926 return; |
| 1927 #endif |
1924 | 1928 |
1925 if (!m_popup) | 1929 if (!m_popup) |
1926 m_popup = document().frameHost()->chromeClient().openPopupMenu(*document
().frame(), *this); | 1930 m_popup = document().frameHost()->chromeClient().openPopupMenu(*document
().frame(), *this); |
1927 m_popupIsVisible = true; | 1931 m_popupIsVisible = true; |
1928 observeTreeMutation(); | 1932 observeTreeMutation(); |
1929 | 1933 |
1930 LayoutMenuList* menuList = toLayoutMenuList(layoutObject()); | 1934 LayoutMenuList* menuList = toLayoutMenuList(layoutObject()); |
1931 m_popup->show(); | 1935 m_popup->show(); |
1932 if (AXObjectCache* cache = document().existingAXObjectCache()) | 1936 if (AXObjectCache* cache = document().existingAXObjectCache()) |
1933 cache->didShowMenuListPopup(menuList); | 1937 cache->didShowMenuListPopup(menuList); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2034 } | 2038 } |
2035 | 2039 |
2036 void HTMLSelectElement::didMutateSubtree() | 2040 void HTMLSelectElement::didMutateSubtree() |
2037 { | 2041 { |
2038 DCHECK(popupIsVisible()); | 2042 DCHECK(popupIsVisible()); |
2039 DCHECK(m_popup); | 2043 DCHECK(m_popup); |
2040 m_popup->updateFromElement(PopupMenu::ByDOMChange); | 2044 m_popup->updateFromElement(PopupMenu::ByDOMChange); |
2041 } | 2045 } |
2042 | 2046 |
2043 } // namespace blink | 2047 } // namespace blink |
OLD | NEW |