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

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

Issue 2200583003: SELECT popup: Tentative fix for an issue on Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743_91
Patch Set: Created 4 years, 4 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 | 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 /* 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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698