| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 virtual LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, Layout
Unit position) override; | 99 virtual LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, Layout
Unit position) override; |
| 100 virtual LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, Layou
tUnit position) override; | 100 virtual LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, Layou
tUnit position) override; |
| 101 | 101 |
| 102 RootInlineBox* createAndAppendRootInlineBox(); | 102 RootInlineBox* createAndAppendRootInlineBox(); |
| 103 | 103 |
| 104 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0)
override; | 104 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0)
override; |
| 105 | 105 |
| 106 LayoutUnit startAlignedOffsetForLine(bool shouldIndentText); | 106 LayoutUnit startAlignedOffsetForLine(bool shouldIndentText); |
| 107 void updateLogicalWidthForAlignment(const ETextAlign&, const RootInlineBox*,
BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float&
availableLogicalWidth, unsigned expansionOpportunityCount); | 107 void updateLogicalWidthForAlignment(const ETextAlign&, const RootInlineBox*,
BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float&
availableLogicalWidth, unsigned expansionOpportunityCount); |
| 108 | 108 |
| 109 void setStaticInlinePositionForChild(RenderBox*, LayoutUnit inlinePosition); | |
| 110 void updateStaticInlinePositionForChild(RenderBox*); | |
| 111 | |
| 112 static bool shouldSkipCreatingRunsForObject(RenderObject* obj) | 109 static bool shouldSkipCreatingRunsForObject(RenderObject* obj) |
| 113 { | 110 { |
| 114 return obj->isOutOfFlowPositioned() && !obj->style()->isOriginalDisplayI
nlineType() && !obj->container()->isRenderInline(); | 111 return obj->isOutOfFlowPositioned() && !obj->style()->isOriginalDisplayI
nlineType() && !obj->container()->isRenderInline(); |
| 115 } | 112 } |
| 116 | 113 |
| 117 protected: | 114 protected: |
| 118 virtual void layoutChildren(bool relayoutChildren, SubtreeLayoutScope&, Layo
utUnit beforeEdge, LayoutUnit afterEdge); | 115 virtual void layoutChildren(bool relayoutChildren, SubtreeLayoutScope&, Layo
utUnit beforeEdge, LayoutUnit afterEdge); |
| 119 | 116 |
| 120 void determineLogicalLeftPositionForChild(RenderBox* child); | 117 void determineLogicalLeftPositionForChild(RenderBox* child); |
| 121 | 118 |
| 122 private: | 119 private: |
| 123 void layoutBlockFlow(SubtreeLayoutScope&); | 120 void layoutBlockFlow(SubtreeLayoutScope&); |
| 124 | |
| 125 void layoutBlockChild(RenderBox* child); | 121 void layoutBlockChild(RenderBox* child); |
| 126 void adjustPositionedBlock(RenderBox* child); | |
| 127 | 122 |
| 128 RootInlineBox* createRootInlineBox(); | 123 RootInlineBox* createRootInlineBox(); |
| 129 | 124 |
| 130 public: | 125 public: |
| 131 struct FloatWithRect { | 126 struct FloatWithRect { |
| 132 FloatWithRect(RenderBox* f) | 127 FloatWithRect(RenderBox* f) |
| 133 : object(f) | 128 : object(f) |
| 134 , rect(LayoutRect(f->x() - f->marginLeft(), f->y() - f->marginTop(),
f->width() + f->marginWidth(), f->height() + f->marginHeight())) | 129 , rect(LayoutRect(f->x() - f->marginLeft(), f->y() - f->marginTop(),
f->width() + f->marginWidth(), f->height() + f->marginHeight())) |
| 135 , everHadLayout(f->everHadLayout()) | 130 , everHadLayout(f->everHadLayout()) |
| 136 { | 131 { |
| 137 } | 132 } |
| 138 | 133 |
| 139 RenderBox* object; | 134 RenderBox* object; |
| 140 LayoutRect rect; | 135 LayoutRect rect; |
| 141 bool everHadLayout; | 136 bool everHadLayout; |
| 142 }; | 137 }; |
| 143 | 138 |
| 144 protected: | 139 protected: |
| 145 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 | 140 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 |
| 146 friend class LineBreaker; | 141 friend class LineBreaker; |
| 147 }; | 142 }; |
| 148 | 143 |
| 149 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow()); | 144 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow()); |
| 150 | 145 |
| 151 } // namespace blink | 146 } // namespace blink |
| 152 | 147 |
| 153 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBLOCKFLOW_H_ | 148 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBLOCKFLOW_H_ |
| OLD | NEW |