flutter_flutter/engine/core/rendering/RenderParagraph.h
Rafael Weinstein 9e43ce3605 Start splitting RenderParagraph logic out of RenderBlock.
In particular, move RenderParagraph-specific code from
hitTestContents, paintContents, simplifiedNormalFlowLayout & addOverflowFromChildren.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/754493002
2014-11-26 11:15:01 -08:00

40 lines
1.1 KiB
C++

// Copyright 2014 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_RENDERPARAGRAPH_H_
#define SKY_ENGINE_CORE_RENDERING_RENDERPARAGRAPH_H_
#include "sky/engine/core/dom/ContainerNode.h"
#include "sky/engine/core/rendering/RenderBlockFlow.h"
namespace blink {
class ContainerNode;
class RenderParagraph final : public RenderBlockFlow {
public:
explicit RenderParagraph(ContainerNode*);
virtual ~RenderParagraph();
static RenderParagraph* createAnonymous(Document&);
bool isRenderParagraph() const override { return true; }
protected:
void addOverflowFromChildren() final;
void simplifiedNormalFlowLayout() final;
void paintContents(PaintInfo&, const LayoutPoint&) final;
bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) final;
};
DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderParagraph, isRenderParagraph());
} // namespace blink
#endif // SKY_ENGINE_CORE_RENDERING_RENDERPARAGRAPH_H_