OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |