| 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, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| 11 * | 11 * |
| 12 * This library is distributed in the hope that it will be useful, | 12 * This library is distributed in the hope that it will be useful, |
| 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 * Library General Public License for more details. | 15 * Library General Public License for more details. |
| 16 * | 16 * |
| 17 * You should have received a copy of the GNU Library General Public License | 17 * You should have received a copy of the GNU Library General Public License |
| 18 * along with this library; see the file COPYING.LIB. If not, write to | 18 * along with this library; see the file COPYING.LIB. If not, write to |
| 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 20 * Boston, MA 02110-1301, USA. | 20 * Boston, MA 02110-1301, USA. |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 #ifndef LayoutBlock_h | 23 #ifndef LayoutBlock_h |
| 24 #define LayoutBlock_h | 24 #define LayoutBlock_h |
| 25 | 25 |
| 26 #include "core/CoreExport.h" | 26 #include "core/CoreExport.h" |
| 27 #include "core/layout/ColumnInfo.h" | |
| 28 #include "core/layout/FloatingObjects.h" | 27 #include "core/layout/FloatingObjects.h" |
| 29 #include "core/layout/GapRects.h" | 28 #include "core/layout/GapRects.h" |
| 30 #include "core/layout/LayoutBox.h" | 29 #include "core/layout/LayoutBox.h" |
| 31 #include "core/layout/line/LineBoxList.h" | 30 #include "core/layout/line/LineBoxList.h" |
| 32 #include "core/layout/line/RootInlineBox.h" | 31 #include "core/layout/line/RootInlineBox.h" |
| 33 #include "core/style/ShapeValue.h" | 32 #include "core/style/ShapeValue.h" |
| 34 #include "platform/text/TextBreakIterator.h" | 33 #include "platform/text/TextBreakIterator.h" |
| 35 #include "wtf/ListHashSet.h" | 34 #include "wtf/ListHashSet.h" |
| 36 #include "wtf/OwnPtr.h" | 35 #include "wtf/OwnPtr.h" |
| 37 | 36 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 140 |
| 142 void markPositionedObjectsForLayout(); | 141 void markPositionedObjectsForLayout(); |
| 143 // FIXME: Do we really need this to be virtual? It's just so we can call thi
s on | 142 // FIXME: Do we really need this to be virtual? It's just so we can call thi
s on |
| 144 // LayoutBoxes without needed to check whether they're LayoutBlocks first. | 143 // LayoutBoxes without needed to check whether they're LayoutBlocks first. |
| 145 virtual void markForPaginationRelayoutIfNeeded(SubtreeLayoutScope&) override
final; | 144 virtual void markForPaginationRelayoutIfNeeded(SubtreeLayoutScope&) override
final; |
| 146 | 145 |
| 147 LayoutUnit textIndentOffset() const; | 146 LayoutUnit textIndentOffset() const; |
| 148 | 147 |
| 149 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; | 148 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; |
| 150 | 149 |
| 151 // Block flows subclass availableWidth to handle multi column layout (shrink
ing the width available to children when laying out.) | |
| 152 virtual LayoutUnit availableLogicalWidth() const override final; | |
| 153 | |
| 154 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; | |
| 155 void adjustStartEdgeForWritingModeIncludingColumns(LayoutRect&) const; | |
| 156 | |
| 157 LayoutUnit blockDirectionOffset(const LayoutSize& offsetFromBlock) const; | 150 LayoutUnit blockDirectionOffset(const LayoutSize& offsetFromBlock) const; |
| 158 LayoutUnit inlineDirectionOffset(const LayoutSize& offsetFromBlock) const; | 151 LayoutUnit inlineDirectionOffset(const LayoutSize& offsetFromBlock) const; |
| 159 | 152 |
| 160 LayoutBlock* blockBeforeWithinSelectionRoot(LayoutSize& offset) const; | 153 LayoutBlock* blockBeforeWithinSelectionRoot(LayoutSize& offset) const; |
| 161 | 154 |
| 162 virtual void setSelectionState(SelectionState) override; | 155 virtual void setSelectionState(SelectionState) override; |
| 163 | 156 |
| 164 LayoutRect logicalRectToPhysicalRect(const LayoutPoint& physicalPosition, co
nst LayoutRect& logicalRect) const; | 157 LayoutRect logicalRectToPhysicalRect(const LayoutPoint& physicalPosition, co
nst LayoutRect& logicalRect) const; |
| 165 | 158 |
| 166 // Helper methods for computing line counts and heights for line counts. | 159 // Helper methods for computing line counts and heights for line counts. |
| 167 RootInlineBox* lineAtIndex(int) const; | 160 RootInlineBox* lineAtIndex(int) const; |
| 168 int lineCount(const RootInlineBox* = 0, bool* = 0) const; | 161 int lineCount(const RootInlineBox* = 0, bool* = 0) const; |
| 169 int heightForLineCount(int); | 162 int heightForLineCount(int); |
| 170 void clearTruncation(); | 163 void clearTruncation(); |
| 171 | 164 |
| 172 void adjustRectForColumns(LayoutRect&) const; | |
| 173 virtual LayoutSize columnOffset(const LayoutPoint&) const override; | |
| 174 void adjustForColumnRect(LayoutSize& offset, const LayoutPoint& locationInCo
ntainer) const; | |
| 175 | |
| 176 void addContinuationWithOutline(LayoutInline*); | 165 void addContinuationWithOutline(LayoutInline*); |
| 177 | 166 |
| 178 virtual LayoutBoxModelObject* virtualContinuation() const override final { r
eturn continuation(); } | 167 virtual LayoutBoxModelObject* virtualContinuation() const override final { r
eturn continuation(); } |
| 179 bool isAnonymousBlockContinuation() const { return continuation() && isAnony
mousBlock(); } | 168 bool isAnonymousBlockContinuation() const { return continuation() && isAnony
mousBlock(); } |
| 180 LayoutInline* inlineElementContinuation() const; | 169 LayoutInline* inlineElementContinuation() const; |
| 181 LayoutBlock* blockElementContinuation() const; | 170 LayoutBlock* blockElementContinuation() const; |
| 182 | 171 |
| 183 using LayoutBoxModelObject::continuation; | 172 using LayoutBoxModelObject::continuation; |
| 184 using LayoutBoxModelObject::setContinuation; | 173 using LayoutBoxModelObject::setContinuation; |
| 185 | 174 |
| 186 static LayoutBlock* createAnonymousWithParentAndDisplay(const LayoutObject*,
EDisplay = BLOCK); | 175 static LayoutBlock* createAnonymousWithParentAndDisplay(const LayoutObject*,
EDisplay = BLOCK); |
| 187 static LayoutBlockFlow* createAnonymousColumnsWithParent(const LayoutObject*
); | 176 static LayoutBlockFlow* createAnonymousColumnsWithParent(const LayoutObject*
); |
| 188 static LayoutBlockFlow* createAnonymousColumnSpanWithParent(const LayoutObje
ct*); | 177 static LayoutBlockFlow* createAnonymousColumnSpanWithParent(const LayoutObje
ct*); |
| 189 LayoutBlock* createAnonymousBlock(EDisplay display = BLOCK) const { return c
reateAnonymousWithParentAndDisplay(this, display); } | 178 LayoutBlock* createAnonymousBlock(EDisplay display = BLOCK) const { return c
reateAnonymousWithParentAndDisplay(this, display); } |
| 190 LayoutBlockFlow* createAnonymousColumnsBlock() const { return createAnonymou
sColumnsWithParent(this); } | 179 LayoutBlockFlow* createAnonymousColumnsBlock() const { return createAnonymou
sColumnsWithParent(this); } |
| 191 LayoutBlockFlow* createAnonymousColumnSpanBlock() const { return createAnony
mousColumnSpanWithParent(this); } | 180 LayoutBlockFlow* createAnonymousColumnSpanBlock() const { return createAnony
mousColumnSpanWithParent(this); } |
| 192 | 181 |
| 193 virtual LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare
nt) const override; | 182 virtual LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare
nt) const override; |
| 194 | 183 |
| 195 ColumnInfo* columnInfo() const; | |
| 196 int columnGap() const; | 184 int columnGap() const; |
| 197 | 185 |
| 198 // These two functions take the ColumnInfo* to avoid repeated lookups of the
info in the global HashMap. | |
| 199 unsigned columnCount(ColumnInfo*) const; | |
| 200 LayoutRect columnRectAt(ColumnInfo*, unsigned) const; | |
| 201 | |
| 202 // Accessors for logical width/height and margins in the containing block's
block-flow direction. | 186 // Accessors for logical width/height and margins in the containing block's
block-flow direction. |
| 203 LayoutUnit logicalWidthForChild(const LayoutBox& child) const { return isHor
izontalWritingMode() ? child.size().width() : child.size().height(); } | 187 LayoutUnit logicalWidthForChild(const LayoutBox& child) const { return isHor
izontalWritingMode() ? child.size().width() : child.size().height(); } |
| 204 LayoutUnit logicalHeightForChild(const LayoutBox& child) const { return isHo
rizontalWritingMode() ? child.size().height() : child.size().width(); } | 188 LayoutUnit logicalHeightForChild(const LayoutBox& child) const { return isHo
rizontalWritingMode() ? child.size().height() : child.size().width(); } |
| 205 LayoutSize logicalSizeForChild(const LayoutBox& child) const { return isHori
zontalWritingMode() ? child.size() : child.size().transposedSize(); } | 189 LayoutSize logicalSizeForChild(const LayoutBox& child) const { return isHori
zontalWritingMode() ? child.size() : child.size().transposedSize(); } |
| 206 LayoutUnit logicalTopForChild(const LayoutBox& child) const { return isHoriz
ontalWritingMode() ? child.location().y() : child.location().x(); } | 190 LayoutUnit logicalTopForChild(const LayoutBox& child) const { return isHoriz
ontalWritingMode() ? child.location().y() : child.location().x(); } |
| 207 LayoutUnit marginBeforeForChild(const LayoutBoxModelObject& child) const { r
eturn child.marginBefore(style()); } | 191 LayoutUnit marginBeforeForChild(const LayoutBoxModelObject& child) const { r
eturn child.marginBefore(style()); } |
| 208 LayoutUnit marginAfterForChild(const LayoutBoxModelObject& child) const { re
turn child.marginAfter(style()); } | 192 LayoutUnit marginAfterForChild(const LayoutBoxModelObject& child) const { re
turn child.marginAfter(style()); } |
| 209 LayoutUnit marginStartForChild(const LayoutBoxModelObject& child) const { re
turn child.marginStart(style()); } | 193 LayoutUnit marginStartForChild(const LayoutBoxModelObject& child) const { re
turn child.marginStart(style()); } |
| 210 LayoutUnit marginEndForChild(const LayoutBoxModelObject& child) const { retu
rn child.marginEnd(style()); } | 194 LayoutUnit marginEndForChild(const LayoutBoxModelObject& child) const { retu
rn child.marginEnd(style()); } |
| 211 void setMarginStartForChild(LayoutBox& child, LayoutUnit value) const { chil
d.setMarginStart(value, style()); } | 195 void setMarginStartForChild(LayoutBox& child, LayoutUnit value) const { chil
d.setMarginStart(value, style()); } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 | 251 |
| 268 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Layo
utBlockFlow | 252 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Layo
utBlockFlow |
| 269 virtual void paintFloats(const PaintInfo&, const LayoutPoint&, bool) { } | 253 virtual void paintFloats(const PaintInfo&, const LayoutPoint&, bool) { } |
| 270 virtual void paintSelection(const PaintInfo&, const LayoutPoint&) { } | 254 virtual void paintSelection(const PaintInfo&, const LayoutPoint&) { } |
| 271 | 255 |
| 272 protected: | 256 protected: |
| 273 virtual void adjustInlineDirectionLineBounds(unsigned /* expansionOpportunit
yCount */, LayoutUnit& /* logicalLeft */, LayoutUnit& /* logicalWidth */) const
{ } | 257 virtual void adjustInlineDirectionLineBounds(unsigned /* expansionOpportunit
yCount */, LayoutUnit& /* logicalLeft */, LayoutUnit& /* logicalWidth */) const
{ } |
| 274 | 258 |
| 275 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const override; | 259 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const override; |
| 276 virtual void computePreferredLogicalWidths() override; | 260 virtual void computePreferredLogicalWidths() override; |
| 277 void adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalWidth, Lay
outUnit& maxLogicalWidth) const; | |
| 278 | 261 |
| 279 virtual int firstLineBoxBaseline() const override; | 262 virtual int firstLineBoxBaseline() const override; |
| 280 virtual int inlineBlockBaseline(LineDirectionMode) const override; | 263 virtual int inlineBlockBaseline(LineDirectionMode) const override; |
| 281 int lastLineBoxBaseline(LineDirectionMode) const; | 264 int lastLineBoxBaseline(LineDirectionMode) const; |
| 282 | 265 |
| 283 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) overrid
e; | 266 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) overrid
e; |
| 284 | 267 |
| 285 // Delay update scrollbar until finishDelayUpdateScrollInfo() will be | 268 // Delay update scrollbar until finishDelayUpdateScrollInfo() will be |
| 286 // called. This function is used when a flexbox is laying out its | 269 // called. This function is used when a flexbox is laying out its |
| 287 // descendant. If multiple calls are made to startDelayUpdateScrollInfo(), | 270 // descendant. If multiple calls are made to startDelayUpdateScrollInfo(), |
| 288 // finishDelayUpdateScrollInfo() will do nothing until finishDelayUpdateScro
llInfo() | 271 // finishDelayUpdateScrollInfo() will do nothing until finishDelayUpdateScro
llInfo() |
| 289 // is called the same number of times. | 272 // is called the same number of times. |
| 290 static void startDelayUpdateScrollInfo(); | 273 static void startDelayUpdateScrollInfo(); |
| 291 static void finishDelayUpdateScrollInfo(); | 274 static void finishDelayUpdateScrollInfo(); |
| 292 | 275 |
| 293 void updateScrollInfoAfterLayout(); | 276 void updateScrollInfoAfterLayout(); |
| 294 | 277 |
| 295 virtual void styleWillChange(StyleDifference, const ComputedStyle& newStyle)
override; | 278 virtual void styleWillChange(StyleDifference, const ComputedStyle& newStyle)
override; |
| 296 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle)
override; | 279 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle)
override; |
| 297 | 280 |
| 298 virtual bool hasLineIfEmpty() const; | 281 virtual bool hasLineIfEmpty() const; |
| 299 | 282 |
| 300 bool simplifiedLayout(); | 283 bool simplifiedLayout(); |
| 301 virtual void simplifiedNormalFlowLayout(); | 284 virtual void simplifiedNormalFlowLayout(); |
| 302 | 285 |
| 303 void setDesiredColumnCountAndWidth(int, LayoutUnit); | |
| 304 | |
| 305 public: | 286 public: |
| 306 virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool = false); | 287 virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool = false); |
| 307 protected: | 288 protected: |
| 308 virtual void addOverflowFromChildren(); | 289 virtual void addOverflowFromChildren(); |
| 309 void addOverflowFromPositionedObjects(); | 290 void addOverflowFromPositionedObjects(); |
| 310 void addOverflowFromBlockChildren(); | 291 void addOverflowFromBlockChildren(); |
| 311 void addVisualOverflowFromTheme(); | 292 void addVisualOverflowFromTheme(); |
| 312 | 293 |
| 313 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit
ionalOffset) const override; | 294 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit
ionalOffset) const override; |
| 314 | 295 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 330 |
| 350 void insertIntoTrackedLayoutBoxMaps(LayoutBox* descendant, TrackedDescendant
sMap*&, TrackedContainerMap*&); | 331 void insertIntoTrackedLayoutBoxMaps(LayoutBox* descendant, TrackedDescendant
sMap*&, TrackedContainerMap*&); |
| 351 static void removeFromTrackedLayoutBoxMaps(LayoutBox* descendant, TrackedDes
cendantsMap*&, TrackedContainerMap*&); | 332 static void removeFromTrackedLayoutBoxMaps(LayoutBox* descendant, TrackedDes
cendantsMap*&, TrackedContainerMap*&); |
| 352 | 333 |
| 353 Node* nodeForHitTest() const; | 334 Node* nodeForHitTest() const; |
| 354 | 335 |
| 355 bool tryLayoutDoingPositionedMovementOnly(); | 336 bool tryLayoutDoingPositionedMovementOnly(); |
| 356 | 337 |
| 357 virtual bool avoidsFloats() const override { return true; } | 338 virtual bool avoidsFloats() const override { return true; } |
| 358 | 339 |
| 359 bool hitTestColumns(HitTestResult&, const HitTestLocation& locationInContain
er, const LayoutPoint& accumulatedOffset, HitTestAction); | |
| 360 bool hitTestContents(HitTestResult&, const HitTestLocation& locationInContai
ner, const LayoutPoint& accumulatedOffset, HitTestAction); | 340 bool hitTestContents(HitTestResult&, const HitTestLocation& locationInContai
ner, const LayoutPoint& accumulatedOffset, HitTestAction); |
| 361 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Layo
utBlockFlow | 341 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Layo
utBlockFlow |
| 362 virtual bool hitTestFloats(HitTestResult&, const HitTestLocation&, const Lay
outPoint&) { return false; } | 342 virtual bool hitTestFloats(HitTestResult&, const HitTestLocation&, const Lay
outPoint&) { return false; } |
| 363 | 343 |
| 364 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc
ationInContainer, const LayoutPoint& accumulatedOffset); | 344 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc
ationInContainer, const LayoutPoint& accumulatedOffset); |
| 365 | 345 |
| 366 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU
nit& maxLogicalWidth) const; | 346 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU
nit& maxLogicalWidth) const; |
| 367 | 347 |
| 368 // Obtains the nearest enclosing block (including this block) that contribut
es a first-line style to our inline | 348 // Obtains the nearest enclosing block (including this block) that contribut
es a first-line style to our inline |
| 369 // children. | 349 // children. |
| 370 virtual LayoutBlock* firstLineBlock() const override; | 350 virtual LayoutBlock* firstLineBlock() const override; |
| 371 | 351 |
| 372 virtual LayoutRect rectWithOutlineForPaintInvalidation(const LayoutBoxModelO
bject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalidat
ionState* = 0) const override final; | 352 virtual LayoutRect rectWithOutlineForPaintInvalidation(const LayoutBoxModelO
bject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalidat
ionState* = 0) const override final; |
| 373 | 353 |
| 374 virtual LayoutObject* hoverAncestor() const override final; | 354 virtual LayoutObject* hoverAncestor() const override final; |
| 375 virtual void updateDragState(bool dragOn) override final; | 355 virtual void updateDragState(bool dragOn) override final; |
| 376 virtual void childBecameNonInline(LayoutObject* child) override final; | 356 virtual void childBecameNonInline(LayoutObject* child) override final; |
| 377 | 357 |
| 378 bool isSelectionRoot() const; | 358 bool isSelectionRoot() const; |
| 379 | 359 |
| 380 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO
ffset) const override; | 360 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO
ffset) const override; |
| 381 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const overrid
e; | 361 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const overrid
e; |
| 382 | 362 |
| 383 LayoutUnit desiredColumnWidth() const; | |
| 384 | |
| 385 private: | 363 private: |
| 386 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0) override final; | 364 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0) override final; |
| 387 bool isInlineBoxWrapperActuallyChild() const; | 365 bool isInlineBoxWrapperActuallyChild() const; |
| 388 | 366 |
| 389 void adjustPointToColumnContents(LayoutPoint&) const; | |
| 390 | |
| 391 void markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUnit logicalBot
tom, RootInlineBox* highest = 0); | 367 void markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUnit logicalBot
tom, RootInlineBox* highest = 0); |
| 392 | 368 |
| 393 Position positionForBox(InlineBox*, bool start = true) const; | 369 Position positionForBox(InlineBox*, bool start = true) const; |
| 394 PositionWithAffinity positionForPointWithInlineChildren(const LayoutPoint&); | 370 PositionWithAffinity positionForPointWithInlineChildren(const LayoutPoint&); |
| 395 | 371 |
| 396 void calcColumnWidth(); | |
| 397 void makeChildrenAnonymousColumnBlocks(LayoutObject* beforeChild, LayoutBloc
kFlow* newBlockBox, LayoutObject* newChild); | 372 void makeChildrenAnonymousColumnBlocks(LayoutObject* beforeChild, LayoutBloc
kFlow* newBlockBox, LayoutObject* newChild); |
| 398 | 373 |
| 399 void splitBlocks(LayoutBlock* fromBlock, LayoutBlock* toBlock, LayoutBlock*
middleBlock, | 374 void splitBlocks(LayoutBlock* fromBlock, LayoutBlock* toBlock, LayoutBlock*
middleBlock, |
| 400 LayoutObject* beforeChild, LayoutBoxModelObject* oldCont); | 375 LayoutObject* beforeChild, LayoutBoxModelObject* oldCont); |
| 401 void splitFlow(LayoutObject* beforeChild, LayoutBlock* newBlockBox, | 376 void splitFlow(LayoutObject* beforeChild, LayoutBlock* newBlockBox, |
| 402 LayoutObject* newChild, LayoutBoxModelObject* oldCont); | 377 LayoutObject* newChild, LayoutBoxModelObject* oldCont); |
| 403 LayoutBlock* clone() const; | 378 LayoutBlock* clone() const; |
| 404 LayoutBlock* continuationBefore(LayoutObject* beforeChild); | 379 LayoutBlock* continuationBefore(LayoutObject* beforeChild); |
| 405 LayoutBlockFlow* containingColumnsBlock(bool allowAnonymousColumnBlock = tru
e); | 380 LayoutBlockFlow* containingColumnsBlock(bool allowAnonymousColumnBlock = tru
e); |
| 406 LayoutBlockFlow* columnsBlockForSpanningElement(LayoutObject* newChild); | 381 LayoutBlockFlow* columnsBlockForSpanningElement(LayoutObject* newChild); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 432 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage); | 407 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage); |
| 433 | 408 |
| 434 // Update minimum page height required to avoid fragmentation where it shoul
dn't occur (inside | 409 // Update minimum page height required to avoid fragmentation where it shoul
dn't occur (inside |
| 435 // unbreakable content, between orphans and widows, etc.). This will be used
as a hint to the | 410 // unbreakable content, between orphans and widows, etc.). This will be used
as a hint to the |
| 436 // column balancer to help set a good minimum column height. | 411 // column balancer to help set a good minimum column height. |
| 437 void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight); | 412 void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight); |
| 438 | 413 |
| 439 // Adjust from painting offsets to the local coords of this layoutObject | 414 // Adjust from painting offsets to the local coords of this layoutObject |
| 440 void offsetForContents(LayoutPoint&) const; | 415 void offsetForContents(LayoutPoint&) const; |
| 441 | 416 |
| 442 bool requiresColumns(int desiredColumnCount) const; | |
| 443 | |
| 444 virtual bool updateLogicalWidthAndColumnWidth(); | 417 virtual bool updateLogicalWidthAndColumnWidth(); |
| 445 | 418 |
| 446 virtual bool canCollapseAnonymousBlockChild() const { return true; } | 419 virtual bool canCollapseAnonymousBlockChild() const { return true; } |
| 447 | 420 |
| 448 LayoutObjectChildList m_children; | 421 LayoutObjectChildList m_children; |
| 449 LineBoxList m_lineBoxes; // All of the root line boxes created for this bloc
k flow. For example, <div>Hello<br>world.</div> will have two total lines for t
he <div>. | 422 LineBoxList m_lineBoxes; // All of the root line boxes created for this bloc
k flow. For example, <div>Hello<br>world.</div> will have two total lines for t
he <div>. |
| 450 | 423 |
| 451 unsigned m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put
in LayoutBlockRareData since they are set too frequently. | 424 unsigned m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put
in LayoutBlockRareData since they are set too frequently. |
| 452 unsigned m_hasMarginAfterQuirk : 1; | 425 unsigned m_hasMarginAfterQuirk : 1; |
| 453 unsigned m_beingDestroyed : 1; | 426 unsigned m_beingDestroyed : 1; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 465 // FIXME: This is temporary as we move code that accesses block flow | 438 // FIXME: This is temporary as we move code that accesses block flow |
| 466 // member variables out of LayoutBlock and into LayoutBlockFlow. | 439 // member variables out of LayoutBlock and into LayoutBlockFlow. |
| 467 friend class LayoutBlockFlow; | 440 friend class LayoutBlockFlow; |
| 468 }; | 441 }; |
| 469 | 442 |
| 470 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); | 443 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); |
| 471 | 444 |
| 472 } // namespace blink | 445 } // namespace blink |
| 473 | 446 |
| 474 #endif // LayoutBlock_h | 447 #endif // LayoutBlock_h |
| OLD | NEW |