Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 0b4277c3be96e0c2a25dc71792fb3cf47fdc8481..0bb8a126a7ec6e7addc8be7b6aa18467a1819e58 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -718,7 +718,7 @@ DOMImplementation& Document::implementation() |
return *m_implementation; |
} |
-bool Document::hasManifest() const |
+bool Document::hasAppCacheManifest() const |
{ |
return isHTMLHtmlElement(documentElement()) && documentElement()->hasAttribute(manifestAttr); |
} |
@@ -2462,7 +2462,7 @@ void Document::setBody(PassRefPtr<HTMLElement> prpNewBody, ExceptionState& excep |
documentElement()->appendChild(newBody.release(), exceptionState); |
} |
-HTMLHeadElement* Document::head() |
+HTMLHeadElement* Document::head() const |
{ |
Node* de = documentElement(); |
if (!de) |
@@ -4686,6 +4686,22 @@ Vector<IconURL> Document::iconURLs(int iconTypesMask) |
return iconURLs; |
} |
+HTMLLinkElement* Document::linkManifest() const |
+{ |
+ HTMLHeadElement* head = this->head(); |
+ if (!head) |
+ return 0; |
+ |
+ // The first link element with a manifest rel must be used. Others are ignored. |
+ for (HTMLLinkElement* linkElement = Traversal<HTMLLinkElement>::firstChild(*head); linkElement; linkElement = Traversal<HTMLLinkElement>::nextSibling(*linkElement)) { |
+ if (!linkElement->relAttribute().isManifest()) |
+ continue; |
+ return linkElement; |
+ } |
+ |
+ return 0; |
+} |
+ |
void Document::setUseSecureKeyboardEntryWhenActive(bool usesSecureKeyboard) |
{ |
if (m_useSecureKeyboardEntryWhenActive == usesSecureKeyboard) |