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

Side by Side Diff: Source/core/rendering/RenderBox.cpp

Issue 196533012: Make LayoutState always be RAII (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix FlexBox LayoutState scoping Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 clearNeedsLayout(); 307 clearNeedsLayout();
308 return; 308 return;
309 } 309 }
310 310
311 LayoutStateMaintainer statePusher(*this, locationOffset()); 311 LayoutStateMaintainer statePusher(*this, locationOffset());
312 while (child) { 312 while (child) {
313 child->layoutIfNeeded(); 313 child->layoutIfNeeded();
314 ASSERT(!child->needsLayout()); 314 ASSERT(!child->needsLayout());
315 child = child->nextSibling(); 315 child = child->nextSibling();
316 } 316 }
317 statePusher.pop();
318 invalidateBackgroundObscurationStatus(); 317 invalidateBackgroundObscurationStatus();
319 clearNeedsLayout(); 318 clearNeedsLayout();
320 } 319 }
321 320
322 // More IE extensions. clientWidth and clientHeight represent the interior of a n object 321 // More IE extensions. clientWidth and clientHeight represent the interior of a n object
323 // excluding border and scrollbar. 322 // excluding border and scrollbar.
324 LayoutUnit RenderBox::clientWidth() const 323 LayoutUnit RenderBox::clientWidth() const
325 { 324 {
326 return width() - borderLeft() - borderRight() - verticalScrollbarWidth(); 325 return width() - borderLeft() - borderRight() - verticalScrollbarWidth();
327 } 326 }
(...skipping 4377 matching lines...) Expand 10 before | Expand all | Expand 10 after
4705 return 0; 4704 return 0;
4706 4705
4707 if (!layoutState && !flowThreadContainingBlock()) 4706 if (!layoutState && !flowThreadContainingBlock())
4708 return 0; 4707 return 0;
4709 4708
4710 RenderBlock* containerBlock = containingBlock(); 4709 RenderBlock* containerBlock = containingBlock();
4711 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4710 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4712 } 4711 }
4713 4712
4714 } // namespace WebCore 4713 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698