Changeset 117759 in webkit
- Timestamp:
- May 21, 2012, 3:48:40 AM (14 years ago)
- Location:
- releases/WebKitGTK/webkit-1.8/Source/WebCore
- Files:
-
- 9 edited
-
ChangeLog (modified) (1 diff)
-
rendering/RenderBlock.cpp (modified) (2 diffs)
-
rendering/RenderBlock.h (modified) (1 diff)
-
rendering/RenderBox.h (modified) (1 diff)
-
rendering/RenderInline.cpp (modified) (1 diff)
-
rendering/RenderTable.h (modified) (1 diff)
-
rendering/RenderTableCell.h (modified) (1 diff)
-
rendering/RenderTableRow.h (modified) (1 diff)
-
rendering/RenderTableSection.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog
r117758 r117759 1 2012-04-06 Abhishek Arya <inferno@chromium.org> 2 3 Virtualize createAnonymousBoxWithSameTypeAs. 4 https://bugs.webkit.org/show_bug.cgi?id=83229 5 6 Reviewed by Julien Chaffraix. 7 8 This helps to use the same function to create anonymous 9 table parts and in the future extend to more classes 10 derived from RenderBox. 11 12 The current switch case situation was going to be messy as 13 we will need to mix cases that were very dependent on the 14 class, so it made sense to add a virtual function. 15 16 * rendering/RenderBlock.cpp: 17 (WebCore::RenderBlock::splitAnonymousBlocksAroundChild): 18 (WebCore::RenderBlock::createAnonymousBoxWithSameTypeAs): 19 * rendering/RenderBlock.h: 20 (RenderBlock): 21 * rendering/RenderBox.h: 22 (WebCore::RenderBox::createAnonymousBoxWithSameTypeAs): 23 (RenderBox): 24 * rendering/RenderInline.cpp: 25 (WebCore::RenderInline::splitFlow): 26 * rendering/RenderTable.h: 27 (WebCore::RenderTable::createAnonymousBoxWithSameTypeAs): 28 * rendering/RenderTableCell.h: 29 (WebCore::RenderTableCell::createAnonymousBoxWithSameTypeAs): 30 * rendering/RenderTableRow.h: 31 (WebCore::RenderTableRow::createAnonymousBoxWithSameTypeAs): 32 * rendering/RenderTableSection.h: 33 (WebCore::RenderTableSection::createAnonymousBoxWithSameTypeAs): 34 1 35 2012-04-04 Abhishek Arya <inferno@chromium.org> 2 36 -
releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderBlock.cpp
r117758 r117759 607 607 if (blockToSplit->firstChild() != beforeChild) { 608 608 // We have to split the parentBlock into two blocks. 609 RenderBlock* post = createAnonymousBlockWithSameTypeAs(blockToSplit);609 RenderBlock* post = toRenderBlock(blockToSplit->createAnonymousBoxWithSameTypeAs(this)); 610 610 post->setChildrenInline(blockToSplit->childrenInline()); 611 611 RenderBlock* parentBlock = toRenderBlock(blockToSplit->parent()); … … 6467 6467 } 6468 6468 6469 RenderB lock* RenderBlock::createAnonymousBlockWithSameTypeAs(RenderBlock* otherAnonymousBlock) const6470 { 6471 if ( otherAnonymousBlock->isAnonymousColumnsBlock())6472 return createAnonymousColumns Block();6473 if ( otherAnonymousBlock->isAnonymousColumnSpanBlock())6474 return createAnonymousColumnSpan Block();6475 return createAnonymous Block(otherAnonymousBlock->style()->display());6469 RenderBox* RenderBlock::createAnonymousBoxWithSameTypeAs(const RenderObject* parent) const 6470 { 6471 if (isAnonymousColumnsBlock()) 6472 return createAnonymousColumnsWithParentRenderer(parent); 6473 if (isAnonymousColumnSpanBlock()) 6474 return createAnonymousColumnSpanWithParentRenderer(parent); 6475 return createAnonymousWithParentRendererAndDisplay(parent, style()->display()); 6476 6476 } 6477 6477 -
releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderBlock.h
r117758 r117759 228 228 RenderBlock* createAnonymousColumnSpanBlock() const { return createAnonymousColumnSpanWithParentRenderer(this); } 229 229 230 RenderBlock* createAnonymousBlockWithSameTypeAs(RenderBlock* otherAnonymousBlock) const;230 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* parent) const OVERRIDE; 231 231 232 232 static void appendRunsForObject(BidiRunList<BidiRun>&, int start, int end, RenderObject*, InlineBidiResolver&); -
releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderBox.h
r107880 r117759 446 446 virtual void computeIntrinsicRatioInformation(FloatSize& /* intrinsicSize */, double& /* intrinsicRatio */, bool& /* isPercentageIntrinsicSize */) const { } 447 447 448 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject*) const 449 { 450 ASSERT_NOT_REACHED(); 451 return 0; 452 } 453 448 454 protected: 449 455 virtual void willBeDestroyed(); -
releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderInline.cpp
r108185 r117759 427 427 } 428 428 429 RenderBlock* post = block->createAnonymousBlockWithSameTypeAs(pre);429 RenderBlock* post = toRenderBlock(pre->createAnonymousBoxWithSameTypeAs(block)); 430 430 431 431 RenderObject* boxFirst = madeNewBeforeBlock ? block->firstChild() : pre->nextSibling(); -
releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderTable.h
r117758 r117759 213 213 214 214 static RenderTable* createAnonymousWithParentRenderer(const RenderObject*); 215 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* parent) const OVERRIDE 216 { 217 return createAnonymousWithParentRenderer(parent); 218 } 215 219 216 220 protected: -
releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderTableCell.h
r117758 r117759 138 138 139 139 static RenderTableCell* createAnonymousWithParentRenderer(const RenderObject*); 140 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* parent) const OVERRIDE 141 { 142 return createAnonymousWithParentRenderer(parent); 143 } 140 144 141 145 protected: -
releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderTableRow.h
r117758 r117759 44 44 45 45 static RenderTableRow* createAnonymousWithParentRenderer(const RenderObject*); 46 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* parent) const OVERRIDE 47 { 48 return createAnonymousWithParentRenderer(parent); 49 } 46 50 47 51 private: -
releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderTableSection.h
r117758 r117759 143 143 144 144 static RenderTableSection* createAnonymousWithParentRenderer(const RenderObject*); 145 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* parent) const OVERRIDE 146 { 147 return createAnonymousWithParentRenderer(parent); 148 } 145 149 146 150 protected:
Note:
See TracChangeset
for help on using the changeset viewer.