Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Side by Side Diff: sky/engine/core/rendering/RenderBlockFlow.h

Issue 876663003: Remove layoutBlock. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003-2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2003-2013 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * Copyright (C) 2013 Google Inc. All rights reserved. 7 * Copyright (C) 2013 Google Inc. All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are 10 * modification, are permitted provided that the following conditions are
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 class RenderBlockFlow : public RenderBlock { 49 class RenderBlockFlow : public RenderBlock {
50 public: 50 public:
51 explicit RenderBlockFlow(ContainerNode*); 51 explicit RenderBlockFlow(ContainerNode*);
52 virtual ~RenderBlockFlow(); 52 virtual ~RenderBlockFlow();
53 53
54 static RenderBlockFlow* createAnonymous(Document*); 54 static RenderBlockFlow* createAnonymous(Document*);
55 55
56 virtual bool isRenderBlockFlow() const override final { return true; } 56 virtual bool isRenderBlockFlow() const override final { return true; }
57 57
58 virtual void layoutBlock(bool relayoutChildren) override; 58 void layout() override;
59 59
60 virtual void deleteLineBoxTree() override final; 60 virtual void deleteLineBoxTree() override final;
61 61
62 LayoutUnit availableLogicalWidthForLine(bool shouldIndentText) const 62 LayoutUnit availableLogicalWidthForLine(bool shouldIndentText) const
63 { 63 {
64 return max<LayoutUnit>(0, logicalRightOffsetForLine(shouldIndentText) - logicalLeftOffsetForLine(shouldIndentText)); 64 return max<LayoutUnit>(0, logicalRightOffsetForLine(shouldIndentText) - logicalLeftOffsetForLine(shouldIndentText));
65 } 65 }
66 LayoutUnit logicalRightOffsetForLine(bool shouldIndentText) const 66 LayoutUnit logicalRightOffsetForLine(bool shouldIndentText) const
67 { 67 {
68 LayoutUnit right = logicalRightOffsetForContent(); 68 LayoutUnit right = logicalRightOffsetForContent();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 115 }
116 116
117 protected: 117 protected:
118 virtual void layoutChildren(bool relayoutChildren, SubtreeLayoutScope&, Layo utUnit beforeEdge, LayoutUnit afterEdge); 118 virtual void layoutChildren(bool relayoutChildren, SubtreeLayoutScope&, Layo utUnit beforeEdge, LayoutUnit afterEdge);
119 119
120 virtual bool updateLogicalWidthAndColumnWidth() override; 120 virtual bool updateLogicalWidthAndColumnWidth() override;
121 121
122 void determineLogicalLeftPositionForChild(RenderBox* child); 122 void determineLogicalLeftPositionForChild(RenderBox* child);
123 123
124 private: 124 private:
125 void layoutBlockFlow(bool relayoutChildren, SubtreeLayoutScope&); 125 void layoutBlockFlow(SubtreeLayoutScope&);
126 126
127 void layoutBlockChild(RenderBox* child); 127 void layoutBlockChild(RenderBox* child);
128 void adjustPositionedBlock(RenderBox* child); 128 void adjustPositionedBlock(RenderBox* child);
129 129
130 RootInlineBox* createRootInlineBox(); 130 RootInlineBox* createRootInlineBox();
131 131
132 public: 132 public:
133 struct FloatWithRect { 133 struct FloatWithRect {
134 FloatWithRect(RenderBox* f) 134 FloatWithRect(RenderBox* f)
135 : object(f) 135 : object(f)
(...skipping 10 matching lines...) Expand all
146 protected: 146 protected:
147 friend class BreakingContext; // FIXME: It uses insertFloatingObject and pos itionNewFloatOnLine, if we move those out from the private scope/add a helper to LineBreaker, we can remove this friend 147 friend class BreakingContext; // FIXME: It uses insertFloatingObject and pos itionNewFloatOnLine, if we move those out from the private scope/add a helper to LineBreaker, we can remove this friend
148 friend class LineBreaker; 148 friend class LineBreaker;
149 }; 149 };
150 150
151 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow()); 151 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow());
152 152
153 } // namespace blink 153 } // namespace blink
154 154
155 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBLOCKFLOW_H_ 155 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBLOCKFLOW_H_
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBlock.cpp ('k') | sky/engine/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698