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

Side by Side Diff: Source/core/rendering/RenderView.h

Issue 162613007: Reduce the number of parameters to LayoutStateMaintainer by one (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 unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderVTTCue.cpp ('k') | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 unsigned m_renderCounterCount; 276 unsigned m_renderCounterCount;
277 }; 277 };
278 278
279 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); 279 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView());
280 280
281 // Stack-based class to assist with LayoutState push/pop 281 // Stack-based class to assist with LayoutState push/pop
282 class LayoutStateMaintainer { 282 class LayoutStateMaintainer {
283 WTF_MAKE_NONCOPYABLE(LayoutStateMaintainer); 283 WTF_MAKE_NONCOPYABLE(LayoutStateMaintainer);
284 public: 284 public:
285 // ctor to push now 285 // ctor to push now
286 LayoutStateMaintainer(RenderView* view, RenderBox* root, LayoutSize offset, bool disableState = false, LayoutUnit pageHeight = 0, bool pageHeightChanged = f alse, ColumnInfo* colInfo = 0) 286 LayoutStateMaintainer(RenderBox* root, LayoutSize offset, bool disableState = false, LayoutUnit pageHeight = 0, bool pageHeightChanged = false, ColumnInfo* colInfo = 0)
287 : m_view(view) 287 : m_view(root->view())
288 , m_disabled(disableState) 288 , m_disabled(disableState)
289 , m_didStart(false) 289 , m_didStart(false)
290 , m_didEnd(false) 290 , m_didEnd(false)
291 , m_didCreateLayoutState(false) 291 , m_didCreateLayoutState(false)
292 { 292 {
293 push(root, offset, pageHeight, pageHeightChanged, colInfo); 293 push(root, offset, pageHeight, pageHeightChanged, colInfo);
294 } 294 }
295 295
296 // ctor to maybe push later 296 // ctor to maybe push later
297 LayoutStateMaintainer(RenderView* view) 297 LayoutStateMaintainer(RenderBox* root)
298 : m_view(view) 298 : m_view(root->view())
299 , m_disabled(false) 299 , m_disabled(false)
300 , m_didStart(false) 300 , m_didStart(false)
301 , m_didEnd(false) 301 , m_didEnd(false)
302 , m_didCreateLayoutState(false) 302 , m_didCreateLayoutState(false)
303 { 303 {
304 } 304 }
305 305
306 ~LayoutStateMaintainer() 306 ~LayoutStateMaintainer()
307 { 307 {
308 ASSERT(m_didStart == m_didEnd); // if this fires, it means that someon e did a push(), but forgot to pop(). 308 ASSERT(m_didStart == m_didEnd); // if this fires, it means that someon e did a push(), but forgot to pop().
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 if (m_view) 357 if (m_view)
358 m_view->enableLayoutState(); 358 m_view->enableLayoutState();
359 } 359 }
360 private: 360 private:
361 RenderView* m_view; 361 RenderView* m_view;
362 }; 362 };
363 363
364 } // namespace WebCore 364 } // namespace WebCore
365 365
366 #endif // RenderView_h 366 #endif // RenderView_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderVTTCue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698