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

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

Issue 8417039: Merge 98372 - Crash in WebCore::RenderTableSection::addChild due to assert failure (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 9 years, 1 month 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 | « Source/WebCore/rendering/RenderTableRow.cpp ('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) 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, 2008, 2009, 2010 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserved.
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 last = lastChild(); 112 last = lastChild();
113 if (last && last->isAnonymous() && !last->isBeforeOrAfterContent()) { 113 if (last && last->isAnonymous() && !last->isBeforeOrAfterContent()) {
114 if (beforeChild == last) 114 if (beforeChild == last)
115 beforeChild = last->firstChild(); 115 beforeChild = last->firstChild();
116 last->addChild(child, beforeChild); 116 last->addChild(child, beforeChild);
117 return; 117 return;
118 } 118 }
119 119
120 if (beforeChild && !beforeChild->isAnonymous() && beforeChild->parent() == this) { 120 if (beforeChild && !beforeChild->isAnonymous() && beforeChild->parent() == this) {
121 RenderObject* row = beforeChild->previousSibling(); 121 RenderObject* row = beforeChild->previousSibling();
122 if (row && row->isTableRow()) { 122 if (row && row->isTableRow() && row->isAnonymous()) {
123 ASSERT(row->isAnonymous());
124 row->addChild(child); 123 row->addChild(child);
125 return; 124 return;
126 } 125 }
127 } 126 }
128 127
129 // If beforeChild is inside an anonymous cell/row, insert into the cell or into 128 // If beforeChild is inside an anonymous cell/row, insert into the cell or into
130 // the anonymous row containing it, if there is one. 129 // the anonymous row containing it, if there is one.
131 RenderObject* lastBox = last; 130 RenderObject* lastBox = last;
132 while (lastBox && lastBox->parent()->isAnonymous() && !lastBox->isTableR ow()) 131 while (lastBox && lastBox->parent()->isAnonymous() && !lastBox->isTableR ow())
133 lastBox = lastBox->parent(); 132 lastBox = lastBox->parent();
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 if (static_cast<RenderObject*>(cell)->nodeAtPoint(request, result, point InContainer, cellPoint, action)) { 1277 if (static_cast<RenderObject*>(cell)->nodeAtPoint(request, result, point InContainer, cellPoint, action)) {
1279 updateHitTestResult(result, toLayoutPoint(pointInContainer - cellPoi nt)); 1278 updateHitTestResult(result, toLayoutPoint(pointInContainer - cellPoi nt));
1280 return true; 1279 return true;
1281 } 1280 }
1282 } 1281 }
1283 return false; 1282 return false;
1284 1283
1285 } 1284 }
1286 1285
1287 } // namespace WebCore 1286 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderTableRow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698