Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 0b4277c3be96e0c2a25dc71792fb3cf47fdc8481..06b2158baf114e185d062fc566feb7272b90504c 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,18 @@ Vector<IconURL> Document::iconURLs(int iconTypesMask) |
return iconURLs; |
} |
+HTMLLinkElement* Document::linkManifest() const |
+{ |
+ // The first link element with a manifest rel must be used. Others are ignored. |
Inactive
2014/05/08 20:13:29
May be a bit simpler to return early if head() is
Inactive
2014/05/10 00:40:20
Did you disagree with this proposal? It avoided ca
mlamouri (slow - plz ping)
2014/05/10 11:28:45
Eh, sorry about that. I got focused on the tests a
|
+ for (HTMLLinkElement* linkElement = head() ? Traversal<HTMLLinkElement>::firstChild(*head()) : 0; linkElement; linkElement = Traversal<HTMLLinkElement>::nextSibling(*linkElement)) { |
+ if (!linkElement->relAttribute().isManifest()) |
+ continue; |
+ return linkElement; |
+ } |
+ |
+ return 0; |
+} |
+ |
void Document::setUseSecureKeyboardEntryWhenActive(bool usesSecureKeyboard) |
{ |
if (m_useSecureKeyboardEntryWhenActive == usesSecureKeyboard) |