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

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

Issue 8016006: Merge 95671 - Source/WebCore: Not use anonymousContainer on beforeChild calculation (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) { 110 if (!beforeChild)
111 if (RenderObject* afterContentRenderer = findAfterContentRenderer()) 111 beforeChild = findAfterContentRenderer();
112 beforeChild = anonymousContainer(afterContentRenderer);
113 }
114 112
115 bool wrapInAnonymousSection = !child->isPositioned(); 113 bool wrapInAnonymousSection = !child->isPositioned();
116 114
117 if (child->isRenderBlock() && child->style()->display() == TABLE_CAPTION) { 115 if (child->isRenderBlock() && child->style()->display() == TABLE_CAPTION) {
118 // First caption wins. 116 // First caption wins.
119 if (beforeChild && m_caption) { 117 if (beforeChild && m_caption) {
120 RenderObject* o = beforeChild->previousSibling(); 118 RenderObject* o = beforeChild->previousSibling();
121 while (o && o != m_caption) 119 while (o && o != m_caption)
122 o = o->previousSibling(); 120 o = o->previousSibling();
123 if (!o) { 121 if (!o) {
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(pointI nContainer))) { 1208 if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(pointI nContainer))) {
1211 updateHitTestResult(result, flipForWritingMode(pointInContainer - toLayo utSize(adjustedLocation))); 1209 updateHitTestResult(result, flipForWritingMode(pointInContainer - toLayo utSize(adjustedLocation)));
1212 if (!result.addNodeToRectBasedTestResult(node(), pointInContainer, bound sRect)) 1210 if (!result.addNodeToRectBasedTestResult(node(), pointInContainer, bound sRect))
1213 return true; 1211 return true;
1214 } 1212 }
1215 1213
1216 return false; 1214 return false;
1217 } 1215 }
1218 1216
1219 } 1217 }
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