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

Side by Side Diff: Source/WebCore/rendering/RenderBox.cpp

Issue 10875066: Merge 125234 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 4 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/table/split-anonymous-boxes-around-table-repaint-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 3976 matching lines...) Expand 10 before | Expand all | Expand 10 after
3987 while (beforeChild->parent() != this) { 3987 while (beforeChild->parent() != this) {
3988 RenderBox* boxToSplit = toRenderBox(beforeChild->parent()); 3988 RenderBox* boxToSplit = toRenderBox(beforeChild->parent());
3989 if (boxToSplit->firstChild() != beforeChild && boxToSplit->isAnonymous() ) { 3989 if (boxToSplit->firstChild() != beforeChild && boxToSplit->isAnonymous() ) {
3990 didSplitParentAnonymousBoxes = true; 3990 didSplitParentAnonymousBoxes = true;
3991 3991
3992 // We have to split the parent box into two boxes and move children 3992 // We have to split the parent box into two boxes and move children
3993 // from |beforeChild| to end into the new post box. 3993 // from |beforeChild| to end into the new post box.
3994 RenderBox* postBox = boxToSplit->createAnonymousBoxWithSameTypeAs(th is); 3994 RenderBox* postBox = boxToSplit->createAnonymousBoxWithSameTypeAs(th is);
3995 postBox->setChildrenInline(boxToSplit->childrenInline()); 3995 postBox->setChildrenInline(boxToSplit->childrenInline());
3996 RenderBox* parentBox = toRenderBox(boxToSplit->parent()); 3996 RenderBox* parentBox = toRenderBox(boxToSplit->parent());
3997 // We need to invalidate the |parentBox| before inserting the new no de
3998 // so that the table repainting logic knows the structure is dirty.
3999 // See for example RenderTableCell:clippedOverflowRectForRepaint.
4000 markBoxForRelayoutAfterSplit(parentBox);
3997 parentBox->virtualChildren()->insertChildNode(parentBox, postBox, bo xToSplit->nextSibling()); 4001 parentBox->virtualChildren()->insertChildNode(parentBox, postBox, bo xToSplit->nextSibling());
3998 boxToSplit->moveChildrenTo(postBox, beforeChild, 0, true); 4002 boxToSplit->moveChildrenTo(postBox, beforeChild, 0, true);
3999 4003
4000 markBoxForRelayoutAfterSplit(boxToSplit); 4004 markBoxForRelayoutAfterSplit(boxToSplit);
4001 markBoxForRelayoutAfterSplit(postBox); 4005 markBoxForRelayoutAfterSplit(postBox);
4002 4006
4003 beforeChild = postBox; 4007 beforeChild = postBox;
4004 } else 4008 } else
4005 beforeChild = boxToSplit; 4009 beforeChild = boxToSplit;
4006 } 4010 }
4007 4011
4008 if (didSplitParentAnonymousBoxes) 4012 if (didSplitParentAnonymousBoxes)
4009 markBoxForRelayoutAfterSplit(this); 4013 markBoxForRelayoutAfterSplit(this);
4010 4014
4011 ASSERT(beforeChild->parent() == this); 4015 ASSERT(beforeChild->parent() == this);
4012 return beforeChild; 4016 return beforeChild;
4013 } 4017 }
4014 4018
4015 } // namespace WebCore 4019 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/table/split-anonymous-boxes-around-table-repaint-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698