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

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

Issue 815933006: Change all uses of the RoundedRect class to use FloatRoundedRect instead. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 12 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
« no previous file with comments | « Source/core/paint/LayerClipRecorder.cpp ('k') | Source/core/paint/ReplacedPainter.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/PartPainter.h" 6 #include "core/paint/PartPainter.h"
7 7
8 #include "core/paint/BoxPainter.h" 8 #include "core/paint/BoxPainter.h"
9 9
10 #include "core/paint/ScrollableAreaPainter.h" 10 #include "core/paint/ScrollableAreaPainter.h"
(...skipping 28 matching lines...) Expand all
39 return; 39 return;
40 40
41 if (m_renderPart.style()->hasBorderRadius()) { 41 if (m_renderPart.style()->hasBorderRadius()) {
42 LayoutRect borderRect = LayoutRect(adjustedPaintOffset, m_renderPart.siz e()); 42 LayoutRect borderRect = LayoutRect(adjustedPaintOffset, m_renderPart.siz e());
43 43
44 if (borderRect.isEmpty()) 44 if (borderRect.isEmpty())
45 return; 45 return;
46 46
47 // Push a clip if we have a border radius, since we want to round the fo reground content that gets painted. 47 // Push a clip if we have a border radius, since we want to round the fo reground content that gets painted.
48 paintInfo.context->save(); 48 paintInfo.context->save();
49 RoundedRect roundedInnerRect = m_renderPart.style()->getRoundedInnerBord erFor(borderRect, 49 FloatRoundedRect roundedInnerRect = m_renderPart.style()->getRoundedInne rBorderFor(borderRect,
50 m_renderPart.paddingTop() + m_renderPart.borderTop(), m_renderPart.p addingBottom() + m_renderPart.borderBottom(), m_renderPart.paddingLeft() + m_ren derPart.borderLeft(), m_renderPart.paddingRight() + m_renderPart.borderRight(), true, true); 50 m_renderPart.paddingTop() + m_renderPart.borderTop(), m_renderPart.p addingBottom() + m_renderPart.borderBottom(), m_renderPart.paddingLeft() + m_ren derPart.borderLeft(), m_renderPart.paddingRight() + m_renderPart.borderRight(), true, true);
51 BoxPainter::clipRoundedInnerRect(paintInfo.context, borderRect, roundedI nnerRect); 51 BoxPainter::clipRoundedInnerRect(paintInfo.context, borderRect, roundedI nnerRect);
52 } 52 }
53 53
54 if (m_renderPart.widget()) 54 if (m_renderPart.widget())
55 m_renderPart.paintContents(paintInfo, paintOffset); 55 m_renderPart.paintContents(paintInfo, paintOffset);
56 56
57 if (m_renderPart.style()->hasBorderRadius()) 57 if (m_renderPart.style()->hasBorderRadius())
58 paintInfo.context->restore(); 58 paintInfo.context->restore();
59 59
(...skipping 29 matching lines...) Expand all
89 paintInfo.context->translate(widgetPaintOffset.width(), widgetPaintOffse t.height()); 89 paintInfo.context->translate(widgetPaintOffset.width(), widgetPaintOffse t.height());
90 paintRect.move(-widgetPaintOffset); 90 paintRect.move(-widgetPaintOffset);
91 } 91 }
92 widget->paint(paintInfo.context, paintRect); 92 widget->paint(paintInfo.context, paintRect);
93 93
94 if (!widgetPaintOffset.isZero()) 94 if (!widgetPaintOffset.isZero())
95 paintInfo.context->translate(-widgetPaintOffset.width(), -widgetPaintOff set.height()); 95 paintInfo.context->translate(-widgetPaintOffset.width(), -widgetPaintOff set.height());
96 } 96 }
97 97
98 } // namespace blink 98 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/LayerClipRecorder.cpp ('k') | Source/core/paint/ReplacedPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698