зеркало из https://github.com/mozilla/gecko-dev.git
Bug 651441 - Make sure the HTML5 application cache selection algorithm runs properly when there is no manifest attribute. r=honzab.moz.
This commit is contained in:
Родитель
14650cfa38
Коммит
d6617b6996
|
@ -254,6 +254,8 @@ public:
|
|||
// of the above defined methods to select the document's application
|
||||
// cache, let it be associated with the document and eventually
|
||||
// schedule the cache update process.
|
||||
// This method MUST be called with the empty string as the argument
|
||||
// when there is no manifest attribute!
|
||||
void ProcessOfflineManifest(const nsAString& aManifestSpec);
|
||||
|
||||
// Extracts the manifest attribute from the element if it is the root
|
||||
|
|
|
@ -148,6 +148,8 @@ nsHtml5TreeBuilder::createElement(PRInt32 aNamespace, nsIAtom* aName, nsHtml5Htm
|
|||
nsString* url = aAttributes->getValue(nsHtml5AttributeName::ATTR_MANIFEST);
|
||||
if (url) {
|
||||
mSpeculativeLoadQueue.AppendElement()->InitManifest(*url);
|
||||
} else {
|
||||
mSpeculativeLoadQueue.AppendElement()->InitManifest(EmptyString());
|
||||
}
|
||||
} else if (nsHtml5Atoms::base == aName) {
|
||||
nsString* url =
|
||||
|
@ -205,10 +207,12 @@ nsHtml5TreeBuilder::createElement(PRInt32 aNamespace, nsIAtom* aName, nsHtml5Htm
|
|||
}
|
||||
} else if (aNamespace == kNameSpaceID_XHTML && nsHtml5Atoms::html == aName) {
|
||||
nsString* url = aAttributes->getValue(nsHtml5AttributeName::ATTR_MANIFEST);
|
||||
nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement();
|
||||
NS_ASSERTION(treeOp, "Tree op allocation failed.");
|
||||
if (url) {
|
||||
nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement();
|
||||
NS_ASSERTION(treeOp, "Tree op allocation failed.");
|
||||
treeOp->Init(eTreeOpProcessOfflineManifest, *url);
|
||||
} else {
|
||||
treeOp->Init(eTreeOpProcessOfflineManifest, EmptyString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче