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

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

Issue 591613003: Move painting code from RenderObject into a new ObjectPainter class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge again. 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 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 borders.addBorder(topVal, BSTop, renderTop, borderRect.x(), borderRect.y(), borderRect.maxX(), borderRect.y() + topWidth, topStyle); 1139 borders.addBorder(topVal, BSTop, renderTop, borderRect.x(), borderRect.y(), borderRect.maxX(), borderRect.y() + topWidth, topStyle);
1140 borders.addBorder(bottomVal, BSBottom, renderBottom, borderRect.x(), borderR ect.maxY() - bottomWidth, borderRect.maxX(), borderRect.maxY(), bottomStyle); 1140 borders.addBorder(bottomVal, BSBottom, renderBottom, borderRect.x(), borderR ect.maxY() - bottomWidth, borderRect.maxX(), borderRect.maxY(), bottomStyle);
1141 borders.addBorder(leftVal, BSLeft, renderLeft, borderRect.x(), borderRect.y( ), borderRect.x() + leftWidth, borderRect.maxY(), leftStyle); 1141 borders.addBorder(leftVal, BSLeft, renderLeft, borderRect.x(), borderRect.y( ), borderRect.x() + leftWidth, borderRect.maxY(), leftStyle);
1142 borders.addBorder(rightVal, BSRight, renderRight, borderRect.maxX() - rightW idth, borderRect.y(), borderRect.maxX(), borderRect.maxY(), rightStyle); 1142 borders.addBorder(rightVal, BSRight, renderRight, borderRect.maxX() - rightW idth, borderRect.y(), borderRect.maxX(), borderRect.maxY(), rightStyle);
1143 1143
1144 GraphicsContext* graphicsContext = paintInfo.context; 1144 GraphicsContext* graphicsContext = paintInfo.context;
1145 bool antialias = BoxPainter::shouldAntialiasLines(graphicsContext); 1145 bool antialias = BoxPainter::shouldAntialiasLines(graphicsContext);
1146 1146
1147 for (CollapsedBorder* border = borders.nextBorder(); border; border = border s.nextBorder()) { 1147 for (CollapsedBorder* border = borders.nextBorder(); border; border = border s.nextBorder()) {
1148 if (border->borderValue.isSameIgnoringColor(*table()->currentBorderValue ())) { 1148 if (border->borderValue.isSameIgnoringColor(*table()->currentBorderValue ())) {
1149 drawLineForBoxSide(graphicsContext, border->x1, border->y1, border-> x2, border->y2, border->side, 1149 ObjectPainter::drawLineForBoxSide(graphicsContext, border->x1, borde r->y1, border->x2, border->y2, border->side,
1150 border->borderValue.color().resolve(style()->visitedDependentCol or(CSSPropertyColor)), border->style, 0, 0, antialias); 1150 border->borderValue.color().resolve(style()->visitedDependentCol or(CSSPropertyColor)), border->style, 0, 0, antialias);
1151 } 1151 }
1152 } 1152 }
1153 } 1153 }
1154 1154
1155 void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, const Lay outPoint& paintOffset, RenderObject* backgroundObject) 1155 void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, const Lay outPoint& paintOffset, RenderObject* backgroundObject)
1156 { 1156 {
1157 if (!paintInfo.shouldPaintWithinRoot(this)) 1157 if (!paintInfo.shouldPaintWithinRoot(this))
1158 return; 1158 return;
1159 1159
(...skipping 101 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
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | Source/core/rendering/style/RenderStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698