void HTMLIFrameElement::attach() { HTMLElement::attach(); RenderPartObject* renderPart = static_cast<RenderPartObject*>(renderer()); if (renderPart) { if (!contentFrame()) openURL(); if (contentFrame()) { renderPart->setWidget(contentFrame()->view()); renderPart->updateWidget(); needWidgetUpdate = false; } } }
void FrameView::performPostLayoutTasks() { if (d->m_firstLayoutCallbackPending) { d->m_firstLayoutCallbackPending = false; m_frame->loader()->didFirstLayout(); } RenderView* root = m_frame->contentRenderer(); root->updateWidgetPositions(); if (m_widgetUpdateSet && d->m_nestedLayoutCount <= 1) { Vector<RenderPartObject*> objectVector; copyToVector(*m_widgetUpdateSet, objectVector); size_t size = objectVector.size(); for (size_t i = 0; i < size; ++i) { RenderPartObject* object = objectVector[i]; object->updateWidget(false); // updateWidget() can destroy the RenderPartObject, so we need to make sure it's // alive by checking if it's still in m_widgetUpdateSet. if (m_widgetUpdateSet->contains(object)) object->updateWidgetPosition(); } m_widgetUpdateSet->clear(); } resumeScheduledEvents(); if (!root->printing()) { IntSize currentSize = IntSize(width(), height()); float currentZoomFactor = root->style()->zoom(); bool resized = !d->m_firstLayout && (currentSize != d->m_lastLayoutSize || currentZoomFactor != d->m_lastZoomFactor); d->m_lastLayoutSize = currentSize; d->m_lastZoomFactor = currentZoomFactor; if (resized) m_frame->sendResizeEvent(); } }