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

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

Issue 10264007: Merge 113252 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 7 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
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 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 return; 106 return;
107 } 107 }
108 } 108 }
109 109
110 // If beforeChild is inside an anonymous cell, insert into the cell. 110 // If beforeChild is inside an anonymous cell, insert into the cell.
111 if (last && !last->isTableCell() && last->parent() && last->parent()->is Anonymous() && !last->parent()->isBeforeOrAfterContent()) { 111 if (last && !last->isTableCell() && last->parent() && last->parent()->is Anonymous() && !last->parent()->isBeforeOrAfterContent()) {
112 last->parent()->addChild(child, beforeChild); 112 last->parent()->addChild(child, beforeChild);
113 return; 113 return;
114 } 114 }
115 115
116 RenderTableCell* cell = new (renderArena()) RenderTableCell(document() / * anonymous object */); 116 RenderTableCell* cell = RenderTableCell::createAnonymousWithParentRender er(this);
117 RefPtr<RenderStyle> newStyle = RenderStyle::create();
118 newStyle->inheritFrom(style());
119 newStyle->setDisplay(TABLE_CELL);
120 cell->setStyle(newStyle.release());
121 addChild(cell, beforeChild); 117 addChild(cell, beforeChild);
122 cell->addChild(child); 118 cell->addChild(child);
123 return; 119 return;
124 } 120 }
125 121
126 // If the next renderer is actually wrapped in an anonymous table cell, we n eed to go up and find that. 122 // If the next renderer is actually wrapped in an anonymous table cell, we n eed to go up and find that.
127 while (beforeChild && beforeChild->parent() != this) 123 while (beforeChild && beforeChild->parent() != this)
128 beforeChild = beforeChild->parent(); 124 beforeChild = beforeChild->parent();
129 125
130 RenderTableCell* cell = toRenderTableCell(child); 126 RenderTableCell* cell = toRenderTableCell(child);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 238 }
243 } 239 }
244 } 240 }
245 241
246 void RenderTableRow::imageChanged(WrappedImagePtr, const IntRect*) 242 void RenderTableRow::imageChanged(WrappedImagePtr, const IntRect*)
247 { 243 {
248 // FIXME: Examine cells and repaint only the rect the image paints in. 244 // FIXME: Examine cells and repaint only the rect the image paints in.
249 repaint(); 245 repaint();
250 } 246 }
251 247
248 RenderTableRow* RenderTableRow::createAnonymousWithParentRenderer(const RenderOb ject* parent)
249 {
250 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->sty le());
251 newStyle->setDisplay(TABLE_ROW);
252
253 RenderTableRow* newRow = new (parent->renderArena()) RenderTableRow(parent-> document() /* is anonymous */);
254 newRow->setStyle(newStyle.release());
255 return newRow;
256 }
257
252 } // namespace WebCore 258 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderTableRow.h ('k') | Source/WebCore/rendering/RenderTableSection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698