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

Side by Side Diff: Source/WebCore/rendering/RenderTable.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
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 * 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return; 179 return;
180 } 180 }
181 181
182 if (!beforeChild && lastChild() && lastChild()->isTableSection() && lastChil d()->isAnonymous() && !lastChild()->isBeforeContent()) { 182 if (!beforeChild && lastChild() && lastChild()->isTableSection() && lastChil d()->isAnonymous() && !lastChild()->isBeforeContent()) {
183 lastChild()->addChild(child); 183 lastChild()->addChild(child);
184 return; 184 return;
185 } 185 }
186 186
187 if (beforeChild && !beforeChild->isAnonymous() && beforeChild->parent() == t his) { 187 if (beforeChild && !beforeChild->isAnonymous() && beforeChild->parent() == t his) {
188 RenderObject* section = beforeChild->previousSibling(); 188 RenderObject* section = beforeChild->previousSibling();
189 if (section && section->isTableSection()) { 189 if (section && section->isTableSection() && section->isAnonymous()) {
190 ASSERT(section->isAnonymous());
191 section->addChild(child); 190 section->addChild(child);
192 return; 191 return;
193 } 192 }
194 } 193 }
195 194
196 RenderObject* lastBox = beforeChild; 195 RenderObject* lastBox = beforeChild;
197 while (lastBox && lastBox->parent()->isAnonymous() && !lastBox->isTableSecti on() && lastBox->style()->display() != TABLE_CAPTION && lastBox->style()->displa y() != TABLE_COLUMN_GROUP) 196 while (lastBox && lastBox->parent()->isAnonymous() && !lastBox->isTableSecti on() && lastBox->style()->display() != TABLE_CAPTION && lastBox->style()->displa y() != TABLE_COLUMN_GROUP)
198 lastBox = lastBox->parent(); 197 lastBox = lastBox->parent();
199 if (lastBox && lastBox->isAnonymous() && !isAfterContent(lastBox)) { 198 if (lastBox && lastBox->isAnonymous() && !isAfterContent(lastBox)) {
200 if (beforeChild == lastBox) 199 if (beforeChild == lastBox)
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(pointI nContainer))) { 1229 if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(pointI nContainer))) {
1231 updateHitTestResult(result, flipForWritingMode(pointInContainer - toLayo utSize(adjustedLocation))); 1230 updateHitTestResult(result, flipForWritingMode(pointInContainer - toLayo utSize(adjustedLocation)));
1232 if (!result.addNodeToRectBasedTestResult(node(), pointInContainer, bound sRect)) 1231 if (!result.addNodeToRectBasedTestResult(node(), pointInContainer, bound sRect))
1233 return true; 1232 return true;
1234 } 1233 }
1235 1234
1236 return false; 1235 return false;
1237 } 1236 }
1238 1237
1239 } 1238 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/table/table-anonymous-section-bug-expected.txt ('k') | Source/WebCore/rendering/RenderTableRow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698