| Index: third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp b/third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp
|
| index a36a6003e736455472f78e6bd44d374bfd2e3cd7..5c02831d236012dde612ec303713b17386e38329 100644
|
| --- a/third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp
|
| @@ -6,14 +6,40 @@
|
|
|
| #include "core/layout/FloatingObjects.h"
|
| #include "core/layout/LayoutBlockFlow.h"
|
| -#include "core/paint/ClipScope.h"
|
| -#include "core/paint/LayoutObjectDrawingRecorder.h"
|
| +#include "core/paint/BlockPainter.h"
|
| +#include "core/paint/LineBoxListPainter.h"
|
| #include "core/paint/ObjectPainter.h"
|
| #include "core/paint/PaintInfo.h"
|
| -#include "core/paint/PaintLayer.h"
|
|
|
| namespace blink {
|
|
|
| +void BlockFlowPainter::paintContentsAndFloats(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
|
| +{
|
| + paintContents(paintInfo, paintOffset);
|
| +
|
| + const PaintPhase paintPhase = paintInfo.phase;
|
| + if (paintPhase == PaintPhaseFloat || paintPhase == PaintPhaseSelection || paintPhase == PaintPhaseTextClip)
|
| + paintFloats(paintInfo, paintOffset);
|
| +}
|
| +
|
| +void BlockFlowPainter::paintContents(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
|
| +{
|
| + // Avoid painting descendants of the root element when stylesheets haven't loaded. This eliminates FOUC.
|
| + // It's ok not to draw, because later on, when all the stylesheets do load, styleResolverMayHaveChanged()
|
| + // on Document will trigger a full paint invalidation.
|
| + if (m_layoutBlockFlow.document().didLayoutWithPendingStylesheets() && !m_layoutBlockFlow.isLayoutView())
|
| + return;
|
| +
|
| + if (!m_layoutBlockFlow.childrenInline()) {
|
| + BlockPainter(m_layoutBlockFlow).paintContents(paintInfo, paintOffset);
|
| + return;
|
| + }
|
| + if (shouldPaintDescendantOutlines(paintInfo.phase))
|
| + ObjectPainter(m_layoutBlockFlow).paintInlineChildrenOutlines(paintInfo, paintOffset);
|
| + else
|
| + LineBoxListPainter(m_layoutBlockFlow.lineBoxes()).paint(m_layoutBlockFlow, paintInfo, paintOffset);
|
| +}
|
| +
|
| void BlockFlowPainter::paintFloats(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
|
| {
|
| if (!m_layoutBlockFlow.floatingObjects())
|
|
|