зеркало из https://github.com/mozilla/pjs.git
Bug 595036 (1/2) - Update nsIXTFElementWrapper and inIDOMUtils API to use a PRUint64 value for intrinsic states. r+a=bz
This commit is contained in:
Родитель
8867dcb352
Коммит
8103854c6f
|
@ -44,7 +44,7 @@ interface nsIAtom;
|
|||
interface nsIDOMElement;
|
||||
interface nsIDOMDocument;
|
||||
|
||||
[scriptable, uuid(0ad87068-c6fd-4122-a515-ffe8c4773b10)]
|
||||
[scriptable, uuid(3697f9ed-d8bc-4c00-890f-7a702d5b4005)]
|
||||
interface nsIXTFElementWrapper : nsISupports
|
||||
{
|
||||
readonly attribute nsIDOMElement elementNode;
|
||||
|
@ -60,7 +60,7 @@ interface nsIXTFElementWrapper : nsISupports
|
|||
* Sets the intrinsic state for the element.
|
||||
* @see nsIContent::IntrinsicState().
|
||||
*/
|
||||
void setIntrinsicState(in long newState);
|
||||
void setIntrinsicState(in unsigned long long newState);
|
||||
|
||||
/**
|
||||
* This sets the name of the class attribute.
|
||||
|
|
|
@ -901,10 +901,10 @@ nsXTFElementWrapper::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXTFElementWrapper::SetIntrinsicState(PRInt32 aNewState)
|
||||
nsXTFElementWrapper::SetIntrinsicState(PRUint64 aNewState)
|
||||
{
|
||||
nsIDocument *doc = GetCurrentDoc();
|
||||
PRInt32 bits = mIntrinsicState ^ aNewState;
|
||||
PRUint64 bits = mIntrinsicState ^ aNewState;
|
||||
|
||||
if (!doc || !bits)
|
||||
return NS_OK;
|
||||
|
@ -915,7 +915,7 @@ nsXTFElementWrapper::SetIntrinsicState(PRInt32 aNewState)
|
|||
|
||||
mIntrinsicState = aNewState;
|
||||
mozAutoDocUpdate upd(doc, UPDATE_CONTENT_STATE, PR_TRUE);
|
||||
doc->ContentStatesChanged(this, nsnull, bits);
|
||||
doc->ContentStatesChanged(this, nsnull, (PRInt32)bits);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -187,7 +187,7 @@ protected:
|
|||
* The intrinsic state of the element.
|
||||
* @see nsIContent::IntrinsicState()
|
||||
*/
|
||||
PRInt32 mIntrinsicState;
|
||||
PRUint64 mIntrinsicState;
|
||||
|
||||
// Temporary owner used by GetAttrNameAt
|
||||
nsAttrName mTmpAttrName;
|
||||
|
|
|
@ -46,7 +46,7 @@ interface nsIDOMDocument;
|
|||
interface nsIDOMCSSStyleRule;
|
||||
interface nsIDOMNode;
|
||||
|
||||
[scriptable, uuid(78fd16c2-bdfb-4b1d-8738-d536d0a8f430)]
|
||||
[scriptable, uuid(aa6562de-2628-44fa-90a8-13d6aee404d6)]
|
||||
interface inIDOMUtils : nsISupports
|
||||
{
|
||||
// CSS utilities
|
||||
|
@ -65,6 +65,6 @@ interface inIDOMUtils : nsISupports
|
|||
nsIArray getBindingURLs(in nsIDOMElement aElement);
|
||||
|
||||
// content state utilities
|
||||
long getContentState(in nsIDOMElement aElement);
|
||||
void setContentState(in nsIDOMElement aElement, in long aState);
|
||||
unsigned long long getContentState(in nsIDOMElement aElement);
|
||||
void setContentState(in nsIDOMElement aElement, in unsigned long long aState);
|
||||
};
|
||||
|
|
|
@ -232,7 +232,7 @@ inDOMUtils::GetBindingURLs(nsIDOMElement *aElement, nsIArray **_retval)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
inDOMUtils::SetContentState(nsIDOMElement *aElement, PRInt32 aState)
|
||||
inDOMUtils::SetContentState(nsIDOMElement *aElement, PRUint64 aState)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aElement);
|
||||
|
||||
|
@ -241,14 +241,14 @@ inDOMUtils::SetContentState(nsIDOMElement *aElement, PRInt32 aState)
|
|||
nsCOMPtr<nsIContent> content;
|
||||
content = do_QueryInterface(aElement);
|
||||
|
||||
return esm->SetContentState(content, aState);
|
||||
return esm->SetContentState(content, (PRInt32)aState);
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
inDOMUtils::GetContentState(nsIDOMElement *aElement, PRInt32* aState)
|
||||
inDOMUtils::GetContentState(nsIDOMElement *aElement, PRUint64* aState)
|
||||
{
|
||||
*aState = 0;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче