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

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

Issue 13393017: Merge 145822 "REGRESSION(r145305) Performance: 1.3% mac-release-..." (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 8 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 | « no previous file | no next file » | 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 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 StackStats::LayoutCheckPoint layoutCheckPoint; 244 StackStats::LayoutCheckPoint layoutCheckPoint;
245 updateFirstLetter(); 245 updateFirstLetter();
246 246
247 int oldCellBaseline = cellBaselinePosition(); 247 int oldCellBaseline = cellBaselinePosition();
248 layoutBlock(cellWidthChanged()); 248 layoutBlock(cellWidthChanged());
249 249
250 // If we have replaced content, the intrinsic height of our content may have changed since the last time we laid out. If that's the case the intrinsic paddi ng we used 250 // If we have replaced content, the intrinsic height of our content may have changed since the last time we laid out. If that's the case the intrinsic paddi ng we used
251 // for layout (the padding required to push the contents of the cell down to the row's baseline) is included in our new height and baseline and makes both 251 // for layout (the padding required to push the contents of the cell down to the row's baseline) is included in our new height and baseline and makes both
252 // of them wrong. So if our content's intrinsic height has changed push the new content up into the intrinsic padding and relayout so that the rest of 252 // of them wrong. So if our content's intrinsic height has changed push the new content up into the intrinsic padding and relayout so that the rest of
253 // table and row layout can use the correct baseline and height for this cel l. 253 // table and row layout can use the correct baseline and height for this cel l.
254 if (isBaselineAligned() && cellBaselinePosition() > section()->rowBaseline(r owIndex())) { 254 if (isBaselineAligned() && section()->rowBaseline(rowIndex()) && cellBaselin ePosition() > section()->rowBaseline(rowIndex())) {
255 int newIntrinsicPaddingBefore = max<LayoutUnit>(0, intrinsicPaddingBefor e() - max<LayoutUnit>(0, cellBaselinePosition() - oldCellBaseline)); 255 int newIntrinsicPaddingBefore = max<LayoutUnit>(0, intrinsicPaddingBefor e() - max<LayoutUnit>(0, cellBaselinePosition() - oldCellBaseline));
256 setIntrinsicPaddingBefore(newIntrinsicPaddingBefore); 256 setIntrinsicPaddingBefore(newIntrinsicPaddingBefore);
257 setNeedsLayout(true, MarkOnlyThis); 257 setNeedsLayout(true, MarkOnlyThis);
258 layoutBlock(cellWidthChanged()); 258 layoutBlock(cellWidthChanged());
259 } 259 }
260 260
261 setCellWidthChanged(false); 261 setCellWidthChanged(false);
262 } 262 }
263 263
264 LayoutUnit RenderTableCell::paddingTop() const 264 LayoutUnit RenderTableCell::paddingTop() const
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 1269
1270 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render Object* parent) 1270 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render Object* parent)
1271 { 1271 {
1272 RenderTableCell* newCell = RenderTableCell::createAnonymous(parent->document ()); 1272 RenderTableCell* newCell = RenderTableCell::createAnonymous(parent->document ());
1273 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_CELL); 1273 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_CELL);
1274 newCell->setStyle(newStyle.release()); 1274 newCell->setStyle(newStyle.release());
1275 return newCell; 1275 return newCell;
1276 } 1276 }
1277 1277
1278 } // namespace WebCore 1278 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698