| Index: Source/core/frame/LocalFrame.cpp
|
| diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp
|
| index d7362b387583bdce737827918f1543e45b9ab428..2324b095516d91aca12777f1d8e56a28dd1b3758 100644
|
| --- a/Source/core/frame/LocalFrame.cpp
|
| +++ b/Source/core/frame/LocalFrame.cpp
|
| @@ -85,7 +85,6 @@ struct ScopedFramePaintingState {
|
| ScopedFramePaintingState(LocalFrame* frame, Node* node)
|
| : frame(frame)
|
| , node(node)
|
| - , paintBehavior(frame->view()->paintBehavior())
|
| {
|
| ASSERT(!node || node->layoutObject());
|
| if (node)
|
| @@ -96,13 +95,15 @@ struct ScopedFramePaintingState {
|
| {
|
| if (node && node->layoutObject())
|
| node->layoutObject()->updateDragState(false);
|
| - frame->view()->setPaintBehavior(paintBehavior);
|
| frame->view()->setNodeToDraw(0);
|
| + // We reset the global paint flags as this is the end
|
| + // of the paint phase. TODO(jchaffraix): We shouldn't
|
| + // need this code. See the comment above GlobalPaintFlags.
|
| + gGlobalPaintFlags = GlobalPaintNoFlag;
|
| }
|
|
|
| LocalFrame* frame;
|
| Node* node;
|
| - PaintBehavior paintBehavior;
|
| };
|
|
|
| inline float parentPageZoomFactor(LocalFrame* frame)
|
| @@ -628,7 +629,7 @@ PassOwnPtr<DragImage> LocalFrame::nodeImage(Node& node)
|
|
|
| m_view->updateAllLifecyclePhases();
|
|
|
| - m_view->setPaintBehavior(state.paintBehavior | PaintBehaviorFlattenCompositingLayers);
|
| + gGlobalPaintFlags = GlobalPaintFlattenCompositingLayers;
|
|
|
| m_view->setNodeToDraw(&node); // Enable special sub-tree drawing mode.
|
|
|
| @@ -649,7 +650,7 @@ PassOwnPtr<DragImage> LocalFrame::dragImageForSelection()
|
| return nullptr;
|
|
|
| const ScopedFramePaintingState state(this, 0);
|
| - m_view->setPaintBehavior(PaintBehaviorSelectionOnly | PaintBehaviorFlattenCompositingLayers);
|
| + gGlobalPaintFlags = GlobalPaintSelectionOnly | GlobalPaintFlattenCompositingLayers;
|
| m_view->updateAllLifecyclePhases();
|
|
|
| return paintIntoDragImage(*this, DisplayItem::ClipSelectionImage, DoNotRespectImageOrientation, enclosingIntRect(selection().bounds()));
|
|
|