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

Side by Side Diff: Source/WebKit/chromium/src/WebViewImpl.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: 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 3506 matching lines...) Expand 10 before | Expand all | Expand 10 after
3517 // The first time the Autofill popup is shown we'll create the client and 3517 // The first time the Autofill popup is shown we'll create the client and
3518 // the popup. 3518 // the popup.
3519 if (!m_autofillPopupClient) 3519 if (!m_autofillPopupClient)
3520 m_autofillPopupClient = adoptPtr(new AutofillPopupMenuClient); 3520 m_autofillPopupClient = adoptPtr(new AutofillPopupMenuClient);
3521 3521
3522 m_autofillPopupClient->initialize( 3522 m_autofillPopupClient->initialize(
3523 inputElem, names, labels, icons, itemIDs, separatorIndex); 3523 inputElem, names, labels, icons, itemIDs, separatorIndex);
3524 3524
3525 if (!m_autofillPopup) { 3525 if (!m_autofillPopup) {
3526 PopupContainerSettings popupSettings = autofillPopupSettings; 3526 PopupContainerSettings popupSettings = autofillPopupSettings;
3527 popupSettings.deviceSupportsTouch = settingsImpl()->deviceSupportsTouch( ); 3527 popupSettings.primaryInputIsTouch = settingsImpl()->primaryPointerDevice s() & WebSettings::PointerDeviceTouch;
3528 m_autofillPopup = PopupContainer::create(m_autofillPopupClient.get(), 3528 m_autofillPopup = PopupContainer::create(m_autofillPopupClient.get(),
3529 PopupContainer::Suggestion, 3529 PopupContainer::Suggestion,
3530 popupSettings); 3530 popupSettings);
3531 } 3531 }
3532 3532
3533 if (m_autofillPopupShowing) { 3533 if (m_autofillPopupShowing) {
3534 refreshAutofillPopup(); 3534 refreshAutofillPopup();
3535 } else { 3535 } else {
3536 m_autofillPopupShowing = true; 3536 m_autofillPopupShowing = true;
3537 m_autofillPopup->showInRect(focusedNode->pixelSnappedBoundingBox(), focu sedNode->ownerDocument()->view(), 0); 3537 m_autofillPopup->showInRect(focusedNode->pixelSnappedBoundingBox(), focu sedNode->ownerDocument()->view(), 0);
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
4254 } 4254 }
4255 4255
4256 bool WebViewImpl::shouldDisableDesktopWorkarounds() 4256 bool WebViewImpl::shouldDisableDesktopWorkarounds()
4257 { 4257 {
4258 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); 4258 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments();
4259 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom 4259 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom
4260 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); 4260 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto);
4261 } 4261 }
4262 4262
4263 } // namespace WebKit 4263 } // namespace WebKit
OLDNEW
« Source/WebKit/chromium/public/WebSettings.h ('K') | « Source/WebKit/chromium/src/WebSettingsImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698