Commit 6d6c1221 authored by justincohen's avatar justincohen Committed by Commit bot

[ios] Stop setting omnibox fakebox flag on iPhone.

This should have been removed when the 'top' omnibox was hidden on the NTP.
Since there is only one omnibox visible on iPhone, we don't need the fakebox flag.

BUG=666081

Review-Url: https://codereview.chromium.org/2601943002
Cr-Commit-Position: refs/heads/master@{#443292}
parent 525d6e76
...@@ -1335,14 +1335,17 @@ CGRect RectShiftedDownAndResizedForStatusBar(CGRect rect) { ...@@ -1335,14 +1335,17 @@ CGRect RectShiftedDownAndResizedForStatusBar(CGRect rect) {
} }
- (void)focusFakebox { - (void)focusFakebox {
OmniboxEditModel* model = _locationBar->GetLocationEntry()->model(); if (IsIPadIdiom()) {
// Setting the caret visibility to false causes OmniboxEditModel to indicate OmniboxEditModel* model = _locationBar->GetLocationEntry()->model();
// that omnibox interaction was initiated from the fakebox. Note that // Setting the caret visibility to false causes OmniboxEditModel to indicate
// SetCaretVisibility is a no-op unless OnSetFocus is called first. // that omnibox interaction was initiated from the fakebox. Note that
model->OnSetFocus(false); // SetCaretVisibility is a no-op unless OnSetFocus is called first. Only
model->SetCaretVisibility(false); // set fakebox on iPad, where there is a distinction between the omnibox
// and the fakebox on the NTP. On iPhone there is no visible omnibox, so
if (!IsIPadIdiom()) { // there's no need to indicate interaction was initiated from the fakebox.
model->OnSetFocus(false);
model->SetCaretVisibility(false);
} else {
// Set the omnibox background's frame to full bleed. // Set the omnibox background's frame to full bleed.
CGRect mobFrame = CGRectInset([_clippingView bounds], -2, -2); CGRect mobFrame = CGRectInset([_clippingView bounds], -2, -2);
[_omniboxBackground setFrame:mobFrame]; [_omniboxBackground setFrame:mobFrame];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment