Bug 878747 - part 1 - implement 'nodefaultsrc' attribute for XUL frames; r=smaug

This commit is contained in:
Tim Taubert 2013-06-06 21:05:21 +02:00
parent eb81ebc472
commit 0b02403a61
2 changed files with 10 additions and 0 deletions

View File

@ -318,6 +318,15 @@ nsFrameLoader::LoadFrame()
src.Trim(" \t\n\r");
if (src.IsEmpty()) {
// If the frame is a XUL element and has the attribute 'nodefaultsrc=true'
// then we will not use 'about:blank' as fallback but return early without
// starting a load if no 'src' attribute is given (or it's empty).
if (mOwnerContent->IsXUL() &&
mOwnerContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::nodefaultsrc,
nsGkAtoms::_true, eCaseMatters)) {
return NS_OK;
}
src.AssignLiteral("about:blank");
}

View File

@ -607,6 +607,7 @@ GK_ATOM(no, "no")
GK_ATOM(noautohide, "noautohide")
GK_ATOM(nobr, "nobr")
GK_ATOM(node, "node")
GK_ATOM(nodefaultsrc, "nodefaultsrc")
GK_ATOM(nodeSet, "node-set")
GK_ATOM(noembed, "noembed")
GK_ATOM(noframes, "noframes")