| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |