| 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.
|
|
|