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

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

Issue 732093002: Move RenderBoxClipper to core/paint/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « Source/core/paint/BoxClipper.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/TablePainter.h" 6 #include "core/paint/TablePainter.h"
7 7
8 #include "core/paint/BoxClipper.h"
8 #include "core/paint/BoxPainter.h" 9 #include "core/paint/BoxPainter.h"
9 #include "core/paint/DrawingRecorder.h" 10 #include "core/paint/DrawingRecorder.h"
10 #include "core/paint/ObjectPainter.h" 11 #include "core/paint/ObjectPainter.h"
11 #include "core/rendering/GraphicsContextAnnotator.h" 12 #include "core/rendering/GraphicsContextAnnotator.h"
12 #include "core/rendering/PaintInfo.h" 13 #include "core/rendering/PaintInfo.h"
13 #include "core/rendering/RenderBoxClipper.h"
14 #include "core/rendering/RenderTable.h" 14 #include "core/rendering/RenderTable.h"
15 #include "core/rendering/RenderTableSection.h" 15 #include "core/rendering/RenderTableSection.h"
16 #include "core/rendering/style/CollapsedBorderValue.h" 16 #include "core/rendering/style/CollapsedBorderValue.h"
17 17
18 namespace blink { 18 namespace blink {
19 19
20 void TablePainter::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 20 void TablePainter::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
21 { 21 {
22 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, &m_renderTable); 22 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, &m_renderTable);
23 23
24 LayoutPoint adjustedPaintOffset = paintOffset + m_renderTable.location(); 24 LayoutPoint adjustedPaintOffset = paintOffset + m_renderTable.location();
25 25
26 if (!m_renderTable.isDocumentElement()) { 26 if (!m_renderTable.isDocumentElement()) {
27 LayoutRect overflowBox = m_renderTable.visualOverflowRect(); 27 LayoutRect overflowBox = m_renderTable.visualOverflowRect();
28 m_renderTable.flipForWritingMode(overflowBox); 28 m_renderTable.flipForWritingMode(overflowBox);
29 overflowBox.moveBy(adjustedPaintOffset); 29 overflowBox.moveBy(adjustedPaintOffset);
30 if (!overflowBox.intersects(paintInfo.rect)) 30 if (!overflowBox.intersects(paintInfo.rect))
31 return; 31 return;
32 } 32 }
33 33
34 RenderBoxClipper boxClipper(m_renderTable, paintInfo, adjustedPaintOffset, F orceContentsClip); 34 BoxClipper boxClipper(m_renderTable, paintInfo, adjustedPaintOffset, ForceCo ntentsClip);
35 paintObject(paintInfo, adjustedPaintOffset); 35 paintObject(paintInfo, adjustedPaintOffset);
36 } 36 }
37 37
38 void TablePainter::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOff set) 38 void TablePainter::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOff set)
39 { 39 {
40 PaintPhase paintPhase = paintInfo.phase; 40 PaintPhase paintPhase = paintInfo.phase;
41 if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChil dBlockBackground) && m_renderTable.hasBoxDecorationBackground() && m_renderTable .style()->visibility() == VISIBLE) 41 if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChil dBlockBackground) && m_renderTable.hasBoxDecorationBackground() && m_renderTable .style()->visibility() == VISIBLE)
42 paintBoxDecorationBackground(paintInfo, paintOffset); 42 paintBoxDecorationBackground(paintInfo, paintOffset);
43 43
44 if (paintPhase == PaintPhaseMask) { 44 if (paintPhase == PaintPhaseMask) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (m_renderTable.style()->visibility() != VISIBLE || paintInfo.phase != Pai ntPhaseMask) 103 if (m_renderTable.style()->visibility() != VISIBLE || paintInfo.phase != Pai ntPhaseMask)
104 return; 104 return;
105 105
106 LayoutRect rect(paintOffset, m_renderTable.size()); 106 LayoutRect rect(paintOffset, m_renderTable.size());
107 m_renderTable.subtractCaptionRect(rect); 107 m_renderTable.subtractCaptionRect(rect);
108 DrawingRecorder recorder(paintInfo.context, &m_renderTable, paintInfo.phase, pixelSnappedIntRect(rect)); 108 DrawingRecorder recorder(paintInfo.context, &m_renderTable, paintInfo.phase, pixelSnappedIntRect(rect));
109 BoxPainter(m_renderTable).paintMaskImages(paintInfo, rect); 109 BoxPainter(m_renderTable).paintMaskImages(paintInfo, rect);
110 } 110 }
111 111
112 } // namespace blink 112 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/BoxClipper.cpp ('k') | Source/core/paint/TableSectionPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698