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

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

Issue 882683003: Normalize top controls offset to (0, 1), Blink-side. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 // Exposed for tests. 508 // Exposed for tests.
509 WebVector<WebCompositionUnderline> compositionUnderlines() const; 509 WebVector<WebCompositionUnderline> compositionUnderlines() const;
510 510
511 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } 511 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; }
512 512
513 bool pinchVirtualViewportEnabled() const; 513 bool pinchVirtualViewportEnabled() const;
514 514
515 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match esHeuristicsForGpuRasterization; } 515 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match esHeuristicsForGpuRasterization; }
516 516
517 virtual void setTopControlsLayoutHeight(float) override; 517 virtual void setTopControlsLayoutHeight(float) override;
518 virtual void setTopControlsHeight(float height, bool topControlsShrinkLayout Size) override;
518 519
519 virtual void forceNextWebGLContextCreationToFail() override; 520 virtual void forceNextWebGLContextCreationToFail() override;
520 521
521 IntSize mainFrameSize(); 522 IntSize mainFrameSize();
522 523
523 private: 524 private:
524 void didUpdateTopControls(); 525 void didUpdateTopControls();
525 void setTopControlsContentOffset(float); 526 void setTopControlsContentOffset(float);
526 527
527 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat e to 528 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat e to
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 bool m_showScrollBottleneckRects; 753 bool m_showScrollBottleneckRects;
753 WebColor m_baseBackgroundColor; 754 WebColor m_baseBackgroundColor;
754 WebColor m_backgroundColorOverride; 755 WebColor m_backgroundColorOverride;
755 float m_zoomFactorOverride; 756 float m_zoomFactorOverride;
756 757
757 bool m_userGestureObserved; 758 bool m_userGestureObserved;
758 759
759 // The top controls offset since the last compositor commit. 760 // The top controls offset since the last compositor commit.
760 float m_topControlsContentOffset; 761 float m_topControlsContentOffset;
761 762
762 // The top controls offset at the time of the last Resize event. This is the 763 float m_topControlsHeight;
763 // amount that the viewport was shrunk by to accomodate the top controls. 764 // If this is true, then the viewport was shrunk by the top controls height
764 float m_topControlsLayoutHeight; 765 // as of the last Resize event.
bokan 2015/02/06 08:25:23 It'd be more clear to say here (and in WebView.h)
aelias_OOO_until_Jul13 2015/02/06 20:32:37 Done.
766 bool m_topControlsShrinkLayoutSize;
767
768 // If true, then top controls is normalized between 0 and 1; if false,
769 // then it's an absolute value.
770 // TODO(aelias): Delete this after Blink roll.
771 bool m_topControlsOffsetIsNormalized;
765 }; 772 };
766 773
767 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is WebView()); 774 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is WebView());
768 // We have no ways to check if the specified WebView is an instance of 775 // We have no ways to check if the specified WebView is an instance of
769 // WebViewImpl because WebViewImpl is the only implementation of WebView. 776 // WebViewImpl because WebViewImpl is the only implementation of WebView.
770 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 777 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
771 778
772 } // namespace blink 779 } // namespace blink
773 780
774 #endif 781 #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