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

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

Issue 21430003: Implement interfaces in PaintInfo and make it a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@getterPaintInfo01
Patch Set: Second try Created 7 years, 4 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
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, 2010 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 } 228 }
229 } 229 }
230 } 230 }
231 231
232 return false; 232 return false;
233 } 233 }
234 234
235 void RenderTableRow::paintOutlineForRowIfNeeded(PaintInfo& paintInfo, const Layo utPoint& paintOffset) 235 void RenderTableRow::paintOutlineForRowIfNeeded(PaintInfo& paintInfo, const Layo utPoint& paintOffset)
236 { 236 {
237 LayoutPoint adjustedPaintOffset = paintOffset + location(); 237 LayoutPoint adjustedPaintOffset = paintOffset + location();
238 PaintPhase paintPhase = paintInfo.phase; 238 PaintPhase paintPhase = paintInfo.getPhase();
239 if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && style()->visibility() == VISIBLE) 239 if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && style()->visibility() == VISIBLE)
240 paintOutline(paintInfo, LayoutRect(adjustedPaintOffset, size())); 240 paintOutline(paintInfo, LayoutRect(adjustedPaintOffset, size()));
241 } 241 }
242 242
243 void RenderTableRow::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 243 void RenderTableRow::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
244 { 244 {
245 ASSERT(hasSelfPaintingLayer()); 245 ASSERT(hasSelfPaintingLayer());
246 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); 246 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this);
247 247
248 paintOutlineForRowIfNeeded(paintInfo, paintOffset); 248 paintOutlineForRowIfNeeded(paintInfo, paintOffset);
249 for (RenderObject* child = firstChild(); child; child = child->nextSibling() ) { 249 for (RenderObject* child = firstChild(); child; child = child->nextSibling() ) {
250 if (child->isTableCell()) { 250 if (child->isTableCell()) {
251 // Paint the row background behind the cell. 251 // Paint the row background behind the cell.
252 if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == PaintPhaseChildBlockBackground) { 252 if (paintInfo.getPhase() == PaintPhaseBlockBackground || paintInfo.g etPhase() == PaintPhaseChildBlockBackground) {
253 RenderTableCell* cell = toRenderTableCell(child); 253 RenderTableCell* cell = toRenderTableCell(child);
254 cell->paintBackgroundsBehindCell(paintInfo, paintOffset, this); 254 cell->paintBackgroundsBehindCell(paintInfo, paintOffset, this);
255 } 255 }
256 if (!toRenderBox(child)->hasSelfPaintingLayer()) 256 if (!toRenderBox(child)->hasSelfPaintingLayer())
257 child->paint(paintInfo, paintOffset); 257 child->paint(paintInfo, paintOffset);
258 } 258 }
259 } 259 }
260 } 260 }
261 261
262 void RenderTableRow::imageChanged(WrappedImagePtr, const IntRect*) 262 void RenderTableRow::imageChanged(WrappedImagePtr, const IntRect*)
(...skipping 11 matching lines...) Expand all
274 274
275 RenderTableRow* RenderTableRow::createAnonymousWithParentRenderer(const RenderOb ject* parent) 275 RenderTableRow* RenderTableRow::createAnonymousWithParentRenderer(const RenderOb ject* parent)
276 { 276 {
277 RenderTableRow* newRow = RenderTableRow::createAnonymous(parent->document()) ; 277 RenderTableRow* newRow = RenderTableRow::createAnonymous(parent->document()) ;
278 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_ROW); 278 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_ROW);
279 newRow->setStyle(newStyle.release()); 279 newRow->setStyle(newStyle.release());
280 return newRow; 280 return newRow;
281 } 281 }
282 282
283 } // namespace WebCore 283 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698