IntRect TileController::boundsForSize(const FloatSize& size) const { IntPoint boundsOriginIncludingMargin(-leftMarginWidth(), -topMarginHeight()); IntSize boundsSizeIncludingMargin = expandedIntSize(size); boundsSizeIncludingMargin.expand(leftMarginWidth() + rightMarginWidth(), topMarginHeight() + bottomMarginHeight()); return IntRect(boundsOriginIncludingMargin, boundsSizeIncludingMargin); }
IntSize ScrollbarGroup::contentsSize() const { IntSize size; if (m_horizontalScrollbar) size.setWidth(m_horizontalScrollbar->scrollbar()->totalSize()); else if (m_verticalScrollbar) { size.setWidth(m_verticalScrollbar->scrollbar()->x()); if (m_verticalScrollbar->scrollbar()->isOverlayScrollbar()) size.expand(WebPluginScrollbar::defaultThickness(), 0); } if (m_verticalScrollbar) size.setHeight(m_verticalScrollbar->scrollbar()->totalSize()); else if (m_horizontalScrollbar) { size.setHeight(m_horizontalScrollbar->scrollbar()->y()); if (m_horizontalScrollbar->scrollbar()->isOverlayScrollbar()) size.expand(0, WebPluginScrollbar::defaultThickness()); } return size; }
IntSize RenderTableCell::offsetFromContainer(RenderObject* o, const IntPoint& point) const { ASSERT(o == container()); IntSize offset = RenderBlock::offsetFromContainer(o, point); if (parent()) offset.expand(-parentBox()->x(), -parentBox()->y()); return offset; }