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

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

Issue 639863006: Revert of Convert first letter into a pseudo element. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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, 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 layouter.setNeedsLayout(this); 226 layouter.setNeedsLayout(this);
227 227
228 setLogicalWidth(tableLayoutLogicalWidth); 228 setLogicalWidth(tableLayoutLogicalWidth);
229 setCellWidthChanged(true); 229 setCellWidthChanged(true);
230 } 230 }
231 231
232 void RenderTableCell::layout() 232 void RenderTableCell::layout()
233 { 233 {
234 ASSERT(needsLayout()); 234 ASSERT(needsLayout());
235 235
236 updateFirstLetter();
237
236 int oldCellBaseline = cellBaselinePosition(); 238 int oldCellBaseline = cellBaselinePosition();
237 layoutBlock(cellWidthChanged()); 239 layoutBlock(cellWidthChanged());
238 240
239 // 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 241 // 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
240 // 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 242 // 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
241 // 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 243 // 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
242 // table and row layout can use the correct baseline and height for this cel l. 244 // table and row layout can use the correct baseline and height for this cel l.
243 if (isBaselineAligned() && section()->rowBaseline(rowIndex()) && cellBaselin ePosition() > section()->rowBaseline(rowIndex())) { 245 if (isBaselineAligned() && section()->rowBaseline(rowIndex()) && cellBaselin ePosition() > section()->rowBaseline(rowIndex())) {
244 int newIntrinsicPaddingBefore = std::max<LayoutUnit>(0, intrinsicPadding Before() - std::max<LayoutUnit>(0, cellBaselinePosition() - oldCellBaseline)); 246 int newIntrinsicPaddingBefore = std::max<LayoutUnit>(0, intrinsicPadding Before() - std::max<LayoutUnit>(0, cellBaselinePosition() - oldCellBaseline));
245 setIntrinsicPaddingBefore(newIntrinsicPaddingBefore); 247 setIntrinsicPaddingBefore(newIntrinsicPaddingBefore);
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 1261
1260 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render Object* parent) 1262 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render Object* parent)
1261 { 1263 {
1262 RenderTableCell* newCell = RenderTableCell::createAnonymous(&parent->documen t()); 1264 RenderTableCell* newCell = RenderTableCell::createAnonymous(&parent->documen t());
1263 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_CELL); 1265 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_CELL);
1264 newCell->setStyle(newStyle.release()); 1266 newCell->setStyle(newStyle.release());
1265 return newCell; 1267 return newCell;
1266 } 1268 }
1267 1269
1268 } // namespace blink 1270 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObjectChildList.cpp ('k') | Source/core/rendering/RenderTextFragment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698