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

Unified Diff: Source/WebCore/rendering/RenderBoxModelObject.cpp

Issue 10729003: Merge 121001 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderBox.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderBoxModelObject.cpp
===================================================================
--- Source/WebCore/rendering/RenderBoxModelObject.cpp (revision 122131)
+++ Source/WebCore/rendering/RenderBoxModelObject.cpp (working copy)
@@ -2754,6 +2754,11 @@
void RenderBoxModelObject::moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child, RenderObject* beforeChild, bool fullRemoveInsert)
{
+ // FIXME: We need a performant way to handle clearing positioned objects from our list that are
+ // in |child|'s subtree so we could just clear them here. Because of this, we assume that callers
+ // have cleared their positioned objects list for child moves (!fullRemoveInsert) to avoid any badness.
+ ASSERT(!fullRemoveInsert || !isRenderBlock() || !toRenderBlock(this)->hasPositionedObjects());
+
ASSERT(this == child->parent());
ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
if (fullRemoveInsert && (toBoxModelObject->isRenderBlock() || toBoxModelObject->isRenderInline())) {
@@ -2766,6 +2771,15 @@
void RenderBoxModelObject::moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* startChild, RenderObject* endChild, RenderObject* beforeChild, bool fullRemoveInsert)
{
+ // This condition is rarely hit since this function is usually called on
+ // anonymous blocks which can no longer carry positioned objects (see r120761)
+ // or when fullRemoveInsert is false.
+ if (fullRemoveInsert && isRenderBlock()) {
+ RenderBlock* block = toRenderBlock(this);
+ if (block->hasPositionedObjects())
+ block->removePositionedObjects(0);
+ }
+
ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
for (RenderObject* child = startChild; child && child != endChild; ) {
// Save our next sibling as moveChildTo will clear it.
« no previous file with comments | « Source/WebCore/rendering/RenderBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698