OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |