summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp
index ef78b07ee1..9af7137faf 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp
@@ -175,6 +175,12 @@ void RenderWidget::styleDidChange(StyleDifference diff, const RenderStyle* oldSt
}
}
+void RenderWidget::showSubstituteImage(PassRefPtr<Image> prpImage)
+{
+ m_substituteImage = prpImage;
+ repaint();
+}
+
void RenderWidget::paint(PaintInfo& paintInfo, int tx, int ty)
{
if (!shouldPaint(paintInfo, tx, ty))
@@ -222,7 +228,10 @@ void RenderWidget::paint(PaintInfo& paintInfo, int tx, int ty)
// Tell the widget to paint now. This is the only time the widget is allowed
// to paint itself. That way it will composite properly with z-indexed layers.
- m_widget->paint(paintInfo.context, paintInfo.rect);
+ if (m_substituteImage)
+ paintInfo.context->drawImage(m_substituteImage.get(), m_widget->frameRect());
+ else
+ m_widget->paint(paintInfo.context, paintInfo.rect);
if (m_widget->isFrameView() && paintInfo.overlapTestRequests && !static_cast<FrameView*>(m_widget.get())->useSlowRepaints()) {
ASSERT(!paintInfo.overlapTestRequests->contains(this));