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

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

Issue 576823004: Move painting code for tables into *Paint classes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix. Created 6 years, 3 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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 { 985 {
986 CollapsedBorderValue border = collapsedAfterBorder(DoNotIncludeBorderColor); 986 CollapsedBorderValue border = collapsedAfterBorder(DoNotIncludeBorderColor);
987 if (border.exists()) 987 if (border.exists())
988 return (border.width() + ((styleForCellFlow()->isFlippedBlocksWritingMod e() ^ outer) ? 1 : 0)) / 2; 988 return (border.width() + ((styleForCellFlow()->isFlippedBlocksWritingMod e() ^ outer) ? 1 : 0)) / 2;
989 return 0; 989 return 0;
990 } 990 }
991 991
992 void RenderTableCell::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset ) 992 void RenderTableCell::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset )
993 { 993 {
994 ASSERT(paintInfo.phase != PaintPhaseCollapsedTableBorders); 994 ASSERT(paintInfo.phase != PaintPhaseCollapsedTableBorders);
995 RenderBlockFlow::paint(paintInfo, paintOffset); 995 RenderBlock::paint(paintInfo, paintOffset);
mstensho (USE GERRIT) 2014/09/19 10:50:11 Why this change? While there's currently no implem
chrishtr 2014/09/19 16:35:24 I want it to be explicit, so that I can more easil
mstensho (USE GERRIT) 2014/09/19 18:08:55 But a table cell IS a RenderBlockFlow, and it may
chrishtr 2014/09/19 18:14:36 I don't care that much, so reverted this change.
996 } 996 }
997 997
998 static EBorderStyle collapsedBorderStyle(EBorderStyle style) 998 static EBorderStyle collapsedBorderStyle(EBorderStyle style)
999 { 999 {
1000 if (style == OUTSET) 1000 if (style == OUTSET)
1001 return GROOVE; 1001 return GROOVE;
1002 if (style == INSET) 1002 if (style == INSET)
1003 return RIDGE; 1003 return RIDGE;
1004 return style; 1004 return style;
1005 } 1005 }
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 1261
1262 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render Object* parent) 1262 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render Object* parent)
1263 { 1263 {
1264 RenderTableCell* newCell = RenderTableCell::createAnonymous(&parent->documen t()); 1264 RenderTableCell* newCell = RenderTableCell::createAnonymous(&parent->documen t());
1265 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_CELL); 1265 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_CELL);
1266 newCell->setStyle(newStyle.release()); 1266 newCell->setStyle(newStyle.release());
1267 return newCell; 1267 return newCell;
1268 } 1268 }
1269 1269
1270 } // namespace blink 1270 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698