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

Side by Side Diff: Source/core/layout/LayoutTableCell.cpp

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « Source/core/layout/LayoutTableCell.h ('k') | Source/core/layout/LayoutTableCol.h » ('j') | 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 { 294 {
295 return static_cast<int>(computedCSSPaddingAfter()) + intrinsicPaddingAfter() ; 295 return static_cast<int>(computedCSSPaddingAfter()) + intrinsicPaddingAfter() ;
296 } 296 }
297 297
298 void LayoutTableCell::setOverrideLogicalContentHeightFromRowHeight(LayoutUnit ro wHeight) 298 void LayoutTableCell::setOverrideLogicalContentHeightFromRowHeight(LayoutUnit ro wHeight)
299 { 299 {
300 clearIntrinsicPadding(); 300 clearIntrinsicPadding();
301 setOverrideLogicalContentHeight(std::max<LayoutUnit>(0, rowHeight - borderAn dPaddingLogicalHeight())); 301 setOverrideLogicalContentHeight(std::max<LayoutUnit>(0, rowHeight - borderAn dPaddingLogicalHeight()));
302 } 302 }
303 303
304 LayoutSize LayoutTableCell::offsetFromContainer(const RenderObject* o, const Lay outPoint& point, bool* offsetDependsOnPoint) const 304 LayoutSize LayoutTableCell::offsetFromContainer(const LayoutObject* o, const Lay outPoint& point, bool* offsetDependsOnPoint) const
305 { 305 {
306 ASSERT(o == container()); 306 ASSERT(o == container());
307 307
308 LayoutSize offset = RenderBlockFlow::offsetFromContainer(o, point, offsetDep endsOnPoint); 308 LayoutSize offset = RenderBlockFlow::offsetFromContainer(o, point, offsetDep endsOnPoint);
309 if (parent()) 309 if (parent())
310 offset -= parentBox()->locationOffset(); 310 offset -= parentBox()->locationOffset();
311 311
312 return offset; 312 return offset;
313 } 313 }
314 314
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 return result; 714 return result;
715 } 715 }
716 716
717 // (3) Our row's before border. 717 // (3) Our row's before border.
718 result = chooseBorder(result, CollapsedBorderValue(parent()->style()->border Before(), includeColor ? parent()->resolveColor(beforeColorProperty) : Color(), BROW)); 718 result = chooseBorder(result, CollapsedBorderValue(parent()->style()->border Before(), includeColor ? parent()->resolveColor(beforeColorProperty) : Color(), BROW));
719 if (!result.exists()) 719 if (!result.exists())
720 return result; 720 return result;
721 721
722 // (4) The previous row's after border. 722 // (4) The previous row's after border.
723 if (prevCell) { 723 if (prevCell) {
724 RenderObject* prevRow = 0; 724 LayoutObject* prevRow = 0;
725 if (prevCell->section() == section()) 725 if (prevCell->section() == section())
726 prevRow = parent()->previousSibling(); 726 prevRow = parent()->previousSibling();
727 else 727 else
728 prevRow = prevCell->section()->lastRow(); 728 prevRow = prevCell->section()->lastRow();
729 729
730 if (prevRow) { 730 if (prevRow) {
731 result = chooseBorder(CollapsedBorderValue(prevRow->style()->borderA fter(), includeColor ? prevRow->resolveColor(afterColorProperty) : Color(), BROW ), result); 731 result = chooseBorder(CollapsedBorderValue(prevRow->style()->borderA fter(), includeColor ? prevRow->resolveColor(afterColorProperty) : Color(), BROW ), result);
732 if (!result.exists()) 732 if (!result.exists())
733 return result; 733 return result;
734 } 734 }
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 } 1039 }
1040 } 1040 }
1041 1041
1042 LayoutTableCell* LayoutTableCell::createAnonymous(Document* document) 1042 LayoutTableCell* LayoutTableCell::createAnonymous(Document* document)
1043 { 1043 {
1044 LayoutTableCell* renderer = new LayoutTableCell(0); 1044 LayoutTableCell* renderer = new LayoutTableCell(0);
1045 renderer->setDocumentForAnonymous(document); 1045 renderer->setDocumentForAnonymous(document);
1046 return renderer; 1046 return renderer;
1047 } 1047 }
1048 1048
1049 LayoutTableCell* LayoutTableCell::createAnonymousWithParentRenderer(const Render Object* parent) 1049 LayoutTableCell* LayoutTableCell::createAnonymousWithParentRenderer(const Layout Object* parent)
1050 { 1050 {
1051 LayoutTableCell* newCell = LayoutTableCell::createAnonymous(&parent->documen t()); 1051 LayoutTableCell* newCell = LayoutTableCell::createAnonymous(&parent->documen t());
1052 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_CELL); 1052 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_CELL);
1053 newCell->setStyle(newStyle.release()); 1053 newCell->setStyle(newStyle.release());
1054 return newCell; 1054 return newCell;
1055 } 1055 }
1056 1056
1057 } // namespace blink 1057 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTableCell.h ('k') | Source/core/layout/LayoutTableCol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698