void BlockPainter::paintContents(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) { if (m_layoutBlock.childrenInline()) { LineBoxListPainter(*m_layoutBlock.lineBoxes()).paint(&m_layoutBlock, paintInfo, paintOffset); } else { PaintPhase newPhase = (paintInfo.phase == PaintPhaseChildOutlines) ? PaintPhaseOutline : paintInfo.phase; newPhase = (newPhase == PaintPhaseChildBlockBackgrounds) ? PaintPhaseChildBlockBackground : newPhase; // We don't paint our own background, but we do let the kids paint their backgrounds. PaintInfo paintInfoForChild(paintInfo); paintInfoForChild.phase = newPhase; paintInfoForChild.updatePaintingRootForChildren(&m_layoutBlock); m_layoutBlock.paintChildren(paintInfoForChild, paintOffset); } }
void RenderSnapshottedPlugIn::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) { if (paintInfo.phase == PaintPhaseForeground && plugInImageElement().displayState() < HTMLPlugInElement::Restarting) { paintSnapshot(paintInfo, paintOffset); } PaintPhase newPhase = (paintInfo.phase == PaintPhaseChildOutlines) ? PaintPhaseOutline : paintInfo.phase; newPhase = (newPhase == PaintPhaseChildBlockBackgrounds) ? PaintPhaseChildBlockBackground : newPhase; PaintInfo paintInfoForChild(paintInfo); paintInfoForChild.phase = newPhase; paintInfoForChild.updateSubtreePaintRootForChildren(this); for (auto& child : childrenOfType<RenderBox>(*this)) { LayoutPoint childPoint = flipForWritingModeForChild(&child, paintOffset); if (!child.hasSelfPaintingLayer() && !child.isFloating()) child.paint(paintInfoForChild, childPoint); } RenderEmbeddedObject::paint(paintInfo, paintOffset); }
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, styleResolverChanged() on the Document // will do a full paint invalidation. if (m_layoutBlock.document().didLayoutWithPendingStylesheets() && !m_layoutBlock.isLayoutView()) return; if (m_layoutBlock.childrenInline()) { LineBoxListPainter(*m_layoutBlock.lineBoxes()).paint(&m_layoutBlock, paintInfo, paintOffset); } else { PaintPhase newPhase = (paintInfo.phase == PaintPhaseChildOutlines) ? PaintPhaseOutline : paintInfo.phase; newPhase = (newPhase == PaintPhaseChildBlockBackgrounds) ? PaintPhaseChildBlockBackground : newPhase; // We don't paint our own background, but we do let the kids paint their backgrounds. PaintInfo paintInfoForChild(paintInfo); paintInfoForChild.phase = newPhase; paintInfoForChild.updatePaintingRootForChildren(&m_layoutBlock); m_layoutBlock.paintChildren(paintInfoForChild, paintOffset); } }