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

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

Issue 177003021: Minor cosmetic cleanup in FrameView (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 406e38f0fbe3b8659b263fe7f3ed748bb9483600..2534e6fc33d18d44d6dfeb76c2e44997688ccb26 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -926,26 +926,25 @@ void FrameView::layout(bool allowSubtree)
ScrollbarMode currentHMode = horizontalScrollbarMode();
ScrollbarMode currentVMode = verticalScrollbarMode();
- if (m_firstLayout || (hMode != currentHMode || vMode != currentVMode)) {
- if (m_firstLayout) {
- setScrollbarsSuppressed(true);
-
- m_firstLayout = false;
- m_firstLayoutCallbackPending = true;
- m_lastViewportSize = layoutSize(IncludeScrollbars);
- m_lastZoomFactor = rootForThisLayout->style()->zoom();
-
- // Set the initial vMode to AlwaysOn if we're auto.
- if (vMode == ScrollbarAuto)
- setVerticalScrollbarMode(ScrollbarAlwaysOn); // This causes a vertical scrollbar to appear.
- // Set the initial hMode to AlwaysOff if we're auto.
- if (hMode == ScrollbarAuto)
- setHorizontalScrollbarMode(ScrollbarAlwaysOff); // This causes a horizontal scrollbar to disappear.
-
- setScrollbarModes(hMode, vMode);
- setScrollbarsSuppressed(false, true);
- } else
- setScrollbarModes(hMode, vMode);
+ if (m_firstLayout) {
+ setScrollbarsSuppressed(true);
+
+ m_firstLayout = false;
+ m_firstLayoutCallbackPending = true;
+ m_lastViewportSize = layoutSize(IncludeScrollbars);
+ m_lastZoomFactor = rootForThisLayout->style()->zoom();
+
+ // Set the initial vMode to AlwaysOn if we're auto.
+ if (vMode == ScrollbarAuto)
+ setVerticalScrollbarMode(ScrollbarAlwaysOn); // This causes a vertical scrollbar to appear.
+ // Set the initial hMode to AlwaysOff if we're auto.
+ if (hMode == ScrollbarAuto)
+ setHorizontalScrollbarMode(ScrollbarAlwaysOff); // This causes a horizontal scrollbar to disappear.
+
+ setScrollbarModes(hMode, vMode);
+ setScrollbarsSuppressed(false, true);
+ } else if (hMode != currentHMode || vMode != currentVMode) {
+ setScrollbarModes(hMode, vMode);
}
LayoutSize oldSize = m_size;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698