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

Side by Side Diff: Source/WebCore/rendering/RenderTable.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
« no previous file with comments | « Source/WebCore/rendering/RenderObject.cpp ('k') | Source/WebCore/rendering/RenderTableRow.cpp » ('j') | 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, 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 RenderObject* o = before->previousSibling(); 100 RenderObject* o = before->previousSibling();
101 while (o && o != ptr) 101 while (o && o != ptr)
102 o = o->previousSibling(); 102 o = o->previousSibling();
103 if (!o) 103 if (!o)
104 ptr = 0; 104 ptr = 0;
105 } 105 }
106 106
107 void RenderTable::addChild(RenderObject* child, RenderObject* beforeChild) 107 void RenderTable::addChild(RenderObject* child, RenderObject* beforeChild)
108 { 108 {
109 // Make sure we don't append things after :after-generated content if we hav e it. 109 // Make sure we don't append things after :after-generated content if we hav e it.
110 if (!beforeChild && isAfterContent(lastChild())) 110 if (!beforeChild) {
111 beforeChild = lastChild(); 111 if (RenderObject* afterContentRenderer = findAfterContentRenderer())
112 beforeChild = anonymousContainer(afterContentRenderer);
113 }
112 114
113 bool wrapInAnonymousSection = !child->isPositioned(); 115 bool wrapInAnonymousSection = !child->isPositioned();
114 116
115 if (child->isRenderBlock() && child->style()->display() == TABLE_CAPTION) { 117 if (child->isRenderBlock() && child->style()->display() == TABLE_CAPTION) {
116 // First caption wins. 118 // First caption wins.
117 if (beforeChild && m_caption) { 119 if (beforeChild && m_caption) {
118 RenderObject* o = beforeChild->previousSibling(); 120 RenderObject* o = beforeChild->previousSibling();
119 while (o && o != m_caption) 121 while (o && o != m_caption)
120 o = o->previousSibling(); 122 o = o->previousSibling();
121 if (!o) { 123 if (!o) {
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(pointI nContainer))) { 1210 if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(pointI nContainer))) {
1209 updateHitTestResult(result, flipForWritingMode(pointInContainer - toLayo utSize(adjustedLocation))); 1211 updateHitTestResult(result, flipForWritingMode(pointInContainer - toLayo utSize(adjustedLocation)));
1210 if (!result.addNodeToRectBasedTestResult(node(), pointInContainer, bound sRect)) 1212 if (!result.addNodeToRectBasedTestResult(node(), pointInContainer, bound sRect))
1211 return true; 1213 return true;
1212 } 1214 }
1213 1215
1214 return false; 1216 return false;
1215 } 1217 }
1216 1218
1217 } 1219 }
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderObject.cpp ('k') | Source/WebCore/rendering/RenderTableRow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698