Bug 881087. Skip unnecessary work resetting visited state on links if the base URI only changes its fragment identifier. r=smaug

This commit is contained in:
Boris Zbarsky 2013-07-16 01:31:43 -04:00
Родитель 2e1a03a7a3
Коммит e9e910b57d
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -2750,8 +2750,11 @@ nsDocument::SetDocumentURI(nsIURI* aURI)
nsIURI* newBase = GetDocBaseURI();
bool equalBases = false;
// Changing just the ref of a URI does not change how relative URIs would
// resolve wrt to it, so we can treat the bases as equal as long as they're
// equal ignoring the ref.
if (oldBase && newBase) {
oldBase->Equals(newBase, &equalBases);
oldBase->EqualsExceptRef(newBase, &equalBases);
}
else {
equalBases = !oldBase && !newBase;