| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 bool generatesLineBoxesForInlineChild(RenderObject*); | 104 bool generatesLineBoxesForInlineChild(RenderObject*); |
| 105 | 105 |
| 106 LayoutUnit startAlignedOffsetForLine(LayoutUnit position, bool shouldIndentT
ext); | 106 LayoutUnit startAlignedOffsetForLine(LayoutUnit position, bool shouldIndentT
ext); |
| 107 | 107 |
| 108 void setStaticInlinePositionForChild(RenderBox*, LayoutUnit inlinePosition); | 108 void setStaticInlinePositionForChild(RenderBox*, LayoutUnit inlinePosition); |
| 109 void updateStaticInlinePositionForChild(RenderBox*, LayoutUnit logicalTop); | 109 void updateStaticInlinePositionForChild(RenderBox*, LayoutUnit logicalTop); |
| 110 | 110 |
| 111 static bool shouldSkipCreatingRunsForObject(RenderObject* obj) | 111 static bool shouldSkipCreatingRunsForObject(RenderObject* obj) |
| 112 { | 112 { |
| 113 return obj->isFloating() || (obj->isOutOfFlowPositioned() && !obj->style
()->isOriginalDisplayInlineType() && !obj->container()->isRenderInline()); | 113 return obj->isOutOfFlowPositioned() && !obj->style()->isOriginalDisplayI
nlineType() && !obj->container()->isRenderInline(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void addOverflowFromInlineChildren(); | 116 void addOverflowFromInlineChildren(); |
| 117 | 117 |
| 118 // FIXME: This should be const to avoid a const_cast, but can modify child d
irty bits | 118 // FIXME: This should be const to avoid a const_cast, but can modify child d
irty bits |
| 119 void computeInlinePreferredLogicalWidths(LayoutUnit& minLogicalWidth, Layout
Unit& maxLogicalWidth); | 119 void computeInlinePreferredLogicalWidths(LayoutUnit& minLogicalWidth, Layout
Unit& maxLogicalWidth); |
| 120 | 120 |
| 121 GapRects inlineSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& root
BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 121 GapRects inlineSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& root
BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
| 122 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLeft, LayoutUnit& las
tLogicalRight, const PaintInfo*); | 122 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLeft, LayoutUnit& las
tLogicalRight, const PaintInfo*); |
| 123 | 123 |
| 124 virtual bool avoidsFloats() const override; | |
| 125 | |
| 126 protected: | 124 protected: |
| 127 void layoutInlineChildren(bool relayoutChildren, LayoutUnit& paintInvalidati
onLogicalTop, LayoutUnit& paintInvalidationLogicalBottom, LayoutUnit afterEdge); | 125 void layoutInlineChildren(bool relayoutChildren, LayoutUnit& paintInvalidati
onLogicalTop, LayoutUnit& paintInvalidationLogicalBottom, LayoutUnit afterEdge); |
| 128 | 126 |
| 129 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed
Offset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const | 127 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed
Offset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const |
| 130 { | 128 { |
| 131 return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(lo
gicalTop, fixedOffset, logicalHeight), applyTextIndent); | 129 return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(lo
gicalTop, fixedOffset, logicalHeight), applyTextIndent); |
| 132 } | 130 } |
| 133 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO
ffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const | 131 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO
ffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const |
| 134 { | 132 { |
| 135 return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logi
calTop, fixedOffset, logicalHeight), applyTextIndent); | 133 return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logi
calTop, fixedOffset, logicalHeight), applyTextIndent); |
| 136 } | 134 } |
| 137 | 135 |
| 138 virtual bool updateLogicalWidthAndColumnWidth() override; | 136 virtual bool updateLogicalWidthAndColumnWidth() override; |
| 139 | 137 |
| 140 void setLogicalLeftForChild(RenderBox* child, LayoutUnit logicalLeft); | |
| 141 void setLogicalTopForChild(RenderBox* child, LayoutUnit logicalTop); | |
| 142 void determineLogicalLeftPositionForChild(RenderBox* child); | 138 void determineLogicalLeftPositionForChild(RenderBox* child); |
| 143 | 139 |
| 144 private: | 140 private: |
| 145 void layoutBlockFlow(bool relayoutChildren, SubtreeLayoutScope&); | 141 void layoutBlockFlow(bool relayoutChildren, SubtreeLayoutScope&); |
| 146 void layoutBlockChildren(bool relayoutChildren, SubtreeLayoutScope&, LayoutU
nit beforeEdge, LayoutUnit afterEdge); | 142 void layoutBlockChildren(bool relayoutChildren, SubtreeLayoutScope&, LayoutU
nit beforeEdge, LayoutUnit afterEdge); |
| 147 | 143 |
| 148 void layoutBlockChild(RenderBox* child, MarginInfo&); | 144 void layoutBlockChild(RenderBox* child, MarginInfo&); |
| 149 void adjustPositionedBlock(RenderBox* child, const MarginInfo&); | 145 void adjustPositionedBlock(RenderBox* child, const MarginInfo&); |
| 150 | 146 |
| 151 virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitT
estLocation& locationInContainer, const LayoutPoint& accumulatedOffset) override
final; | 147 virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitT
estLocation& locationInContainer, const LayoutPoint& accumulatedOffset) override
final; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 | 326 |
| 331 // END METHODS DEFINED IN RenderBlockLineLayout | 327 // END METHODS DEFINED IN RenderBlockLineLayout |
| 332 | 328 |
| 333 }; | 329 }; |
| 334 | 330 |
| 335 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow()); | 331 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow()); |
| 336 | 332 |
| 337 } // namespace blink | 333 } // namespace blink |
| 338 | 334 |
| 339 #endif // RenderBlockFlow_h | 335 #endif // RenderBlockFlow_h |
| OLD | NEW |