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

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

Issue 1321613002: Refactor ObjectPainter::paintOutline to take a paintOffset (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove ObjectPainter::outlineRectForSVG Created 5 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
« no previous file with comments | « Source/core/paint/TablePainter.cpp ('k') | Source/core/paint/TableSectionPainter.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/TableRowPainter.h" 6 #include "core/paint/TableRowPainter.h"
7 7
8 #include "core/layout/LayoutTableCell.h" 8 #include "core/layout/LayoutTableCell.h"
9 #include "core/layout/LayoutTableRow.h" 9 #include "core/layout/LayoutTableRow.h"
10 #include "core/paint/LayoutObjectDrawingRecorder.h" 10 #include "core/paint/LayoutObjectDrawingRecorder.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 } 32 }
33 33
34 if (!cell->hasSelfPaintingLayer()) 34 if (!cell->hasSelfPaintingLayer())
35 cell->paint(paintInfo, paintOffset); 35 cell->paint(paintInfo, paintOffset);
36 } 36 }
37 } 37 }
38 38
39 void TableRowPainter::paintOutlineForRowIfNeeded(const PaintInfo& paintInfo, con st LayoutPoint& paintOffset) 39 void TableRowPainter::paintOutlineForRowIfNeeded(const PaintInfo& paintInfo, con st LayoutPoint& paintOffset)
40 { 40 {
41 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutTableRow.location();
42 PaintPhase paintPhase = paintInfo.phase; 41 PaintPhase paintPhase = paintInfo.phase;
43 if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && m_layoutTableRow.style()->visibility() == VISIBLE) { 42 if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && m_layoutTableRow.style()->visibility() == VISIBLE) {
44 LayoutRect visualOverflowRect(m_layoutTableRow.visualOverflowRect()); 43 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutTableRow.locatio n();
45 visualOverflowRect.moveBy(adjustedPaintOffset); 44 ObjectPainter(m_layoutTableRow).paintOutline(paintInfo, m_layoutTableRow .visualOverflowRect(), m_layoutTableRow.size(), adjustedPaintOffset);
46 ObjectPainter(m_layoutTableRow).paintOutline(paintInfo, LayoutRect(adjus tedPaintOffset, m_layoutTableRow.size()), visualOverflowRect);
47 } 45 }
48 } 46 }
49 47
50 } // namespace blink 48 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/TablePainter.cpp ('k') | Source/core/paint/TableSectionPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698