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

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: It's the ToT as you can see 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 4368 matching lines...) Expand 10 before | Expand all | Expand 10 after
4696 return 0; 4695 return 0;
4697 4696
4698 if (!layoutState && !flowThreadContainingBlock()) 4697 if (!layoutState && !flowThreadContainingBlock())
4699 return 0; 4698 return 0;
4700 4699
4701 RenderBlock* containerBlock = containingBlock(); 4700 RenderBlock* containerBlock = containingBlock();
4702 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4701 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4703 } 4702 }
4704 4703
4705 } // namespace WebCore 4704 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698