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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp

Issue 2453553003: Disable overlay scrollbars in Blink when hidden by the compositor. (Closed)
Patch Set: Rebase Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
index 18a86a632b57b0ae4029cf2cbe2ef04e69d48dce..ae5d8e41f19e34536c1bda4be73988007efa3e4e 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
@@ -50,7 +50,7 @@ struct SameSizeAsScrollableArea {
VerifyEagerFinalization verifyEager;
#endif
Member<void*> pointer[2];
- unsigned bitfields : 16;
+ unsigned bitfields : 17;
IntPoint origin;
};
@@ -78,7 +78,8 @@ ScrollableArea::ScrollableArea()
m_scrollOriginChanged(false),
m_horizontalScrollbarNeedsPaintInvalidation(false),
m_verticalScrollbarNeedsPaintInvalidation(false),
- m_scrollCornerNeedsPaintInvalidation(false) {}
+ m_scrollCornerNeedsPaintInvalidation(false),
+ m_scrollbarsHidden(false) {}
ScrollableArea::~ScrollableArea() {}
@@ -530,6 +531,17 @@ bool ScrollableArea::shouldScrollOnMainThread() const {
return true;
}
+bool ScrollableArea::scrollbarsHidden() const {
+ return hasOverlayScrollbars() && m_scrollbarsHidden;
+}
+
+void ScrollableArea::setScrollbarsHidden(bool hidden) {
+ if (m_scrollbarsHidden == static_cast<unsigned>(hidden))
+ return;
+ m_scrollbarsHidden = hidden;
+ didChangeScrollbarsHidden();
+}
+
IntRect ScrollableArea::visibleContentRect(
IncludeScrollbarsInRect scrollbarInclusion) const {
int scrollbarWidth =
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollableArea.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698