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

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

Issue 2197043002: Merge "SELECT popup: Tentative fix for an issue on Android WebView." to M53. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
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 2003 matching lines...) Expand 10 before | Expand all | Expand 10 after
2014 } 2014 }
2015 2015
2016 void HTMLSelectElement::showPopup() 2016 void HTMLSelectElement::showPopup()
2017 { 2017 {
2018 if (popupIsVisible()) 2018 if (popupIsVisible())
2019 return; 2019 return;
2020 if (document().frameHost()->chromeClient().hasOpenedPopup()) 2020 if (document().frameHost()->chromeClient().hasOpenedPopup())
2021 return; 2021 return;
2022 if (!layoutObject() || !layoutObject()->isMenuList()) 2022 if (!layoutObject() || !layoutObject()->isMenuList())
2023 return; 2023 return;
2024 // Disable visibility check on Android. elementRectRelativeToViewport()
2025 // doesn't work well on Android WebView. crbug.com/632561
2026 #if !OS(ANDROID)
2024 if (elementRectRelativeToViewport().isEmpty()) 2027 if (elementRectRelativeToViewport().isEmpty())
2025 return; 2028 return;
2029 #endif
2026 2030
2027 if (!m_popup) 2031 if (!m_popup)
2028 m_popup = document().frameHost()->chromeClient().openPopupMenu(*document ().frame(), *this); 2032 m_popup = document().frameHost()->chromeClient().openPopupMenu(*document ().frame(), *this);
2029 m_popupIsVisible = true; 2033 m_popupIsVisible = true;
2030 observeTreeMutation(); 2034 observeTreeMutation();
2031 2035
2032 LayoutMenuList* menuList = toLayoutMenuList(layoutObject()); 2036 LayoutMenuList* menuList = toLayoutMenuList(layoutObject());
2033 m_popup->show(); 2037 m_popup->show();
2034 if (AXObjectCache* cache = document().existingAXObjectCache()) 2038 if (AXObjectCache* cache = document().existingAXObjectCache())
2035 cache->didShowMenuListPopup(menuList); 2039 cache->didShowMenuListPopup(menuList);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2136 } 2140 }
2137 2141
2138 void HTMLSelectElement::didMutateSubtree() 2142 void HTMLSelectElement::didMutateSubtree()
2139 { 2143 {
2140 DCHECK(popupIsVisible()); 2144 DCHECK(popupIsVisible());
2141 DCHECK(m_popup); 2145 DCHECK(m_popup);
2142 m_popup->updateFromElement(PopupMenu::ByDOMChange); 2146 m_popup->updateFromElement(PopupMenu::ByDOMChange);
2143 } 2147 }
2144 2148
2145 } // namespace blink 2149 } // 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