void DebugPageOverlays::hideRegionOverlay(MainFrame& frame, RegionType regionType) { auto it = m_frameRegionOverlays.find(&frame); if (it != m_frameRegionOverlays.end()) { auto& visualizers = it->value; if (RegionOverlay* visualizer = visualizers[indexOf(regionType)].get()) { frame.pageOverlayController().uninstallPageOverlay(&visualizer->overlay(), PageOverlay::FadeMode::DoNotFade); visualizers[indexOf(regionType)] = nullptr; } } }
String MockPageOverlayClient::layerTreeAsText(MainFrame& mainFrame) { return "View-relative:\n" + mainFrame.pageOverlayController().viewOverlayRootLayer().layerTreeAsText(LayerTreeAsTextIncludePageOverlayLayers) + "\n\nDocument-relative:\n" + mainFrame.pageOverlayController().documentOverlayRootLayer().layerTreeAsText(LayerTreeAsTextIncludePageOverlayLayers); }
void DebugPageOverlays::showRegionOverlay(MainFrame& frame, RegionType regionType) { RegionOverlay& visualizer = ensureRegionOverlayForFrame(frame, regionType); frame.pageOverlayController().installPageOverlay(&visualizer.overlay(), PageOverlay::FadeMode::DoNotFade); }
void MockPageOverlayClient::installOverlay(MainFrame& mainFrame, PageOverlay::OverlayType overlayType) { RefPtr<PageOverlay> overlay = PageOverlay::create(*this, overlayType); mainFrame.pageOverlayController().installPageOverlay(overlay, PageOverlay::FadeMode::DoNotFade); m_overlays.add(overlay.get()); }