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

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

Issue 7946014: Merge 95461 - Child not placed correctly when beforeChild (table part) (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 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
OLDNEW
1 /** 1 /**
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 RenderBox::styleDidChange(diff, oldStyle); 76 RenderBox::styleDidChange(diff, oldStyle);
77 propagateStyleToAnonymousChildren(); 77 propagateStyleToAnonymousChildren();
78 78
79 if (parent()) 79 if (parent())
80 updateBeforeAndAfterContent(); 80 updateBeforeAndAfterContent();
81 } 81 }
82 82
83 void RenderTableRow::addChild(RenderObject* child, RenderObject* beforeChild) 83 void RenderTableRow::addChild(RenderObject* child, RenderObject* beforeChild)
84 { 84 {
85 // Make sure we don't append things after :after-generated content if we hav e it. 85 // Make sure we don't append things after :after-generated content if we hav e it.
86 if (!beforeChild && isAfterContent(lastChild())) 86 if (!beforeChild) {
87 beforeChild = lastChild(); 87 if (RenderObject* afterContentRenderer = findAfterContentRenderer())
88 beforeChild = anonymousContainer(afterContentRenderer);
89 }
88 90
89 if (!child->isTableCell()) { 91 if (!child->isTableCell()) {
90 RenderObject* last = beforeChild; 92 RenderObject* last = beforeChild;
91 if (!last) 93 if (!last)
92 last = lastChild(); 94 last = lastChild();
93 if (last && last->isAnonymous() && last->isTableCell() && !last->isBefor eOrAfterContent()) { 95 if (last && last->isAnonymous() && last->isTableCell() && !last->isBefor eOrAfterContent()) {
94 if (beforeChild == last) 96 if (beforeChild == last)
95 beforeChild = last->firstChild(); 97 beforeChild = last->firstChild();
96 last->addChild(child, beforeChild); 98 last->addChild(child, beforeChild);
97 return; 99 return;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 228 }
227 } 229 }
228 230
229 void RenderTableRow::imageChanged(WrappedImagePtr, const IntRect*) 231 void RenderTableRow::imageChanged(WrappedImagePtr, const IntRect*)
230 { 232 {
231 // FIXME: Examine cells and repaint only the rect the image paints in. 233 // FIXME: Examine cells and repaint only the rect the image paints in.
232 repaint(); 234 repaint();
233 } 235 }
234 236
235 } // namespace WebCore 237 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderTable.cpp ('k') | Source/WebCore/rendering/RenderTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698