Changeset 161335 in webkit
- Timestamp:
- Jan 6, 2014, 1:47:01 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r161334 r161335 1 1 2014-01-06 Gurpreet Kaur <k.gurpreet@samsung.com> 2 3 RenderInline::clone() should return RenderPtr. 4 <https://webkit.org/b/126514> 5 6 Reviewed by Antti Koivisto. 7 8 * rendering/RenderInline.h: 9 * rendering/RenderInline.cpp: 10 (WebCore::RenderInline::clone): 11 12 Tweaked to return RenderPtr<RenderInline>. 13 14 (WebCore::RenderInline::splitInlines): 15 16 Store cloned RenderInlines in RenderPtrs. Use leakPtr() to sink 17 them into ownership-taking APIs that still use raw pointers. 18 19 2014-01-06 Andreas Kling <akling@apple.com> 2 20 3 21 <hr> appears gray instead of green because of color attribute is defined followed by noshade attribute -
trunk/Source/WebCore/rendering/RenderInline.cpp
r160599 r161335 331 331 } 332 332 333 Render Inline*RenderInline::clone() const334 { 335 Render Inline* cloneInline = new RenderInline(*element(), style());333 RenderPtr<RenderInline> RenderInline::clone() const 334 { 335 RenderPtr<RenderInline> cloneInline = createRenderer<RenderInline>(*element(), style()); 336 336 cloneInline->initializeStyle(); 337 337 cloneInline->setFlowThreadState(flowThreadState()); … … 344 344 { 345 345 // Create a clone of this inline. 346 Render Inline*cloneInline = clone();346 RenderPtr<RenderInline> cloneInline = clone(); 347 347 cloneInline->setContinuation(oldCont); 348 348 … … 370 370 371 371 // Hook |clone| up as the continuation of the middle block. 372 middleBlock->setContinuation(cloneInline );372 middleBlock->setContinuation(cloneInline.get()); 373 373 374 374 // We have been reparented and are now under the fromBlock. We need … … 388 388 if (splitDepth < cMaxSplitDepth) { 389 389 // Create a new clone. 390 Render Inline* cloneChild = cloneInline;390 RenderPtr<RenderInline> cloneChild = std::move(cloneInline); 391 391 cloneInline = toRenderInline(curr)->clone(); 392 392 393 393 // Insert our child clone as the first child. 394 cloneInline->addChildIgnoringContinuation(cloneChild , 0);394 cloneInline->addChildIgnoringContinuation(cloneChild.leakPtr(), 0); 395 395 396 396 // Hook the clone up as a continuation of |curr|. 397 397 RenderInline* inlineCurr = toRenderInline(curr); 398 398 oldCont = inlineCurr->continuation(); 399 inlineCurr->setContinuation(cloneInline );399 inlineCurr->setContinuation(cloneInline.get()); 400 400 cloneInline->setContinuation(oldCont); 401 401 … … 419 419 420 420 // Now we are at the block level. We need to put the clone into the toBlock. 421 toBlock->insertChildInternal(cloneInline , nullptr, NotifyChildren);421 toBlock->insertChildInternal(cloneInline.leakPtr(), nullptr, NotifyChildren); 422 422 423 423 // Now take all the children after currChild and remove them from the fromBlock -
trunk/Source/WebCore/rendering/RenderInline.h
r160236 r161335 170 170 virtual void updateFromStyle() OVERRIDE FINAL; 171 171 172 Render Inline*clone() const;172 RenderPtr<RenderInline> clone() const; 173 173 174 174 void paintOutlineForLine(GraphicsContext*, const LayoutPoint&, const LayoutRect& prevLine, const LayoutRect& thisLine,
Note:
See TracChangeset
for help on using the changeset viewer.