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

Unified Diff: Source/core/paint/FramePainter.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/paint/DeprecatedPaintLayerPainter.cpp ('k') | Source/core/paint/InlineFlowBoxPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/FramePainter.cpp
diff --git a/Source/core/paint/FramePainter.cpp b/Source/core/paint/FramePainter.cpp
index 74b3b93dd13ba02b4c50ac5c5bbb751ad5044cd8..30da9303150fdee2940e47700f2619226258b804 100644
--- a/Source/core/paint/FramePainter.cpp
+++ b/Source/core/paint/FramePainter.cpp
@@ -73,7 +73,7 @@ void FramePainter::paintContents(GraphicsContext* context, const IntRect& rect)
fillWithRed = false; // Subframe, don't fill with red.
else if (m_frameView.isTransparent())
fillWithRed = false; // Transparent, don't fill with red.
- else if (m_frameView.paintBehavior() & PaintBehaviorSelectionOnly)
+ else if (gGlobalPaintFlags & GlobalPaintSelectionOnly)
fillWithRed = false; // Selections are transparent, don't fill with red.
else if (m_frameView.nodeToDraw())
fillWithRed = false; // Element images are transparent, don't fill with red.
@@ -102,15 +102,9 @@ void FramePainter::paintContents(GraphicsContext* context, const IntRect& rect)
FontCachePurgePreventer fontCachePurgePreventer;
- PaintBehavior oldPaintBehavior = m_frameView.paintBehavior();
-
- if (FrameView* parentView = m_frameView.parentFrameView()) {
- if (parentView->paintBehavior() & PaintBehaviorFlattenCompositingLayers)
- m_frameView.setPaintBehavior(m_frameView.paintBehavior() | PaintBehaviorFlattenCompositingLayers);
- }
-
+ // TODO(jchaffraix): Why is this here and done globally once per paint phase?
if (document->printing())
- m_frameView.setPaintBehavior(m_frameView.paintBehavior() | PaintBehaviorFlattenCompositingLayers);
+ gGlobalPaintFlags |= GlobalPaintFlattenCompositingLayers;
ASSERT(!m_frameView.isPainting());
m_frameView.setIsPainting(true);
@@ -129,14 +123,13 @@ void FramePainter::paintContents(GraphicsContext* context, const IntRect& rect)
float deviceScaleFactor = blink::deviceScaleFactor(rootLayer->layoutObject()->frame());
context->setDeviceScaleFactor(deviceScaleFactor);
- layerPainter.paint(context, LayoutRect(rect), m_frameView.paintBehavior(), layoutObject);
+ layerPainter.paint(context, LayoutRect(rect), PaintBehaviorNormal, layoutObject);
if (rootLayer->containsDirtyOverlayScrollbars())
- layerPainter.paintOverlayScrollbars(context, LayoutRect(rect), m_frameView.paintBehavior(), layoutObject);
+ layerPainter.paintOverlayScrollbars(context, LayoutRect(rect), PaintBehaviorNormal, layoutObject);
m_frameView.setIsPainting(false);
- m_frameView.setPaintBehavior(oldPaintBehavior);
m_frameView.setLastPaintTime(currentTime());
// Regions may have changed as a result of the visibility/z-index of element changing.
« no previous file with comments | « Source/core/paint/DeprecatedPaintLayerPainter.cpp ('k') | Source/core/paint/InlineFlowBoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698