#ifndef HTMLFrameElementBase_h
#define HTMLFrameElementBase_h
#include "core/html/HTMLFrameOwnerElement.h"
#include "platform/scroll/ScrollTypes.h"
namespace WebCore {
class HTMLFrameElementBase : public HTMLFrameOwnerElement {
public:
virtual ScrollbarMode scrollingMode() const OVERRIDE FINAL { return m_scrolling; }
int marginWidth() const { return m_marginWidth; }
int marginHeight() const { return m_marginHeight; }
int width();
int height();
virtual bool canContainRangeEndPoint() const OVERRIDE FINAL { return false; }
protected:
HTMLFrameElementBase(const QualifiedName&, Document&);
bool isURLAllowed() const;
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
virtual void didNotifySubtreeInsertionsToDocument() OVERRIDE FINAL;
virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
private:
virtual bool supportsFocus() const OVERRIDE FINAL;
virtual void setFocus(bool) OVERRIDE FINAL;
virtual bool isURLAttribute(const Attribute&) const OVERRIDE FINAL;
virtual bool hasLegalLinkAttribute(const QualifiedName&) const OVERRIDE FINAL;
virtual bool isHTMLContentAttribute(const Attribute&) const OVERRIDE FINAL;
virtual bool areAuthorShadowsAllowed() const OVERRIDE FINAL { return false; }
void setLocation(const String&);
void setNameAndOpenURL();
void openURL(bool lockBackForwardList = true);
AtomicString m_URL;
AtomicString m_frameName;
ScrollbarMode m_scrolling;
int m_marginWidth;
int m_marginHeight;
};
inline bool isHTMLFrameElementBase(const Element& element)
{
return isHTMLFrameElement(element) || isHTMLIFrameElement(element);
}
inline bool isHTMLFrameElementBase(const HTMLElement& element)
{
return isHTMLFrameElement(element) || isHTMLIFrameElement(element);
}
DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLFrameElementBase);
}
#endif