Пример #1
0
IntRect VisualViewport::visibleContentRect(
    IncludeScrollbarsInRect scrollbarInclusion) const {
  // TODO(ymalik): We're losing precision here and below. visibleRect should
  // be replaced with visibleContentRect.
  IntRect rect = IntRect(visibleRect());
  if (scrollbarInclusion == ExcludeScrollbars) {
    RootFrameViewport* rootFrameViewport =
        mainFrame()->view()->getRootFrameViewport();
    DCHECK(rootFrameViewport);
    rect.contract(rootFrameViewport->verticalScrollbarWidth() / m_scale,
                  rootFrameViewport->horizontalScrollbarHeight() / m_scale);
  }
  return rect;
}
Пример #2
0
IntRect TileController::boundsAtLastRevalidateWithoutMargin() const
{
    IntRect boundsWithoutMargin = IntRect(IntPoint(), m_boundsAtLastRevalidate.size());
    boundsWithoutMargin.contract(IntSize(leftMarginWidth() + rightMarginWidth(), topMarginHeight() + bottomMarginHeight()));
    return boundsWithoutMargin;
}