| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "sky/engine/config.h" |
| 6 #include "sky/engine/core/rendering/RenderCustomLayout.h" |
| 7 |
| 8 #include "sky/engine/core/rendering/RenderLayer.h" |
| 9 #include "sky/engine/core/layout/LayoutCallback.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 RenderCustomLayout::RenderCustomLayout(ContainerNode* node) |
| 14 : RenderBlock(node) |
| 15 { |
| 16 } |
| 17 |
| 18 RenderCustomLayout::~RenderCustomLayout() |
| 19 { |
| 20 } |
| 21 |
| 22 void RenderCustomLayout::layout() |
| 23 { |
| 24 // TODO(ojan): This should really be done by the author code, but |
| 25 // if the author code doesn't call layout, then we won't clear the |
| 26 // needsLayout bit and we'll assert. |
| 27 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBo
x()) { |
| 28 child->layoutIfNeeded(); |
| 29 } |
| 30 |
| 31 ASSERT(node()->isElementNode()); |
| 32 toElement(node())->layoutManager()->handleEvent(); |
| 33 clearNeedsLayout(); |
| 34 } |
| 35 |
| 36 const char* RenderCustomLayout::renderName() const |
| 37 { |
| 38 return "RenderCustomLayout"; |
| 39 } |
| 40 |
| 41 } // namespace blink |
| 42 |
| OLD | NEW |