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

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

Issue 698743002: [WIP] Adding support for <iframe>s to slimming paint. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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/FramePainter.cpp
diff --git a/Source/core/paint/FramePainter.cpp b/Source/core/paint/FramePainter.cpp
index a2e721af44a8e90dfba9d3c280d12f801eb3f317..ca59656ee30af8952708f46a9e8e0083d3e2b425 100644
--- a/Source/core/paint/FramePainter.cpp
+++ b/Source/core/paint/FramePainter.cpp
@@ -12,8 +12,10 @@
#include "core/page/Chrome.h"
#include "core/page/ChromeClient.h"
#include "core/page/Page.h"
+#include "core/paint/ClipRecorder.h"
#include "core/paint/LayerPainter.h"
#include "core/paint/ScrollbarPainter.h"
+#include "core/paint/TranslationRecorder.h"
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderView.h"
#include "platform/fonts/FontCache.h"
@@ -34,10 +36,9 @@ void FramePainter::paint(GraphicsContext* context, const IntRect& rect)
documentDirtyRect.intersect(visibleAreaWithoutScrollbars);
if (!documentDirtyRect.isEmpty()) {
- GraphicsContextStateSaver stateSaver(*context);
-
- context->translate(m_frameView.x() - m_frameView.scrollX(), m_frameView.y() - m_frameView.scrollY());
- context->clip(m_frameView.visibleContentRect());
+ // FIXME: Need proper identifier (renderer and phase pair) for the recorders.
+ TranslationRecorder translationRecorder(m_frameView.renderView(), context, FloatSize(m_frameView.x() - m_frameView.scrollX(), m_frameView.y() - m_frameView.scrollY()));
+ ClipRecorder clipRecorder(m_frameView.renderView()->layer(), context, DisplayItem::ClipLayerForeground, LayoutRect(m_frameView.visibleContentRect()));
documentDirtyRect.moveBy(-m_frameView.location() + m_frameView.scrollPosition());
paintContents(context, documentDirtyRect);

Powered by Google App Engine
This is Rietveld 408576698