HTMLIFrameElement::HTMLIFrameElement(Document* doc)
: HTMLFrameElement(iframeTag, doc)
- , needWidgetUpdate(false)
{
m_frameBorder = false;
}
return false;
}
- return HTMLElement::mapToEntry(attrName, result);
+ return HTMLFrameElement::mapToEntry(attrName, result);
}
void HTMLIFrameElement::parseMappedAttribute(MappedAttribute *attr)
void HTMLIFrameElement::insertedIntoDocument()
{
+ HTMLFrameElement::insertedIntoDocument();
+
if (document()->isHTMLDocument()) {
HTMLDocument *doc = static_cast<HTMLDocument *>(document());
doc->addDocExtraNamedItem(oldNameAttr);
}
- HTMLElement::insertedIntoDocument();
-
- // Load the frame
- m_name = getAttribute(nameAttr);
- if (m_name.isNull())
- m_name = getAttribute(idAttr);
-
- if (Frame* parentFrame = document()->frame()) {
- m_name = parentFrame->tree()->uniqueChildName(m_name);
-
- openURL();
- }
+ openURL();
}
void HTMLIFrameElement::willRemove()
doc->removeDocExtraNamedItem(oldNameAttr);
}
- HTMLElement::removedFromDocument();
+ HTMLFrameElement::removedFromDocument();
}
bool HTMLIFrameElement::rendererIsNeeded(RenderStyle *style)
void HTMLIFrameElement::attach()
{
- HTMLElement::attach();
-
- RenderPartObject* renderPart = static_cast<RenderPartObject*>(renderer());
-
- if (renderPart) {
- if (!contentFrame())
- openURL();
+ HTMLFrameElement::attach();
+ if (RenderPartObject* renderPart = static_cast<RenderPartObject*>(renderer())) {
if (contentFrame()) {
renderPart->setWidget(contentFrame()->view());
renderPart->updateWidget();
- needWidgetUpdate = false;
}
}
}
HTMLElement::detach();
}
-void HTMLIFrameElement::recalcStyle( StyleChange ch )
-{
- if (needWidgetUpdate) {
- if (renderer())
- static_cast<RenderPartObject*>(renderer())->updateWidget();
- needWidgetUpdate = false;
- }
- HTMLElement::recalcStyle( ch );
-}
-
bool HTMLIFrameElement::isURLAttribute(Attribute *attr) const
{
return attr->name() == srcAttr;