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

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

Issue 560623002: Adjust maximum scroll bounds on FrameView to account for top controls. (Blink-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 3 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 | « Source/core/frame/FrameView.cpp ('k') | 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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 491
492 // Exposed for tests. 492 // Exposed for tests.
493 WebVector<WebCompositionUnderline> compositionUnderlines() const; 493 WebVector<WebCompositionUnderline> compositionUnderlines() const;
494 494
495 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } 495 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; }
496 496
497 bool pinchVirtualViewportEnabled() const; 497 bool pinchVirtualViewportEnabled() const;
498 498
499 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match esHeuristicsForGpuRasterization; } 499 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match esHeuristicsForGpuRasterization; }
500 500
501 virtual void setTopControlsLayoutHeight(float) OVERRIDE;
502
501 private: 503 private:
504 void didUpdateTopControls();
502 void setTopControlsContentOffset(float); 505 void setTopControlsContentOffset(float);
503 506
504 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat e to 507 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat e to
505 // prevent external usage 508 // prevent external usage
506 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O VERRIDE; 509 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O VERRIDE;
507 510
508 void scrollAndRescaleViewports(float scaleFactor, const IntPoint& mainFrameO rigin, const FloatPoint& pinchViewportOrigin); 511 void scrollAndRescaleViewports(float scaleFactor, const IntPoint& mainFrameO rigin, const FloatPoint& pinchViewportOrigin);
509 512
510 IntRect visibleRectInDocument() const; 513 IntRect visibleRectInDocument() const;
511 514
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 bool m_showFPSCounter; 730 bool m_showFPSCounter;
728 bool m_showPaintRects; 731 bool m_showPaintRects;
729 bool m_showDebugBorders; 732 bool m_showDebugBorders;
730 bool m_continuousPaintingEnabled; 733 bool m_continuousPaintingEnabled;
731 bool m_showScrollBottleneckRects; 734 bool m_showScrollBottleneckRects;
732 WebColor m_baseBackgroundColor; 735 WebColor m_baseBackgroundColor;
733 WebColor m_backgroundColorOverride; 736 WebColor m_backgroundColorOverride;
734 float m_zoomFactorOverride; 737 float m_zoomFactorOverride;
735 738
736 bool m_userGestureObserved; 739 bool m_userGestureObserved;
740
741 // The top controls offset since the last compositor commit.
737 float m_topControlsContentOffset; 742 float m_topControlsContentOffset;
743
744 // The top controls offset at the time of the last Resize event. This is the
745 // amount that the viewport was shrunk by to accomodate the top controls.
746 float m_topControlsLayoutHeight;
738 }; 747 };
739 748
740 // We have no ways to check if the specified WebView is an instance of 749 // We have no ways to check if the specified WebView is an instance of
741 // WebViewImpl because WebViewImpl is the only implementation of WebView. 750 // WebViewImpl because WebViewImpl is the only implementation of WebView.
742 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 751 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
743 752
744 } // namespace blink 753 } // namespace blink
745 754
746 #endif 755 #endif
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698