mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
-Temporarily add setting override width as well so that we correctly bypass in RenderBox::computeLogicalWidth. -Add setNeedsLayout so that the author code can force layouts (e.g. when the container's width changes). -Have setLayoutManager force a reattach of the element if it's renderer wasn't a custom layout one before. -Remove the laying out of children from RenderCustomLayout::layout. This is the job of the author code. -Add a test case. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1055263002
36 lines
780 B
C++
36 lines
780 B
C++
// Copyright 2015 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "sky/engine/config.h"
|
|
#include "sky/engine/core/rendering/RenderCustomLayout.h"
|
|
|
|
#include "sky/engine/core/rendering/RenderLayer.h"
|
|
#include "sky/engine/core/layout/LayoutCallback.h"
|
|
|
|
namespace blink {
|
|
|
|
RenderCustomLayout::RenderCustomLayout(ContainerNode* node)
|
|
: RenderBlock(node)
|
|
{
|
|
}
|
|
|
|
RenderCustomLayout::~RenderCustomLayout()
|
|
{
|
|
}
|
|
|
|
void RenderCustomLayout::layout()
|
|
{
|
|
ASSERT(node()->isElementNode());
|
|
toElement(node())->layoutManager()->handleEvent();
|
|
clearNeedsLayout();
|
|
}
|
|
|
|
const char* RenderCustomLayout::renderName() const
|
|
{
|
|
return "RenderCustomLayout";
|
|
}
|
|
|
|
} // namespace blink
|
|
|