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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 lastBox = lastBox->parent(); | 184 lastBox = lastBox->parent(); |
185 if (lastBox && lastBox->isAnonymous() && !isAfterContent(lastBox)) { | 185 if (lastBox && lastBox->isAnonymous() && !isAfterContent(lastBox)) { |
186 if (beforeChild == lastBox) | 186 if (beforeChild == lastBox) |
187 beforeChild = lastBox->firstChild(); | 187 beforeChild = lastBox->firstChild(); |
188 lastBox->addChild(child, beforeChild); | 188 lastBox->addChild(child, beforeChild); |
189 return; | 189 return; |
190 } | 190 } |
191 | 191 |
192 if (beforeChild && !beforeChild->isTableSection() && beforeChild->style()->d
isplay() != TABLE_CAPTION && beforeChild->style()->display() != TABLE_COLUMN_GRO
UP) | 192 if (beforeChild && !beforeChild->isTableSection() && beforeChild->style()->d
isplay() != TABLE_CAPTION && beforeChild->style()->display() != TABLE_COLUMN_GRO
UP) |
193 beforeChild = 0; | 193 beforeChild = 0; |
194 RenderTableSection* section = new (renderArena()) RenderTableSection(documen
t() /* anonymous */); | 194 |
195 RefPtr<RenderStyle> newStyle = RenderStyle::create(); | 195 RenderTableSection* section = RenderTableSection::createAnonymousWithParentR
enderer(this); |
196 newStyle->inheritFrom(style()); | |
197 newStyle->setDisplay(TABLE_ROW_GROUP); | |
198 section->setStyle(newStyle.release()); | |
199 addChild(section, beforeChild); | 196 addChild(section, beforeChild); |
200 section->addChild(child); | 197 section->addChild(child); |
201 } | 198 } |
202 | 199 |
203 void RenderTable::removeChild(RenderObject* oldChild) | 200 void RenderTable::removeChild(RenderObject* oldChild) |
204 { | 201 { |
205 RenderBox::removeChild(oldChild); | 202 RenderBox::removeChild(oldChild); |
206 | 203 |
207 size_t index = m_captions.find(oldChild); | 204 size_t index = m_captions.find(oldChild); |
208 if (index != notFound) { | 205 if (index != notFound) { |
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 LayoutRect boundsRect(adjustedLocation, size()); | 1274 LayoutRect boundsRect(adjustedLocation, size()); |
1278 if (visibleToHitTesting() && (action == HitTestBlockBackground || action ==
HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(pointI
nContainer))) { | 1275 if (visibleToHitTesting() && (action == HitTestBlockBackground || action ==
HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(pointI
nContainer))) { |
1279 updateHitTestResult(result, flipForWritingMode(pointInContainer - toLayo
utSize(adjustedLocation))); | 1276 updateHitTestResult(result, flipForWritingMode(pointInContainer - toLayo
utSize(adjustedLocation))); |
1280 if (!result.addNodeToRectBasedTestResult(node(), pointInContainer, bound
sRect)) | 1277 if (!result.addNodeToRectBasedTestResult(node(), pointInContainer, bound
sRect)) |
1281 return true; | 1278 return true; |
1282 } | 1279 } |
1283 | 1280 |
1284 return false; | 1281 return false; |
1285 } | 1282 } |
1286 | 1283 |
| 1284 RenderTable* RenderTable::createAnonymousWithParentRenderer(const RenderObject*
parent) |
| 1285 { |
| 1286 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->sty
le()); |
| 1287 newStyle->setDisplay(TABLE); |
| 1288 |
| 1289 RenderTable* newTable = new (parent->renderArena()) RenderTable(parent->docu
ment() /* is anonymous */); |
| 1290 newTable->setStyle(newStyle.release()); |
| 1291 return newTable; |
1287 } | 1292 } |
| 1293 |
| 1294 } |
OLD | NEW |