void InspectorOverlay::rebuildOverlayPage()
{
    FrameView* view = m_webViewImpl->mainFrameImpl()->frameView();
    if (!view)
        return;

    IntRect visibleRectInDocument = view->getScrollableArea()->visibleContentRect();
    IntSize viewportSize = m_webViewImpl->page()->frameHost().visualViewport().size();
    LocalFrame* frame = toLocalFrame(overlayPage()->mainFrame());
    frame->view()->resize(viewportSize);
    overlayPage()->frameHost().visualViewport().setSize(viewportSize);
    frame->setPageZoomFactor(windowToViewportScale());

    reset(viewportSize, visibleRectInDocument.location());

    drawNodeHighlight();
    drawQuadHighlight();
    drawPausedInDebuggerMessage();
    drawViewSize();
    if (m_layoutEditor && !m_highlightNode)
        m_layoutEditor->rebuild();
}
Example #2
0
void InspectorOverlay::rebuildOverlayPage() {
  FrameView* view = m_frameImpl->frameView();
  LocalFrame* frame = m_frameImpl->frame();
  if (!view || !frame)
    return;

  IntRect visibleRectInDocument =
      view->getScrollableArea()->visibleContentRect();
  IntSize viewportSize = frame->host()->visualViewport().size();
  overlayMainFrame()->view()->resize(viewportSize);
  overlayPage()->frameHost().visualViewport().setSize(viewportSize);
  overlayMainFrame()->setPageZoomFactor(windowToViewportScale());

  reset(viewportSize, visibleRectInDocument.location());

  if (m_showReloadingBlanket) {
    evaluateInOverlay("showReloadingBlanket", "");
    return;
  }
  drawNodeHighlight();
  drawQuadHighlight();
  drawPausedInDebuggerMessage();
  drawViewSize();
}