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

Unified Diff: Source/core/paint/FileUploadControlPainter.cpp

Issue 1315993004: Implement a paint offset cache for slimming paint v2 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase more (world moved in the past hour) Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/paint/FieldsetPainter.cpp ('k') | Source/core/paint/FramePainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/FileUploadControlPainter.cpp
diff --git a/Source/core/paint/FileUploadControlPainter.cpp b/Source/core/paint/FileUploadControlPainter.cpp
index 479bd661aedc2a332dba4c9efb789d84c03ce006..e94252bf39b3dec21d3d11824f352fe0dfc7058a 100644
--- a/Source/core/paint/FileUploadControlPainter.cpp
+++ b/Source/core/paint/FileUploadControlPainter.cpp
@@ -33,7 +33,7 @@ void FileUploadControlPainter::paintObject(const PaintInfo& paintInfo, const Lay
clipRecorder.emplace(*paintInfo.context, m_layoutFileUploadControl, DisplayItem::ClipFileUploadControlRect, LayoutRect(clipRect));
}
- if (paintInfo.phase == PaintPhaseForeground && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutFileUploadControl, paintInfo.phase)) {
+ if (paintInfo.phase == PaintPhaseForeground && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutFileUploadControl, paintInfo.phase, paintOffset)) {
const String& displayedFilename = m_layoutFileUploadControl.fileTextValue();
const Font& font = m_layoutFileUploadControl.style()->font();
TextRun textRun = constructTextRun(font, displayedFilename, m_layoutFileUploadControl.styleRef(), RespectDirection | RespectDirectionOverride);
@@ -67,7 +67,7 @@ void FileUploadControlPainter::paintObject(const PaintInfo& paintInfo, const Lay
textWidth, m_layoutFileUploadControl.style()->fontMetrics().height());
// Draw the filename.
- LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutFileUploadControl, paintInfo.phase, textRunPaintInfo.bounds);
+ LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutFileUploadControl, paintInfo.phase, textRunPaintInfo.bounds, paintOffset);
paintInfo.context->setFillColor(m_layoutFileUploadControl.resolveColor(CSSPropertyColor));
paintInfo.context->drawBidiText(font, textRunPaintInfo, FloatPoint(roundToInt(textX), roundToInt(textY)));
}
« no previous file with comments | « Source/core/paint/FieldsetPainter.cpp ('k') | Source/core/paint/FramePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698