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) {
}
- (void)focusFakebox {
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.
// SetCaretVisibility is a no-op unless OnSetFocus is called first. Only
// 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
// there's no need to indicate interaction was initiated from the fakebox.
model->OnSetFocus(false);
model->SetCaretVisibility(false);
if (!IsIPadIdiom()) {
} else {
// Set the omnibox background's frame to full bleed.
CGRect mobFrame = CGRectInset([_clippingView bounds], -2, -2);
[_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