flutter_flutter/engine/core/rendering/RenderCustomLayout.h
Ojan Vafai 6bfa21b190 Make custom layout actually work.
-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
2015-04-06 12:53:35 -07:00

26 lines
725 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.
#ifndef SKY_ENGINE_CORE_RENDERING_RENDERCUSTOMLAYOUT_H_
#define SKY_ENGINE_CORE_RENDERING_RENDERCUSTOMLAYOUT_H_
#include "sky/engine/core/rendering/RenderBlock.h"
namespace blink {
class RenderCustomLayout : public RenderBlock {
public:
explicit RenderCustomLayout(ContainerNode* node);
virtual void layout() override;
const char* renderName() const;
bool isRenderCustomLayout() const final { return true; }
protected:
virtual ~RenderCustomLayout();
};
} // namespace blink
#endif // SKY_ENGINE_CORE_RENDERING_RENDERCUSTOMLAYOUT_H_