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

Side by Side Diff: third_party/WebKit/WebCore/rendering/RenderTable.cpp

Issue 20076: WebKit merge 40500:40539 [WebKit side] (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | Annotate | Revision Log
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 Apple Inc. All rights reserv ed. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 beforeChild = 0; 194 beforeChild = 0;
195 RenderTableSection* section = new (renderArena()) RenderTableSection(documen t() /* anonymous */); 195 RenderTableSection* section = new (renderArena()) RenderTableSection(documen t() /* anonymous */);
196 RefPtr<RenderStyle> newStyle = RenderStyle::create(); 196 RefPtr<RenderStyle> newStyle = RenderStyle::create();
197 newStyle->inheritFrom(style()); 197 newStyle->inheritFrom(style());
198 newStyle->setDisplay(TABLE_ROW_GROUP); 198 newStyle->setDisplay(TABLE_ROW_GROUP);
199 section->setStyle(newStyle.release()); 199 section->setStyle(newStyle.release());
200 addChild(section, beforeChild); 200 addChild(section, beforeChild);
201 section->addChild(child); 201 section->addChild(child);
202 } 202 }
203 203
204 void RenderTable::removeChild(RenderObject* oldChild)
205 {
206 RenderContainer::removeChild(oldChild);
207 setNeedsSectionRecalc();
208 }
209
204 void RenderTable::calcWidth() 210 void RenderTable::calcWidth()
205 { 211 {
206 if (isPositioned()) 212 if (isPositioned())
207 calcAbsoluteHorizontal(); 213 calcAbsoluteHorizontal();
208 214
209 RenderBlock* cb = containingBlock(); 215 RenderBlock* cb = containingBlock();
210 int availableWidth = cb->availableWidth(); 216 int availableWidth = cb->availableWidth();
211 217
212 LengthType widthType = style()->width().type(); 218 LengthType widthType = style()->width().type();
213 if (widthType > Relative && style()->width().isPositive()) { 219 if (widthType > Relative && style()->width().isPositive()) {
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 } 709 }
704 710
705 m_columns.resize(maxCols); 711 m_columns.resize(maxCols);
706 m_columnPos.resize(maxCols + 1); 712 m_columnPos.resize(maxCols + 1);
707 713
708 ASSERT(selfNeedsLayout()); 714 ASSERT(selfNeedsLayout());
709 715
710 m_needsSectionRecalc = false; 716 m_needsSectionRecalc = false;
711 } 717 }
712 718
713 RenderObject* RenderTable::removeChildNode(RenderObject* child, bool fullRemove)
714 {
715 setNeedsSectionRecalc();
716 return RenderContainer::removeChildNode(child, fullRemove);
717 }
718
719 int RenderTable::calcBorderLeft() const 719 int RenderTable::calcBorderLeft() const
720 { 720 {
721 if (collapseBorders()) { 721 if (collapseBorders()) {
722 // Determined by the first cell of the first row. See the CSS 2.1 spec, section 17.6.2. 722 // Determined by the first cell of the first row. See the CSS 2.1 spec, section 17.6.2.
723 if (!numEffCols()) 723 if (!numEffCols())
724 return 0; 724 return 0;
725 725
726 unsigned borderWidth = 0; 726 unsigned borderWidth = 0;
727 727
728 const BorderValue& tb = style()->borderLeft(); 728 const BorderValue& tb = style()->borderLeft();
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 // we might have to hack this code first (depending on what order we do thes e bug fixes in). 1129 // we might have to hack this code first (depending on what order we do thes e bug fixes in).
1130 if (m_caption) { 1130 if (m_caption) {
1131 rect.setHeight(height()); 1131 rect.setHeight(height());
1132 rect.setY(ty); 1132 rect.setY(ty);
1133 } 1133 }
1134 1134
1135 return rect; 1135 return rect;
1136 } 1136 }
1137 1137
1138 } 1138 }
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/rendering/RenderTable.h ('k') | third_party/WebKit/WebCore/rendering/RenderTableSection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698