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

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

Issue 2716153003: Removed FrameHost::chromeClient() (Closed)
Patch Set: Small feedback Created 3 years, 9 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
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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
7 * reserved. 7 * reserved.
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2010 Google Inc. All rights reserved. 9 * Copyright (C) 2010 Google Inc. All rights reserved.
10 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 10 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "core/dom/MutationObserverInit.h" 42 #include "core/dom/MutationObserverInit.h"
43 #include "core/dom/MutationRecord.h" 43 #include "core/dom/MutationRecord.h"
44 #include "core/dom/NodeComputedStyle.h" 44 #include "core/dom/NodeComputedStyle.h"
45 #include "core/dom/NodeListsNodeData.h" 45 #include "core/dom/NodeListsNodeData.h"
46 #include "core/dom/NodeTraversal.h" 46 #include "core/dom/NodeTraversal.h"
47 #include "core/dom/TaskRunnerHelper.h" 47 #include "core/dom/TaskRunnerHelper.h"
48 #include "core/events/GestureEvent.h" 48 #include "core/events/GestureEvent.h"
49 #include "core/events/KeyboardEvent.h" 49 #include "core/events/KeyboardEvent.h"
50 #include "core/events/MouseEvent.h" 50 #include "core/events/MouseEvent.h"
51 #include "core/events/ScopedEventQueue.h" 51 #include "core/events/ScopedEventQueue.h"
52 #include "core/frame/FrameHost.h"
53 #include "core/frame/FrameView.h" 52 #include "core/frame/FrameView.h"
54 #include "core/frame/LocalFrame.h" 53 #include "core/frame/LocalFrame.h"
55 #include "core/html/FormData.h" 54 #include "core/html/FormData.h"
56 #include "core/html/HTMLFormElement.h" 55 #include "core/html/HTMLFormElement.h"
57 #include "core/html/HTMLHRElement.h" 56 #include "core/html/HTMLHRElement.h"
58 #include "core/html/HTMLOptGroupElement.h" 57 #include "core/html/HTMLOptGroupElement.h"
59 #include "core/html/HTMLOptionElement.h" 58 #include "core/html/HTMLOptionElement.h"
60 #include "core/html/forms/FormController.h" 59 #include "core/html/forms/FormController.h"
61 #include "core/input/EventHandler.h" 60 #include "core/input/EventHandler.h"
62 #include "core/input/InputDeviceCapabilities.h" 61 #include "core/input/InputDeviceCapabilities.h"
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after
1914 selectOptionByPopup(m_indexToSelectOnCancel); 1913 selectOptionByPopup(m_indexToSelectOnCancel);
1915 } 1914 }
1916 1915
1917 void HTMLSelectElement::provisionalSelectionChanged(unsigned listIndex) { 1916 void HTMLSelectElement::provisionalSelectionChanged(unsigned listIndex) {
1918 setIndexToSelectOnCancel(listIndex); 1917 setIndexToSelectOnCancel(listIndex);
1919 } 1918 }
1920 1919
1921 void HTMLSelectElement::showPopup() { 1920 void HTMLSelectElement::showPopup() {
1922 if (popupIsVisible()) 1921 if (popupIsVisible())
1923 return; 1922 return;
1924 if (document().frameHost()->chromeClient().hasOpenedPopup()) 1923 if (document().page()->chromeClient().hasOpenedPopup())
1925 return; 1924 return;
1926 if (!layoutObject() || !layoutObject()->isMenuList()) 1925 if (!layoutObject() || !layoutObject()->isMenuList())
1927 return; 1926 return;
1928 if (visibleBoundsInVisualViewport().isEmpty()) 1927 if (visibleBoundsInVisualViewport().isEmpty())
1929 return; 1928 return;
1930 1929
1931 if (!m_popup) 1930 if (!m_popup)
1932 m_popup = document().frameHost()->chromeClient().openPopupMenu( 1931 m_popup = document().page()->chromeClient().openPopupMenu(
1933 *document().frame(), *this); 1932 *document().frame(), *this);
1934 m_popupIsVisible = true; 1933 m_popupIsVisible = true;
1935 observeTreeMutation(); 1934 observeTreeMutation();
1936 1935
1937 LayoutMenuList* menuList = toLayoutMenuList(layoutObject()); 1936 LayoutMenuList* menuList = toLayoutMenuList(layoutObject());
1938 m_popup->show(); 1937 m_popup->show();
1939 if (AXObjectCache* cache = document().existingAXObjectCache()) 1938 if (AXObjectCache* cache = document().existingAXObjectCache())
1940 cache->didShowMenuListPopup(menuList); 1939 cache->didShowMenuListPopup(menuList);
1941 } 1940 }
1942 1941
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
2041 m_popupUpdater = nullptr; 2040 m_popupUpdater = nullptr;
2042 } 2041 }
2043 2042
2044 void HTMLSelectElement::didMutateSubtree() { 2043 void HTMLSelectElement::didMutateSubtree() {
2045 DCHECK(popupIsVisible()); 2044 DCHECK(popupIsVisible());
2046 DCHECK(m_popup); 2045 DCHECK(m_popup);
2047 m_popup->updateFromElement(PopupMenu::ByDOMChange); 2046 m_popup->updateFromElement(PopupMenu::ByDOMChange);
2048 } 2047 }
2049 2048
2050 } // namespace blink 2049 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLInputElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698