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

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

Issue 1144203004: Allow certain SP recorder classes to defer their "begin" operation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/DeprecatedPaintLayerPainter.cpp ('k') | Source/core/paint/FloatClipRecorder.h » ('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 34b3031de96de022954b2cb7d4e69470b34ba2d0..72308dd76a1fe7abb8907689cbb7872c40c2f8bb 100644
--- a/Source/core/paint/FileUploadControlPainter.cpp
+++ b/Source/core/paint/FileUploadControlPainter.cpp
@@ -22,14 +22,14 @@ void FileUploadControlPainter::paintObject(const PaintInfo& paintInfo, const Lay
return;
// Push a clip.
- OwnPtr<ClipRecorder> clipRecorder;
+ ClipRecorder clipRecorder(*paintInfo.context, m_layoutFileUploadControl, DisplayItem::ClipFileUploadControlRect);
if (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseChildBlockBackgrounds) {
IntRect clipRect = enclosingIntRect(LayoutRect(
LayoutPoint(paintOffset.x() + m_layoutFileUploadControl.borderLeft(), paintOffset.y() + m_layoutFileUploadControl.borderTop()),
m_layoutFileUploadControl.size() + LayoutSize(0, -m_layoutFileUploadControl.borderWidth() + buttonShadowHeight)));
if (clipRect.isEmpty())
return;
- clipRecorder = adoptPtr(new ClipRecorder(*paintInfo.context, m_layoutFileUploadControl, DisplayItem::ClipFileUploadControlRect, LayoutRect(clipRect)));
+ clipRecorder.begin(LayoutRect(clipRect));
}
if (paintInfo.phase == PaintPhaseForeground) {
« no previous file with comments | « Source/core/paint/DeprecatedPaintLayerPainter.cpp ('k') | Source/core/paint/FloatClipRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698