| Index: Source/core/rendering/RenderBlockFlow.cpp
|
| diff --git a/Source/core/rendering/RenderBlockFlow.cpp b/Source/core/rendering/RenderBlockFlow.cpp
|
| index 66839618a85298c8590ef4e1c2b757b395da6a24..076512949347a470b53acd9e4cb05277977be7fc 100644
|
| --- a/Source/core/rendering/RenderBlockFlow.cpp
|
| +++ b/Source/core/rendering/RenderBlockFlow.cpp
|
| @@ -38,6 +38,7 @@
|
| #include "core/html/HTMLDialogElement.h"
|
| #include "core/paint/BlockFlowPainter.h"
|
| #include "core/paint/DrawingRecorder.h"
|
| +#include "core/paint/GraphicsContextRecorder.h"
|
| #include "core/rendering/HitTestLocation.h"
|
| #include "core/rendering/RenderFlowThread.h"
|
| #include "core/rendering/RenderLayer.h"
|
| @@ -2120,16 +2121,22 @@ void RenderBlockFlow::paintSelection(const PaintInfo& paintInfo, const LayoutPoi
|
|
|
| void RenderBlockFlow::clipOutFloatingObjects(const RenderBlock* rootBlock, const PaintInfo* paintInfo, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock) const
|
| {
|
| - if (m_floatingObjects) {
|
| - const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
|
| - FloatingObjectSetIterator end = floatingObjectSet.end();
|
| - for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
|
| - FloatingObject* floatingObject = it->get();
|
| - LayoutRect floatBox(offsetFromRootBlock.width() + xPositionForFloatIncludingMargin(floatingObject),
|
| - offsetFromRootBlock.height() + yPositionForFloatIncludingMargin(floatingObject),
|
| - floatingObject->renderer()->width(), floatingObject->renderer()->height());
|
| - rootBlock->flipForWritingMode(floatBox);
|
| - floatBox.move(rootBlockPhysicalPosition.x(), rootBlockPhysicalPosition.y());
|
| + if (!m_floatingObjects)
|
| + return;
|
| +
|
| + const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
|
| + FloatingObjectSetIterator end = floatingObjectSet.end();
|
| + for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
|
| + FloatingObject* floatingObject = it->get();
|
| + LayoutRect floatBox(offsetFromRootBlock.width() + xPositionForFloatIncludingMargin(floatingObject),
|
| + offsetFromRootBlock.height() + yPositionForFloatIncludingMargin(floatingObject),
|
| + floatingObject->renderer()->width(), floatingObject->renderer()->height());
|
| + rootBlock->flipForWritingMode(floatBox);
|
| + floatBox.move(rootBlockPhysicalPosition.x(), rootBlockPhysicalPosition.y());
|
| + if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
|
| + GraphicsContextRecorder::currentRecorder().addClipRecorder(
|
| + adoptPtr(new ClipRecorder(const_cast<RenderBlockFlow&>(*this), const_cast<PaintInfo&>(*paintInfo), floatBox, SkRegion::kDifference_Op)));
|
| + } else {
|
| paintInfo->context->clipOut(pixelSnappedIntRect(floatBox));
|
| }
|
| }
|
|
|