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

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

Issue 2905873003: VR: Disable select element in VR mode via WebPreferences (Closed)
Patch Set: Address the comment Created 3 years, 7 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 | third_party/WebKit/Source/web/ChromeClientImpl.cpp » ('j') | 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 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 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after
1942 if (GetDocument().GetPage()->GetChromeClient().HasOpenedPopup()) 1942 if (GetDocument().GetPage()->GetChromeClient().HasOpenedPopup())
1943 return; 1943 return;
1944 if (!GetLayoutObject() || !GetLayoutObject()->IsMenuList()) 1944 if (!GetLayoutObject() || !GetLayoutObject()->IsMenuList())
1945 return; 1945 return;
1946 if (VisibleBoundsInVisualViewport().IsEmpty()) 1946 if (VisibleBoundsInVisualViewport().IsEmpty())
1947 return; 1947 return;
1948 1948
1949 if (!popup_) 1949 if (!popup_)
1950 popup_ = GetDocument().GetPage()->GetChromeClient().OpenPopupMenu( 1950 popup_ = GetDocument().GetPage()->GetChromeClient().OpenPopupMenu(
1951 *GetDocument().GetFrame(), *this); 1951 *GetDocument().GetFrame(), *this);
1952 if (!popup_)
1953 return;
1954
1952 popup_is_visible_ = true; 1955 popup_is_visible_ = true;
1953 ObserveTreeMutation(); 1956 ObserveTreeMutation();
1954 1957
1955 LayoutMenuList* menu_list = ToLayoutMenuList(GetLayoutObject()); 1958 LayoutMenuList* menu_list = ToLayoutMenuList(GetLayoutObject());
1956 popup_->Show(); 1959 popup_->Show();
1957 if (AXObjectCache* cache = GetDocument().ExistingAXObjectCache()) 1960 if (AXObjectCache* cache = GetDocument().ExistingAXObjectCache())
1958 cache->DidShowMenuListPopup(menu_list); 1961 cache->DidShowMenuListPopup(menu_list);
1959 } 1962 }
1960 1963
1961 void HTMLSelectElement::HidePopup() { 1964 void HTMLSelectElement::HidePopup() {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
2059 popup_updater_ = nullptr; 2062 popup_updater_ = nullptr;
2060 } 2063 }
2061 2064
2062 void HTMLSelectElement::DidMutateSubtree() { 2065 void HTMLSelectElement::DidMutateSubtree() {
2063 DCHECK(PopupIsVisible()); 2066 DCHECK(PopupIsVisible());
2064 DCHECK(popup_); 2067 DCHECK(popup_);
2065 popup_->UpdateFromElement(PopupMenu::kByDOMChange); 2068 popup_->UpdateFromElement(PopupMenu::kByDOMChange);
2066 } 2069 }
2067 2070
2068 } // namespace blink 2071 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/ChromeClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698