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

Side by Side Diff: Source/web/WebViewImpl.h

Issue 1192433010: Use Android's "scroll focused node into view" path on all platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added test Created 5 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 | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 // Called by a full frame plugin inside this view to inform it that its 457 // Called by a full frame plugin inside this view to inform it that its
458 // zoom level has been updated. The plugin should only call this function 458 // zoom level has been updated. The plugin should only call this function
459 // if the zoom change was triggered by the browser, it's only needed in case 459 // if the zoom change was triggered by the browser, it's only needed in case
460 // a plugin can update its own zoom, say because of its own UI. 460 // a plugin can update its own zoom, say because of its own UI.
461 void fullFramePluginZoomLevelChanged(double zoomLevel); 461 void fullFramePluginZoomLevelChanged(double zoomLevel);
462 462
463 void computeScaleAndScrollForBlockRect(const WebPoint& hitPoint, const WebRe ct& blockRect, float padding, float defaultScaleWhenAlreadyLegible, float& scale , WebPoint& scroll); 463 void computeScaleAndScrollForBlockRect(const WebPoint& hitPoint, const WebRe ct& blockRect, float padding, float defaultScaleWhenAlreadyLegible, float& scale , WebPoint& scroll);
464 Node* bestTapNode(const GestureEventWithHitTestResults& targetedTapEvent); 464 Node* bestTapNode(const GestureEventWithHitTestResults& targetedTapEvent);
465 void enableTapHighlightAtPoint(const GestureEventWithHitTestResults& targete dTapEvent); 465 void enableTapHighlightAtPoint(const GestureEventWithHitTestResults& targete dTapEvent);
466 void enableTapHighlights(WillBeHeapVector<RawPtrWillBeMember<Node>>&); 466 void enableTapHighlights(WillBeHeapVector<RawPtrWillBeMember<Node>>&);
467 void computeScaleAndScrollForFocusedNode(Node* focusedNode, float& scale, In tPoint& scroll, bool& needAnimation); 467 void computeScaleAndScrollForFocusedNode(Node* focusedNode, bool zoomInToLeg ibleScale, float& scale, IntPoint& scroll, bool& needAnimation);
468 468
469 void animateDoubleTapZoom(const IntPoint&); 469 void animateDoubleTapZoom(const IntPoint&);
470 470
471 void enableFakePageScaleAnimationForTesting(bool); 471 void enableFakePageScaleAnimationForTesting(bool);
472 bool fakeDoubleTapAnimationPendingForTesting() const { return m_doubleTapZoo mPending; } 472 bool fakeDoubleTapAnimationPendingForTesting() const { return m_doubleTapZoo mPending; }
473 IntPoint fakePageScaleAnimationTargetPositionForTesting() const { return m_f akePageScaleAnimationTargetPosition; } 473 IntPoint fakePageScaleAnimationTargetPositionForTesting() const { return m_f akePageScaleAnimationTargetPosition; }
474 float fakePageScaleAnimationPageScaleForTesting() const { return m_fakePageS caleAnimationPageScaleFactor; } 474 float fakePageScaleAnimationPageScaleForTesting() const { return m_fakePageS caleAnimationPageScaleFactor; }
475 bool fakePageScaleAnimationUseAnchorForTesting() const { return m_fakePageSc aleAnimationUseAnchor; } 475 bool fakePageScaleAnimationUseAnchorForTesting() const { return m_fakePageSc aleAnimationUseAnchor; }
476 476
477 void enterFullScreenForElement(Element*); 477 void enterFullScreenForElement(Element*);
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 }; 754 };
755 755
756 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is WebView()); 756 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is WebView());
757 // We have no ways to check if the specified WebView is an instance of 757 // We have no ways to check if the specified WebView is an instance of
758 // WebViewImpl because WebViewImpl is the only implementation of WebView. 758 // WebViewImpl because WebViewImpl is the only implementation of WebView.
759 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 759 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
760 760
761 } // namespace blink 761 } // namespace blink
762 762
763 #endif 763 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698