HTMLHtmlElement.cpp [plain text]
#include "config.h"
#include "HTMLHtmlElement.h"
#include "ApplicationCacheGroup.h"
#include "Document.h"
#include "HTMLNames.h"
namespace WebCore {
using namespace HTMLNames;
HTMLHtmlElement::HTMLHtmlElement(Document* doc)
: HTMLElement(htmlTag, doc)
{
}
HTMLHtmlElement::~HTMLHtmlElement()
{
}
String HTMLHtmlElement::version() const
{
return getAttribute(versionAttr);
}
void HTMLHtmlElement::setVersion(const String &value)
{
setAttribute(versionAttr, value);
}
bool HTMLHtmlElement::checkDTD(const Node* newChild)
{
return newChild->hasTagName(headTag) || newChild->hasTagName(bodyTag) ||
newChild->hasTagName(framesetTag) || newChild->hasTagName(noframesTag) ||
newChild->hasTagName(scriptTag);
}
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
void HTMLHtmlElement::insertedIntoDocument()
{
HTMLElement::insertedIntoDocument();
if (!document()->parsing())
return;
if (!document()->frame())
return;
AtomicString manifest = getAttribute(manifestAttr);
if (manifest.isNull())
ApplicationCacheGroup::selectCacheWithoutManifestURL(document()->frame());
else
ApplicationCacheGroup::selectCache(document()->frame(), document()->completeURL(manifest).deprecatedString());
}
#endif
}