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

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

Issue 172753003: Consistently disable the LayoutState for certain layout situations (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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
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(RenderBox* root, LayoutSize offset, bool disableState = false, LayoutUnit pageHeight = 0, bool pageHeightChanged = false, ColumnInfo* colInfo = 0) 286 LayoutStateMaintainer(RenderBox* root, LayoutSize offset, LayoutUnit pageHei ght = 0, bool pageHeightChanged = false, ColumnInfo* colInfo = 0)
287 : m_view(root->view()) 287 : m_view(root->view())
288 , m_disabled(disableState) 288 , m_disabled(root->shouldDisableLayoutState())
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(RenderBox* root) 297 LayoutStateMaintainer(RenderBox* root)
298 : m_view(root->view()) 298 : m_view(root->view())
(...skipping 58 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

Powered by Google App Engine
This is Rietveld 408576698