Chromium Code Reviews| Index: ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm |
| diff --git a/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm b/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm |
| index 85cdcae7446fe88ee8e1fbff2ffba86eca99a7c2..6e921e783cc81faad18b60badb1fa5d22c83fb06 100644 |
| --- a/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm |
| +++ b/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm |
| @@ -1335,14 +1335,14 @@ CGRect RectShiftedDownAndResizedForStatusBar(CGRect rect) { |
| } |
| - (void)focusFakebox { |
| - OmniboxEditModel* model = _locationBar->GetLocationEntry()->model(); |
| - // Setting the caret visibility to false causes OmniboxEditModel to indicate |
| - // that omnibox interaction was initiated from the fakebox. Note that |
| - // SetCaretVisibility is a no-op unless OnSetFocus is called first. |
| - model->OnSetFocus(false); |
| - model->SetCaretVisibility(false); |
| - |
| - if (!IsIPadIdiom()) { |
| + if (IsIPadIdiom()) { |
| + OmniboxEditModel* model = _locationBar->GetLocationEntry()->model(); |
| + // Setting the caret visibility to false causes OmniboxEditModel to indicate |
| + // that omnibox interaction was initiated from the fakebox. Note that |
| + // SetCaretVisibility is a no-op unless OnSetFocus is called first. |
|
rohitrao (ping after 24h)
2017/01/10 17:18:45
Add to this explaining why the phone omnibox does
justincohen
2017/01/12 18:04:36
Done.
|
| + model->OnSetFocus(false); |
| + model->SetCaretVisibility(false); |
| + } else { |
| // Set the omnibox background's frame to full bleed. |
| CGRect mobFrame = CGRectInset([_clippingView bounds], -2, -2); |
| [_omniboxBackground setFrame:mobFrame]; |