mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
In particular, move RenderParagraph-specific code from hitTestContents, paintContents, simplifiedNormalFlowLayout & addOverflowFromChildren. R=ojan@chromium.org Review URL: https://codereview.chromium.org/754493002
40 lines
1.1 KiB
C++
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_
|