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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2394163002: Fix performance regression and bug with hide_scrollbars setting. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index e2dd2aa4b213b6a509bff7794b8855602d7f1841..bd96f08d07e60c11154acaff753ba2cb3557824c 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -3451,9 +3451,6 @@ void FrameView::addChild(Widget* child) {
}
void FrameView::setHasHorizontalScrollbar(bool hasBar) {
- if (m_frame->settings() && m_frame->settings()->hideScrollbars())
- hasBar = false;
-
if (hasBar == !!m_horizontalScrollbar)
return;
@@ -3477,9 +3474,6 @@ void FrameView::setHasHorizontalScrollbar(bool hasBar) {
}
void FrameView::setHasVerticalScrollbar(bool hasBar) {
- if (m_frame->settings() && m_frame->settings()->hideScrollbars())
- hasBar = false;
-
if (hasBar == !!m_verticalScrollbar)
return;
@@ -3691,6 +3685,12 @@ void FrameView::computeScrollbarExistence(
bool& newHasVerticalScrollbar,
const IntSize& docSize,
ComputeScrollbarExistenceOption option) const {
+ if (m_frame->settings() && m_frame->settings()->hideScrollbars()) {
+ newHasHorizontalScrollbar = false;
+ newHasVerticalScrollbar = false;
+ return;
+ }
+
bool hasHorizontalScrollbar = m_horizontalScrollbar;
bool hasVerticalScrollbar = m_verticalScrollbar;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698