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

Side by Side Diff: sky/engine/core/rendering/RenderBoxModelObject.cpp

Issue 1070233002: Remove dead code around anonymous renderers. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 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 | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderObject.h » ('j') | 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 * (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 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 if (logicalHeightLength.isAuto()) 77 if (logicalHeightLength.isAuto())
78 return true; 78 return true;
79 79
80 // For percentage heights: The percentage is calculated with respect to the height of the generated box's 80 // For percentage heights: The percentage is calculated with respect to the height of the generated box's
81 // containing block. If the height of the containing block is not specified explicitly (i.e., it depends 81 // containing block. If the height of the containing block is not specified explicitly (i.e., it depends
82 // on content height), and this element is not absolutely positioned, the va lue computes to 'auto'. 82 // on content height), and this element is not absolutely positioned, the va lue computes to 'auto'.
83 // FIXME(sky): We might want to make height: 100% be sensible. 83 // FIXME(sky): We might want to make height: 100% be sensible.
84 if (!logicalHeightLength.isPercent() || isOutOfFlowPositioned()) 84 if (!logicalHeightLength.isPercent() || isOutOfFlowPositioned())
85 return false; 85 return false;
86 86
87 // Anonymous block boxes are ignored when resolving percentage values that w ould refer to it:
88 // the closest non-anonymous ancestor box is used instead.
89 RenderBlock* cb = containingBlock(); 87 RenderBlock* cb = containingBlock();
90 while (cb->isAnonymous())
91 cb = cb->containingBlock();
92 88
93 // Match RenderBox::availableLogicalHeightUsing by special casing 89 // Match RenderBox::availableLogicalHeightUsing by special casing
94 // the render view. The available height is taken from the frame. 90 // the render view. The available height is taken from the frame.
95 if (cb->isRenderView()) 91 if (cb->isRenderView())
96 return false; 92 return false;
97 93
98 if (cb->isOutOfFlowPositioned() && !cb->style()->logicalTop().isAuto() && !c b->style()->logicalBottom().isAuto()) 94 if (cb->isOutOfFlowPositioned() && !cb->style()->logicalTop().isAuto() && !c b->style()->logicalBottom().isAuto())
99 return false; 95 return false;
100 96
101 // If the height of the containing block computes to 'auto', then it hasn't been 'specified explicitly'. 97 // If the height of the containing block computes to 'auto', then it hasn't been 'specified explicitly'.
(...skipping 2292 matching lines...) Expand 10 before | Expand all | Expand 10 after
2394 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); 2390 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
2395 for (RenderObject* child = slowFirstChild(); child; ) { 2391 for (RenderObject* child = slowFirstChild(); child; ) {
2396 // Save our next sibling as moveChildTo will clear it. 2392 // Save our next sibling as moveChildTo will clear it.
2397 RenderObject* nextSibling = child->nextSibling(); 2393 RenderObject* nextSibling = child->nextSibling();
2398 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); 2394 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert);
2399 child = nextSibling; 2395 child = nextSibling;
2400 } 2396 }
2401 } 2397 }
2402 2398
2403 } // namespace blink 2399 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698