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

Side by Side Diff: Source/core/rendering/RenderBlock.h

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderBR.h ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 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.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 class RenderBlock : public RenderBox { 56 class RenderBlock : public RenderBox {
57 public: 57 public:
58 friend class LineLayoutState; 58 friend class LineLayoutState;
59 59
60 protected: 60 protected:
61 explicit RenderBlock(ContainerNode*); 61 explicit RenderBlock(ContainerNode*);
62 virtual ~RenderBlock(); 62 virtual ~RenderBlock();
63 63
64 public: 64 public:
65 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } 65 LayoutObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); }
66 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); r eturn children()->lastChild(); } 66 LayoutObject* lastChild() const { ASSERT(children() == virtualChildren()); r eturn children()->lastChild(); }
67 67
68 // If you have a RenderBlock, use firstChild or lastChild instead. 68 // If you have a RenderBlock, use firstChild or lastChild instead.
69 void slowFirstChild() const = delete; 69 void slowFirstChild() const = delete;
70 void slowLastChild() const = delete; 70 void slowLastChild() const = delete;
71 71
72 const RenderObjectChildList* children() const { return &m_children; } 72 const LayoutObjectChildList* children() const { return &m_children; }
73 RenderObjectChildList* children() { return &m_children; } 73 LayoutObjectChildList* children() { return &m_children; }
74 74
75 bool beingDestroyed() const { return m_beingDestroyed; } 75 bool beingDestroyed() const { return m_beingDestroyed; }
76 76
77 // These two functions are overridden for inline-block. 77 // These two functions are overridden for inline-block.
78 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const override final; 78 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const override final;
79 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const override; 79 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const override;
80 80
81 LayoutUnit minLineHeightForReplacedRenderer(bool isFirstLine, LayoutUnit rep lacedHeight) const; 81 LayoutUnit minLineHeightForReplacedRenderer(bool isFirstLine, LayoutUnit rep lacedHeight) const;
82 82
83 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; } 83 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; }
84 84
85 protected: 85 protected:
86 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } 86 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); }
87 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } 87 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); }
88 88
89 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir stLineBox()); } 89 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir stLineBox()); }
90 RootInlineBox* lastRootBox() const { return static_cast<RootInlineBox*>(last LineBox()); } 90 RootInlineBox* lastRootBox() const { return static_cast<RootInlineBox*>(last LineBox()); }
91 91
92 public: 92 public:
93 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow 93 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow
94 virtual void deleteLineBoxTree(); 94 virtual void deleteLineBoxTree();
95 95
96 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) override; 96 virtual void addChild(LayoutObject* newChild, LayoutObject* beforeChild = 0) override;
97 virtual void removeChild(RenderObject*) override; 97 virtual void removeChild(LayoutObject*) override;
98 98
99 virtual void layoutBlock(bool relayoutChildren); 99 virtual void layoutBlock(bool relayoutChildren);
100 100
101 void insertPositionedObject(RenderBox*); 101 void insertPositionedObject(RenderBox*);
102 static void removePositionedObject(RenderBox*); 102 static void removePositionedObject(RenderBox*);
103 void removePositionedObjects(RenderBlock*, ContainingBlockState = SameContai ningBlock); 103 void removePositionedObjects(RenderBlock*, ContainingBlockState = SameContai ningBlock);
104 104
105 TrackedRendererListHashSet* positionedObjects() const; 105 TrackedRendererListHashSet* positionedObjects() const;
106 bool hasPositionedObjects() const 106 bool hasPositionedObjects() const
107 { 107 {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 void addContinuationWithOutline(RenderInline*); 174 void addContinuationWithOutline(RenderInline*);
175 175
176 virtual RenderBoxModelObject* virtualContinuation() const override final { r eturn continuation(); } 176 virtual RenderBoxModelObject* virtualContinuation() const override final { r eturn continuation(); }
177 bool isAnonymousBlockContinuation() const { return continuation() && isAnony mousBlock(); } 177 bool isAnonymousBlockContinuation() const { return continuation() && isAnony mousBlock(); }
178 RenderInline* inlineElementContinuation() const; 178 RenderInline* inlineElementContinuation() const;
179 RenderBlock* blockElementContinuation() const; 179 RenderBlock* blockElementContinuation() const;
180 180
181 using RenderBoxModelObject::continuation; 181 using RenderBoxModelObject::continuation;
182 using RenderBoxModelObject::setContinuation; 182 using RenderBoxModelObject::setContinuation;
183 183
184 static RenderBlock* createAnonymousWithParentRendererAndDisplay(const Render Object*, EDisplay = BLOCK); 184 static RenderBlock* createAnonymousWithParentRendererAndDisplay(const Layout Object*, EDisplay = BLOCK);
185 static RenderBlockFlow* createAnonymousColumnsWithParentRenderer(const Rende rObject*); 185 static RenderBlockFlow* createAnonymousColumnsWithParentRenderer(const Layou tObject*);
186 static RenderBlockFlow* createAnonymousColumnSpanWithParentRenderer(const Re nderObject*); 186 static RenderBlockFlow* createAnonymousColumnSpanWithParentRenderer(const La youtObject*);
187 RenderBlock* createAnonymousBlock(EDisplay display = BLOCK) const { return c reateAnonymousWithParentRendererAndDisplay(this, display); } 187 RenderBlock* createAnonymousBlock(EDisplay display = BLOCK) const { return c reateAnonymousWithParentRendererAndDisplay(this, display); }
188 RenderBlockFlow* createAnonymousColumnsBlock() const { return createAnonymou sColumnsWithParentRenderer(this); } 188 RenderBlockFlow* createAnonymousColumnsBlock() const { return createAnonymou sColumnsWithParentRenderer(this); }
189 RenderBlockFlow* createAnonymousColumnSpanBlock() const { return createAnony mousColumnSpanWithParentRenderer(this); } 189 RenderBlockFlow* createAnonymousColumnSpanBlock() const { return createAnony mousColumnSpanWithParentRenderer(this); }
190 190
191 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* pare nt) const override; 191 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare nt) const override;
192 192
193 ColumnInfo* columnInfo() const; 193 ColumnInfo* columnInfo() const;
194 int columnGap() const; 194 int columnGap() const;
195 195
196 // These two functions take the ColumnInfo* to avoid repeated lookups of the info in the global HashMap. 196 // These two functions take the ColumnInfo* to avoid repeated lookups of the info in the global HashMap.
197 unsigned columnCount(ColumnInfo*) const; 197 unsigned columnCount(ColumnInfo*) const;
198 LayoutRect columnRectAt(ColumnInfo*, unsigned) const; 198 LayoutRect columnRectAt(ColumnInfo*, unsigned) const;
199 199
200 // The page logical offset is the object's offset from the top of the page i n the page progression 200 // The page logical offset is the object's offset from the top of the page i n the page progression
201 // direction (so an x-offset in vertical text and a y-offset for horizontal text). 201 // direction (so an x-offset in vertical text and a y-offset for horizontal text).
(...skipping 27 matching lines...) Expand all
229 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC ontent(); } 229 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC ontent(); }
230 230
231 virtual LayoutUnit logicalLeftSelectionOffset(const RenderBlock* rootBlock, LayoutUnit position) const; 231 virtual LayoutUnit logicalLeftSelectionOffset(const RenderBlock* rootBlock, LayoutUnit position) const;
232 virtual LayoutUnit logicalRightSelectionOffset(const RenderBlock* rootBlock, LayoutUnit position) const; 232 virtual LayoutUnit logicalRightSelectionOffset(const RenderBlock* rootBlock, LayoutUnit position) const;
233 233
234 #if ENABLE(ASSERT) 234 #if ENABLE(ASSERT)
235 void checkPositionedObjectsNeedLayout(); 235 void checkPositionedObjectsNeedLayout();
236 bool paintsContinuationOutline(RenderInline* flow); 236 bool paintsContinuationOutline(RenderInline* flow);
237 #endif 237 #endif
238 #ifndef NDEBUG 238 #ifndef NDEBUG
239 void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const Inline Box* = 0, const char* = 0, const RenderObject* = 0) const; 239 void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const Inline Box* = 0, const char* = 0, const LayoutObject* = 0) const;
240 #endif 240 #endif
241 241
242 bool recalcChildOverflowAfterStyleChange(); 242 bool recalcChildOverflowAfterStyleChange();
243 bool recalcOverflowAfterStyleChange(); 243 bool recalcOverflowAfterStyleChange();
244 244
245 protected: 245 protected:
246 virtual void willBeDestroyed() override; 246 virtual void willBeDestroyed() override;
247 247
248 void dirtyForLayoutFromPercentageHeightDescendants(SubtreeLayoutScope&); 248 void dirtyForLayoutFromPercentageHeightDescendants(SubtreeLayoutScope&);
249 249
250 virtual void layout() override; 250 virtual void layout() override;
251 virtual bool updateImageLoadingPriorities() override final; 251 virtual bool updateImageLoadingPriorities() override final;
252 252
253 enum PositionedLayoutBehavior { 253 enum PositionedLayoutBehavior {
254 DefaultLayout, 254 DefaultLayout,
255 LayoutOnlyFixedPositionedObjects, 255 LayoutOnlyFixedPositionedObjects,
256 ForcedLayoutAfterContainingBlockMoved 256 ForcedLayoutAfterContainingBlockMoved
257 }; 257 };
258 258
259 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior = DefaultLayout); 259 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior = DefaultLayout);
260 void markFixedPositionObjectForLayoutIfNeeded(RenderObject* child, SubtreeLa youtScope&); 260 void markFixedPositionObjectForLayoutIfNeeded(LayoutObject* child, SubtreeLa youtScope&);
261 261
262 LayoutUnit marginIntrinsicLogicalWidthForChild(RenderBox& child) const; 262 LayoutUnit marginIntrinsicLogicalWidthForChild(RenderBox& child) const;
263 263
264 int beforeMarginInLineDirection(LineDirectionMode) const; 264 int beforeMarginInLineDirection(LineDirectionMode) const;
265 265
266 virtual void paint(const PaintInfo&, const LayoutPoint&) override; 266 virtual void paint(const PaintInfo&, const LayoutPoint&) override;
267 public: 267 public:
268 virtual void paintObject(const PaintInfo&, const LayoutPoint&) override; 268 virtual void paintObject(const PaintInfo&, const LayoutPoint&) override;
269 virtual void paintChildren(const PaintInfo&, const LayoutPoint&); 269 virtual void paintChildren(const PaintInfo&, const LayoutPoint&);
270 270
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const override; 318 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const override;
319 319
320 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox& ); 320 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox& );
321 321
322 virtual bool isInlineBlockOrInlineTable() const override final { return isIn line() && isReplaced(); } 322 virtual bool isInlineBlockOrInlineTable() const override final { return isIn line() && isReplaced(); }
323 323
324 virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPaintInvalidationState) override; 324 virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPaintInvalidationState) override;
325 325
326 private: 326 private:
327 virtual RenderObjectChildList* virtualChildren() override final { return chi ldren(); } 327 virtual LayoutObjectChildList* virtualChildren() override final { return chi ldren(); }
328 virtual const RenderObjectChildList* virtualChildren() const override final { return children(); } 328 virtual const LayoutObjectChildList* virtualChildren() const override final { return children(); }
329 329
330 virtual const char* renderName() const override; 330 virtual const char* renderName() const override;
331 331
332 virtual bool isRenderBlock() const override final { return true; } 332 virtual bool isRenderBlock() const override final { return true; }
333 333
334 void makeChildrenNonInline(RenderObject* insertionPoint = 0); 334 void makeChildrenNonInline(LayoutObject* insertionPoint = 0);
335 virtual void removeLeftoverAnonymousBlock(RenderBlock* child); 335 virtual void removeLeftoverAnonymousBlock(RenderBlock* child);
336 336
337 static void collapseAnonymousBlockChild(RenderBlock* parent, RenderBlock* ch ild); 337 static void collapseAnonymousBlockChild(RenderBlock* parent, RenderBlock* ch ild);
338 338
339 virtual void dirtyLinesFromChangedChild(RenderObject* child) override final { m_lineBoxes.dirtyLinesFromChangedChild(this, child); } 339 virtual void dirtyLinesFromChangedChild(LayoutObject* child) override final { m_lineBoxes.dirtyLinesFromChangedChild(this, child); }
340 340
341 void addChildToContinuation(RenderObject* newChild, RenderObject* beforeChil d); 341 void addChildToContinuation(LayoutObject* newChild, LayoutObject* beforeChil d);
342 virtual void addChildIgnoringContinuation(RenderObject* newChild, RenderObje ct* beforeChild) override; 342 virtual void addChildIgnoringContinuation(LayoutObject* newChild, LayoutObje ct* beforeChild) override;
343 void addChildToAnonymousColumnBlocks(RenderObject* newChild, RenderObject* b eforeChild); 343 void addChildToAnonymousColumnBlocks(LayoutObject* newChild, LayoutObject* b eforeChild);
344 344
345 void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObj ect* beforeChild = 0); 345 void addChildIgnoringAnonymousColumnBlocks(LayoutObject* newChild, LayoutObj ect* beforeChild = 0);
346 346
347 virtual bool isSelfCollapsingBlock() const override; 347 virtual bool isSelfCollapsingBlock() const override;
348 348
349 void removeAnonymousWrappersIfRequired(); 349 void removeAnonymousWrappersIfRequired();
350 350
351 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants Map*&, TrackedContainerMap*&); 351 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants Map*&, TrackedContainerMap*&);
352 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc endantsMap*&, TrackedContainerMap*&); 352 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc endantsMap*&, TrackedContainerMap*&);
353 353
354 Node* nodeForHitTest() const; 354 Node* nodeForHitTest() const;
355 355
356 bool tryLayoutDoingPositionedMovementOnly(); 356 bool tryLayoutDoingPositionedMovementOnly();
357 357
358 virtual bool avoidsFloats() const override { return true; } 358 virtual bool avoidsFloats() const override { return true; }
359 359
360 bool hitTestColumns(const HitTestRequest&, HitTestResult&, const HitTestLoca tion& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction); 360 bool hitTestColumns(const HitTestRequest&, HitTestResult&, const HitTestLoca tion& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
361 bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLoc ation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) ; 361 bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLoc ation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) ;
362 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow 362 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow
363 virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitT estLocation&, const LayoutPoint&) { return false; } 363 virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitT estLocation&, const LayoutPoint&) { return false; }
364 364
365 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc ationInContainer, const LayoutPoint& accumulatedOffset); 365 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc ationInContainer, const LayoutPoint& accumulatedOffset);
366 366
367 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const; 367 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const;
368 368
369 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline 369 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline
370 // children. 370 // children.
371 virtual RenderBlock* firstLineBlock() const override; 371 virtual RenderBlock* firstLineBlock() const override;
372 372
373 virtual LayoutRect rectWithOutlineForPaintInvalidation(const LayoutLayerMode lObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalid ationState* = 0) const override final; 373 virtual LayoutRect rectWithOutlineForPaintInvalidation(const LayoutLayerMode lObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalid ationState* = 0) const override final;
374 374
375 virtual RenderObject* hoverAncestor() const override final; 375 virtual LayoutObject* hoverAncestor() const override final;
376 virtual void updateDragState(bool dragOn) override final; 376 virtual void updateDragState(bool dragOn) override final;
377 virtual void childBecameNonInline(RenderObject* child) override final; 377 virtual void childBecameNonInline(LayoutObject* child) override final;
378 378
379 bool isSelectionRoot() const; 379 bool isSelectionRoot() const;
380 380
381 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow 381 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow
382 virtual void clipOutFloatingObjects(const RenderBlock*, const PaintInfo*, co nst LayoutPoint&, const LayoutSize&) const { }; 382 virtual void clipOutFloatingObjects(const RenderBlock*, const PaintInfo*, co nst LayoutPoint&, const LayoutSize&) const { };
383 383
384 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const override; 384 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const override;
385 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const overrid e; 385 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const overrid e;
386 386
387 LayoutUnit desiredColumnWidth() const; 387 LayoutUnit desiredColumnWidth() const;
388 388
389 private: 389 private:
390 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e xtraWidthToEndOfLine = 0) override final; 390 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e xtraWidthToEndOfLine = 0) override final;
391 bool isInlineBoxWrapperActuallyChild() const; 391 bool isInlineBoxWrapperActuallyChild() const;
392 392
393 void adjustPointToColumnContents(LayoutPoint&) const; 393 void adjustPointToColumnContents(LayoutPoint&) const;
394 394
395 void markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUnit logicalBot tom, RootInlineBox* highest = 0); 395 void markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUnit logicalBot tom, RootInlineBox* highest = 0);
396 396
397 Position positionForBox(InlineBox*, bool start = true) const; 397 Position positionForBox(InlineBox*, bool start = true) const;
398 PositionWithAffinity positionForPointWithInlineChildren(const LayoutPoint&); 398 PositionWithAffinity positionForPointWithInlineChildren(const LayoutPoint&);
399 399
400 void calcColumnWidth(); 400 void calcColumnWidth();
401 void makeChildrenAnonymousColumnBlocks(RenderObject* beforeChild, RenderBloc kFlow* newBlockBox, RenderObject* newChild); 401 void makeChildrenAnonymousColumnBlocks(LayoutObject* beforeChild, RenderBloc kFlow* newBlockBox, LayoutObject* newChild);
402 402
403 void splitBlocks(RenderBlock* fromBlock, RenderBlock* toBlock, RenderBlock* middleBlock, 403 void splitBlocks(RenderBlock* fromBlock, RenderBlock* toBlock, RenderBlock* middleBlock,
404 RenderObject* beforeChild, RenderBoxModelObject* oldCont); 404 LayoutObject* beforeChild, RenderBoxModelObject* oldCont);
405 void splitFlow(RenderObject* beforeChild, RenderBlock* newBlockBox, 405 void splitFlow(LayoutObject* beforeChild, RenderBlock* newBlockBox,
406 RenderObject* newChild, RenderBoxModelObject* oldCont); 406 LayoutObject* newChild, RenderBoxModelObject* oldCont);
407 RenderBlock* clone() const; 407 RenderBlock* clone() const;
408 RenderBlock* continuationBefore(RenderObject* beforeChild); 408 RenderBlock* continuationBefore(LayoutObject* beforeChild);
409 RenderBlockFlow* containingColumnsBlock(bool allowAnonymousColumnBlock = tru e); 409 RenderBlockFlow* containingColumnsBlock(bool allowAnonymousColumnBlock = tru e);
410 RenderBlockFlow* columnsBlockForSpanningElement(RenderObject* newChild); 410 RenderBlockFlow* columnsBlockForSpanningElement(LayoutObject* newChild);
411 411
412 // End helper functions and structs used by layoutBlockChildren. 412 // End helper functions and structs used by layoutBlockChildren.
413 413
414 void removeFromGlobalMaps(); 414 void removeFromGlobalMaps();
415 bool widthAvailableToChildrenHasChanged(); 415 bool widthAvailableToChildrenHasChanged();
416 416
417 protected: 417 protected:
418 // Returns the logicalOffset at the top of the next page. If the offset pass ed in is already at the top of the current page, 418 // Returns the logicalOffset at the top of the next page. If the offset pass ed in is already at the top of the current page,
419 // then nextPageLogicalTop with ExcludePageBoundary will still move to the t op of the next page. nextPageLogicalTop with 419 // then nextPageLogicalTop with ExcludePageBoundary will still move to the t op of the next page. nextPageLogicalTop with
420 // IncludePageBoundary set will not. 420 // IncludePageBoundary set will not.
(...skipping 23 matching lines...) Expand all
444 bool requiresColumns(int desiredColumnCount) const; 444 bool requiresColumns(int desiredColumnCount) const;
445 445
446 virtual bool updateLogicalWidthAndColumnWidth(); 446 virtual bool updateLogicalWidthAndColumnWidth();
447 447
448 virtual bool canCollapseAnonymousBlockChild() const { return true; } 448 virtual bool canCollapseAnonymousBlockChild() const { return true; }
449 449
450 public: 450 public:
451 virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const override final; 451 virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const override final;
452 452
453 protected: 453 protected:
454 RenderObjectChildList m_children; 454 LayoutObjectChildList m_children;
455 RenderLineBoxList m_lineBoxes; // All of the root line boxes created for t his block flow. For example, <div>Hello<br>world.</div> will have two total lin es for the <div>. 455 RenderLineBoxList m_lineBoxes; // All of the root line boxes created for t his block flow. For example, <div>Hello<br>world.</div> will have two total lin es for the <div>.
456 456
457 LayoutUnit m_pageLogicalOffset; 457 LayoutUnit m_pageLogicalOffset;
458 458
459 unsigned m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put in RenderBlockRareData since they are set too frequently. 459 unsigned m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put in RenderBlockRareData since they are set too frequently.
460 unsigned m_hasMarginAfterQuirk : 1; 460 unsigned m_hasMarginAfterQuirk : 1;
461 unsigned m_beingDestroyed : 1; 461 unsigned m_beingDestroyed : 1;
462 unsigned m_hasMarkupTruncation : 1; 462 unsigned m_hasMarkupTruncation : 1;
463 unsigned m_widthAvailableToChildrenChanged : 1; 463 unsigned m_widthAvailableToChildrenChanged : 1;
464 mutable unsigned m_hasOnlySelfCollapsingChildren : 1; 464 mutable unsigned m_hasOnlySelfCollapsingChildren : 1;
465 mutable unsigned m_descendantsWithFloatsMarkedForLayout : 1; 465 mutable unsigned m_descendantsWithFloatsMarkedForLayout : 1;
466 466
467 // LayoutRubyBase objects need to be able to split and merge, moving their c hildren around 467 // LayoutRubyBase objects need to be able to split and merge, moving their c hildren around
468 // (calling moveChildTo, moveAllChildrenTo, and makeChildrenNonInline). 468 // (calling moveChildTo, moveAllChildrenTo, and makeChildrenNonInline).
469 friend class LayoutRubyBase; 469 friend class LayoutRubyBase;
470 // FIXME-BLOCKFLOW: Remove this when the line layout stuff has all moved out of RenderBlock 470 // FIXME-BLOCKFLOW: Remove this when the line layout stuff has all moved out of RenderBlock
471 friend class LineBreaker; 471 friend class LineBreaker;
472 472
473 // FIXME: This is temporary as we move code that accesses block flow 473 // FIXME: This is temporary as we move code that accesses block flow
474 // member variables out of RenderBlock and into RenderBlockFlow. 474 // member variables out of RenderBlock and into RenderBlockFlow.
475 friend class RenderBlockFlow; 475 friend class RenderBlockFlow;
476 }; 476 };
477 477
478 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); 478 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock());
479 479
480 } // namespace blink 480 } // namespace blink
481 481
482 #endif // RenderBlock_h 482 #endif // RenderBlock_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBR.h ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698