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

Unified Diff: Source/core/rendering/RenderFileUploadControl.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, 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderFileUploadControl.cpp
diff --git a/Source/core/rendering/RenderFileUploadControl.cpp b/Source/core/rendering/RenderFileUploadControl.cpp
index 7228e4b35144fd7819f060dccd8e97ec6fa3cdb5..4f0465984b22f2ce7481521ac00e2f7aa0e2e70e 100644
--- a/Source/core/rendering/RenderFileUploadControl.cpp
+++ b/Source/core/rendering/RenderFileUploadControl.cpp
@@ -98,17 +98,17 @@ void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, const LayoutPoin
return;
// Push a clip.
- GraphicsContextStateSaver stateSaver(*paintInfo.context, false);
- if (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseChildBlockBackgrounds) {
+ GraphicsContextStateSaver stateSaver(*(paintInfo.getContext()), false);
+ if (paintInfo.getPhase() == PaintPhaseForeground || paintInfo.getPhase() == PaintPhaseChildBlockBackgrounds) {
IntRect clipRect = enclosingIntRect(LayoutRect(paintOffset.x() + borderLeft(), paintOffset.y() + borderTop(),
width() - borderLeft() - borderRight(), height() - borderBottom() - borderTop() + buttonShadowHeight));
if (clipRect.isEmpty())
return;
stateSaver.save();
- paintInfo.context->clip(clipRect);
+ paintInfo.getContext()->clip(clipRect);
}
- if (paintInfo.phase == PaintPhaseForeground) {
+ if (paintInfo.getPhase() == PaintPhaseForeground) {
const String& displayedFilename = fileTextValue();
const Font& font = style()->font();
TextRun textRun = constructTextRun(this, font, displayedFilename, style(), TextRun::AllowTrailingExpansion, RespectDirection | RespectDirectionOverride);
@@ -143,10 +143,10 @@ void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, const LayoutPoin
textWidth,
style()->fontMetrics().height());
- paintInfo.context->setFillColor(resolveColor(CSSPropertyColor));
+ paintInfo.getContext()->setFillColor(resolveColor(CSSPropertyColor));
// Draw the filename
- paintInfo.context->drawBidiText(font, textRunPaintInfo, IntPoint(roundToInt(textX), roundToInt(textY)));
+ paintInfo.getContext()->drawBidiText(font, textRunPaintInfo, IntPoint(roundToInt(textX), roundToInt(textY)));
}
// Paint the children.

Powered by Google App Engine
This is Rietveld 408576698