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; }
IntRect TileController::boundsAtLastRevalidateWithoutMargin() const { IntRect boundsWithoutMargin = IntRect(IntPoint(), m_boundsAtLastRevalidate.size()); boundsWithoutMargin.contract(IntSize(leftMarginWidth() + rightMarginWidth(), topMarginHeight() + bottomMarginHeight())); return boundsWithoutMargin; }