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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 304743007: Page gets zoomed in when user taps URL bar after clearing text in an input field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments fixed. Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.app.SearchManager; 9 import android.app.SearchManager;
10 import android.content.ContentResolver; 10 import android.content.ContentResolver;
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 resultCode == InputMethodManager.RESULT_ SHOWN || 533 resultCode == InputMethodManager.RESULT_ SHOWN ||
534 resultCode == InputMethodManager.RESULT_ UNCHANGED_SHOWN); 534 resultCode == InputMethodManager.RESULT_ UNCHANGED_SHOWN);
535 if (resultCode == InputMethodManager.RESULT_SHOW N) { 535 if (resultCode == InputMethodManager.RESULT_SHOW N) {
536 // If OSK is newly shown, delay the form foc us until 536 // If OSK is newly shown, delay the form foc us until
537 // the onSizeChanged (in order to adjust rel ative to the 537 // the onSizeChanged (in order to adjust rel ative to the
538 // new size). 538 // new size).
539 // TODO(jdduke): We should not assume that o nSizeChanged will 539 // TODO(jdduke): We should not assume that o nSizeChanged will
540 // always be called, crbug.com/294908. 540 // always be called, crbug.com/294908.
541 getContainerView().getWindowVisibleDisplayFr ame( 541 getContainerView().getWindowVisibleDisplayFr ame(
542 mFocusPreOSKViewportRect); 542 mFocusPreOSKViewportRect);
543 } else if (resultCode == 543 } else if (hasFocus() && resultCode ==
544 InputMethodManager.RESULT_UNCHANGED_SHOW N) { 544 InputMethodManager.RESULT_UNCHANGED_SHOW N) {
545 // If the OSK was already there, focus the f orm immediately. 545 // If the OSK was already there, focus the f orm immediately.
546 scrollFocusedEditableNodeIntoView(); 546 scrollFocusedEditableNodeIntoView();
547 } 547 }
548 } 548 }
549 }; 549 };
550 } 550 }
551 } 551 }
552 ); 552 );
553 } 553 }
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 /** 1566 /**
1567 * @see View#onWindowFocusChanged(boolean) 1567 * @see View#onWindowFocusChanged(boolean)
1568 */ 1568 */
1569 public void onWindowFocusChanged(boolean hasWindowFocus) { 1569 public void onWindowFocusChanged(boolean hasWindowFocus) {
1570 if (!hasWindowFocus) resetGestureDetection(); 1570 if (!hasWindowFocus) resetGestureDetection();
1571 } 1571 }
1572 1572
1573 public void onFocusChanged(boolean gainFocus) { 1573 public void onFocusChanged(boolean gainFocus) {
1574 if (!gainFocus) { 1574 if (!gainFocus) {
1575 hideImeIfNeeded(); 1575 hideImeIfNeeded();
1576 cancelRequestToScrollFocusedEditableNodeIntoView();
Ted C 2014/06/02 21:25:46 I agree with jdduke@ that this should be sufficien
1576 } 1577 }
1577 if (mNativeContentViewCore != 0) nativeSetFocus(mNativeContentViewCore, gainFocus); 1578 if (mNativeContentViewCore != 0) nativeSetFocus(mNativeContentViewCore, gainFocus);
1578 } 1579 }
1579 1580
1580 /** 1581 /**
1581 * @see View#onKeyUp(int, KeyEvent) 1582 * @see View#onKeyUp(int, KeyEvent)
1582 */ 1583 */
1583 public boolean onKeyUp(int keyCode, KeyEvent event) { 1584 public boolean onKeyUp(int keyCode, KeyEvent event) {
1584 if (mPopupZoomer.isShowing() && keyCode == KeyEvent.KEYCODE_BACK) { 1585 if (mPopupZoomer.isShowing() && keyCode == KeyEvent.KEYCODE_BACK) {
1585 mPopupZoomer.hide(true); 1586 mPopupZoomer.hide(true);
(...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after
3223 boolean enableHiding, boolean enableShowing, boolean animate); 3224 boolean enableHiding, boolean enableShowing, boolean animate);
3224 3225
3225 private native void nativeShowImeIfNeeded(long nativeContentViewCoreImpl); 3226 private native void nativeShowImeIfNeeded(long nativeContentViewCoreImpl);
3226 3227
3227 private native void nativeSetAccessibilityEnabled( 3228 private native void nativeSetAccessibilityEnabled(
3228 long nativeContentViewCoreImpl, boolean enabled); 3229 long nativeContentViewCoreImpl, boolean enabled);
3229 3230
3230 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l, 3231 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l,
3231 int x, int y, int w, int h); 3232 int x, int y, int w, int h);
3232 } 3233 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698