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

Side by Side Diff: Source/core/paint/TableCellPainter.cpp

Issue 750333004: Change rendering code to use RenderObject::resolveColor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/svg/SVGRenderTreeAsText.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/TableCellPainter.h" 6 #include "core/paint/TableCellPainter.h"
7 7
8 #include "core/paint/BlockPainter.h" 8 #include "core/paint/BlockPainter.h"
9 #include "core/paint/BoxPainter.h" 9 #include "core/paint/BoxPainter.h"
10 #include "core/paint/DrawingRecorder.h" 10 #include "core/paint/DrawingRecorder.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 borders.addBorder(bottomVal, BSBottom, renderBottom, borderRect.x(), borderR ect.maxY() - bottomWidth, borderRect.maxX(), borderRect.maxY(), bottomStyle); 167 borders.addBorder(bottomVal, BSBottom, renderBottom, borderRect.x(), borderR ect.maxY() - bottomWidth, borderRect.maxX(), borderRect.maxY(), bottomStyle);
168 borders.addBorder(leftVal, BSLeft, renderLeft, borderRect.x(), borderRect.y( ), borderRect.x() + leftWidth, borderRect.maxY(), leftStyle); 168 borders.addBorder(leftVal, BSLeft, renderLeft, borderRect.x(), borderRect.y( ), borderRect.x() + leftWidth, borderRect.maxY(), leftStyle);
169 borders.addBorder(rightVal, BSRight, renderRight, borderRect.maxX() - rightW idth, borderRect.y(), borderRect.maxX(), borderRect.maxY(), rightStyle); 169 borders.addBorder(rightVal, BSRight, renderRight, borderRect.maxX() - rightW idth, borderRect.y(), borderRect.maxX(), borderRect.maxY(), rightStyle);
170 170
171 GraphicsContext* graphicsContext = paintInfo.context; 171 GraphicsContext* graphicsContext = paintInfo.context;
172 bool antialias = BoxPainter::shouldAntialiasLines(graphicsContext); 172 bool antialias = BoxPainter::shouldAntialiasLines(graphicsContext);
173 173
174 for (CollapsedBorder* border = borders.nextBorder(); border; border = border s.nextBorder()) { 174 for (CollapsedBorder* border = borders.nextBorder(); border; border = border s.nextBorder()) {
175 if (border->borderValue.isSameIgnoringColor(*m_renderTableCell.table()-> currentBorderValue())) { 175 if (border->borderValue.isSameIgnoringColor(*m_renderTableCell.table()-> currentBorderValue())) {
176 ObjectPainter::drawLineForBoxSide(graphicsContext, border->x1, borde r->y1, border->x2, border->y2, border->side, 176 ObjectPainter::drawLineForBoxSide(graphicsContext, border->x1, borde r->y1, border->x2, border->y2, border->side,
177 border->borderValue.color().resolve(m_renderTableCell.style()->v isitedDependentColor(CSSPropertyColor)), border->style, 0, 0, antialias); 177 border->borderValue.color().resolve(m_renderTableCell.resolveCol or(CSSPropertyColor)), border->style, 0, 0, antialias);
178 } 178 }
179 } 179 }
180 } 180 }
181 181
182 void TableCellPainter::paintBackgroundsBehindCell(const PaintInfo& paintInfo, co nst LayoutPoint& paintOffset, RenderObject* backgroundObject) 182 void TableCellPainter::paintBackgroundsBehindCell(const PaintInfo& paintInfo, co nst LayoutPoint& paintOffset, RenderObject* backgroundObject)
183 { 183 {
184 if (!paintInfo.shouldPaintWithinRoot(&m_renderTableCell)) 184 if (!paintInfo.shouldPaintWithinRoot(&m_renderTableCell))
185 return; 185 return;
186 186
187 if (!backgroundObject) 187 if (!backgroundObject)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 LayoutRect TableCellPainter::paintBounds(const LayoutPoint& paintOffset, PaintBo undOffsetBehavior paintBoundOffsetBehavior) 253 LayoutRect TableCellPainter::paintBounds(const LayoutPoint& paintOffset, PaintBo undOffsetBehavior paintBoundOffsetBehavior)
254 { 254 {
255 LayoutPoint adjustedPaintOffset = paintOffset; 255 LayoutPoint adjustedPaintOffset = paintOffset;
256 if (paintBoundOffsetBehavior == AddOffsetFromParent) 256 if (paintBoundOffsetBehavior == AddOffsetFromParent)
257 adjustedPaintOffset.moveBy(m_renderTableCell.location()); 257 adjustedPaintOffset.moveBy(m_renderTableCell.location());
258 return LayoutRect(adjustedPaintOffset, LayoutSize(m_renderTableCell.pixelSna ppedSize())); 258 return LayoutRect(adjustedPaintOffset, LayoutSize(m_renderTableCell.pixelSna ppedSize()));
259 } 259 }
260 260
261 } // namespace blink 261 } // namespace blink
262 262
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/svg/SVGRenderTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698