bool RenderWidget::updateWidgetGeometry() { if (!m_widget->transformsAffectFrameRect()) return setWidgetGeometry(absoluteContentBox()); LayoutRect contentBox = contentBoxRect(); LayoutRect absoluteContentBox(localToAbsoluteQuad(FloatQuad(contentBox)).boundingBox()); if (m_widget->isFrameView()) { contentBox.setLocation(absoluteContentBox.location()); return setWidgetGeometry(contentBox); } return setWidgetGeometry(absoluteContentBox); }
void RenderWidget::setWidget(Widget* widget) { if (widget != m_widget) { if (m_widget) { m_widget->removeFromParent(); widgetRendererMap().remove(m_widget); deleteWidget(); } m_widget = widget; if (m_widget) { widgetRendererMap().add(m_widget, this); // if we've already received a layout, apply the calculated space to the // widget immediately, but we have to have really been full constructed (with a non-null // style pointer). if (style()) { if (!needsLayout()) setWidgetGeometry(absoluteContentBox()); if (style()->visibility() != VISIBLE) m_widget->hide(); else m_widget->show(); } m_view->addChild(m_widget); } } }
bool RenderWidget::updateWidgetGeometry() { Widget* widget = this->widget(); ASSERT(widget); LayoutRect contentBox = contentBoxRect(); LayoutRect absoluteContentBox(localToAbsoluteQuad(FloatQuad(contentBox)).boundingBox()); if (widget->isFrameView()) { contentBox.setLocation(absoluteContentBox.location()); return setWidgetGeometry(contentBox); } return setWidgetGeometry(absoluteContentBox); }
bool LayoutPart::updateWidgetGeometryInternal() { Widget* widget = this->widget(); ASSERT(widget); LayoutRect contentBox = contentBoxRect(); LayoutRect absoluteContentBox(localToAbsoluteQuad(FloatQuad(FloatRect(contentBox))).boundingBox()); if (widget->isFrameView()) { if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) contentBox.setLocation(absoluteContentBox.location()); return setWidgetGeometry(contentBox); } // TODO(chrishtr): why are these widgets using an absolute rect for their frameRect? return setWidgetGeometry(absoluteContentBox); }
bool RenderVTTCue::isOutside() const { return !containingBlock()->absoluteBoundingBoxRect().contains(absoluteContentBox()); }
bool RenderTextTrackCue::isOutside() const { return !rectIsWithinContainer(absoluteContentBox()); }