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

Unified Diff: Source/core/frame/LocalFrame.cpp

Issue 1224893004: Turn FrameView's paintBehavior into a real global (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Improved change after the reviews. Still fails on Android. Created 5 years, 5 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
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/LocalFrame.cpp
diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp
index d7362b387583bdce737827918f1543e45b9ab428..3292dfb5379be3274c41ad9ffd80be3a49db7221 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 = GlobalPaintNormalPhase;
}
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()));
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698