Bug 617789 - Links in view page source when base href exists fixed. r=hsivonen.

This commit is contained in:
Diwas Joshi
2014-09-30 12:35:17 +03:00
parent d4f0e82e96
commit cca79e512e
7 changed files with 66 additions and 9 deletions

View File

@@ -100,6 +100,7 @@ nsHtml5TreeOperation::~nsHtml5TreeOperation()
case eTreeOpAppendComment:
case eTreeOpAppendCommentToDocument:
case eTreeOpAddViewSourceHref:
case eTreeOpAddViewSourceBase:
delete[] mTwo.unicharPtr;
break;
case eTreeOpSetDocumentCharset:
@@ -957,6 +958,13 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
}
return rv;
}
case eTreeOpAddViewSourceBase: {
char16_t* buffer = mTwo.unicharPtr;
int32_t length = mFour.integer;
nsDependentString baseUrl(buffer, length);
aBuilder->AddBase(baseUrl);
return NS_OK;
}
default: {
MOZ_CRASH("Bogus tree op");
}