Bug 747516 - Admit mozilla::dom::Link into a weight loss program; r=bz

This commit is contained in:
Ehsan Akhgari 2012-04-20 17:48:54 -04:00
parent 65ab1ba23b
commit c02381dff5
2 changed files with 8 additions and 8 deletions

View File

@ -55,10 +55,10 @@ namespace mozilla {
namespace dom {
Link::Link(Element *aElement)
: mLinkState(defaultState)
, mRegistered(false)
, mElement(aElement)
: mElement(aElement)
, mHistory(services::GetHistoryService())
, mLinkState(defaultState)
, mRegistered(false)
{
NS_ABORT_IF_FALSE(mElement, "Must have an element");
}
@ -75,7 +75,7 @@ Link::GetLinkState() const
"Getting the link state of an unregistered Link!");
NS_ASSERTION(mLinkState != eLinkState_Unknown,
"Getting the link state with an unknown value!");
return mLinkState;
return nsLinkState(mLinkState);
}
void

View File

@ -149,17 +149,17 @@ private:
already_AddRefed<nsIURI> GetURIToMutate();
void SetHrefAttribute(nsIURI *aURI);
nsLinkState mLinkState;
mutable nsCOMPtr<nsIURI> mCachedURI;
bool mRegistered;
Element * const mElement;
// Strong reference to History. The link has to unregister before History
// can disappear.
nsCOMPtr<IHistory> mHistory;
PRUint16 mLinkState;
bool mRegistered;
};
NS_DEFINE_STATIC_IID_ACCESSOR(Link, MOZILLA_DOM_LINK_IMPLEMENTATION_IID)