This source file includes following definitions.
- m_frameBorderSet
- create
- rendererIsNeeded
- createRenderer
- noResize
- attach
- parseAttribute
#include "config.h"
#include "core/html/HTMLFrameElement.h"
#include "HTMLNames.h"
#include "core/html/HTMLFrameSetElement.h"
#include "core/rendering/RenderFrame.h"
namespace WebCore {
using namespace HTMLNames;
inline HTMLFrameElement::HTMLFrameElement(Document& document)
: HTMLFrameElementBase(frameTag, document)
, m_frameBorder(true)
, m_frameBorderSet(false)
{
ScriptWrappable::init(this);
}
PassRefPtr<HTMLFrameElement> HTMLFrameElement::create(Document& document)
{
return adoptRef(new HTMLFrameElement(document));
}
bool HTMLFrameElement::rendererIsNeeded(const RenderStyle&)
{
return isURLAllowed();
}
RenderObject* HTMLFrameElement::createRenderer(RenderStyle*)
{
return new RenderFrame(this);
}
bool HTMLFrameElement::noResize() const
{
return hasAttribute(noresizeAttr);
}
void HTMLFrameElement::attach(const AttachContext& context)
{
HTMLFrameElementBase::attach(context);
if (HTMLFrameSetElement* frameSetElement = Traversal<HTMLFrameSetElement>::firstAncestor(*this)) {
if (!m_frameBorderSet)
m_frameBorder = frameSetElement->hasFrameBorder();
}
}
void HTMLFrameElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == frameborderAttr) {
m_frameBorder = value.toInt();
m_frameBorderSet = !value.isNull();
} else if (name == noresizeAttr) {
if (renderer())
renderer()->updateFromElement();
} else
HTMLFrameElementBase::parseAttribute(name, value);
}
}