Bug 461199 (Part 15) - Rely on nsIContent::IntrinsicState instead of nsIContent::GetLinkState in layout.

Layout should call IntrinsicState instead of GetLinkState.  Simplifies a lot of
logic, and makes the code easier to follow.
r=bz
sr=dbaron
This commit is contained in:
Shawn Wilsher
2009-12-15 16:04:12 -08:00
parent 44fd507c85
commit 1a25ba03cd
5 changed files with 36 additions and 151 deletions
-10
View File
@@ -1673,7 +1673,6 @@ PresShell::Init(nsIDocument* aDocument,
nsCOMPtr<nsIObserverService> os =
do_GetService("@mozilla.org/observer-service;1", &result);
if (os) {
os->AddObserver(this, NS_LINK_VISITED_EVENT_TOPIC, PR_FALSE);
os->AddObserver(this, "agent-sheet-added", PR_FALSE);
os->AddObserver(this, "user-sheet-added", PR_FALSE);
os->AddObserver(this, "agent-sheet-removed", PR_FALSE);
@@ -1741,7 +1740,6 @@ PresShell::Destroy()
nsCOMPtr<nsIObserverService> os =
do_GetService("@mozilla.org/observer-service;1");
if (os) {
os->RemoveObserver(this, NS_LINK_VISITED_EVENT_TOPIC);
os->RemoveObserver(this, "agent-sheet-added");
os->RemoveObserver(this, "user-sheet-added");
os->RemoveObserver(this, "agent-sheet-removed");
@@ -7572,14 +7570,6 @@ PresShell::Observe(nsISupports* aSubject,
}
#endif
if (!nsCRT::strcmp(aTopic, NS_LINK_VISITED_EVENT_TOPIC)) {
nsCOMPtr<nsIURI> uri = do_QueryInterface(aSubject);
if (uri && mDocument) {
mDocument->NotifyURIVisitednessChanged(uri);
}
return NS_OK;
}
if (!nsCRT::strcmp(aTopic, "agent-sheet-added") && mStyleSet) {
AddAgentSheet(aSubject);
return NS_OK;