Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/BlockPainter.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/BlockPainter.cpp b/third_party/WebKit/Source/core/paint/BlockPainter.cpp |
| index fae1796f4f780fbcee3399d4a900814bc1c70650..7666d1e0f6ec57ba93c8b8ed5f2d3aab5cef89fe 100644 |
| --- a/third_party/WebKit/Source/core/paint/BlockPainter.cpp |
| +++ b/third_party/WebKit/Source/core/paint/BlockPainter.cpp |
| @@ -6,8 +6,6 @@ |
| #include "core/editing/DragCaretController.h" |
| #include "core/editing/FrameSelection.h" |
| -#include "core/frame/Settings.h" |
| -#include "core/layout/LayoutBlockFlow.h" |
| #include "core/layout/LayoutFlexibleBox.h" |
| #include "core/layout/LayoutInline.h" |
| #include "core/layout/api/LineLayoutAPIShim.h" |
| @@ -15,13 +13,10 @@ |
| #include "core/page/Page.h" |
| #include "core/paint/BoxClipper.h" |
| #include "core/paint/BoxPainter.h" |
| -#include "core/paint/InlinePainter.h" |
| #include "core/paint/LayoutObjectDrawingRecorder.h" |
| -#include "core/paint/LineBoxListPainter.h" |
| #include "core/paint/ObjectPaintProperties.h" |
| #include "core/paint/PaintInfo.h" |
| #include "core/paint/PaintLayer.h" |
| -#include "core/paint/ScopeRecorder.h" |
| #include "core/paint/ScrollRecorder.h" |
| #include "core/paint/ScrollableAreaPainter.h" |
| #include "platform/graphics/paint/ClipRecorder.h" |
| @@ -181,10 +176,7 @@ void BlockPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& pa |
| const PaintInfo& contentsPaintInfo = scrolledPaintInfo ? *scrolledPaintInfo : paintInfo; |
| - paintContents(contentsPaintInfo, paintOffset); |
| - |
| - if (paintPhase == PaintPhaseFloat || paintPhase == PaintPhaseSelection || paintPhase == PaintPhaseTextClip) |
| - m_layoutBlock.paintFloats(contentsPaintInfo, paintOffset); |
| + m_layoutBlock.paintContentsAndFloats(contentsPaintInfo, paintOffset); |
|
mstensho (USE GERRIT)
2016/05/18 15:12:34
Not sure how you prefer this. We could just as wel
chrishtr
2016/05/18 16:50:42
It would be good to avoid having a method related
mstensho (USE GERRIT)
2016/05/18 18:51:08
Hmm... is it okay to initialize a BlockFlowPainter
|
| } |
| if (shouldPaintSelfOutline(paintPhase)) |
| @@ -237,21 +229,9 @@ bool BlockPainter::intersectsPaintRect(const PaintInfo& paintInfo, const LayoutP |
| void BlockPainter::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_layoutBlock.document().didLayoutWithPendingStylesheets() && !m_layoutBlock.isLayoutView()) |
| - return; |
| - |
| - if (m_layoutBlock.childrenInline()) { |
| - if (shouldPaintDescendantOutlines(paintInfo.phase)) |
| - ObjectPainter(m_layoutBlock).paintInlineChildrenOutlines(paintInfo, paintOffset); |
| - else |
| - LineBoxListPainter(m_layoutBlock.lineBoxes()).paint(m_layoutBlock, paintInfo, paintOffset); |
| - } else { |
| - PaintInfo paintInfoForDescendants = paintInfo.forDescendants(); |
| - m_layoutBlock.paintChildren(paintInfoForDescendants, paintOffset); |
| - } |
| + DCHECK(!m_layoutBlock.childrenInline()); |
| + PaintInfo paintInfoForDescendants = paintInfo.forDescendants(); |
| + m_layoutBlock.paintChildren(paintInfoForDescendants, paintOffset); |
| } |
| } // namespace blink |