 Chromium Code Reviews
 Chromium Code Reviews Issue 2839993002:
  [Android] Adding Smart GO/NEXT feature in Chrome  (Closed)
    
  
    Issue 2839993002:
  [Android] Adding Smart GO/NEXT feature in Chrome  (Closed) 
  | 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 2882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2893 caretInDocument.height() + caretPadding - | 2893 caretInDocument.height() + caretPadding - | 
| 2894 targetViewportSize.height())); | 2894 targetViewportSize.height())); | 
| 2895 } | 2895 } | 
| 2896 } | 2896 } | 
| 2897 | 2897 | 
| 2898 void WebViewImpl::advanceFocus(bool reverse) { | 2898 void WebViewImpl::advanceFocus(bool reverse) { | 
| 2899 page()->focusController().advanceFocus(reverse ? WebFocusTypeBackward | 2899 page()->focusController().advanceFocus(reverse ? WebFocusTypeBackward | 
| 2900 : WebFocusTypeForward); | 2900 : WebFocusTypeForward); | 
| 2901 } | 2901 } | 
| 2902 | 2902 | 
| 2903 void WebViewImpl::advanceFocusInForm(WebFocusType focusType) { | |
| 2904 Element* element = focusedElement(); | |
| 2905 if (!element) | |
| 2906 return; | |
| 2907 | |
| 2908 LocalFrame* focusedFrame = focusedLocalFrameInWidget(); | |
| 
EhsanK
2017/04/25 22:43:08
I may not be understanding the patch correctly but
 
AKVT
2017/04/26 10:33:04
Could you help me to find an example in this file
 
EhsanK
2017/04/26 21:31:59
New changes in RenderFrameImpl and WebLocalFrame l
 | |
| 2909 if (focusedFrame) { | |
| 2910 Element* nextElement = | |
| 2911 focusedFrame->inputMethodController().nextFocusableElementInForm( | |
| 2912 element, focusType); | |
| 2913 if (!nextElement) | |
| 2914 return; | |
| 2915 nextElement->scrollIntoViewIfNeeded(true /*centerIfNeeded*/); | |
| 2916 nextElement->focus(); | |
| 2917 } | |
| 2918 } | |
| 2919 | |
| 2903 void WebViewImpl::advanceFocusAcrossFrames(WebFocusType type, | 2920 void WebViewImpl::advanceFocusAcrossFrames(WebFocusType type, | 
| 2904 WebRemoteFrame* from, | 2921 WebRemoteFrame* from, | 
| 2905 WebLocalFrame* to) { | 2922 WebLocalFrame* to) { | 
| 2906 // TODO(alexmos): Pass in proper with sourceCapabilities. | 2923 // TODO(alexmos): Pass in proper with sourceCapabilities. | 
| 2907 page()->focusController().advanceFocusAcrossFrames( | 2924 page()->focusController().advanceFocusAcrossFrames( | 
| 2908 type, toWebRemoteFrameImpl(from)->frame(), | 2925 type, toWebRemoteFrameImpl(from)->frame(), | 
| 2909 toWebLocalFrameImpl(to)->frame()); | 2926 toWebLocalFrameImpl(to)->frame()); | 
| 2910 } | 2927 } | 
| 2911 | 2928 | 
| 2912 double WebViewImpl::zoomLevel() { | 2929 double WebViewImpl::zoomLevel() { | 
| (...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4178 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4195 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 
| 4179 return nullptr; | 4196 return nullptr; | 
| 4180 return focusedFrame; | 4197 return focusedFrame; | 
| 4181 } | 4198 } | 
| 4182 | 4199 | 
| 4183 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4200 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 
| 4184 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4201 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 
| 4185 } | 4202 } | 
| 4186 | 4203 | 
| 4187 } // namespace blink | 4204 } // namespace blink | 
| OLD | NEW |