зеркало из https://github.com/mozilla/gecko-dev.git
Merge for backout of changeset 1c37899b532e
This commit is contained in:
Коммит
cafab3d0ff
|
@ -120,8 +120,7 @@ Link::LinkState() const
|
||||||
Link *self = const_cast<Link *>(this);
|
Link *self = const_cast<Link *>(this);
|
||||||
|
|
||||||
// If we are not in the document, default to not visited.
|
// If we are not in the document, default to not visited.
|
||||||
nsIContent *content = self->Content();
|
if (!self->Content()->IsInDoc()) {
|
||||||
if (!content->IsInDoc()) {
|
|
||||||
self->mLinkState = eLinkState_Unvisited;
|
self->mLinkState = eLinkState_Unvisited;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,12 +142,6 @@ Link::LinkState() const
|
||||||
|
|
||||||
// Assume that we are not visited until we are told otherwise.
|
// Assume that we are not visited until we are told otherwise.
|
||||||
self->mLinkState = eLinkState_Unvisited;
|
self->mLinkState = eLinkState_Unvisited;
|
||||||
|
|
||||||
// And make sure we are in the document's link map.
|
|
||||||
nsIDocument *doc = content->GetCurrentDoc();
|
|
||||||
if (doc) {
|
|
||||||
doc->AddStyleRelevantLink(content, hrefURI);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,12 +467,10 @@ Link::ResetLinkState()
|
||||||
{
|
{
|
||||||
nsIContent *content = Content();
|
nsIContent *content = Content();
|
||||||
|
|
||||||
// Tell the document to forget about this link, but only if we are registered.
|
// Tell the document to forget about this link.
|
||||||
if (mRegistered) {
|
nsIDocument *doc = content->GetCurrentDoc();
|
||||||
nsIDocument *doc = content->GetCurrentDoc();
|
if (doc) {
|
||||||
if (doc) {
|
doc->ForgetLink(content);
|
||||||
doc->ForgetLink(content);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UnregisterFromHistory();
|
UnregisterFromHistory();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче