Changeset 144461 in webkit
- Timestamp:
- Mar 1, 2013 8:58:25 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r144460 r144461 1 2013-03-01 David Hyatt <hyatt@apple.com> 2 3 [New Multicolumn] Change flow thread containment to be a state. 4 https://bugs.webkit.org/show_bug.cgi?id=111110 5 6 Change m_inRenderFlowThread from a single bit to an actual state. This 7 will let us track whether we're inside a multicolumn (in-flow) flow thread 8 or a named (out-of-flow) flow thread. In the former case, we're going to have 9 to do more work to maintain this state, but for now I've kept all the logic 10 the same just for the initial landing. 11 12 Reviewed by Andreas Kling. 13 14 * dom/NodeRenderingContext.cpp: 15 (WebCore::NodeRenderingContext::createRendererForElementIfNeeded): 16 (WebCore::NodeRenderingContext::createRendererForTextIfNeeded): 17 * rendering/RenderBlock.cpp: 18 (WebCore::RenderBlock::clone): 19 * rendering/RenderFlowThread.cpp: 20 (WebCore::RenderFlowThread::RenderFlowThread): 21 * rendering/RenderInline.cpp: 22 (WebCore::RenderInline::clone): 23 * rendering/RenderMultiColumnFlowThread.cpp: 24 (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread): 25 * rendering/RenderObject.cpp: 26 (WebCore::RenderObject::setFlowThreadStateIncludingDescendants): 27 (WebCore::RenderObject::removeFromRenderFlowThreadRecursive): 28 * rendering/RenderObject.h: 29 (WebCore::RenderObject::setParent): 30 (RenderObject): 31 (WebCore::RenderObject::inRenderFlowThread): 32 (WebCore::RenderObject::flowThreadState): 33 (WebCore::RenderObject::setFlowThreadState): 34 (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields): 35 (RenderObjectBitfields): 36 (WebCore::RenderObject::RenderObjectBitfields::flowThreadState): 37 (WebCore::RenderObject::RenderObjectBitfields::setFlowThreadState): 38 * rendering/RenderView.cpp: 39 (WebCore::RenderView::addChild): 40 1 41 2013-03-01 Jessie Berlin <jberlin@apple.com> 2 42 … … 1328 1368 calls to m_boundFBO, m_boundTexture0 and m_activeTexture to m_state 1329 1369 respectives. 1330 1370 1331 1371 2013-02-28 David Hyatt <hyatt@apple.com> 1332 1372 -
trunk/Source/WebCore/dom/NodeRenderingContext.cpp
r140546 r144461 269 269 // Make sure the RenderObject already knows it is going to be added to a RenderFlowThread before we set the style 270 270 // for the first time. Otherwise code using inRenderFlowThread() in the styleWillChange and styleDidChange will fail. 271 newRenderer->set InRenderFlowThread(parentRenderer->inRenderFlowThread());271 newRenderer->setFlowThreadState(parentRenderer->flowThreadState()); 272 272 273 273 element->setRenderer(newRenderer); … … 315 315 // Make sure the RenderObject already knows it is going to be added to a RenderFlowThread before we set the style 316 316 // for the first time. Otherwise code using inRenderFlowThread() in the styleWillChange and styleDidChange will fail. 317 newRenderer->set InRenderFlowThread(parentRenderer->inRenderFlowThread());317 newRenderer->setFlowThreadState(parentRenderer->flowThreadState()); 318 318 319 319 RenderObject* nextRenderer = this->nextRenderer(); -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r144350 r144461 592 592 cloneBlock->setChildrenInline(cloneBlock->firstChild() ? cloneBlock->firstChild()->isInline() : childrenInline()); 593 593 } 594 cloneBlock->set InRenderFlowThread(inRenderFlowThread());594 cloneBlock->setFlowThreadState(flowThreadState()); 595 595 return cloneBlock; 596 596 } -
trunk/Source/WebCore/rendering/RenderFlowThread.cpp
r144318 r144461 60 60 { 61 61 ASSERT(document->cssRegionsEnabled()); 62 set InRenderFlowThread();62 setFlowThreadState(InsideOutOfFlowThread); 63 63 } 64 64 -
trunk/Source/WebCore/rendering/RenderInline.cpp
r144350 r144461 336 336 RenderInline* cloneInline = new (renderArena()) RenderInline(node()); 337 337 cloneInline->setStyle(style()); 338 cloneInline->set InRenderFlowThread(inRenderFlowThread());338 cloneInline->setFlowThreadState(flowThreadState()); 339 339 return cloneInline; 340 340 } -
trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp
r143606 r144461 34 34 : RenderFlowThread(document) 35 35 { 36 setFlowThreadState(InsideInFlowThread); 36 37 } 37 38 -
trunk/Source/WebCore/rendering/RenderObject.cpp
r144350 r144461 277 277 } 278 278 279 void RenderObject::set InRenderFlowThreadIncludingDescendants(bool b)280 { 281 set InRenderFlowThread(b);279 void RenderObject::setFlowThreadStateIncludingDescendants(FlowThreadState state) 280 { 281 setFlowThreadState(state); 282 282 283 283 for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { 284 ASSERT( b != child->inRenderFlowThread());285 child->set InRenderFlowThreadIncludingDescendants(b);284 ASSERT(state != child->flowThreadState()); 285 child->setFlowThreadStateIncludingDescendants(state); 286 286 } 287 287 } … … 2508 2508 } 2509 2509 renderFlowThread->removeFlowChildInfo(this); 2510 set InRenderFlowThread(false);2510 setFlowThreadState(NotInsideFlowThread); 2511 2511 } 2512 2512 -
trunk/Source/WebCore/rendering/RenderObject.h
r144350 r144461 265 265 { 266 266 m_parent = parent; 267 if (parent && parent->inRenderFlowThread() && !inRenderFlowThread()) 268 setInRenderFlowThreadIncludingDescendants(true); 269 else if (!parent && inRenderFlowThread()) 270 setInRenderFlowThreadIncludingDescendants(false); 271 } 267 268 // Only update if our flow thread state is different from our new parent and if we're not a RenderFlowThread. 269 // A RenderFlowThread is always considered to be inside itself, so it never has to change its state 270 // in response to parent changes. 271 FlowThreadState newState = parent ? parent->flowThreadState() : NotInsideFlowThread; 272 if (newState != flowThreadState() && !isRenderFlowThread()) 273 setFlowThreadStateIncludingDescendants(newState); 274 } 275 272 276 ////////////////////////////////////////// 273 277 private: … … 433 437 } 434 438 435 bool inRenderFlowThread() const { return m_bitfields.inRenderFlowThread(); } 436 void setInRenderFlowThread(bool b = true) { m_bitfields.setInRenderFlowThread(b); } 437 438 void setInRenderFlowThreadIncludingDescendants(bool = true); 439 enum FlowThreadState { 440 NotInsideFlowThread = 0, 441 InsideOutOfFlowThread = 1, 442 InsideInFlowThread = 2, 443 }; 444 445 bool inRenderFlowThread() const 446 { 447 FlowThreadState state = flowThreadState(); 448 return state != NotInsideFlowThread; 449 } 450 451 void setFlowThreadStateIncludingDescendants(FlowThreadState); 452 453 FlowThreadState flowThreadState() const { return m_bitfields.flowThreadState(); } 454 void setFlowThreadState(FlowThreadState state) { m_bitfields.setFlowThreadState(state); } 439 455 440 456 virtual bool requiresForcedStyleRecalcPropagation() const { return false; } … … 1044 1060 IsStickyPositioned = 3 1045 1061 }; 1062 1046 1063 public: 1047 1064 RenderObjectBitfields(Node* node) … … 1067 1084 , m_hasCounterNodeMap(false) 1068 1085 , m_everHadLayout(false) 1069 , m_inRenderFlowThread(false)1070 1086 , m_childrenInline(false) 1071 1087 , m_hasColumns(false) 1072 1088 , m_positionedState(IsStaticlyPositioned) 1073 1089 , m_selectionState(SelectionNone) 1090 , m_flowThreadState(NotInsideFlowThread) 1074 1091 { 1075 1092 } 1076 1093 1077 // 29 bits have been used here. There are threebits available.1094 // 30 bits have been used here. There are two bits available. 1078 1095 ADD_BOOLEAN_BITFIELD(needsLayout, NeedsLayout); 1079 1096 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovementLayout); … … 1103 1120 ADD_BOOLEAN_BITFIELD(everHadLayout, EverHadLayout); 1104 1121 1105 // These bitfields are moved here from subclasses to pack them together.1106 // from RenderFlowThread1107 ADD_BOOLEAN_BITFIELD(inRenderFlowThread, InRenderFlowThread);1108 1109 1122 // from RenderBlock 1110 1123 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline); … … 1114 1127 unsigned m_positionedState : 2; // PositionedState 1115 1128 unsigned m_selectionState : 3; // SelectionState 1129 unsigned m_flowThreadState : 2; // FlowThreadState 1116 1130 1117 1131 public: … … 1130 1144 ALWAYS_INLINE SelectionState selectionState() const { return static_cast<SelectionState>(m_selectionState); } 1131 1145 ALWAYS_INLINE void setSelectionState(SelectionState selectionState) { m_selectionState = selectionState; } 1146 1147 ALWAYS_INLINE FlowThreadState flowThreadState() const { return static_cast<FlowThreadState>(m_flowThreadState); } 1148 ALWAYS_INLINE void setFlowThreadState(FlowThreadState flowThreadState) { m_flowThreadState = flowThreadState; } 1132 1149 }; 1133 1150 -
trunk/Source/WebCore/rendering/RenderView.cpp
r143428 r144461 164 164 RenderBox* seamlessBox = enclosingSeamlessRenderer(document()); 165 165 if (seamlessBox && seamlessBox->inRenderFlowThread()) 166 newChild->set InRenderFlowThread();166 newChild->setFlowThreadState(seamlessBox->flowThreadState()); 167 167 } 168 168 RenderBlock::addChild(newChild, beforeChild);
Note: See TracChangeset
for help on using the changeset viewer.