Lines Matching refs:box

94     Node* node = box().node();
109 if (inResizeMode() && !box().documentBeingDestroyed()) {
110 if (LocalFrame* frame = box().frame())
114 if (LocalFrame* frame = box().frame()) {
120 if (box().frame() && box().frame()->page()) {
121 if (ScrollingCoordinator* scrollingCoordinator = box().frame()->page()->scrollingCoordinator())
125 if (!box().documentBeingDestroyed()) {
126 Node* node = box().node();
131 if (LocalFrame* frame = box().frame()) {
133 frameView->removeResizerArea(box());
147 if (Page* page = box().frame()->page())
200 if (!box().parent())
204 scrollRect.move(verticalScrollbarStart(0, box().width()), box().borderTop());
206 scrollRect.move(horizontalScrollbarStart(0), box().height() - box().borderBottom() - scrollbar->height());
212 box().flipForWritingMode(paintInvalidationRect);
216 if (box().frameView()->isInPerformLayout())
219 box().invalidatePaintRectangle(intRect);
237 Page* page = box().frame()->page();
280 // We have a scrollbar corner when a scrollbar is visible and not filling the entire length of the box.
286 bool hasResizer = box().style()->resize() != RESIZE_NONE;
288 return cornerRect(box().style(), horizontalScrollbar(), verticalScrollbar(), box().pixelSnappedBorderBoxRect());
294 RenderView* view = box().view();
301 return view->frameView()->convertFromRenderer(box(), rect);
306 RenderView* view = box().view();
310 IntRect rect = view->frameView()->convertToRenderer(box(), parentRect);
317 RenderView* view = box().view();
323 return view->frameView()->convertFromRenderer(box(), point);
328 RenderView* view = box().view();
332 IntPoint point = view->frameView()->convertToRenderer(box(), parentPoint);
346 if (!box().isMarquee()) {
357 LocalFrame* frame = box().frame();
360 RefPtr<FrameView> frameView = box().frameView();
362 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ScrollLayer", "data", InspectorScrollLayerEvent::data(&box()));
364 InspectorInstrumentation::willScrollLayer(&box());
366 const RenderLayerModelObject* paintInvalidationContainer = box().containerForPaintInvalidation();
373 box().setPreviousPaintInvalidationRect(box().boundsRectForPaintInvalidation(paintInvalidationContainer));
390 if (!box().isMarquee() && box().view()->compositor()->inCompositingMode()) {
397 && box().style()->backgroundLayers().attachment() != LocalBackgroundAttachment;
405 box().setShouldDoFullPaintInvalidation(true);
408 if (box().node())
409 box().node()->document().enqueueScrollEventForNode(box().node());
411 if (AXObjectCache* cache = box().document().existingAXObjectCache())
412 cache->handleScrollPositionChanged(&box());
414 InspectorInstrumentation::didScrollLayer(&box());
429 if (!box().hasOverflowClip())
431 return -scrollOrigin() + IntPoint(pixelSnappedScrollWidth(), pixelSnappedScrollHeight()) - enclosingIntRect(box().clientBoxRect()).size();
469 return box().frame() ? box().frame()->eventHandler().lastKnownMousePosition() : IntPoint();
474 RenderView* view = box().view();
482 RenderView* view = box().view();
490 return box().absoluteBoundingBoxRect();
495 if (box().isIntristicallyScrollable(orientation))
499 box().style()->overflowX() : box().style()->overflowY();
505 return box().style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft();
511 box().pixelSnappedClientWidth() : box().pixelSnappedClientHeight();
518 RenderBox& RenderLayerScrollableArea::box() const
544 return snapSizeToPixel(scrollWidth(), box().clientLeft() + box().x());
549 return snapSizeToPixel(scrollHeight(), box().clientTop() + box().y());
556 m_overflowRect = box().layoutOverflowRect();
557 box().flipForWritingMode(m_overflowRect);
559 int scrollableLeftOverflow = m_overflowRect.x() - box().borderLeft() - (box().style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft() ? box().verticalScrollbarWidth() : 0);
560 int scrollableTopOverflow = m_overflowRect.y() - box().borderTop();
578 if (!box().isMarquee()) {
597 if (box().style()->overflowX() == OSCROLL)
599 if (box().style()->overflowY() == OSCROLL)
604 bool autoHorizontalScrollBarChanged = box().hasAutoHorizontalScrollbar() && (hasHorizontalScrollbar() != hasHorizontalOverflow);
605 bool autoVerticalScrollBarChanged = box().hasAutoVerticalScrollbar() && (hasVerticalScrollbar() != hasVerticalOverflow);
608 if (box().hasAutoHorizontalScrollbar())
610 if (box().hasAutoVerticalScrollbar())
619 if (box().document().hasAnnotatedRegions())
620 box().document().setAnnotatedRegionsDirty(true);
622 if (box().style()->overflowX() == OAUTO || box().style()->overflowY() == OAUTO) {
626 SubtreeLayoutScope layoutScope(box());
627 layoutScope.setNeedsLayout(&box());
628 if (box().isRenderBlock()) {
629 RenderBlock& block = toRenderBlock(box());
633 box().layout();
646 int clientWidth = box().pixelSnappedClientWidth();
650 int clientHeight = box().pixelSnappedClientHeight();
668 return pixelSnappedScrollWidth() > box().pixelSnappedClientWidth();
675 return pixelSnappedScrollHeight() > box().pixelSnappedClientHeight();
680 return hasHorizontalOverflow() && box().scrollsOverflowX();
685 return hasVerticalOverflow() && box().scrollsOverflowY();
698 // This function returns true if the given box requires overflow scrollbars (as
703 static bool canHaveOverflowScrollbars(const RenderBox& box)
705 return !box.isRenderView() && box.document().viewportDefiningElement() != box.node();
710 if (!canHaveOverflowScrollbars(box()))
716 EOverflow overflowX = box().style()->overflowX();
717 EOverflow overflowY = box().style()->overflowY();
761 int clientWidth = box().pixelSnappedClientWidth();
765 int clientHeight = box().pixelSnappedClientHeight();
771 bool autoHorizontalScrollBarChanged = box().hasAutoHorizontalScrollbar() && (hasHorizontalScrollbar() != hasHorizontalOverflow);
772 bool autoVerticalScrollBarChanged = box().hasAutoVerticalScrollbar() && (hasVerticalScrollbar() != hasVerticalOverflow);
774 box().setNeedsLayoutAndFullPaintInvalidation();
779 int maxX = scrollWidth() - box().pixelSnappedClientWidth();
780 int maxY = scrollHeight() - box().pixelSnappedClientHeight();
795 borderBoxRect.maxY() - box().borderBottom() - m_hBar->height(),
796 borderBoxRect.width() - (box().borderLeft() + box().borderRight()) - scrollCorner.width(),
808 borderBoxRect.y() + box().borderTop(),
810 borderBoxRect.height() - (box().borderTop() + box().borderBottom()) - scrollCorner.height());
815 if (box().style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
816 return minX + box().borderLeft();
817 return maxX - box().borderRight() - m_vBar->width();
822 int x = minX + box().borderLeft();
823 if (box().style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
824 x += m_vBar ? m_vBar->width() : resizerCornerRect(box().pixelSnappedBorderBoxRect(), ResizerForPointer).width();
831 return IntSize(verticalScrollbarStart(0, box().width()), box().borderTop());
834 return IntSize(horizontalScrollbarStart(0), box().height() - box().borderBottom() - scrollbar->height());
855 RenderObject* actualRenderer = rendererForScrollbar(box());
869 box().document().view()->addChild(widget.get());
908 if (box().document().hasAnnotatedRegions())
909 box().document().setAnnotatedRegionsDirty(true);
932 if (box().document().hasAnnotatedRegions())
933 box().document().setAnnotatedRegionsDirty(true);
952 if (!hasScrollbar() && !box().canResize())
955 const IntRect borderBox = box().pixelSnappedBorderBoxRect();
989 RenderObject* actualRenderer = rendererForScrollbar(box());
990 RefPtr<RenderStyle> corner = box().hasOverflowClip() ? actualRenderer->getUncachedPseudoStyle(PseudoStyleRequest(SCROLLBAR_CORNER), actualRenderer->style()) : PassRefPtr<RenderStyle>(nullptr);
993 m_scrollCorner = RenderScrollbarPart::createAnonymous(&box().document());
994 m_scrollCorner->setParent(&box());
1006 if (!box().hasOverflowClip())
1034 RenderView* renderView = box().view();
1058 // edge of the box.
1085 if (!hasScrollbar() && !box().canResize())
1089 if (box().style()->resize() != RESIZE_NONE) {
1090 resizeControlRect = resizerCornerRect(box().pixelSnappedBorderBoxRect(), ResizerForPointer);
1097 LayoutRect vBarRect(verticalScrollbarStart(0, box().width()),
1098 box().borderTop(),
1100 box().height() - (box().borderTop() + box().borderBottom()) - (m_hBar ? m_hBar->height() : resizeControlSize));
1110 box().height() - box().borderBottom() - m_hBar->height(),
1111 box().width() - (box().borderLeft() + box().borderRight()) - (m_vBar ? m_vBar->width() : resizeControlSize),
1126 if (box().style()->resize() == RESIZE_NONE)
1128 IntRect corner = cornerRect(box().style(), horizontalScrollbar(), verticalScrollbar(), bounds);
1147 scrollCornerAndResizer = resizerCornerRect(box().pixelSnappedBorderBoxRect(), ResizerForPointer);
1153 const IntRect borderBox = box().pixelSnappedBorderBoxRect();
1172 if (box().style()->resize() == RESIZE_NONE)
1175 IntRect absRect = resizerCornerRect(box().pixelSnappedBorderBoxRect(), ResizerForPointer);
1203 if (!box().canResize())
1206 IntPoint localPoint = roundedIntPoint(box().absoluteToLocal(absolutePoint, UseTransforms));
1207 IntRect localBounds(0, 0, box().pixelSnappedWidth(), box().pixelSnappedHeight());
1213 if (!box().canResize())
1230 LocalFrame* frame = box().frame();
1236 if (box().canResize())
1237 frameView->addResizerArea(box());
1239 frameView->removeResizerArea(box());
1244 if (!m_resizer && !box().canResize())
1247 RenderObject* actualRenderer = rendererForScrollbar(box());
1248 RefPtr<RenderStyle> resizer = box().hasOverflowClip() ? actualRenderer->getUncachedPseudoStyle(PseudoStyleRequest(RESIZER), actualRenderer->style()) : PassRefPtr<RenderStyle>(nullptr);
1251 m_resizer = RenderScrollbarPart::createAnonymous(&box().document());
1252 m_resizer->setParent(&box());
1263 float deviceScaleFactor = blink::deviceScaleFactor(box().frame());
1278 if (box().style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) {
1295 if (box().style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
1298 IntPoint localPoint = roundedIntPoint(box().absoluteToLocal(absolutePoint, UseTransforms));
1305 if (!inResizeMode() || !box().canResize() || !box().node())
1308 ASSERT(box().node()->isElementNode());
1309 Element* element = toElement(box().node());
1333 float zoomFactor = box().style()->effectiveZoom();
1339 LayoutSize currentSize = LayoutSize(box().width() / zoomFactor, box().height() / zoomFactor);
1344 if (box().style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) {
1351 bool isBoxSizingBorder = box().style()->boxSizing() == BORDER_BOX;
1353 EResize resize = box().style()->resize();
1357 element->setInlineStyleProperty(CSSPropertyMarginLeft, box().marginLeft() / zoomFactor, CSSPrimitiveValue::CSS_PX);
1358 element->setInlineStyleProperty(CSSPropertyMarginRight, box().marginRight() / zoomFactor, CSSPrimitiveValue::CSS_PX);
1360 LayoutUnit baseWidth = box().width() - (isBoxSizingBorder ? LayoutUnit() : box().borderAndPaddingWidth());
1368 element->setInlineStyleProperty(CSSPropertyMarginTop, box().marginTop() / zoomFactor, CSSPrimitiveValue::CSS_PX);
1369 element->setInlineStyleProperty(CSSPropertyMarginBottom, box().marginBottom() / zoomFactor, CSSPrimitiveValue::CSS_PX);
1371 LayoutUnit baseHeight = box().height() - (isBoxSizingBorder ? LayoutUnit() : box().borderAndPaddingHeight());
1383 LayoutRect localExposeRect(box().absoluteToLocalQuad(FloatQuad(FloatRect(rect)), UseTransforms).boundingBox());
1384 LayoutRect layerBounds(0, 0, box().clientWidth(), box().clientHeight());
1395 return LayoutRect(box().localToAbsoluteQuad(FloatQuad(FloatRect(localExposeRect)), UseTransforms).boundingBox());
1400 LocalFrame* frame = box().frame();
1409 bool isVisibleToHitTest = box().visibleToHitTesting();
1427 RenderLayerCompositor* compositor = box().view()->compositor();
1443 if (box().isIntristicallyScrollable(VerticalScrollbar) || box().isIntristicallyScrollable(HorizontalScrollbar))