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(); } }
KJS::Bindings::Instance *HTMLEmbedElementImpl::getEmbedInstance() const { KHTMLPart* part = getDocument()->part(); if (!part) return 0; if (embedInstance) return embedInstance; RenderPartObject *r = static_cast<RenderPartObject*>(m_render); if (r) { if (r->widget()){ // Call into the part (and over the bridge) to pull the Bindings::Instance // from the guts of the Java VM. void *_view = r->widget()->getView(); embedInstance = KWQ(part)->getEmbedInstanceForView((NSView *)_view); // Applet may specified with <embed> tag. if (!embedInstance) embedInstance = KWQ(part)->getAppletInstanceForView((NSView *)_view); } } return embedInstance; }