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

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

Issue 1316163002: Make the LayoutRect->FloatRect constructor explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
Index: Source/core/paint/EmbeddedObjectPainter.cpp
diff --git a/Source/core/paint/EmbeddedObjectPainter.cpp b/Source/core/paint/EmbeddedObjectPainter.cpp
index 8dd5c5bc11ca175a8a1fe3f24088692756a54064..89fb06a408434c60fbd7b82f6dfcad5e1a8cc6ad 100644
--- a/Source/core/paint/EmbeddedObjectPainter.cpp
+++ b/Source/core/paint/EmbeddedObjectPainter.cpp
@@ -47,10 +47,11 @@ void EmbeddedObjectPainter::paintReplaced(const PaintInfo& paintInfo, const Layo
if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, m_layoutEmbeddedObject, paintInfo.phase))
return;
- FloatRect contentRect = m_layoutEmbeddedObject.contentBoxRect();
+ FloatRect contentRect(m_layoutEmbeddedObject.contentBoxRect());
contentRect.moveBy(roundedIntPoint(paintOffset));
- LayoutObjectDrawingRecorder drawingRecorder(*context, m_layoutEmbeddedObject, paintInfo.phase, contentRect);
+ LayoutObjectDrawingRecorder drawingRecorder(*context, m_layoutEmbeddedObject, paintInfo.phase, LayoutRect(enclosingIntRect(contentRect)));
jbroman 2015/08/26 21:45:08 Can just use the IntRect overload to take enclosin
chrishtr 2015/08/26 22:32:21 Done.
GraphicsContextStateSaver stateSaver(*context);
+ // TODO(chrishtr): this should be pixel-snapped.
context->clip(contentRect);
Font font = replacementTextFont();

Powered by Google App Engine
This is Rietveld 408576698