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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 715733002: [Android] Show autofill popup after animation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 } 1496 }
1497 1497
1498 void RenderViewImpl::OnScrollFocusedEditableNodeIntoRect( 1498 void RenderViewImpl::OnScrollFocusedEditableNodeIntoRect(
1499 const gfx::Rect& rect) { 1499 const gfx::Rect& rect) {
1500 if (has_scrolled_focused_editable_node_into_rect_ && 1500 if (has_scrolled_focused_editable_node_into_rect_ &&
1501 rect == rect_for_scrolled_focused_editable_node_) { 1501 rect == rect_for_scrolled_focused_editable_node_) {
1502 return; 1502 return;
1503 } 1503 }
1504 1504
1505 blink::WebElement element = GetFocusedElement(); 1505 blink::WebElement element = GetFocusedElement();
1506 bool will_animate = false;
1506 if (!element.isNull() && IsEditableNode(element)) { 1507 if (!element.isNull() && IsEditableNode(element)) {
1507 rect_for_scrolled_focused_editable_node_ = rect; 1508 rect_for_scrolled_focused_editable_node_ = rect;
1508 has_scrolled_focused_editable_node_into_rect_ = true; 1509 has_scrolled_focused_editable_node_into_rect_ = true;
1509 webview()->scrollFocusedNodeIntoRect(rect); 1510 will_animate = webview()->scrollFocusedNodeIntoRect(rect);
1510 } 1511 }
1512
1513 FOR_EACH_OBSERVER(RenderViewObserver, observers_,
aelias_OOO_until_Jul13 2014/11/22 03:38:11 It's brittle to tie the autofill showing up at all
please use gerrit instead 2014/11/24 20:22:31 FocusChangeComplete event is a good idea. On Andro
aelias_OOO_until_Jul13 2014/11/25 01:26:34 To be clear, what I'm suggesting is that we should
please use gerrit instead 2014/12/15 18:39:55 The step #2 (FocusComplete) is not necessary, beca
1514 WillAnimatePageScale(will_animate));
1511 } 1515 }
1512 1516
1513 void RenderViewImpl::OnSetEditCommandsForNextKeyEvent( 1517 void RenderViewImpl::OnSetEditCommandsForNextKeyEvent(
1514 const EditCommands& edit_commands) { 1518 const EditCommands& edit_commands) {
1515 edit_commands_ = edit_commands; 1519 edit_commands_ = edit_commands;
1516 } 1520 }
1517 1521
1518 void RenderViewImpl::OnSetHistoryLengthAndPrune(int history_length, 1522 void RenderViewImpl::OnSetHistoryLengthAndPrune(int history_length,
1519 int32 minimum_page_id) { 1523 int32 minimum_page_id) {
1520 DCHECK_GE(history_length, 0); 1524 DCHECK_GE(history_length, 0);
(...skipping 2320 matching lines...) Expand 10 before | Expand all | Expand 10 after
3841 } 3845 }
3842 3846
3843 void RenderViewImpl::InstrumentWillComposite() { 3847 void RenderViewImpl::InstrumentWillComposite() {
3844 if (!webview()) 3848 if (!webview())
3845 return; 3849 return;
3846 if (!webview()->devToolsAgent()) 3850 if (!webview()->devToolsAgent())
3847 return; 3851 return;
3848 webview()->devToolsAgent()->willComposite(); 3852 webview()->devToolsAgent()->willComposite();
3849 } 3853 }
3850 3854
3855 void RenderViewImpl::DidCompletePageScaleAnimation() {
3856 FOR_EACH_OBSERVER(RenderViewObserver, observers_,
3857 DidCompletePageScaleAnimation());
3858 }
3859
3851 void RenderViewImpl::SetScreenMetricsEmulationParameters( 3860 void RenderViewImpl::SetScreenMetricsEmulationParameters(
3852 float device_scale_factor, 3861 float device_scale_factor,
3853 const gfx::Point& root_layer_offset, 3862 const gfx::Point& root_layer_offset,
3854 float root_layer_scale) { 3863 float root_layer_scale) {
3855 if (webview() && compositor()) { 3864 if (webview() && compositor()) {
3856 webview()->setCompositorDeviceScaleFactorOverride(device_scale_factor); 3865 webview()->setCompositorDeviceScaleFactorOverride(device_scale_factor);
3857 webview()->setRootLayerTransform( 3866 webview()->setRootLayerTransform(
3858 blink::WebSize(root_layer_offset.x(), root_layer_offset.y()), 3867 blink::WebSize(root_layer_offset.x(), root_layer_offset.y()),
3859 root_layer_scale); 3868 root_layer_scale);
3860 } 3869 }
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
4226 std::vector<gfx::Size> sizes; 4235 std::vector<gfx::Size> sizes;
4227 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4236 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4228 if (!url.isEmpty()) 4237 if (!url.isEmpty())
4229 urls.push_back( 4238 urls.push_back(
4230 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4239 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4231 } 4240 }
4232 SendUpdateFaviconURL(urls); 4241 SendUpdateFaviconURL(urls);
4233 } 4242 }
4234 4243
4235 } // namespace content 4244 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698