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

Side by Side Diff: Source/WebCore/platform/chromium/PopupMenuChromium.cpp

Issue 13818030: Added primary input devices setting to blink to allow media queries for hover/pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review fixes Created 7 years, 8 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) 2008, 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 if (p.popup) 64 if (p.popup)
65 p.popup->listBox()->disconnectClient(); 65 p.popup->listBox()->disconnectClient();
66 hide(); 66 hide();
67 } 67 }
68 68
69 void PopupMenuChromium::show(const IntRect& rect, FrameView* frameView, int inde x) 69 void PopupMenuChromium::show(const IntRect& rect, FrameView* frameView, int inde x)
70 { 70 {
71 if (!p.popup) { 71 if (!p.popup) {
72 Settings* settings = frameView->frame()->page()->settings(); 72 Settings* settings = frameView->frame()->page()->settings();
73 PopupContainerSettings popupSettings = dropDownSettings; 73 PopupContainerSettings popupSettings = dropDownSettings;
74 popupSettings.deviceSupportsTouch = settings->deviceSupportsTouch(); 74 popupSettings.primaryInputIncludesTouch = settings->primaryPointerDevice s() & PointerDeviceTouch;
75 p.popup = PopupContainer::create(client(), PopupContainer::Select, popup Settings); 75 p.popup = PopupContainer::create(client(), PopupContainer::Select, popup Settings);
76 } 76 }
77 p.popup->showInRect(rect, frameView, index); 77 p.popup->showInRect(rect, frameView, index);
78 } 78 }
79 79
80 void PopupMenuChromium::hide() 80 void PopupMenuChromium::hide()
81 { 81 {
82 if (p.popup) 82 if (p.popup)
83 p.popup->hide(); 83 p.popup->hide();
84 } 84 }
85 85
86 void PopupMenuChromium::updateFromElement() 86 void PopupMenuChromium::updateFromElement()
87 { 87 {
88 p.popup->listBox()->updateFromElement(); 88 p.popup->listBox()->updateFromElement();
89 } 89 }
90 90
91 91
92 void PopupMenuChromium::disconnectClient() 92 void PopupMenuChromium::disconnectClient()
93 { 93 {
94 m_popupClient = 0; 94 m_popupClient = 0;
95 } 95 }
96 96
97 } // namespace WebCore 97 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/platform/chromium/PopupListBox.cpp ('k') | Source/WebCore/testing/InternalSettings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698