Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp |
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
index ebd255b75ec08cb74b64de95990fae3ca233ed1e..a4c4916c74300e8cb4eb4d8553679ad2297058cf 100644 |
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
@@ -70,6 +70,7 @@ |
#include "platform/RuntimeEnabledFeatures.h" |
#include "platform/ScriptForbiddenScope.h" |
#include "platform/graphics/GraphicsContext.h" |
+#include "platform/graphics/GraphicsScreen.h" |
#include "platform/graphics/StaticBitmapImage.h" |
#include "platform/graphics/paint/ClipRecorder.h" |
#include "platform/graphics/paint/SkPictureBuilder.h" |
@@ -660,6 +661,8 @@ PassOwnPtr<DragImage> LocalFrame::nodeImage(Node& node) |
if (!layoutObject) |
return nullptr; |
+ WillPaintForDevice device(Page::screenId(page())); |
+ |
// Directly paint boxes as if they are a stacking context. |
if (layoutObject->isBox() && layoutObject->container()) { |
IntRect boundingBox = layoutObject->absoluteBoundingBoxRectIncludingDescendants(); |
@@ -685,6 +688,8 @@ PassOwnPtr<DragImage> LocalFrame::dragImageForSelection(float opacity) |
if (!selection().isRange()) |
return nullptr; |
+ WillPaintForDevice device(Page::screenId(page())); |
+ |
m_view->updateAllLifecyclePhases(); |
return paintIntoDragImage(GlobalPaintSelectionOnly | GlobalPaintFlattenCompositingLayers, |