| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1980 { | 1980 { |
| 1981 child->layer()->setStaticInlinePosition(inlinePosition); | 1981 child->layer()->setStaticInlinePosition(inlinePosition); |
| 1982 } | 1982 } |
| 1983 | 1983 |
| 1984 void RenderBlockFlow::addChild(RenderObject* newChild, RenderObject* beforeChild
) | 1984 void RenderBlockFlow::addChild(RenderObject* newChild, RenderObject* beforeChild
) |
| 1985 { | 1985 { |
| 1986 if (RenderMultiColumnFlowThread* flowThread = multiColumnFlowThread()) { | 1986 if (RenderMultiColumnFlowThread* flowThread = multiColumnFlowThread()) { |
| 1987 flowThread->addChild(newChild, beforeChild); | 1987 flowThread->addChild(newChild, beforeChild); |
| 1988 return; | 1988 return; |
| 1989 } | 1989 } |
| 1990 if (beforeChild) { |
| 1991 if (RenderFlowThread* containingFlowThread = flowThreadContainingBlock()
) |
| 1992 beforeChild = containingFlowThread->resolveMovedChild(beforeChild); |
| 1993 } |
| 1990 RenderBlock::addChild(newChild, beforeChild); | 1994 RenderBlock::addChild(newChild, beforeChild); |
| 1991 } | 1995 } |
| 1992 | 1996 |
| 1997 void RenderBlockFlow::removeChild(RenderObject* oldChild) |
| 1998 { |
| 1999 if (!documentBeingDestroyed()) { |
| 2000 RenderFlowThread* flowThread = multiColumnFlowThread(); |
| 2001 if (flowThread && flowThread != oldChild) |
| 2002 flowThread->flowThreadDescendantOrSiblingWillBeRemoved(oldChild); |
| 2003 } |
| 2004 RenderBlock::removeChild(oldChild); |
| 2005 } |
| 2006 |
| 1993 void RenderBlockFlow::moveAllChildrenIncludingFloatsTo(RenderBlock* toBlock, boo
l fullRemoveInsert) | 2007 void RenderBlockFlow::moveAllChildrenIncludingFloatsTo(RenderBlock* toBlock, boo
l fullRemoveInsert) |
| 1994 { | 2008 { |
| 1995 RenderBlockFlow* toBlockFlow = toRenderBlockFlow(toBlock); | 2009 RenderBlockFlow* toBlockFlow = toRenderBlockFlow(toBlock); |
| 1996 moveAllChildrenTo(toBlockFlow, fullRemoveInsert); | 2010 moveAllChildrenTo(toBlockFlow, fullRemoveInsert); |
| 1997 | 2011 |
| 1998 // When a portion of the render tree is being detached, anonymous blocks | 2012 // When a portion of the render tree is being detached, anonymous blocks |
| 1999 // will be combined as their children are deleted. In this process, the | 2013 // will be combined as their children are deleted. In this process, the |
| 2000 // anonymous block later in the tree is merged into the one preceeding it. | 2014 // anonymous block later in the tree is merged into the one preceeding it. |
| 2001 // It can happen that the later block (this) contains floats that the | 2015 // It can happen that the later block (this) contains floats that the |
| 2002 // previous block (toBlockFlow) did not contain, and thus are not in the | 2016 // previous block (toBlockFlow) did not contain, and thus are not in the |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2911 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() | 2925 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() |
| 2912 { | 2926 { |
| 2913 if (m_rareData) | 2927 if (m_rareData) |
| 2914 return *m_rareData; | 2928 return *m_rareData; |
| 2915 | 2929 |
| 2916 m_rareData = adoptPtrWillBeNoop(new RenderBlockFlowRareData(this)); | 2930 m_rareData = adoptPtrWillBeNoop(new RenderBlockFlowRareData(this)); |
| 2917 return *m_rareData; | 2931 return *m_rareData; |
| 2918 } | 2932 } |
| 2919 | 2933 |
| 2920 } // namespace blink | 2934 } // namespace blink |
| OLD | NEW |