Converting ::GetIID() into NS_GET_IID(). Bug #20232. r=scc, r=mozbot

This commit is contained in:
pp%ludusdesign.com 2000-02-02 22:24:56 +00:00
Родитель dd1d9bfd21
Коммит 43d7ba4273
161 изменённых файлов: 729 добавлений и 891 удалений

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
/*
@ -168,7 +169,7 @@ nsresult NS_NewContentIterator(nsIContentIterator** aInstancePtrResult)
{
nsContentIterator * iter = new nsContentIterator();
if (iter)
return iter->QueryInterface(nsIContentIterator::GetIID(), (void**) aInstancePtrResult);
return iter->QueryInterface(NS_GET_IID(nsIContentIterator), (void**) aInstancePtrResult);
return NS_ERROR_OUT_OF_MEMORY;
}
@ -194,13 +195,13 @@ nsresult nsContentIterator::QueryInterface(const nsIID& aIID,
NS_ADDREF_THIS();
return NS_OK;
}
/* if (aIID.Equals(nsIEnumerator::GetIID()))
/* if (aIID.Equals(NS_GET_IID(nsIEnumerator)))
{
*aInstancePtrResult = (void*)(nsIEnumerator*)this;
NS_ADDREF_THIS();
return NS_OK;
} */
if (aIID.Equals(nsIContentIterator::GetIID()))
if (aIID.Equals(NS_GET_IID(nsIContentIterator)))
{
*aInstancePtrResult = (void*)(nsIContentIterator*)this;
NS_ADDREF_THIS();
@ -718,7 +719,7 @@ nsresult nsContentIterator::CurrentNode(nsIContent **aNode)
return NS_ERROR_FAILURE;
if (mIsDone)
return NS_ERROR_FAILURE;
return mCurNode->QueryInterface(nsIContent::GetIID(), (void**) aNode);
return mCurNode->QueryInterface(NS_GET_IID(nsIContent), (void**) aNode);
}
@ -788,7 +789,7 @@ nsresult NS_NewContentSubtreeIterator(nsIContentIterator** aInstancePtrResult)
{
nsContentIterator * iter = new nsContentSubtreeIterator();
if (iter)
return iter->QueryInterface(nsIContentIterator::GetIID(), (void**) aInstancePtrResult);
return iter->QueryInterface(NS_GET_IID(nsIContentIterator), (void**) aInstancePtrResult);
return NS_ERROR_OUT_OF_MEMORY;
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "plstr.h"
@ -710,7 +711,7 @@ nsresult nsDocument::QueryInterface(REFNSIID aIID, void** aInstancePtr)
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIScriptObjectPrincipal::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIScriptObjectPrincipal))) {
nsIScriptObjectPrincipal* tmp = this;
*aInstancePtr = (void*) tmp;
NS_ADDREF_THIS();
@ -734,19 +735,19 @@ nsresult nsDocument::QueryInterface(REFNSIID aIID, void** aInstancePtr)
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIDiskDocument::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIDiskDocument))) {
nsIDiskDocument* tmp = this;
*aInstancePtr = (void*) tmp;
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsCOMTypeInfo<nsISupportsWeakReference>::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsISupportsWeakReference))) {
nsISupportsWeakReference* tmp = this;
*aInstancePtr = (void*) tmp;
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsCOMTypeInfo<nsISupports>::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsISupports))) {
nsIDocument* tmp = this;
nsISupports* tmp2 = tmp;
*aInstancePtr = (void*) tmp2;
@ -834,7 +835,7 @@ nsDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup)
nsCOMPtr<nsISupports> owner;
aChannel->GetOwner(getter_AddRefs(owner));
if (owner)
owner->QueryInterface(nsIPrincipal::GetIID(), (void**)&mPrincipal);
owner->QueryInterface(NS_GET_IID(nsIPrincipal), (void**)&mPrincipal);
mDocumentLoadGroup = getter_AddRefs(NS_GetWeakReference(aLoadGroup));
// there was an assertion here that aLoadGroup was not null. This is no longer valid
@ -2835,7 +2836,7 @@ nsDocument::CreateXIF(nsString & aBuffer, nsIDOMSelection* aSelection)
// Make a content iterator over the selection:
nsCOMPtr<nsIContentIterator> iter;
result = nsComponentManager::CreateInstance(kCContentIteratorCID, nsnull,
nsIContentIterator::GetIID(),
NS_GET_IID(nsIContentIterator),
getter_AddRefs(iter));
if ((NS_SUCCEEDED(result)) && iter)
{

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIDocumentEncoder.h"
@ -125,7 +126,7 @@ nsresult nsTextEncoder::QueryInterface(REFNSIID aIID,
if (aIID.Equals(kISupportsIID)) {
*aInstancePtr = (void *)(nsISupports*)this;
} else if (aIID.Equals(nsIDocumentEncoder::GetIID())) {
} else if (aIID.Equals(NS_GET_IID(nsIDocumentEncoder))) {
*aInstancePtr = (void *)(nsIDocumentEncoder*)this;
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
/*
@ -80,7 +81,7 @@ NS_NewRange(nsIDOMRange** aInstancePtrResult)
{
nsRange * range = new nsRange();
if (range)
return range->QueryInterface(nsIDOMRange::GetIID(), (void**) aInstancePtrResult);
return range->QueryInterface(NS_GET_IID(nsIDOMRange), (void**) aInstancePtrResult);
return NS_ERROR_OUT_OF_MEMORY;
}
@ -312,13 +313,13 @@ nsresult nsRange::QueryInterface(const nsIID& aIID,
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIDOMRange::GetIID()))
if (aIID.Equals(NS_GET_IID(nsIDOMRange)))
{
*aInstancePtrResult = (void*)(nsIDOMRange*)this;
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIDOMNSRange::GetIID()))
if (aIID.Equals(NS_GET_IID(nsIDOMNSRange)))
{
*aInstancePtrResult = (void*)(nsIDOMNSRange*)this;
NS_ADDREF_THIS();
@ -372,7 +373,7 @@ nsresult nsRange::AddToListOf(nsIDOMNode* aNode)
nsCOMPtr<nsIContent> cN;
nsresult res = aNode->QueryInterface(nsIContent::GetIID(), getter_AddRefs(cN));
nsresult res = aNode->QueryInterface(NS_GET_IID(nsIContent), getter_AddRefs(cN));
if (NS_FAILED(res))
return res;
@ -388,7 +389,7 @@ nsresult nsRange::RemoveFromListOf(nsIDOMNode* aNode)
nsCOMPtr<nsIContent> cN;
nsresult res = aNode->QueryInterface(nsIContent::GetIID(), getter_AddRefs(cN));
nsresult res = aNode->QueryInterface(NS_GET_IID(nsIContent), getter_AddRefs(cN));
if (NS_FAILED(res))
return res;
@ -631,11 +632,11 @@ PRInt32 nsRange::IndexOf(nsIDOMNode* aChildNode)
return 0;
// convert node and parent to nsIContent, so that we can find the child index
res = parentNode->QueryInterface(nsIContent::GetIID(), getter_AddRefs(contentParent));
res = parentNode->QueryInterface(NS_GET_IID(nsIContent), getter_AddRefs(contentParent));
if (NS_FAILED(res))
return 0;
res = aChildNode->QueryInterface(nsIContent::GetIID(), getter_AddRefs(contentChild));
res = aChildNode->QueryInterface(NS_GET_IID(nsIContent), getter_AddRefs(contentChild));
if (NS_FAILED(res))
return 0;
@ -682,7 +683,7 @@ PRInt32 nsRange::GetAncestorsAndOffsets(nsIDOMNode* aNode, PRInt32 aOffset,
// callers responsibility to make sure args are non-null and proper type
res = aNode->QueryInterface(nsIContent::GetIID(),getter_AddRefs(contentNode));
res = aNode->QueryInterface(NS_GET_IID(nsIContent),getter_AddRefs(contentNode));
if (NS_FAILED(res))
{
NS_NOTREACHED("nsRange::GetAncestorsAndOffsets");
@ -772,7 +773,7 @@ nsresult nsRange::GetDOMNodeFromContent(nsIContent* inContentNode, nsCOMPtr<nsID
{
if (!outDomNode)
return NS_ERROR_NULL_POINTER;
nsresult res = inContentNode->QueryInterface(nsIDOMNode::GetIID(), getter_AddRefs(*outDomNode));
nsresult res = inContentNode->QueryInterface(NS_GET_IID(nsIDOMNode), getter_AddRefs(*outDomNode));
if (NS_FAILED(res))
return res;
return NS_OK;
@ -782,7 +783,7 @@ nsresult nsRange::GetContentFromDOMNode(nsIDOMNode* inDomNode, nsCOMPtr<nsIConte
{
if (!outContentNode)
return NS_ERROR_NULL_POINTER;
nsresult res = inDomNode->QueryInterface(nsIContent::GetIID(), getter_AddRefs(*outContentNode));
nsresult res = inDomNode->QueryInterface(NS_GET_IID(nsIContent), getter_AddRefs(*outContentNode));
if (NS_FAILED(res))
return res;
return NS_OK;
@ -1103,13 +1104,13 @@ nsresult nsRange::DeleteContents()
nsCOMPtr<nsIContent> cEnd;
// get the content versions of our endpoints
nsresult res = mStartParent->QueryInterface(nsIContent::GetIID(), getter_AddRefs(cStart));
nsresult res = mStartParent->QueryInterface(NS_GET_IID(nsIContent), getter_AddRefs(cStart));
if (NS_FAILED(res))
{
NS_NOTREACHED("nsRange::DeleteContents");
return NS_ERROR_UNEXPECTED;
}
res = mEndParent->QueryInterface(nsIContent::GetIID(), getter_AddRefs(cEnd));
res = mEndParent->QueryInterface(NS_GET_IID(nsIContent), getter_AddRefs(cEnd));
if (NS_FAILED(res))
{
NS_NOTREACHED("nsRange::DeleteContents");
@ -1144,7 +1145,7 @@ nsresult nsRange::DeleteContents()
else // textnode - offsets refer to data in node
{
nsCOMPtr<nsIDOMText> textNode;
res = mStartParent->QueryInterface(nsIDOMText::GetIID(), getter_AddRefs(textNode));
res = mStartParent->QueryInterface(NS_GET_IID(nsIDOMText), getter_AddRefs(textNode));
if (NS_FAILED(res)) // if it's not a text node, punt
{
NS_NOTREACHED("nsRange::DeleteContents");
@ -1225,7 +1226,7 @@ nsresult nsRange::DeleteContents()
// If mStartParent is a text node, delete the text after start offset
nsIDOMText *textNode;
res = mStartParent->QueryInterface(nsIDOMText::GetIID(), (void**)&textNode);
res = mStartParent->QueryInterface(NS_GET_IID(nsIDOMText), (void**)&textNode);
if (NS_SUCCEEDED(res))
{
res = textNode->DeleteData(mStartOffset, 0xFFFFFFFF); // del to end
@ -1234,7 +1235,7 @@ nsresult nsRange::DeleteContents()
}
// If mEndParent is a text node, delete the text before end offset
res = mEndParent->QueryInterface(nsIDOMText::GetIID(), (void**)&textNode);
res = mEndParent->QueryInterface(NS_GET_IID(nsIDOMText), (void**)&textNode);
if (NS_SUCCEEDED(res))
{
res = textNode->DeleteData(0, mEndOffset); // del from start

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIStyleContext.h"
#include "nsIMutableStyleContext.h"
@ -1761,7 +1762,7 @@ StyleContextImpl::QueryInterface(const nsIID& aIID, void** aInstancePtr)
return NS_ERROR_NULL_POINTER;
}
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
if (aIID.Equals(nsIStyleContext::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIStyleContext))) {
*aInstancePtr = (void*)(nsIStyleContext*)this;
NS_ADDREF_THIS();
return NS_OK;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIAttributeContent.h"
#include "nsGenericElement.h"
@ -219,7 +220,7 @@ NS_NewAttributeContent(nsIContent** aContent)
if (nsnull == it) {
return NS_ERROR_OUT_OF_MEMORY;
}
return NS_SUCCEEDED(it->QueryInterface(nsCOMTypeInfo<nsIContent>::GetIID(), (void **)aContent)) ?
return NS_SUCCEEDED(it->QueryInterface(NS_GET_IID(nsIContent), (void **)aContent)) ?
NS_OK : NS_ERROR_FAILURE;
}
@ -271,25 +272,25 @@ nsresult nsAttributeContent::QueryInterface(const nsIID& aIID, void** aInstanceP
return NS_ERROR_NULL_POINTER;
}
if (aIID.Equals(nsCOMTypeInfo<nsIContent>::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIContent))) {
*aInstancePtr = (void*) ((nsIContent*)this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsCOMTypeInfo<nsITextContent>::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsITextContent))) {
*aInstancePtr = (void*) ((nsITextContent*)this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsCOMTypeInfo<nsIAttributeContent>::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIAttributeContent))) {
*aInstancePtr = (void*) ((nsIAttributeContent*)this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsCOMTypeInfo<nsISupports>::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsISupports))) {
*aInstancePtr = (void*) ((nsISupports*)(nsIContent*)this);
NS_ADDREF_THIS();
return NS_OK;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIDOMHTMLAppletElement.h"
#include "nsIScriptObjectOwner.h"
@ -308,13 +309,13 @@ if (NS_SUCCEEDED(rv)) {
rv = NS_GetObjectFramePluginInstance(frame, pluginInstance);
if ((rv == NS_OK) && (nsnull != pluginInstance)) {
nsIJVMPluginInstance* javaPluginInstance = nsnull;
if (pluginInstance->QueryInterface(nsIJVMPluginInstance::GetIID(), (void**)&javaPluginInstance) == NS_OK) {
if (pluginInstance->QueryInterface(NS_GET_IID(nsIJVMPluginInstance), (void**)&javaPluginInstance) == NS_OK) {
jobject appletObject = nsnull;
rv = javaPluginInstance->GetJavaObject(&appletObject);
if (NS_OK == rv) {
nsILiveConnectManager* manager = NULL;
rv = nsServiceManager::GetService(nsIJVMManager::GetCID(),
nsILiveConnectManager::GetIID(),
NS_GET_IID(nsILiveConnectManager),
(nsISupports **)&manager);
if (rv == NS_OK) {
rv = manager->WrapJavaObject(context, appletObject, &wrappedAppletObject);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsIDOMHTMLInputElement.h"
@ -260,7 +261,7 @@ nsHTMLInputElement::QueryInterface(REFNSIID aIID, void** aInstancePtr)
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIDOMNSHTMLInputElement::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIDOMNSHTMLInputElement))) {
*aInstancePtr = (void*)(nsIDOMNSHTMLInputElement*) this;
NS_ADDREF_THIS();
return NS_OK;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIDOMHTMLOptionElement.h"
#include "nsIDOMHTMLOptGroupElement.h"
@ -277,7 +278,7 @@ nsHTMLOptionElement::SetSelected(PRBool aValue)
nsresult result = GetPrimaryFrame(fcFrame);
if (NS_SUCCEEDED(result) && (nsnull != fcFrame)) {
nsISelectControlFrame* selectFrame = nsnull;
result = fcFrame->QueryInterface(nsISelectControlFrame::GetIID(),(void **) &selectFrame);
result = fcFrame->QueryInterface(NS_GET_IID(nsISelectControlFrame),(void **) &selectFrame);
if (NS_SUCCEEDED(result) && (nsnull != selectFrame)) {
PRInt32 indx;
result = GetIndex(&indx);
@ -310,7 +311,7 @@ nsHTMLOptionElement::SetLabel(const nsString& aValue)
result = GetPrimaryFrame(fcFrame);
if (NS_SUCCEEDED(result) && (nsnull != fcFrame)) {
nsIComboboxControlFrame* selectFrame = nsnull;
result = fcFrame->QueryInterface(nsIComboboxControlFrame::GetIID(),(void **) &selectFrame);
result = fcFrame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame),(void **) &selectFrame);
if (NS_SUCCEEDED(result) && (nsnull != selectFrame)) {
selectFrame->UpdateSelection(PR_FALSE, PR_TRUE, 0);
}
@ -552,7 +553,7 @@ nsHTMLOptionElement::SetText(const nsString& aText)
result = GetPrimaryFrame(fcFrame);
if (NS_SUCCEEDED(result) && (nsnull != fcFrame)) {
nsIComboboxControlFrame* selectFrame = nsnull;
result = fcFrame->QueryInterface(nsIComboboxControlFrame::GetIID(),(void **) &selectFrame);
result = fcFrame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame),(void **) &selectFrame);
if (NS_SUCCEEDED(result) && (nsnull != selectFrame)) {
selectFrame->UpdateSelection(PR_FALSE, PR_TRUE, 0);
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsIDOMHTMLSelectElement.h"
@ -664,7 +665,7 @@ nsHTMLSelectElement::AddOption(nsIContent* aContent)
nsresult result = nsGenericHTMLElement::GetPrimaryFrame(this, fcFrame);
if (NS_SUCCEEDED(result) && (nsnull != fcFrame)) {
nsISelectControlFrame* selectFrame = nsnull;
result = fcFrame->QueryInterface(nsISelectControlFrame::GetIID(),(void **) &selectFrame);
result = fcFrame->QueryInterface(NS_GET_IID(nsISelectControlFrame),(void **) &selectFrame);
if (NS_SUCCEEDED(result) && (nsnull != selectFrame)) {
nsIPresContext* presContext;
nsGenericHTMLElement::GetPresContext(this, &presContext);
@ -693,7 +694,7 @@ nsHTMLSelectElement::RemoveOption(nsIContent* aContent)
nsresult result = nsGenericHTMLElement::GetPrimaryFrame(this, fcFrame);
if (NS_SUCCEEDED(result) && (nsnull != fcFrame)) {
nsISelectControlFrame* selectFrame = nsnull;
result = fcFrame->QueryInterface(nsISelectControlFrame::GetIID(),(void **) &selectFrame);
result = fcFrame->QueryInterface(NS_GET_IID(nsISelectControlFrame),(void **) &selectFrame);
if (NS_SUCCEEDED(result) && (nsnull != selectFrame)) {
// We can't get our index if we've already been replaced in the OptionList.
// If we couldn't get our index, pass -1, remove all options and recreate
@ -723,7 +724,7 @@ nsHTMLSelectElement::DoneAddingContent(PRBool aIsDone)
nsresult result = nsGenericHTMLElement::GetPrimaryFrame(this, fcFrame,PR_FALSE);
if (NS_SUCCEEDED(result) && (nsnull != fcFrame)) {
nsISelectControlFrame* selectFrame = nsnull;
result = fcFrame->QueryInterface(nsISelectControlFrame::GetIID(),(void **) &selectFrame);
result = fcFrame->QueryInterface(NS_GET_IID(nsISelectControlFrame),(void **) &selectFrame);
if (NS_SUCCEEDED(result) && (nsnull != selectFrame)) {
result = selectFrame->DoneAddingContent(mIsDoneAddingContent);
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIDOMHTMLTextAreaElement.h"
#include "nsIDOMNSHTMLTextAreaElement.h"
@ -182,7 +183,7 @@ nsHTMLTextAreaElement::QueryInterface(REFNSIID aIID, void** aInstancePtr)
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIDOMNSHTMLTextAreaElement::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIDOMNSHTMLTextAreaElement))) {
*aInstancePtr = (void*)(nsIDOMNSHTMLTextAreaElement*) this;
NS_ADDREF_THIS();
return NS_OK;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsIHTMLContentSink.h"
@ -1043,7 +1044,7 @@ NS_NewHTMLElementFactory(nsIElementFactory** aInstancePtrResult)
if (!it) {
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(nsIElementFactory::GetIID(),
return it->QueryInterface(NS_GET_IID(nsIElementFactory),
(void**)aInstancePtrResult);
}
@ -3058,7 +3059,7 @@ HTMLContentSink::StartLayout()
// frameset document, disable the scroll bars on the views.
char* ref = nsnull; // init in case mDocumentURI is not a url
nsIURL* url;
nsresult rv = mDocumentURI->QueryInterface(nsIURL::GetIID(), (void**)&url);
nsresult rv = mDocumentURI->QueryInterface(NS_GET_IID(nsIURL), (void**)&url);
if (NS_SUCCEEDED(rv)) {
rv = url->GetRef(&ref);
NS_RELEASE(url);
@ -3777,7 +3778,7 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode)
}
nsIRefreshURI *reefer = nsnull;
rv = mWebShell->QueryInterface(nsCOMTypeInfo<nsIRefreshURI>::GetIID(), (void**)&reefer);
rv = mWebShell->QueryInterface(NS_GET_IID(nsIRefreshURI), (void**)&reefer);
if (NS_FAILED(rv)) {
NS_RELEASE(uri);
return rv;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#define NS_IMPL_IDS
#include "nsICharsetAlias.h"
@ -467,7 +468,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
nsICharsetAlias* calias = nsnull;
rv = nsServiceManager::GetService(
kCharsetAliasCID,
nsICharsetAlias::GetIID(),
NS_GET_IID(nsICharsetAlias),
(nsISupports**) &calias);
if(NS_SUCCEEDED(rv) && (nsnull != calias) )
{
@ -668,7 +669,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
if(NS_SUCCEEDED( rv_detect =
nsComponentManager::CreateInstance(g_detector_progid, nsnull,
nsICharsetDetector::GetIID(), (void**)&cdet)))
NS_GET_IID(nsICharsetDetector), (void**)&cdet)))
{
if(NS_SUCCEEDED( rv_detect =
nsComponentManager::CreateInstance(
@ -678,11 +679,11 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
if(cdetflt &&
NS_SUCCEEDED( rv_detect=
cdetflt->QueryInterface(
nsICharsetDetectionAdaptor::GetIID(),(void**) &adp)))
NS_GET_IID(nsICharsetDetectionAdaptor),(void**) &adp)))
{
if( NS_SUCCEEDED( rv_detect=
webShell->QueryInterface(
nsIWebShellServices::GetIID(),(void**) &wss)))
NS_GET_IID(nsIWebShellServices),(void**) &wss)))
{
rv_detect = adp->Init(wss, cdet, aCommand);
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsICSSStyleSheet.h"
@ -1227,12 +1228,12 @@ CSSStyleSheetImpl::GetStyleRuleProcessor(nsIStyleRuleProcessor*& aProcessor,
nsICSSStyleRuleProcessor* cssProcessor = nsnull;
if (aPrevProcessor) {
result = aPrevProcessor->QueryInterface(nsICSSStyleRuleProcessor::GetIID(), (void**)&cssProcessor);
result = aPrevProcessor->QueryInterface(NS_GET_IID(nsICSSStyleRuleProcessor), (void**)&cssProcessor);
}
if (! cssProcessor) {
CSSRuleProcessor* processor = new CSSRuleProcessor();
if (processor) {
result = processor->QueryInterface(nsICSSStyleRuleProcessor::GetIID(), (void**)&cssProcessor);
result = processor->QueryInterface(NS_GET_IID(nsICSSStyleRuleProcessor), (void**)&cssProcessor);
if (NS_FAILED(result)) {
delete processor;
cssProcessor = nsnull;
@ -2159,12 +2160,12 @@ CSSRuleProcessor::QueryInterface(REFNSIID aIID, void** aInstancePtrResult)
}
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
if (aIID.Equals(nsICSSStyleRuleProcessor::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsICSSStyleRuleProcessor))) {
*aInstancePtrResult = (void*)this;
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIStyleRuleProcessor::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIStyleRuleProcessor))) {
*aInstancePtrResult = (void*)this;
NS_ADDREF_THIS();
return NS_OK;
@ -2347,7 +2348,7 @@ static PRBool SelectorMatches(nsIPresContext* aPresContext,
((nsnull != aSelector->mID) || (nsnull != aSelector->mClassList))) { // test for ID & class match
result = PR_FALSE;
nsIStyledContent* styledContent;
if (NS_SUCCEEDED(aContent->QueryInterface(nsIStyledContent::GetIID(), (void**)&styledContent))) {
if (NS_SUCCEEDED(aContent->QueryInterface(NS_GET_IID(nsIStyledContent), (void**)&styledContent))) {
nsIAtom* contentID;
styledContent->GetID(contentID);
if ((nsnull == aSelector->mID) || (aSelector->mID == contentID)) {
@ -2424,7 +2425,7 @@ static PRBool SelectorMatches(nsIPresContext* aPresContext,
}
if (tag == nsLayoutAtoms::textTagName) { // skip only whitespace text
nsITextContent* text = nsnull;
if (NS_SUCCEEDED(firstChild->QueryInterface(nsITextContent::GetIID(), (void**)&text))) {
if (NS_SUCCEEDED(firstChild->QueryInterface(NS_GET_IID(nsITextContent), (void**)&text))) {
PRBool isWhite;
text->IsOnlyWhitespace(&isWhite);
NS_RELEASE(text);
@ -2516,7 +2517,7 @@ static PRBool SelectorMatches(nsIPresContext* aPresContext,
nsAutoString absURLSpec;
nsresult rv;
nsIURI *baseUri = nsnull;
rv = docURL->QueryInterface(nsIURI::GetIID(), (void**)&baseUri);
rv = docURL->QueryInterface(NS_GET_IID(nsIURI), (void**)&baseUri);
if (NS_FAILED(rv)) return PR_FALSE;
NS_MakeAbsoluteURI(href, baseUri, absURLSpec);
@ -2683,7 +2684,7 @@ CSSRuleProcessor::RulesMatching(nsIPresContext* aPresContext,
nsAutoVoidArray classArray;
nsIStyledContent* styledContent;
if (NS_SUCCEEDED(aContent->QueryInterface(nsIStyledContent::GetIID(), (void**)&styledContent))) {
if (NS_SUCCEEDED(aContent->QueryInterface(NS_GET_IID(nsIStyledContent), (void**)&styledContent))) {
styledContent->GetID(idAtom);
styledContent->GetClasses(classArray);
NS_RELEASE(styledContent);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIHTMLAttributes.h"
@ -379,12 +380,12 @@ nsHTMLMappedAttributes::QueryInterface(const nsIID& aIID,
return NS_ERROR_NULL_POINTER;
}
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
if (aIID.Equals(nsIHTMLMappedAttributes::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIHTMLMappedAttributes))) {
*aInstancePtrResult = (void*) ((nsIHTMLMappedAttributes*)this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIStyleRule::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIStyleRule))) {
*aInstancePtrResult = (void*) ((nsIStyleRule*)this);
NS_ADDREF_THIS();
return NS_OK;
@ -1379,7 +1380,7 @@ HTMLAttributesImpl::Clone(nsIHTMLAttributes** aInstancePtrResult) const
return NS_ERROR_OUT_OF_MEMORY;
}
return clone->QueryInterface(nsIHTMLAttributes::GetIID(), (void **) aInstancePtrResult);
return clone->QueryInterface(NS_GET_IID(nsIHTMLAttributes), (void **) aInstancePtrResult);
}
NS_IMETHODIMP
@ -1499,7 +1500,7 @@ extern NS_HTML nsresult
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(nsIHTMLAttributes::GetIID(), (void **) aInstancePtrResult);
return it->QueryInterface(NS_GET_IID(nsIHTMLAttributes), (void **) aInstancePtrResult);
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIHTMLCSSStyleSheet.h"
@ -418,7 +419,7 @@ nsresult HTMLCSSStyleSheetImpl::QueryInterface(const nsIID& aIID,
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIStyleRuleProcessor::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIStyleRuleProcessor))) {
*aInstancePtrResult = (void*) ((nsIStyleRuleProcessor*)this);
NS_ADDREF_THIS();
return NS_OK;
@ -454,7 +455,7 @@ HTMLCSSStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext,
nsIStyledContent* styledContent;
// just get the one and only style rule from the content's STYLE attribute
if (NS_SUCCEEDED(aContent->QueryInterface(nsIStyledContent::GetIID(), (void**)&styledContent))) {
if (NS_SUCCEEDED(aContent->QueryInterface(NS_GET_IID(nsIStyledContent), (void**)&styledContent))) {
PRUint32 index = 0;
aResults->Count(&index);
if (NS_SUCCEEDED(styledContent->GetInlineStyleRules(aResults))) {

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsINameSpaceManager.h"
#include "nsIHTMLStyleSheet.h"
@ -579,7 +580,7 @@ nsresult HTMLStyleSheetImpl::QueryInterface(const nsIID& aIID,
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIStyleRuleProcessor::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIStyleRuleProcessor))) {
*aInstancePtrResult = (void*) ((nsIStyleRuleProcessor*)this);
NS_ADDREF_THIS();
return NS_OK;
@ -627,7 +628,7 @@ HTMLStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext,
NS_PRECONDITION(nsnull != aResults, "null arg");
nsIStyledContent* styledContent;
if (NS_SUCCEEDED(aContent->QueryInterface(nsIStyledContent::GetIID(), (void**)&styledContent))) {
if (NS_SUCCEEDED(aContent->QueryInterface(NS_GET_IID(nsIStyledContent), (void**)&styledContent))) {
PRInt32 nameSpace;
styledContent->GetNameSpaceID(nameSpace);
if (kNameSpaceID_HTML == nameSpace) {
@ -660,7 +661,7 @@ HTMLStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext,
nsAutoString absURLSpec;
nsresult rv;
nsIURI *baseUri = nsnull;
rv = docURL->QueryInterface(nsIURI::GetIID(), (void**)&baseUri);
rv = docURL->QueryInterface(NS_GET_IID(nsIURI), (void**)&baseUri);
if (NS_FAILED(rv)) return 0;
rv = NS_MakeAbsoluteURI(href, baseUri, absURLSpec);
@ -750,7 +751,7 @@ HTMLStyleSheetImpl::HasStateDependentStyle(nsIPresContext* aPresContext,
if (mActiveRule || mLinkRule || mVisitedRule) { // do we have any rules dependent on state?
nsIStyledContent* styledContent;
if (NS_SUCCEEDED(aContent->QueryInterface(nsIStyledContent::GetIID(), (void**)&styledContent))) {
if (NS_SUCCEEDED(aContent->QueryInterface(NS_GET_IID(nsIStyledContent), (void**)&styledContent))) {
PRInt32 nameSpace;
styledContent->GetNameSpaceID(nameSpace);
if (kNameSpaceID_HTML == nameSpace) {

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

@ -82,7 +82,7 @@ public:
}
};
NS_IMPL_ISUPPORTS(nsProxyStream, nsIInputStream::GetIID());
NS_IMPL_ISUPPORTS(nsProxyStream, NS_GET_IID(nsIInputStream));
//////////////////////////////////////////////////////////////////////////////////////////
@ -184,7 +184,7 @@ nsXBLService::nsXBLService(void)
// Register the XBL namespace.
nsresult rv = nsComponentManager::CreateInstance(kNameSpaceManagerCID,
nsnull,
nsCOMTypeInfo<nsINameSpaceManager>::GetIID(),
NS_GET_IID(nsINameSpaceManager),
(void**) &gNameSpaceManager);
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to create namespace manager");
if (NS_FAILED(rv)) return;
@ -395,7 +395,7 @@ nsXBLService::FetchBindingDocument(nsIURI* aURI, nsIDocument** aResult)
// Create the XML document
nsCOMPtr<nsIDocument> doc;
nsresult rv = nsComponentManager::CreateInstance(kXMLDocumentCID, nsnull,
nsIDocument::GetIID(),
NS_GET_IID(nsIDocument),
getter_AddRefs(doc));
if (NS_FAILED(rv)) return rv;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsXMLElement.h"
@ -88,7 +89,7 @@ nsXMLElement::QueryInterface(REFNSIID aIID,
NS_ADDREF_THIS();
return NS_OK;
}
else if (aIID.Equals(nsIBindableContent::GetIID())) {
else if (aIID.Equals(NS_GET_IID(nsIBindableContent))) {
nsIBindableContent* tmp = this;
*aInstancePtr = (void*) tmp;
NS_ADDREF_THIS();

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsXMLContentSink.h"
@ -1588,7 +1589,7 @@ nsXMLContentSink::StartLayout()
// frameset document, disable the scroll bars on the views.
char* ref = nsnull;
nsIURL* url;
nsresult rv = mDocumentURL->QueryInterface(nsIURL::GetIID(), (void**)&url);
nsresult rv = mDocumentURL->QueryInterface(NS_GET_IID(nsIURL), (void**)&url);
if (NS_SUCCEEDED(rv)) {
rv = url->GetRef(&ref);
NS_RELEASE(url);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
@ -236,7 +237,7 @@ nsXMLDocument::StartDocumentLoad(const char* aCommand,
nsICharsetAlias* calias = nsnull;
rv = nsServiceManager::GetService(
kCharsetAliasCID,
nsICharsetAlias::GetIID(),
NS_GET_IID(nsICharsetAlias),
(nsISupports**) &calias);
if(NS_SUCCEEDED(rv) && (nsnull != calias) )
{

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "pratom.h"
@ -50,7 +51,7 @@ class nsI18nCompatibility : public nsII18nCompatibility {
virtual ~nsI18nCompatibility() {}
};
NS_IMPL_ISUPPORTS(nsI18nCompatibility, nsII18nCompatibility::GetIID());
NS_IMPL_ISUPPORTS(nsI18nCompatibility, NS_GET_IID(nsII18nCompatibility));
NS_IMETHODIMP nsI18nCompatibility::CSIDtoCharsetName(PRUint16 csid, PRUnichar **_retval)
{

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCollationMac.h"
@ -168,7 +169,7 @@ nsresult nsCollationMac::Initialize(nsILocale* locale)
short scriptcode, langcode, regioncode;
nsCOMPtr <nsIMacLocale> macLocale;
res = nsComponentManager::CreateInstance(kMacLocaleFactoryCID, NULL,
nsIMacLocale::GetIID(), getter_AddRefs(macLocale));
NS_GET_IID(nsIMacLocale), getter_AddRefs(macLocale));
if (NS_SUCCEEDED(res)) {
if (NS_SUCCEEDED(res = macLocale->GetPlatformLocale(&aLocale, &scriptcode, &langcode, &regioncode))) {
m_scriptcode = scriptcode;
@ -177,7 +178,7 @@ nsresult nsCollationMac::Initialize(nsILocale* locale)
nsCOMPtr <nsIPlatformCharset> platformCharset;
res = nsComponentManager::CreateInstance(kPlatformCharsetCID, NULL,
nsIPlatformCharset::GetIID(), getter_AddRefs(platformCharset));
NS_GET_IID(nsIPlatformCharset), getter_AddRefs(platformCharset));
if (NS_SUCCEEDED(res)) {
PRUnichar* mappedCharset = NULL;
res = platformCharset->GetDefaultCharsetForLocale(aLocale.GetUnicode(), &mappedCharset);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIServiceManager.h"
@ -276,14 +277,14 @@ nsresult nsDateTimeFormatMac::Initialize(nsILocale* locale)
nsCOMPtr <nsIMacLocale> macLocale;
res = nsComponentManager::CreateInstance(kMacLocaleFactoryCID, NULL,
nsIMacLocale::GetIID(), getter_AddRefs(macLocale));
NS_GET_IID(nsIMacLocale), getter_AddRefs(macLocale));
if (NS_SUCCEEDED(res)) {
res = macLocale->GetPlatformLocale(&mLocale, &mScriptcode, &mLangcode, &mRegioncode);
}
nsCOMPtr <nsIPlatformCharset> platformCharset;
res = nsComponentManager::CreateInstance(kPlatformCharsetCID, NULL,
nsIPlatformCharset::GetIID(), getter_AddRefs(platformCharset));
NS_GET_IID(nsIPlatformCharset), getter_AddRefs(platformCharset));
if (NS_SUCCEEDED(res)) {
PRUnichar* mappedCharset = NULL;
res = platformCharset->GetDefaultCharsetForLocale(mLocale.GetUnicode(), &mappedCharset);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nscore.h"
@ -96,7 +97,7 @@ nsresult nsLocaleMacFactory::CreateInstance(nsISupports *aOuter,
else if (aIID.Equals(kIDateTimeFormatIID)) {
NS_NEWXPCOM(inst, nsDateTimeFormatMac);
}
else if (aIID.Equals(nsIScriptableDateFormat::GetIID())) {
else if (aIID.Equals(NS_GET_IID(nsIScriptableDateFormat))) {
inst = NEW_SCRIPTABLE_DATEFORMAT();
}
else if (mClassID.Equals(kScriptableDateFormatCID)) {

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIComponentManager.h"
@ -155,7 +156,7 @@ extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports* aServMgr, const char *
nsIComponentManager* compMgr;
rv = servMgr->GetService(kComponentManagerCID,
nsIComponentManager::GetIID(),
NS_GET_IID(nsIComponentManager),
(nsISupports**)&compMgr);
if (NS_FAILED(rv)) return rv;
@ -224,7 +225,7 @@ extern "C" NS_EXPORT nsresult NSUnregisterSelf(nsISupports* aServMgr, const char
nsIComponentManager* compMgr;
rv = servMgr->GetService(kComponentManagerCID,
nsIComponentManager::GetIID(),
NS_GET_IID(nsIComponentManager),
(nsISupports**)&compMgr);
if (NS_FAILED(rv)) return rv;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#define NS_IMPL_IDS
@ -46,7 +47,7 @@ nsresult nsCollationFactory::CreateCollation(nsILocale* locale, nsICollation** i
nsICollation *inst;
nsresult res;
res = nsComponentManager::CreateInstance(kCollationCID, NULL, nsICollation::GetIID(), (void**) &inst);
res = nsComponentManager::CreateInstance(kCollationCID, NULL, NS_GET_IID(nsICollation), (void**) &inst);
if (NS_FAILED(res)) {
return res;
}
@ -214,7 +215,7 @@ nsresult nsCollation::UnicodeToChar(const nsString& src, char** dst, const nsStr
nsresult res;
res = nsServiceManager::GetService(kCharsetConverterManagerCID,
nsCOMTypeInfo<nsICharsetConverterManager>::GetIID(),
NS_GET_IID(nsICharsetConverterManager),
(nsISupports**)&ccm);
if(NS_SUCCEEDED(res) && (nsnull != ccm)) {
nsIUnicodeEncoder* encoder = nsnull;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIServiceManager.h"
@ -71,7 +72,7 @@ private:
nsString mStringOut;
};
NS_IMPL_ISUPPORTS(nsScriptableDateFormat, nsIScriptableDateFormat::GetIID());
NS_IMPL_ISUPPORTS(nsScriptableDateFormat, NS_GET_IID(nsIScriptableDateFormat));
NS_IMETHODIMP nsScriptableDateFormat::FormatDateTime(
const PRUnichar *locale,
@ -101,7 +102,7 @@ NS_IMETHODIMP nsScriptableDateFormat::FormatDateTime(
if (NS_SUCCEEDED(rv) && aLocale) {
nsIDateTimeFormat *aDateTimeFormat;
rv = nsComponentManager::CreateInstance(kDateTimeFormatCID, NULL,
nsIDateTimeFormat::GetIID(), (void **) &aDateTimeFormat);
NS_GET_IID(nsIDateTimeFormat), (void **) &aDateTimeFormat);
if (NS_SUCCEEDED(rv) && aDateTimeFormat) {
struct tm tmTime;
time_t timetTime;

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

@ -16,7 +16,7 @@
* Copyright (C) 1999 John Fairhurst. All Rights Reserved.
*
* Contributor(s):
*
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nscore.h"
@ -82,7 +82,7 @@ nsLocaleDllFactory::nsLocaleDllFactory( const nsCID &aClass)
mClassID = aClass;
}
NS_IMPL_ISUPPORTS(nsLocaleDllFactory,nsIFactory::GetIID())
NS_IMPL_ISUPPORTS(nsLocaleDllFactory,NS_GET_IID(nsIFactory))
nsresult nsLocaleDllFactory::CreateInstance( nsISupports *aOuter,
const nsIID &aIID,
@ -139,7 +139,7 @@ extern "C" NS_EXPORT nsresult NSGetFactory( nsISupports *aServiceMgr,
{
fact = new nsLocaleDllFactory( aClass);
rc = fact->QueryInterface( nsIFactory::GetIID(), (void**)aFactory);
rc = fact->QueryInterface( NS_GET_IID(nsIFactory), (void**)aFactory);
}
if( NS_FAILED(rc))

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include <locale.h>
@ -134,7 +135,7 @@ nsresult nsCollationUnix::Initialize(nsILocale* locale)
nsCOMPtr <nsIPlatformCharset> platformCharset;
res = nsComponentManager::CreateInstance(kPlatformCharsetCID, NULL,
nsIPlatformCharset::GetIID(), getter_AddRefs(platformCharset));
NS_GET_IID(nsIPlatformCharset), getter_AddRefs(platformCharset));
if (NS_SUCCEEDED(res)) {
PRUnichar* mappedCharset = NULL;
res = platformCharset->GetDefaultCharsetForLocale(aLocale.GetUnicode(), &mappedCharset);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include <locale.h>
@ -93,14 +94,14 @@ nsresult nsDateTimeFormatUnix::Initialize(nsILocale* locale)
nsCOMPtr <nsIPosixLocale> posixLocale;
res = nsComponentManager::CreateInstance(kPosixLocaleFactoryCID, NULL,
nsIPosixLocale::GetIID(), getter_AddRefs(posixLocale));
NS_GET_IID(nsIPosixLocale), getter_AddRefs(posixLocale));
if (NS_SUCCEEDED(res)) {
res = posixLocale->GetPlatformLocale(&mLocale, mPlatformLocale, kPlatformLocaleLength+1);
}
nsCOMPtr <nsIPlatformCharset> platformCharset;
res = nsComponentManager::CreateInstance(kPlatformCharsetCID, NULL,
nsIPlatformCharset::GetIID(), getter_AddRefs(platformCharset));
NS_GET_IID(nsIPlatformCharset), getter_AddRefs(platformCharset));
if (NS_SUCCEEDED(res)) {
PRUnichar* mappedCharset = NULL;
res = platformCharset->GetDefaultCharsetForLocale(mLocale.GetUnicode(), &mappedCharset);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nscore.h"
@ -71,7 +72,7 @@ nsresult nsLocaleUnixFactory::CreateInstance(nsISupports *aOuter,
else if (aIID.Equals(kIDateTimeFormatIID)) {
NS_NEWXPCOM(inst, nsDateTimeFormatUnix);
}
else if (aIID.Equals(nsIScriptableDateFormat::GetIID())) {
else if (aIID.Equals(NS_GET_IID(nsIScriptableDateFormat))) {
inst = NEW_SCRIPTABLE_DATEFORMAT();
}
else if (mClassID.Equals(kScriptableDateFormatCID)) {

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nspr.h"
#include "nsString.h"
@ -315,7 +316,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *servMgr,
}
// Increase refcnt and store away nsIModule interface to m in return_cobj
rv = m->QueryInterface(nsIModule::GetIID(), (void**)return_cobj);
rv = m->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj);
if (NS_FAILED(rv)) {
delete m;
m = nsnull;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
@ -121,7 +122,7 @@ nsresult nsCollationWin::Initialize(nsILocale* locale)
nsCOMPtr <nsIPlatformCharset> platformCharset;
res = nsComponentManager::CreateInstance(kPlatformCharsetCID, NULL,
nsIPlatformCharset::GetIID(), getter_AddRefs(platformCharset));
NS_GET_IID(nsIPlatformCharset), getter_AddRefs(platformCharset));
if (NS_SUCCEEDED(res)) {
PRUnichar* mappedCharset = NULL;
res = platformCharset->GetDefaultCharsetForLocale(aLocale.GetUnicode(), &mappedCharset);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsDateTimeFormatWin.h"
@ -121,7 +122,7 @@ nsresult nsDateTimeFormatWin::Initialize(nsILocale* locale)
nsCOMPtr <nsIPlatformCharset> platformCharset;
res = nsComponentManager::CreateInstance(kPlatformCharsetCID, NULL,
nsIPlatformCharset::GetIID(), getter_AddRefs(platformCharset));
NS_GET_IID(nsIPlatformCharset), getter_AddRefs(platformCharset));
if (NS_SUCCEEDED(res)) {
PRUnichar* mappedCharset = NULL;
res = platformCharset->GetDefaultCharsetForLocale(mLocale.GetUnicode(), &mappedCharset);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIComponentManager.h"
@ -156,7 +157,7 @@ extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports* aServMgr, const char *
nsIComponentManager* compMgr;
rv = servMgr->GetService(kComponentManagerCID,
nsIComponentManager::GetIID(),
NS_GET_IID(nsIComponentManager),
(nsISupports**)&compMgr);
if (NS_FAILED(rv)) return rv;
@ -227,7 +228,7 @@ extern "C" NS_EXPORT nsresult NSUnregisterSelf(nsISupports* aServMgr, const char
nsIComponentManager* compMgr;
rv = servMgr->GetService(kComponentManagerCID,
nsIComponentManager::GetIID(),
NS_GET_IID(nsIComponentManager),
(nsISupports**)&compMgr);
if (NS_FAILED(rv)) return rv;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nscore.h"
@ -96,7 +97,7 @@ nsresult nsLocaleWinFactory::CreateInstance(nsISupports *aOuter,
else if (aIID.Equals(kIDateTimeFormatIID)) {
NS_NEWXPCOM(inst, nsDateTimeFormatWin);
}
else if (aIID.Equals(nsIScriptableDateFormat::GetIID())) {
else if (aIID.Equals(NS_GET_IID(nsIScriptableDateFormat))) {
inst = NEW_SCRIPTABLE_DATEFORMAT();
}
else if (mClassID.Equals(kScriptableDateFormatCID)) {

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include <iostream.h>
@ -173,7 +174,7 @@ static void TestCollation(nsILocale *locale)
res = nsComponentManager::CreateInstance(kCollationFactoryCID,
NULL,
nsICollationFactory::GetIID(),
NS_GET_IID(nsICollationFactory),
(void**) &f);
cout << "Test 1 - CreateInstance():\n";
@ -185,7 +186,7 @@ static void TestCollation(nsILocale *locale)
res = nsComponentManager::CreateInstance(kCollationFactoryCID,
NULL,
nsICollationFactory::GetIID(),
NS_GET_IID(nsICollationFactory),
(void**) &f);
if(NS_FAILED(res) || ( f == NULL ) ) {
cout << "\t2nd CreateInstance failed\n";
@ -569,7 +570,7 @@ static void TestSort(nsILocale *locale, nsCollationStrength collationStrength, F
res = nsComponentManager::CreateInstance(kCollationFactoryCID,
NULL,
nsICollationFactory::GetIID(),
NS_GET_IID(nsICollationFactory),
(void**) &factoryInst);
if(NS_FAILED(res)) {
cout << "\tFailed!! return value != NS_OK\n";
@ -689,7 +690,7 @@ static void TestDateTimeFormat(nsILocale *locale)
nsIScriptableDateFormat *aScriptableDateFormat;
res = nsComponentManager::CreateInstance(kDateTimeFormatCID,
NULL,
nsIScriptableDateFormat::GetIID(),
NS_GET_IID(nsIScriptableDateFormat),
(void**) &aScriptableDateFormat);
if(NS_FAILED(res) || ( aScriptableDateFormat == NULL ) ) {
cout << "\tnsIScriptableDateFormat CreateInstance failed\n";
@ -735,7 +736,7 @@ static void TestDateTimeFormat(nsILocale *locale)
nsIDateTimeFormat *t = NULL;
res = nsComponentManager::CreateInstance(kDateTimeFormatCID,
NULL,
nsIDateTimeFormat::GetIID(),
NS_GET_IID(nsIDateTimeFormat),
(void**) &t);
cout << "Test 1 - CreateInstance():\n";
@ -747,7 +748,7 @@ static void TestDateTimeFormat(nsILocale *locale)
res = nsComponentManager::CreateInstance(kDateTimeFormatCID,
NULL,
nsIDateTimeFormat::GetIID(),
NS_GET_IID(nsIDateTimeFormat),
(void**) &t);
if(NS_FAILED(res) || ( t == NULL ) ) {

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#define NS_IMPL_IDS
@ -170,7 +171,7 @@ nsConverterInfo::~nsConverterInfo()
//----------------------------------------------------------------------------
// Class nsCharsetConverterManager [implementation]
NS_IMPL_ISUPPORTS(nsCharsetConverterManager, nsICharsetConverterManager::GetIID());
NS_IMPL_ISUPPORTS(nsCharsetConverterManager, NS_GET_IID(nsICharsetConverterManager));
nsCharsetConverterManager::nsCharsetConverterManager()
:mDataBundle(NULL), mTitleBundle(NULL)
@ -264,7 +265,7 @@ void nsCharsetConverterManager::FillInfoArrays()
// get the registry
res = nsServiceManager::GetService(NS_REGISTRY_PROGID,
nsIRegistry::GetIID(), (nsISupports**)&registry);
NS_GET_IID(nsIRegistry), (nsISupports**)&registry);
if (NS_FAILED(res)) goto done;
// open registry if necessary

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

@ -1,4 +1,4 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsString.h"
#include "nsIUnicodeEncoder.h"
@ -62,7 +63,7 @@ NS_IMETHODIMP nsTextToSubURI::ConvertAndEscape(
// Get Charset, get the encoder.
nsICharsetConverterManager * ccm = nsnull;
rv = nsServiceManager::GetService(kCharsetConverterManagerCID ,
nsCOMTypeInfo<nsICharsetConverterManager>::GetIID(),
NS_GET_IID(nsICharsetConverterManager),
(nsISupports**)&ccm);
if(NS_SUCCEEDED(rv) && (nsnull != ccm)) {
rv = ccm->GetUnicodeEncoder(&charsetStr, &encoder);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIComponentManager.h"
@ -173,7 +174,7 @@ extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports* aServMgr, const char *
nsIComponentManager* compMgr;
rv = servMgr->GetService(kComponentManagerCID,
nsIComponentManager::GetIID(),
NS_GET_IID(nsIComponentManager),
(nsISupports**)&compMgr);
if (NS_FAILED(rv)) return rv;
@ -236,7 +237,7 @@ extern "C" NS_EXPORT nsresult NSUnregisterSelf(nsISupports* aServMgr, const char
nsIComponentManager* compMgr;
rv = servMgr->GetService(kComponentManagerCID,
nsIComponentManager::GetIID(),
NS_GET_IID(nsIComponentManager),
(nsISupports**)&compMgr);
if (NS_FAILED(rv)) return rv;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsIModule.h"
@ -262,7 +263,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *servMgr,
}
// Increase refcnt and store away nsIModule interface to m in return_cobj
rv = m->QueryInterface(nsIModule::GetIID(), (void**)return_cobj);
rv = m->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj);
if (NS_FAILED(rv)) {
delete m;
m = nsnull;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#define NS_IMPL_IDS
@ -262,7 +263,7 @@ nsresult testEncoder(nsIUnicodeEncoder * aEnc,
#ifdef TEST_IS_REPRESENTABLE
nsICharRepresentable* rp = nsnull;
res = aEnc->QueryInterface(nsICharRepresentable::GetIID(),(void**) &rp);
res = aEnc->QueryInterface(NS_GET_IID(nsICharRepresentable),(void**) &rp);
if(NS_SUCCEEDED(res)) {
PRUint32 *info= (PRUint32*)PR_Calloc((0x10000 >> 5), 4);
rp->FillInfo(info);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
// Utility that converts file encoded in one charset codepage to
@ -76,7 +77,7 @@ int main(int argc, const char** argv)
}
// Get the charset alias manager
res = nsServiceManager::GetService(NS_CHARSETALIAS_PROGID, nsICharsetAlias::GetIID(),
res = nsServiceManager::GetService(NS_CHARSETALIAS_PROGID, NS_GET_IID(nsICharsetAlias),
(nsISupports**) &aliasmgr);
if (NS_FAILED(res))
{

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#define NS_IMPL_IDS
@ -219,7 +220,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,
}
// Increase refcnt and store away nsIModule interface to m in return_cobj
rv = m->QueryInterface(nsIModule::GetIID(), (void**)return_cobj);
rv = m->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj);
if (NS_FAILED(rv)) {
delete m;
m = nsnull;
@ -231,7 +232,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,
//----------------------------------------------------------------------------
// Class nsConverterFactory [implementation]
NS_IMPL_ISUPPORTS(nsConverterFactory, nsCOMTypeInfo<nsIFactory>::GetIID());
NS_IMPL_ISUPPORTS(nsConverterFactory, NS_GET_IID(nsIFactory));
nsConverterFactory::nsConverterFactory(FactoryData * aData)
{
@ -280,7 +281,7 @@ NS_IMETHODIMP nsConverterFactory::LockFactory(PRBool aLock)
//----------------------------------------------------------------------------
// Class nsConverterModule [implementation]
NS_IMPL_ISUPPORTS(nsConverterModule, nsIModule::GetIID())
NS_IMPL_ISUPPORTS(nsConverterModule, NS_GET_IID(nsIModule))
nsConverterModule::nsConverterModule()
: mInitialized(PR_FALSE)
@ -360,7 +361,7 @@ NS_IMETHODIMP nsConverterModule::RegisterSelf(nsIComponentManager *aCompMgr,
// get the registry
res = nsServiceManager::GetService(NS_REGISTRY_PROGID,
nsIRegistry::GetIID(), (nsISupports**)&registry);
NS_GET_IID(nsIRegistry), (nsISupports**)&registry);
if (NS_FAILED(res)) goto done;
// open the registry

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "pratom.h"
@ -373,7 +374,7 @@ nsresult nsBasicEncoder::QueryInterface(REFNSIID aIID,
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsICharRepresentable::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsICharRepresentable))) {
*aInstancePtr = (void*) ((nsICharRepresentable*)this);
NS_ADDREF_THIS();
return NS_OK;

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

@ -18,7 +18,8 @@
* Rights Reserved.
*
* Contributor(s):
* IBM Corporation
* IBM Corporation
* Pierre Phaneuf <pp@ludusdesign.com>
*
* This Original Code has been modified by IBM Corporation.
* Modifications made by IBM described herein are
@ -241,7 +242,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,
}
// Increase refcnt and store away nsIModule interface to m in return_cobj
rv = m->QueryInterface(nsIModule::GetIID(), (void**)return_cobj);
rv = m->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj);
if (NS_FAILED(rv)) {
delete m;
m = nsnull;
@ -253,7 +254,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,
//----------------------------------------------------------------------------
// Class nsConverterFactory [implementation]
NS_IMPL_ISUPPORTS(nsConverterFactory, nsCOMTypeInfo<nsIFactory>::GetIID());
NS_IMPL_ISUPPORTS(nsConverterFactory, NS_GET_IID(nsIFactory));
nsConverterFactory::nsConverterFactory(FactoryData * aData)
{
@ -302,7 +303,7 @@ NS_IMETHODIMP nsConverterFactory::LockFactory(PRBool aLock)
//----------------------------------------------------------------------------
// Class nsConverterModule [implementation]
NS_IMPL_ISUPPORTS(nsConverterModule, nsIModule::GetIID())
NS_IMPL_ISUPPORTS(nsConverterModule, NS_GET_IID(nsIModule))
nsConverterModule::nsConverterModule()
: mInitialized(PR_FALSE)
@ -382,7 +383,7 @@ NS_IMETHODIMP nsConverterModule::RegisterSelf(nsIComponentManager *aCompMgr,
// get the registry
res = nsServiceManager::GetService(NS_REGISTRY_PROGID,
nsIRegistry::GetIID(), (nsISupports**)&registry);
NS_GET_IID(nsIRegistry), (nsISupports**)&registry);
if (NS_FAILED(res)) goto done;
// open the registry

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

@ -18,7 +18,8 @@
* Rights Reserved.
*
* Contributor(s):
* IBM Corporation
* IBM Corporation
* Pierre Phaneuf <pp@ludusdesign.com>
*
* This Original Code has been modified by IBM Corporation.
* Modifications made by IBM described herein are
@ -386,7 +387,7 @@ nsresult nsBasicEncoder::QueryInterface(REFNSIID aIID,
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsICharRepresentable::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsICharRepresentable))) {
*aInstancePtr = (void*) ((nsICharRepresentable*)this);
NS_ADDREF_THIS();
return NS_OK;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#define NS_IMPL_IDS
@ -253,7 +254,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,
}
// Increase refcnt and store away nsIModule interface to m in return_cobj
rv = m->QueryInterface(nsIModule::GetIID(), (void**)return_cobj);
rv = m->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj);
if (NS_FAILED(rv)) {
delete m;
m = nsnull;
@ -265,7 +266,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,
//----------------------------------------------------------------------------
// Class nsConverterFactory [implementation]
NS_IMPL_ISUPPORTS(nsConverterFactory, nsCOMTypeInfo<nsIFactory>::GetIID());
NS_IMPL_ISUPPORTS(nsConverterFactory, NS_GET_IID(nsIFactory));
nsConverterFactory::nsConverterFactory(FactoryData * aData)
{
@ -314,7 +315,7 @@ NS_IMETHODIMP nsConverterFactory::LockFactory(PRBool aLock)
//----------------------------------------------------------------------------
// Class nsConverterModule [implementation]
NS_IMPL_ISUPPORTS(nsConverterModule, nsIModule::GetIID())
NS_IMPL_ISUPPORTS(nsConverterModule, NS_GET_IID(nsIModule))
nsConverterModule::nsConverterModule()
: mInitialized(PR_FALSE)
@ -394,7 +395,7 @@ NS_IMETHODIMP nsConverterModule::RegisterSelf(nsIComponentManager *aCompMgr,
// get the registry
res = nsServiceManager::GetService(NS_REGISTRY_PROGID,
nsIRegistry::GetIID(), (nsISupports**)&registry);
NS_GET_IID(nsIRegistry), (nsISupports**)&registry);
if (NS_FAILED(res)) goto done;
// open the registry

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "pratom.h"
@ -373,7 +374,7 @@ nsresult nsBasicEncoder::QueryInterface(REFNSIID aIID,
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsICharRepresentable::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsICharRepresentable))) {
*aInstancePtr = (void*) ((nsICharRepresentable*)this);
NS_ADDREF_THIS();
return NS_OK;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "pratom.h"
@ -373,7 +374,7 @@ nsresult nsBasicEncoder::QueryInterface(REFNSIID aIID,
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsICharRepresentable::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsICharRepresentable))) {
*aInstancePtr = (void*) ((nsICharRepresentable*)this);
NS_ADDREF_THIS();
return NS_OK;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#define NS_IMPL_IDS
@ -187,7 +188,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,
}
// Increase refcnt and store away nsIModule interface to m in return_cobj
rv = m->QueryInterface(nsIModule::GetIID(), (void**)return_cobj);
rv = m->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj);
if (NS_FAILED(rv)) {
delete m;
m = nsnull;
@ -199,7 +200,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,
//----------------------------------------------------------------------------
// Class nsConverterFactory [implementation]
NS_IMPL_ISUPPORTS(nsConverterFactory, nsCOMTypeInfo<nsIFactory>::GetIID());
NS_IMPL_ISUPPORTS(nsConverterFactory, NS_GET_IID(nsIFactory));
nsConverterFactory::nsConverterFactory(FactoryData * aData)
{
@ -248,7 +249,7 @@ NS_IMETHODIMP nsConverterFactory::LockFactory(PRBool aLock)
//----------------------------------------------------------------------------
// Class nsConverterModule [implementation]
NS_IMPL_ISUPPORTS(nsConverterModule, nsIModule::GetIID())
NS_IMPL_ISUPPORTS(nsConverterModule, NS_GET_IID(nsIModule))
nsConverterModule::nsConverterModule()
: mInitialized(PR_FALSE)
@ -328,7 +329,7 @@ NS_IMETHODIMP nsConverterModule::RegisterSelf(nsIComponentManager *aCompMgr,
// get the registry
res = nsServiceManager::GetService(NS_REGISTRY_PROGID,
nsIRegistry::GetIID(), (nsISupports**)&registry);
NS_GET_IID(nsIRegistry), (nsISupports**)&registry);
if (NS_FAILED(res)) goto done;
// open the registry

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

@ -19,8 +19,9 @@
* <jshin@pantheon.yale.edu>
*
* Contributor(s):
* Deogtae Kim <dtkim@calab.kaist.ac.kr> (99/08/28)
* Jungshik Shin <jshin@pantheon.yale.edu>
* Deogtae Kim <dtkim@calab.kaist.ac.kr> (99/08/28)
* Jungshik Shin <jshin@pantheon.yale.edu>
* Pierre Phaneuf <pp@ludusdesign.com>
*
* - Purposes:
* 1. Enable displaying all 11,172 Modern hangul syllables with Hanterm
@ -73,7 +74,7 @@ nsresult nsUnicodeToX11Johab::QueryInterface(REFNSIID aIID,
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsICharRepresentable::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsICharRepresentable))) {
*aInstancePtr = (void*) ((nsICharRepresentable*)this);
NS_ADDREF_THIS();
return NS_OK;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#define NS_IMPL_IDS
@ -882,7 +883,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,
}
// Increase refcnt and store away nsIModule interface to m in return_cobj
rv = m->QueryInterface(nsIModule::GetIID(), (void**)return_cobj);
rv = m->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj);
if (NS_FAILED(rv)) {
delete m;
m = nsnull;
@ -894,7 +895,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,
//----------------------------------------------------------------------------
// Class nsConverterFactory [implementation]
NS_IMPL_ISUPPORTS(nsConverterFactory, nsCOMTypeInfo<nsIFactory>::GetIID());
NS_IMPL_ISUPPORTS(nsConverterFactory, NS_GET_IID(nsIFactory));
nsConverterFactory::nsConverterFactory(FactoryData * aData)
{
@ -943,7 +944,7 @@ NS_IMETHODIMP nsConverterFactory::LockFactory(PRBool aLock)
//----------------------------------------------------------------------------
// Class nsConverterModule [implementation]
NS_IMPL_ISUPPORTS(nsConverterModule, nsIModule::GetIID())
NS_IMPL_ISUPPORTS(nsConverterModule, NS_GET_IID(nsIModule))
nsConverterModule::nsConverterModule()
: mInitialized(PR_FALSE)
@ -1023,7 +1024,7 @@ NS_IMETHODIMP nsConverterModule::RegisterSelf(nsIComponentManager *aCompMgr,
// get the registry
res = nsServiceManager::GetService(NS_REGISTRY_PROGID,
nsIRegistry::GetIID(), (nsISupports**)&registry);
NS_GET_IID(nsIRegistry), (nsISupports**)&registry);
if (NS_FAILED(res)) goto done;
// open the registry

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "pratom.h"
@ -373,7 +374,7 @@ nsresult nsBasicEncoder::QueryInterface(REFNSIID aIID,
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsICharRepresentable::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsICharRepresentable))) {
*aInstancePtr = (void*) ((nsICharRepresentable*)this);
NS_ADDREF_THIS();
return NS_OK;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "pratom.h"
@ -373,7 +374,7 @@ nsresult nsBasicEncoder::QueryInterface(REFNSIID aIID,
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsICharRepresentable::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsICharRepresentable))) {
*aInstancePtr = (void*) ((nsICharRepresentable*)this);
NS_ADDREF_THIS();
return NS_OK;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#define NS_IMPL_IDS
@ -177,7 +178,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,
}
// Increase refcnt and store away nsIModule interface to m in return_cobj
rv = m->QueryInterface(nsIModule::GetIID(), (void**)return_cobj);
rv = m->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj);
if (NS_FAILED(rv)) {
delete m;
m = nsnull;
@ -189,7 +190,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,
//----------------------------------------------------------------------------
// Class nsConverterFactory [implementation]
NS_IMPL_ISUPPORTS(nsConverterFactory, nsCOMTypeInfo<nsIFactory>::GetIID());
NS_IMPL_ISUPPORTS(nsConverterFactory, NS_GET_IID(nsIFactory));
nsConverterFactory::nsConverterFactory(FactoryData * aData)
{
@ -238,7 +239,7 @@ NS_IMETHODIMP nsConverterFactory::LockFactory(PRBool aLock)
//----------------------------------------------------------------------------
// Class nsConverterModule [implementation]
NS_IMPL_ISUPPORTS(nsConverterModule, nsIModule::GetIID())
NS_IMPL_ISUPPORTS(nsConverterModule, NS_GET_IID(nsIModule))
nsConverterModule::nsConverterModule()
: mInitialized(PR_FALSE)
@ -318,7 +319,7 @@ NS_IMETHODIMP nsConverterModule::RegisterSelf(nsIComponentManager *aCompMgr,
// get the registry
res = nsServiceManager::GetService(NS_REGISTRY_PROGID,
nsIRegistry::GetIID(), (nsISupports**)&registry);
NS_GET_IID(nsIRegistry), (nsISupports**)&registry);
if (NS_FAILED(res)) goto done;
// open the registry

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "pratom.h"
@ -373,7 +374,7 @@ nsresult nsBasicEncoder::QueryInterface(REFNSIID aIID,
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsICharRepresentable::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsICharRepresentable))) {
*aInstancePtr = (void*) ((nsICharRepresentable*)this);
NS_ADDREF_THIS();
return NS_OK;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#define NS_IMPL_IDS
@ -267,7 +268,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,
}
// Increase refcnt and store away nsIModule interface to m in return_cobj
rv = m->QueryInterface(nsIModule::GetIID(), (void**)return_cobj);
rv = m->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj);
if (NS_FAILED(rv)) {
delete m;
m = nsnull;
@ -279,7 +280,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager * compMgr,
//----------------------------------------------------------------------------
// Class nsConverterFactory [implementation]
NS_IMPL_ISUPPORTS(nsConverterFactory, nsCOMTypeInfo<nsIFactory>::GetIID());
NS_IMPL_ISUPPORTS(nsConverterFactory, NS_GET_IID(nsIFactory));
nsConverterFactory::nsConverterFactory(FactoryData * aData)
{
@ -328,7 +329,7 @@ NS_IMETHODIMP nsConverterFactory::LockFactory(PRBool aLock)
//----------------------------------------------------------------------------
// Class nsConverterModule [implementation]
NS_IMPL_ISUPPORTS(nsConverterModule, nsIModule::GetIID())
NS_IMPL_ISUPPORTS(nsConverterModule, NS_GET_IID(nsIModule))
nsConverterModule::nsConverterModule()
: mInitialized(PR_FALSE)
@ -408,7 +409,7 @@ NS_IMETHODIMP nsConverterModule::RegisterSelf(nsIComponentManager *aCompMgr,
// get the registry
res = nsServiceManager::GetService(NS_REGISTRY_PROGID,
nsIRegistry::GetIID(), (nsISupports**)&registry);
NS_GET_IID(nsIRegistry), (nsISupports**)&registry);
if (NS_FAILED(res)) goto done;
// open the registry

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCSSFrameConstructor.h"
@ -3098,7 +3099,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell,
// if a select is being created with zero options we need to create
// a special pseudo frame so it can be sized as best it can
nsCOMPtr<nsIDOMHTMLSelectElement> selectElement;
nsresult result = aContent->QueryInterface(nsCOMTypeInfo<nsIDOMHTMLSelectElement>::GetIID(),
nsresult result = aContent->QueryInterface(NS_GET_IID(nsIDOMHTMLSelectElement),
(void**)getter_AddRefs(selectElement));
if (NS_SUCCEEDED(result) && selectElement) {
PRUint32 numOptions = 0;
@ -3250,7 +3251,7 @@ nsCSSFrameConstructor::InitializeSelectFrame(nsIPresShell* aPresShell,
// if a select is being created with zero options we need to create
// a special pseudo frame so it can be sized as best it can
nsCOMPtr<nsIDOMHTMLSelectElement> selectElement;
nsresult result = aContent->QueryInterface(nsCOMTypeInfo<nsIDOMHTMLSelectElement>::GetIID(),
nsresult result = aContent->QueryInterface(NS_GET_IID(nsIDOMHTMLSelectElement),
(void**)getter_AddRefs(selectElement));
if (NS_SUCCEEDED(result) && selectElement) {
PRUint32 numOptions = 0;
@ -5561,11 +5562,11 @@ nsCSSFrameConstructor::GetFrameFor(nsIPresShell* aPresShell,
// What is unclear here, is if any of this fails, should it return
// the nsComboboxControlFrame or null?
nsCOMPtr<nsIDOMHTMLSelectElement> selectElement;
nsresult res = aContent->QueryInterface(nsCOMTypeInfo<nsIDOMHTMLSelectElement>::GetIID(),
nsresult res = aContent->QueryInterface(NS_GET_IID(nsIDOMHTMLSelectElement),
(void**)getter_AddRefs(selectElement));
if (NS_SUCCEEDED(res) && selectElement) {
nsIComboboxControlFrame * comboboxFrame;
res = frame->QueryInterface(nsCOMTypeInfo<nsIComboboxControlFrame>::GetIID(),
res = frame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame),
(void**)&comboboxFrame);
nsIFrame * listFrame;
if (NS_SUCCEEDED(res) && comboboxFrame) {
@ -5574,7 +5575,7 @@ nsCSSFrameConstructor::GetFrameFor(nsIPresShell* aPresShell,
listFrame->FirstChild(aPresContext, nsnull, &frame);
}
} else {
res = frame->QueryInterface(nsCOMTypeInfo<nsIListControlFrame>::GetIID(),
res = frame->QueryInterface(NS_GET_IID(nsIListControlFrame),
(void**)&listFrame);
if (NS_SUCCEEDED(res) && listFrame) {
frame->FirstChild(aPresContext, nsnull, &frame);
@ -6611,7 +6612,7 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext,
// so if the select now has a single item
// we need to go in and removed the dummy frame
nsCOMPtr<nsIDOMHTMLSelectElement> selectElement;
nsresult result = aContainer->QueryInterface(nsCOMTypeInfo<nsIDOMHTMLSelectElement>::GetIID(),
nsresult result = aContainer->QueryInterface(NS_GET_IID(nsIDOMHTMLSelectElement),
(void**)getter_AddRefs(selectElement));
if (NS_SUCCEEDED(result) && selectElement) {
RemoveDummyFrameFromSelect(aPresContext, shell, aContainer, aChild, selectElement);
@ -6838,7 +6839,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext,
nsresult result = NS_ERROR_FAILURE;
if (aContainer && childFrame) {
nsCOMPtr<nsIDOMHTMLSelectElement> selectElement;
result = aContainer->QueryInterface(nsCOMTypeInfo<nsIDOMHTMLSelectElement>::GetIID(),
result = aContainer->QueryInterface(NS_GET_IID(nsIDOMHTMLSelectElement),
(void**)getter_AddRefs(selectElement));
if (NS_SUCCEEDED(result) && selectElement) {
PRUint32 numOptions = 0;
@ -7605,7 +7606,7 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext,
// the style tag has its own interpretation based on aHint
if (NS_STYLE_HINT_UNKNOWN == aHint) {
nsIStyledContent* styledContent;
result = aContent->QueryInterface(nsIStyledContent::GetIID(), (void**)&styledContent);
result = aContent->QueryInterface(NS_GET_IID(nsIStyledContent), (void**)&styledContent);
if (NS_OK == result) {
// Get style hint from HTML content object.
@ -10144,15 +10145,15 @@ nsCSSFrameConstructor::ConstructInline(nsIPresShell* aPresShell,
nsIFrameDebug* frameDebug;
printf("nsCSSFrameConstructor::ConstructInline:\n");
if (NS_SUCCEEDED(aNewFrame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(aNewFrame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
printf(" ==> leading inline frame:\n");
frameDebug->List(aPresContext, stdout, 2);
}
if (NS_SUCCEEDED(blockFrame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(blockFrame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
printf(" ==> block frame:\n");
frameDebug->List(aPresContext, stdout, 2);
}
if (NS_SUCCEEDED(inlineFrame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(inlineFrame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
printf(" ==> trailing inline frame:\n");
frameDebug->List(aPresContext, stdout, 2);
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
@ -81,7 +82,7 @@ NS_IMETHODIMP nsCaret::Init(nsIPresShell *inPresShell)
mPresShell = inPresShell; // the presshell owns us, so no addref
nsILookAndFeel* touchyFeely;
if (NS_SUCCEEDED(nsComponentManager::CreateInstance(kLookAndFeelCID, nsnull, nsILookAndFeel::GetIID(), (void**)&touchyFeely)))
if (NS_SUCCEEDED(nsComponentManager::CreateInstance(kLookAndFeelCID, nsnull, NS_GET_IID(nsILookAndFeel), (void**)&touchyFeely)))
{
PRInt32 tempInt;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIFrameManager.h"
#include "nsIFrame.h"
@ -315,7 +316,7 @@ NS_NewFrameManager(nsIFrameManager** aInstancePtrResult)
if (!it) {
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(nsIFrameManager::GetIID(), (void **)aInstancePtrResult);
return it->QueryInterface(NS_GET_IID(nsIFrameManager), (void **)aInstancePtrResult);
}
FrameManager::FrameManager()
@ -827,7 +828,7 @@ DumpContext(nsIFrame* aFrame, nsIStyleContext* aContext)
nsAutoString name;
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(aFrame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(aFrame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->GetFrameName(name);
fputs(name, stdout);
}
@ -1372,7 +1373,7 @@ CaptureFrameStateFor(nsIPresContext* aPresContext, nsIFrame* aFrame, nsILayoutHi
// See if the frame is stateful.
// Frames are not ref-counted so no addref/release is required on statefulFrame.
nsIStatefulFrame* statefulFrame = nsnull;
aFrame->QueryInterface(nsIStatefulFrame::GetIID(), (void**) &statefulFrame);
aFrame->QueryInterface(NS_GET_IID(nsIStatefulFrame), (void**) &statefulFrame);
if (nsnull != statefulFrame) {
// If so, get the content ID, state type and the state and
// add an association between (ID, type) and (state) to the
@ -1434,7 +1435,7 @@ RestoreFrameStateFor(nsIPresContext* aPresContext, nsIFrame* aFrame, nsILayoutHi
// See if the frame is stateful.
// Frames are not ref-counted so no addref/release is required on statefulFrame.
nsIStatefulFrame* statefulFrame = nsnull;
aFrame->QueryInterface(nsIStatefulFrame::GetIID(), (void**) &statefulFrame);
aFrame->QueryInterface(NS_GET_IID(nsIStatefulFrame), (void**) &statefulFrame);
if (nsnull != statefulFrame) {
// If so, get the content ID, state type and the frame state and
// ask the frame object to restore its state.

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsILayoutHistoryState.h"
@ -107,7 +108,7 @@ nsLayoutHistoryState::~nsLayoutHistoryState()
}
NS_IMPL_ISUPPORTS(nsLayoutHistoryState,
nsILayoutHistoryState::GetIID());
NS_GET_IID(nsILayoutHistoryState));
NS_IMETHODIMP
nsLayoutHistoryState::AddState(PRUint32 aContentID,

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
@ -81,7 +82,7 @@ NS_IMETHODIMP nsCaret::Init(nsIPresShell *inPresShell)
mPresShell = inPresShell; // the presshell owns us, so no addref
nsILookAndFeel* touchyFeely;
if (NS_SUCCEEDED(nsComponentManager::CreateInstance(kLookAndFeelCID, nsnull, nsILookAndFeel::GetIID(), (void**)&touchyFeely)))
if (NS_SUCCEEDED(nsComponentManager::CreateInstance(kLookAndFeelCID, nsnull, NS_GET_IID(nsILookAndFeel), (void**)&touchyFeely)))
{
PRInt32 tempInt;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
/*
@ -168,7 +169,7 @@ nsresult NS_NewContentIterator(nsIContentIterator** aInstancePtrResult)
{
nsContentIterator * iter = new nsContentIterator();
if (iter)
return iter->QueryInterface(nsIContentIterator::GetIID(), (void**) aInstancePtrResult);
return iter->QueryInterface(NS_GET_IID(nsIContentIterator), (void**) aInstancePtrResult);
return NS_ERROR_OUT_OF_MEMORY;
}
@ -194,13 +195,13 @@ nsresult nsContentIterator::QueryInterface(const nsIID& aIID,
NS_ADDREF_THIS();
return NS_OK;
}
/* if (aIID.Equals(nsIEnumerator::GetIID()))
/* if (aIID.Equals(NS_GET_IID(nsIEnumerator)))
{
*aInstancePtrResult = (void*)(nsIEnumerator*)this;
NS_ADDREF_THIS();
return NS_OK;
} */
if (aIID.Equals(nsIContentIterator::GetIID()))
if (aIID.Equals(NS_GET_IID(nsIContentIterator)))
{
*aInstancePtrResult = (void*)(nsIContentIterator*)this;
NS_ADDREF_THIS();
@ -718,7 +719,7 @@ nsresult nsContentIterator::CurrentNode(nsIContent **aNode)
return NS_ERROR_FAILURE;
if (mIsDone)
return NS_ERROR_FAILURE;
return mCurNode->QueryInterface(nsIContent::GetIID(), (void**) aNode);
return mCurNode->QueryInterface(NS_GET_IID(nsIContent), (void**) aNode);
}
@ -788,7 +789,7 @@ nsresult NS_NewContentSubtreeIterator(nsIContentIterator** aInstancePtrResult)
{
nsContentIterator * iter = new nsContentSubtreeIterator();
if (iter)
return iter->QueryInterface(nsIContentIterator::GetIID(), (void**) aInstancePtrResult);
return iter->QueryInterface(NS_GET_IID(nsIContentIterator), (void**) aInstancePtrResult);
return NS_ERROR_OUT_OF_MEMORY;
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "plstr.h"
@ -710,7 +711,7 @@ nsresult nsDocument::QueryInterface(REFNSIID aIID, void** aInstancePtr)
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIScriptObjectPrincipal::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIScriptObjectPrincipal))) {
nsIScriptObjectPrincipal* tmp = this;
*aInstancePtr = (void*) tmp;
NS_ADDREF_THIS();
@ -734,19 +735,19 @@ nsresult nsDocument::QueryInterface(REFNSIID aIID, void** aInstancePtr)
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIDiskDocument::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIDiskDocument))) {
nsIDiskDocument* tmp = this;
*aInstancePtr = (void*) tmp;
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsCOMTypeInfo<nsISupportsWeakReference>::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsISupportsWeakReference))) {
nsISupportsWeakReference* tmp = this;
*aInstancePtr = (void*) tmp;
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsCOMTypeInfo<nsISupports>::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsISupports))) {
nsIDocument* tmp = this;
nsISupports* tmp2 = tmp;
*aInstancePtr = (void*) tmp2;
@ -834,7 +835,7 @@ nsDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup)
nsCOMPtr<nsISupports> owner;
aChannel->GetOwner(getter_AddRefs(owner));
if (owner)
owner->QueryInterface(nsIPrincipal::GetIID(), (void**)&mPrincipal);
owner->QueryInterface(NS_GET_IID(nsIPrincipal), (void**)&mPrincipal);
mDocumentLoadGroup = getter_AddRefs(NS_GetWeakReference(aLoadGroup));
// there was an assertion here that aLoadGroup was not null. This is no longer valid
@ -2835,7 +2836,7 @@ nsDocument::CreateXIF(nsString & aBuffer, nsIDOMSelection* aSelection)
// Make a content iterator over the selection:
nsCOMPtr<nsIContentIterator> iter;
result = nsComponentManager::CreateInstance(kCContentIteratorCID, nsnull,
nsIContentIterator::GetIID(),
NS_GET_IID(nsIContentIterator),
getter_AddRefs(iter));
if ((NS_SUCCEEDED(result)) && iter)
{

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIDocumentEncoder.h"
@ -125,7 +126,7 @@ nsresult nsTextEncoder::QueryInterface(REFNSIID aIID,
if (aIID.Equals(kISupportsIID)) {
*aInstancePtr = (void *)(nsISupports*)this;
} else if (aIID.Equals(nsIDocumentEncoder::GetIID())) {
} else if (aIID.Equals(NS_GET_IID(nsIDocumentEncoder))) {
*aInstancePtr = (void *)(nsIDocumentEncoder*)this;
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsFrameList.h"
#ifdef NS_DEBUG
@ -360,7 +361,7 @@ nsFrameList::List(nsIPresContext* aPresContext, FILE* out) const
while (nsnull != frame) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(frame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(frame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->List(aPresContext, out, 1);
}
frame->GetNextSibling(&frame);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsILayoutHistoryState.h"
@ -107,7 +108,7 @@ nsLayoutHistoryState::~nsLayoutHistoryState()
}
NS_IMPL_ISUPPORTS(nsLayoutHistoryState,
nsILayoutHistoryState::GetIID());
NS_GET_IID(nsILayoutHistoryState));
NS_IMETHODIMP
nsLayoutHistoryState::AddState(PRUint32 aContentID,

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
/*
@ -80,7 +81,7 @@ NS_NewRange(nsIDOMRange** aInstancePtrResult)
{
nsRange * range = new nsRange();
if (range)
return range->QueryInterface(nsIDOMRange::GetIID(), (void**) aInstancePtrResult);
return range->QueryInterface(NS_GET_IID(nsIDOMRange), (void**) aInstancePtrResult);
return NS_ERROR_OUT_OF_MEMORY;
}
@ -312,13 +313,13 @@ nsresult nsRange::QueryInterface(const nsIID& aIID,
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIDOMRange::GetIID()))
if (aIID.Equals(NS_GET_IID(nsIDOMRange)))
{
*aInstancePtrResult = (void*)(nsIDOMRange*)this;
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIDOMNSRange::GetIID()))
if (aIID.Equals(NS_GET_IID(nsIDOMNSRange)))
{
*aInstancePtrResult = (void*)(nsIDOMNSRange*)this;
NS_ADDREF_THIS();
@ -372,7 +373,7 @@ nsresult nsRange::AddToListOf(nsIDOMNode* aNode)
nsCOMPtr<nsIContent> cN;
nsresult res = aNode->QueryInterface(nsIContent::GetIID(), getter_AddRefs(cN));
nsresult res = aNode->QueryInterface(NS_GET_IID(nsIContent), getter_AddRefs(cN));
if (NS_FAILED(res))
return res;
@ -388,7 +389,7 @@ nsresult nsRange::RemoveFromListOf(nsIDOMNode* aNode)
nsCOMPtr<nsIContent> cN;
nsresult res = aNode->QueryInterface(nsIContent::GetIID(), getter_AddRefs(cN));
nsresult res = aNode->QueryInterface(NS_GET_IID(nsIContent), getter_AddRefs(cN));
if (NS_FAILED(res))
return res;
@ -631,11 +632,11 @@ PRInt32 nsRange::IndexOf(nsIDOMNode* aChildNode)
return 0;
// convert node and parent to nsIContent, so that we can find the child index
res = parentNode->QueryInterface(nsIContent::GetIID(), getter_AddRefs(contentParent));
res = parentNode->QueryInterface(NS_GET_IID(nsIContent), getter_AddRefs(contentParent));
if (NS_FAILED(res))
return 0;
res = aChildNode->QueryInterface(nsIContent::GetIID(), getter_AddRefs(contentChild));
res = aChildNode->QueryInterface(NS_GET_IID(nsIContent), getter_AddRefs(contentChild));
if (NS_FAILED(res))
return 0;
@ -682,7 +683,7 @@ PRInt32 nsRange::GetAncestorsAndOffsets(nsIDOMNode* aNode, PRInt32 aOffset,
// callers responsibility to make sure args are non-null and proper type
res = aNode->QueryInterface(nsIContent::GetIID(),getter_AddRefs(contentNode));
res = aNode->QueryInterface(NS_GET_IID(nsIContent),getter_AddRefs(contentNode));
if (NS_FAILED(res))
{
NS_NOTREACHED("nsRange::GetAncestorsAndOffsets");
@ -772,7 +773,7 @@ nsresult nsRange::GetDOMNodeFromContent(nsIContent* inContentNode, nsCOMPtr<nsID
{
if (!outDomNode)
return NS_ERROR_NULL_POINTER;
nsresult res = inContentNode->QueryInterface(nsIDOMNode::GetIID(), getter_AddRefs(*outDomNode));
nsresult res = inContentNode->QueryInterface(NS_GET_IID(nsIDOMNode), getter_AddRefs(*outDomNode));
if (NS_FAILED(res))
return res;
return NS_OK;
@ -782,7 +783,7 @@ nsresult nsRange::GetContentFromDOMNode(nsIDOMNode* inDomNode, nsCOMPtr<nsIConte
{
if (!outContentNode)
return NS_ERROR_NULL_POINTER;
nsresult res = inDomNode->QueryInterface(nsIContent::GetIID(), getter_AddRefs(*outContentNode));
nsresult res = inDomNode->QueryInterface(NS_GET_IID(nsIContent), getter_AddRefs(*outContentNode));
if (NS_FAILED(res))
return res;
return NS_OK;
@ -1103,13 +1104,13 @@ nsresult nsRange::DeleteContents()
nsCOMPtr<nsIContent> cEnd;
// get the content versions of our endpoints
nsresult res = mStartParent->QueryInterface(nsIContent::GetIID(), getter_AddRefs(cStart));
nsresult res = mStartParent->QueryInterface(NS_GET_IID(nsIContent), getter_AddRefs(cStart));
if (NS_FAILED(res))
{
NS_NOTREACHED("nsRange::DeleteContents");
return NS_ERROR_UNEXPECTED;
}
res = mEndParent->QueryInterface(nsIContent::GetIID(), getter_AddRefs(cEnd));
res = mEndParent->QueryInterface(NS_GET_IID(nsIContent), getter_AddRefs(cEnd));
if (NS_FAILED(res))
{
NS_NOTREACHED("nsRange::DeleteContents");
@ -1144,7 +1145,7 @@ nsresult nsRange::DeleteContents()
else // textnode - offsets refer to data in node
{
nsCOMPtr<nsIDOMText> textNode;
res = mStartParent->QueryInterface(nsIDOMText::GetIID(), getter_AddRefs(textNode));
res = mStartParent->QueryInterface(NS_GET_IID(nsIDOMText), getter_AddRefs(textNode));
if (NS_FAILED(res)) // if it's not a text node, punt
{
NS_NOTREACHED("nsRange::DeleteContents");
@ -1225,7 +1226,7 @@ nsresult nsRange::DeleteContents()
// If mStartParent is a text node, delete the text after start offset
nsIDOMText *textNode;
res = mStartParent->QueryInterface(nsIDOMText::GetIID(), (void**)&textNode);
res = mStartParent->QueryInterface(NS_GET_IID(nsIDOMText), (void**)&textNode);
if (NS_SUCCEEDED(res))
{
res = textNode->DeleteData(mStartOffset, 0xFFFFFFFF); // del to end
@ -1234,7 +1235,7 @@ nsresult nsRange::DeleteContents()
}
// If mEndParent is a text node, delete the text before end offset
res = mEndParent->QueryInterface(nsIDOMText::GetIID(), (void**)&textNode);
res = mEndParent->QueryInterface(NS_GET_IID(nsIDOMText), (void**)&textNode);
if (NS_SUCCEEDED(res))
{
res = textNode->DeleteData(0, mEndOffset); // del from start

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
/*
@ -557,7 +558,7 @@ nsRangeListIterator::CurrentItem(nsIDOMRange **aItem)
if (NS_FAILED(rv)) return rv;
if (mIndex >=0 && mIndex < (PRInt32)cnt){
nsCOMPtr<nsISupports> indexIsupports = dont_AddRef(mDomSelection->mRangeArray->ElementAt(mIndex));
return indexIsupports->QueryInterface(nsIDOMRange::GetIID(),(void **)aItem);
return indexIsupports->QueryInterface(NS_GET_IID(nsIDOMRange),(void **)aItem);
}
return NS_ERROR_FAILURE;
}
@ -584,12 +585,12 @@ nsRangeListIterator::QueryInterface(REFNSIID aIID, void** aInstancePtr)
if (nsnull == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
}
if (aIID.Equals(nsIEnumerator::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIEnumerator))) {
*aInstancePtr = NS_STATIC_CAST(nsIEnumerator*, this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIBidirectionalEnumerator::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIBidirectionalEnumerator))) {
*aInstancePtr = NS_STATIC_CAST(nsIBidirectionalEnumerator*, this);
NS_ADDREF_THIS();
return NS_OK;
@ -683,13 +684,13 @@ nsRangeList::QueryInterface(REFNSIID aIID, void** aInstancePtr)
if (nsnull == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
}
if (aIID.Equals(nsIFrameSelection::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIFrameSelection))) {
nsIFrameSelection* tmp = this;
*aInstancePtr = (void*) tmp;
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsCOMTypeInfo<nsISupports>::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsISupports))) {
// use *first* base class for ISupports
nsIFrameSelection* tmp1 = this;
nsISupports* tmp2 = tmp1;
@ -1066,7 +1067,7 @@ ParentOffset(nsIDOMNode *aNode, nsIDOMNode **aParent, PRInt32 *aChildOffset)
return NS_ERROR_NULL_POINTER;
nsresult result = NS_OK;
nsCOMPtr<nsIContent> content;
result = aNode->QueryInterface(nsIContent::GetIID(),getter_AddRefs(content));
result = aNode->QueryInterface(NS_GET_IID(nsIContent),getter_AddRefs(content));
if (NS_SUCCEEDED(result) && content)
{
nsCOMPtr<nsIContent> parent;
@ -1075,7 +1076,7 @@ ParentOffset(nsIDOMNode *aNode, nsIDOMNode **aParent, PRInt32 *aChildOffset)
{
result = parent->IndexOf(content, *aChildOffset);
if (NS_SUCCEEDED(result))
result = parent->QueryInterface(nsIDOMNode::GetIID(),(void **)aParent);
result = parent->QueryInterface(NS_GET_IID(nsIDOMNode),(void **)aParent);
}
}
return result;
@ -1919,13 +1920,13 @@ nsDOMSelection::QueryInterface(REFNSIID aIID, void** aInstancePtr)
if (nsnull == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
}
if (aIID.Equals(nsCOMTypeInfo<nsISupports>::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsISupports))) {
nsIDOMSelection *temp = (nsIDOMSelection *)this;
*aInstancePtr = (void*)(nsISupports *)temp;
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIDOMSelection::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIDOMSelection))) {
*aInstancePtr = (void*) this;
NS_ADDREF_THIS();
return NS_OK;
@ -1933,14 +1934,14 @@ nsDOMSelection::QueryInterface(REFNSIID aIID, void** aInstancePtr)
/* The following clause needs to go away, as soon as we've caught any offending callers */
if (aIID.Equals(nsIEnumerator::GetIID())
|| aIID.Equals(nsIBidirectionalEnumerator::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIEnumerator))
|| aIID.Equals(NS_GET_IID(nsIBidirectionalEnumerator))) {
NS_ASSERTION(0, "(tell scc or mjudge) -- Error: Get new enumerators with |GetEnumerator|, not |QueryInterface|! Caller must be fixed");
return NS_NOINTERFACE;
}
if (aIID.Equals(nsIScriptObjectOwner::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIScriptObjectOwner))) {
nsIScriptObjectOwner* tmp = this;
*aInstancePtr = (void*) tmp;
NS_ADDREF_THIS();
@ -2178,7 +2179,7 @@ nsDOMSelection::RemoveItem(nsIDOMRange *aItem)
{
nsCOMPtr<nsISupports> indexIsupports = dont_AddRef(mRangeArray->ElementAt(i));
nsCOMPtr<nsISupports> isupp;
aItem->QueryInterface(nsCOMTypeInfo<nsISupports>::GetIID(),getter_AddRefs(isupp));
aItem->QueryInterface(NS_GET_IID(nsISupports),getter_AddRefs(isupp));
if (isupp.get() == indexIsupports.get())
{
mRangeArray->RemoveElementAt(i);
@ -2346,12 +2347,12 @@ nsDOMSelection::selectFrames(nsIPresContext* aPresContext, nsIDOMRange *aRange,
nsCOMPtr<nsIContentIterator> iter;
nsCOMPtr<nsIContentIterator> inneriter;
nsresult result = nsComponentManager::CreateInstance(kCSubtreeIteratorCID, nsnull,
nsIContentIterator::GetIID(),
NS_GET_IID(nsIContentIterator),
getter_AddRefs(iter));
if (NS_FAILED(result))
return result;
result = nsComponentManager::CreateInstance(kCContentIteratorCID, nsnull,
nsIContentIterator::GetIID(),
NS_GET_IID(nsIContentIterator),
getter_AddRefs(inneriter));
if ((NS_SUCCEEDED(result)) && iter && inneriter)
{

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsSpaceManager.h"
#include "nsPoint.h"
@ -920,7 +921,7 @@ nsSpaceManager::List(FILE* out)
if (mFrame) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(mFrame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(mFrame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->GetFrameName(tmp);
fprintf(out, " frame=");
fputs(tmp, out);
@ -940,7 +941,7 @@ nsSpaceManager::List(FILE* out)
if (1 == band->mNumFrames) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(band->mFrame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(band->mFrame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->GetFrameName(tmp);
fprintf(out, " frame=");
fputs(tmp, out);
@ -956,7 +957,7 @@ nsSpaceManager::List(FILE* out)
if (frame) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(frame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(frame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->GetFrameName(tmp);
fputs(tmp, out);
fprintf(out, "@%p ", frame);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIStyleContext.h"
#include "nsIMutableStyleContext.h"
@ -1761,7 +1762,7 @@ StyleContextImpl::QueryInterface(const nsIID& aIID, void** aInstancePtr)
return NS_ERROR_NULL_POINTER;
}
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
if (aIID.Equals(nsIStyleContext::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIStyleContext))) {
*aInstancePtr = (void*)(nsIStyleContext*)this;
NS_ADDREF_THIS();
return NS_OK;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nspr.h"
#include "nsString.h"
@ -79,7 +80,7 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *servMgr,
}
// Increase refcnt and store away nsIModule interface to m in return_cobj
rv = m->QueryInterface(nsIModule::GetIID(), (void**)return_cobj);
rv = m->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj);
if (NS_FAILED(rv)) {
delete m;
m = nsnull;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsComboboxControlFrame.h"
@ -158,7 +159,7 @@ nsComboboxControlFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
} else if (aIID.Equals(NS_GET_IID(nsIStatefulFrame))) {
*aInstancePtr = (void *)(nsIStatefulFrame*)this;
return NS_OK;
} else if (aIID.Equals(nsCOMTypeInfo<nsIRollupListener>::GetIID())) {
} else if (aIID.Equals(NS_GET_IID(nsIRollupListener))) {
*aInstancePtr = (void*)(nsIRollupListener*)this;
return NS_OK;
}
@ -623,7 +624,7 @@ nsComboboxControlFrame::GetAbsoluteFramePosition(nsIPresContext* aPresContext,
viewOffset.x += po.x;
viewOffset.y += po.y;
nsIScrollableView * scrollView;
if (NS_OK == containingView->QueryInterface(nsIScrollableView::GetIID(), (void **)&scrollView)) {
if (NS_OK == containingView->QueryInterface(NS_GET_IID(nsIScrollableView), (void **)&scrollView)) {
nscoord x;
nscoord y;
scrollView->GetScrollPosition(x, y);

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

@ -369,6 +369,11 @@ nsFormControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
}
}
/*
* FIXME: this ::GetIID() method has no meaning in life and should be
* removed.
* Pierre Phaneuf <pp@ludusdesign.com>
*/
const nsIID&
nsFormControlFrame::GetIID()
{

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

@ -127,6 +127,11 @@ nsGfxButtonControlFrame::IsSubmit(PRInt32 type)
}
}
/*
* FIXME: this ::GetIID() method has no meaning in life and should be
* removed.
* Pierre Phaneuf <pp@ludusdesign.com>
*/
const nsIID&
nsGfxButtonControlFrame::GetIID()
{

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsListControlFrame.h"
@ -164,15 +165,15 @@ nsListControlFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
if (NULL == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
}
if (aIID.Equals(nsCOMTypeInfo<nsIFormControlFrame>::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIFormControlFrame))) {
*aInstancePtr = (void*) ((nsIFormControlFrame*) this);
return NS_OK;
}
if (aIID.Equals(nsCOMTypeInfo<nsIListControlFrame>::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIListControlFrame))) {
*aInstancePtr = (void *)((nsIListControlFrame*)this);
return NS_OK;
}
if (aIID.Equals(nsCOMTypeInfo<nsISelectControlFrame>::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsISelectControlFrame))) {
*aInstancePtr = (void *)((nsISelectControlFrame*)this);
return NS_OK;
}
@ -209,7 +210,7 @@ nsresult nsListControlFrame::CountAllChild(nsIDOMNode * aNode, PRInt32& aCount)
// note: both optgroup and option elements can have DOM child
// option elements have text nodes as COM child, but they don't have too
nsCOMPtr<nsIDOMHTMLOptGroupElement> optGroup;
child->QueryInterface(nsCOMTypeInfo<nsIDOMHTMLOptGroupElement>::GetIID(),(void**) &optGroup);
child->QueryInterface(NS_GET_IID(nsIDOMHTMLOptGroupElement),(void**) &optGroup);
if (optGroup) {
aCount++;
@ -237,7 +238,7 @@ nsresult nsListControlFrame::CountAllChild(nsIDOMNode * aNode, PRInt32& aCount)
} else {
// don't query interface againa if it was an optgroup
nsCOMPtr<nsIDOMHTMLOptionElement> option;
child->QueryInterface(nsCOMTypeInfo<nsIDOMHTMLOptionElement>::GetIID(),(void**) &option);
child->QueryInterface(NS_GET_IID(nsIDOMHTMLOptionElement),(void**) &option);
if (option) {
aCount++;
nsIFrame * frame;
@ -564,7 +565,7 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
GetSizeAttribute(&numRows);
if (numRows == kNoSizeSpecified) {
nsIDOMNode* node;
nsresult rv = mContent->QueryInterface(nsCOMTypeInfo<nsIDOMNode>::GetIID(),(void**) &node);
nsresult rv = mContent->QueryInterface(NS_GET_IID(nsIDOMNode),(void**) &node);
if (node && NS_SUCCEEDED(rv)) {
numRows = 0;
CountAllChild(node, numRows);
@ -677,7 +678,7 @@ nsListControlFrame::IsOptionElement(nsIContent* aContent)
PRBool result = PR_FALSE;
nsCOMPtr<nsIDOMHTMLOptionElement> optElem;
if (NS_SUCCEEDED(aContent->QueryInterface(nsCOMTypeInfo<nsIDOMHTMLOptionElement>::GetIID(),(void**) getter_AddRefs(optElem)))) {
if (NS_SUCCEEDED(aContent->QueryInterface(NS_GET_IID(nsIDOMHTMLOptionElement),(void**) getter_AddRefs(optElem)))) {
if (optElem != nsnull) {
result = PR_TRUE;
}
@ -1183,7 +1184,7 @@ nsresult
nsListControlFrame::GetSizeAttribute(PRInt32 *aSize) {
nsresult rv = NS_OK;
nsIDOMHTMLSelectElement* selectElement;
rv = mContent->QueryInterface(nsCOMTypeInfo<nsIDOMHTMLSelectElement>::GetIID(),(void**) &selectElement);
rv = mContent->QueryInterface(NS_GET_IID(nsIDOMHTMLSelectElement),(void**) &selectElement);
if (mContent && NS_SUCCEEDED(rv)) {
rv = selectElement->GetSize(aSize);
NS_RELEASE(selectElement);
@ -1271,7 +1272,7 @@ nsListControlFrame::GetMultiple(PRBool* aMultiple, nsIDOMHTMLSelectElement* aSel
{
if (!aSelect) {
nsIDOMHTMLSelectElement* selectElement = nsnull;
nsresult result = mContent->QueryInterface(nsCOMTypeInfo<nsIDOMHTMLSelectElement>::GetIID(),
nsresult result = mContent->QueryInterface(NS_GET_IID(nsIDOMHTMLSelectElement),
(void**)&selectElement);
if (NS_SUCCEEDED(result) && selectElement) {
result = selectElement->GetMultiple(aMultiple);
@ -1292,7 +1293,7 @@ nsIDOMHTMLSelectElement*
nsListControlFrame::GetSelect(nsIContent * aContent)
{
nsIDOMHTMLSelectElement* selectElement = nsnull;
nsresult result = aContent->QueryInterface(nsCOMTypeInfo<nsIDOMHTMLSelectElement>::GetIID(),
nsresult result = aContent->QueryInterface(NS_GET_IID(nsIDOMHTMLSelectElement),
(void**)&selectElement);
if (NS_SUCCEEDED(result) && selectElement) {
return selectElement;
@ -1312,7 +1313,7 @@ nsListControlFrame::GetOptionAsContent(nsIDOMHTMLCollection* aCollection, PRInt3
nsIContent * content = nsnull;
nsIDOMHTMLOptionElement* optionElement = GetOption(*aCollection, aIndex);
if (nsnull != optionElement) {
optionElement->QueryInterface(nsCOMTypeInfo<nsIContent>::GetIID(),(void**) &content);
optionElement->QueryInterface(NS_GET_IID(nsIContent),(void**) &content);
NS_RELEASE(optionElement);
}
@ -1370,7 +1371,7 @@ nsListControlFrame::GetOption(nsIDOMHTMLCollection& aCollection, PRInt32 aIndex)
if (NS_SUCCEEDED(aCollection.Item(aIndex, &node))) {
if (nsnull != node) {
nsIDOMHTMLOptionElement* option = nsnull;
node->QueryInterface(nsCOMTypeInfo<nsIDOMHTMLOptionElement>::GetIID(), (void**)&option);
node->QueryInterface(NS_GET_IID(nsIDOMHTMLOptionElement), (void**)&option);
NS_RELEASE(node);
return option;
}
@ -1617,7 +1618,7 @@ nsListControlFrame::GetName(nsString* aResult)
nsresult result = NS_FORM_NOTOK;
if (mContent) {
nsIHTMLContent* formControl = nsnull;
result = mContent->QueryInterface(nsCOMTypeInfo<nsIHTMLContent>::GetIID(),(void**)&formControl);
result = mContent->QueryInterface(NS_GET_IID(nsIHTMLContent),(void**)&formControl);
if (NS_SUCCEEDED(result) && formControl) {
nsHTMLValue value;
result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value);
@ -1729,7 +1730,7 @@ nsListControlFrame::SetComboboxFrame(nsIFrame* aComboboxFrame)
{
nsresult rv = NS_OK;
if (nsnull != aComboboxFrame) {
rv = aComboboxFrame->QueryInterface(nsCOMTypeInfo<nsIComboboxControlFrame>::GetIID(),(void**) &mComboboxFrame);
rv = aComboboxFrame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame),(void**) &mComboboxFrame);
}
return rv;
}
@ -2720,7 +2721,7 @@ nsListControlFrame::ScrollToFrame(nsIContent* aOptElement)
nsIView * scrollView;
GetView(mPresContext, &scrollView);
nsIScrollableView * scrollableView = nsnull;
nsresult rv = scrollView->QueryInterface(nsIScrollableView::GetIID(), (void**)&scrollableView);
nsresult rv = scrollView->QueryInterface(NS_GET_IID(nsIScrollableView), (void**)&scrollableView);
// if null is passed in we scroll to 0,0
if (nsnull == aOptElement) {

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsSelectsAreaFrame.h"
#include "nsCOMPtr.h"
@ -62,7 +63,7 @@ nsSelectsAreaFrame::IsOptionElement(nsIContent* aContent)
PRBool result = PR_FALSE;
nsCOMPtr<nsIDOMHTMLOptionElement> optElem;
if (NS_SUCCEEDED(aContent->QueryInterface(nsCOMTypeInfo<nsIDOMHTMLOptionElement>::GetIID(),(void**) getter_AddRefs(optElem)))) {
if (NS_SUCCEEDED(aContent->QueryInterface(NS_GET_IID(nsIDOMHTMLOptionElement),(void**) getter_AddRefs(optElem)))) {
if (optElem != nsnull) {
result = PR_TRUE;
}

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

@ -192,7 +192,11 @@ nsTextControlFrame::GetHorizontalInsidePadding(nsIPresContext* aPresContext,
}
/*
* FIXME: this ::GetIID() method has no meaning in life and should be
* removed.
* Pierre Phaneuf <pp@ludusdesign.com>
*/
const nsIID&
nsTextControlFrame::GetIID()
{

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsBlockFrame.h"
@ -1173,7 +1174,7 @@ nsBlockFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
*aInstancePtr = (void*) tmp;
return NS_OK;
}
if (aIID.Equals(nsILineIterator::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsILineIterator))) {
nsLineIterator* it = new nsLineIterator;
if (!it) {
*aInstancePtr = nsnull;
@ -1282,7 +1283,7 @@ nsBlockFrame::List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) con
while (nsnull != kid) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(kid->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(kid->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->List(aPresContext, out, aIndent + 1);
}
kid->GetNextSibling(&kid);
@ -5925,9 +5926,9 @@ nsBlockFrame::HandleEvent(nsIPresContext* aPresContext,
if (!shell)
return NS_OK;
nsCOMPtr<nsIFocusTracker> tracker;
result = shell->QueryInterface(nsIFocusTracker::GetIID(),getter_AddRefs(tracker));
result = shell->QueryInterface(NS_GET_IID(nsIFocusTracker),getter_AddRefs(tracker));
result = mainframe->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = mainframe->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
nsIView* parentWithView;
nsPoint origin;
@ -5988,7 +5989,7 @@ nsBlockFrame::HandleEvent(nsIPresContext* aPresContext,
);
if (NS_SUCCEEDED(result) && pos.mResultFrame){
result = pos.mResultFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));//if this fails thats ok
result = pos.mResultFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));//if this fails thats ok
resultFrame = pos.mResultFrame;
mainframe = resultFrame;
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsBlockFrame.h"
@ -1173,7 +1174,7 @@ nsBlockFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
*aInstancePtr = (void*) tmp;
return NS_OK;
}
if (aIID.Equals(nsILineIterator::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsILineIterator))) {
nsLineIterator* it = new nsLineIterator;
if (!it) {
*aInstancePtr = nsnull;
@ -1282,7 +1283,7 @@ nsBlockFrame::List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) con
while (nsnull != kid) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(kid->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(kid->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->List(aPresContext, out, aIndent + 1);
}
kid->GetNextSibling(&kid);
@ -5925,9 +5926,9 @@ nsBlockFrame::HandleEvent(nsIPresContext* aPresContext,
if (!shell)
return NS_OK;
nsCOMPtr<nsIFocusTracker> tracker;
result = shell->QueryInterface(nsIFocusTracker::GetIID(),getter_AddRefs(tracker));
result = shell->QueryInterface(NS_GET_IID(nsIFocusTracker),getter_AddRefs(tracker));
result = mainframe->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = mainframe->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
nsIView* parentWithView;
nsPoint origin;
@ -5988,7 +5989,7 @@ nsBlockFrame::HandleEvent(nsIPresContext* aPresContext,
);
if (NS_SUCCEEDED(result) && pos.mResultFrame){
result = pos.mResultFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));//if this fails thats ok
result = pos.mResultFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));//if this fails thats ok
resultFrame = pos.mResultFrame;
mainframe = resultFrame;
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsBlockFrame.h"
@ -1173,7 +1174,7 @@ nsBlockFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
*aInstancePtr = (void*) tmp;
return NS_OK;
}
if (aIID.Equals(nsILineIterator::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsILineIterator))) {
nsLineIterator* it = new nsLineIterator;
if (!it) {
*aInstancePtr = nsnull;
@ -1282,7 +1283,7 @@ nsBlockFrame::List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) con
while (nsnull != kid) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(kid->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(kid->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->List(aPresContext, out, aIndent + 1);
}
kid->GetNextSibling(&kid);
@ -5925,9 +5926,9 @@ nsBlockFrame::HandleEvent(nsIPresContext* aPresContext,
if (!shell)
return NS_OK;
nsCOMPtr<nsIFocusTracker> tracker;
result = shell->QueryInterface(nsIFocusTracker::GetIID(),getter_AddRefs(tracker));
result = shell->QueryInterface(NS_GET_IID(nsIFocusTracker),getter_AddRefs(tracker));
result = mainframe->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = mainframe->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
nsIView* parentWithView;
nsPoint origin;
@ -5988,7 +5989,7 @@ nsBlockFrame::HandleEvent(nsIPresContext* aPresContext,
);
if (NS_SUCCEEDED(result) && pos.mResultFrame){
result = pos.mResultFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));//if this fails thats ok
result = pos.mResultFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));//if this fails thats ok
resultFrame = pos.mResultFrame;
mainframe = resultFrame;
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsContainerFrame.h"
#include "nsIContent.h"
@ -1018,7 +1019,7 @@ nsContainerFrame::List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent)
// Have the child frame list
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(kid->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(kid->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->List(aPresContext, out, aIndent + 1);
}
kid->GetNextSibling(&kid);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsFrame.h"
@ -251,7 +252,7 @@ nsresult nsFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
static NS_DEFINE_IID(kClassIID, kIFrameIID);
#ifdef DEBUG
if (aIID.Equals(nsIFrameDebug::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIFrameDebug))) {
*aInstancePtr = (void*)(nsIFrameDebug*)this;
return NS_OK;
}
@ -769,15 +770,15 @@ nsFrame::HandleEvent(nsIPresContext* aPresContext,
#else
nsIDragService* dragService;
nsresult rv = nsServiceManager::GetService(kCDragServiceCID,
nsIDragService::GetIID(),
NS_GET_IID(nsIDragService),
(nsISupports **)&dragService);
if (NS_OK == rv) {
nsCOMPtr<nsITransferable> trans;
rv = nsComponentManager::CreateInstance(kCTransferableCID, nsnull,
nsITransferable::GetIID(), getter_AddRefs(trans));
NS_GET_IID(nsITransferable), getter_AddRefs(trans));
nsCOMPtr<nsITransferable> trans2;
rv = nsComponentManager::CreateInstance(kCTransferableCID, nsnull,
nsITransferable::GetIID(), getter_AddRefs(trans2));
NS_GET_IID(nsITransferable), getter_AddRefs(trans2));
if ( trans && trans2 ) {
nsString textPlainFlavor ( "text/plain" );
trans->AddDataFlavor(&textPlainFlavor);
@ -1843,7 +1844,7 @@ nsFrame::DumpBaseRegressionData(nsIPresContext* aPresContext, FILE* out, PRInt32
while (nsnull != kid) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(kid->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(kid->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->DumpRegressionData(aPresContext, out, aIndent);
}
kid->GetNextSibling(&kid);
@ -2028,7 +2029,7 @@ nsFrame::GetNextPrevLineFromeBlockFrame(nsIPresContext* aPresContext,
nsresult result;
nsCOMPtr<nsILineIterator> it;
result = aBlockFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = aBlockFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
if (NS_FAILED(result) || !it)
return result;
PRInt32 searchingLine = aLineStart;
@ -2100,7 +2101,7 @@ nsFrame::GetNextPrevLineFromeBlockFrame(nsIPresContext* aPresContext,
{
nsCOMPtr<nsILineIterator> newIt;
//check to see if this is ANOTHER blockframe inside the other one if so then call into its lines
result = resultFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(newIt));
result = resultFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(newIt));
if (NS_SUCCEEDED(result) && newIt)
{
aPos->mResultFrame = resultFrame;
@ -2276,13 +2277,13 @@ nsFrame::PeekOffset(nsIPresContext* aPresContext, nsPeekOffsetStruct *aPos)
result = blockFrame->GetParent(&blockFrame);
if (NS_FAILED(result) || !blockFrame) //if at line 0 then nothing to do
return result;
result = blockFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = blockFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
while (NS_FAILED(result) && blockFrame)
{
thisBlock = blockFrame;
result = blockFrame->GetParent(&blockFrame);
if (NS_SUCCEEDED(result) && blockFrame){
result = blockFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = blockFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
}
}
//this block is now one child down from blockframe
@ -2314,7 +2315,7 @@ nsFrame::PeekOffset(nsIPresContext* aPresContext, nsPeekOffsetStruct *aPos)
else
doneLooping = PR_TRUE; //do not continue with while loop
if (NS_SUCCEEDED(result) && aPos->mResultFrame){
result = aPos->mResultFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = aPos->mResultFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
if (NS_SUCCEEDED(result) && it)//we have struck another block element!
{
doneLooping = PR_FALSE;
@ -2345,13 +2346,13 @@ nsFrame::PeekOffset(nsIPresContext* aPresContext, nsPeekOffsetStruct *aPos)
result = blockFrame->GetParent(&blockFrame);
if (NS_FAILED(result) || !blockFrame) //if at line 0 then nothing to do
return result;
result = blockFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = blockFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
while (NS_FAILED(result) && blockFrame)
{
thisBlock = blockFrame;
result = blockFrame->GetParent(&blockFrame);
if (NS_SUCCEEDED(result) && blockFrame){
result = blockFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = blockFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
}
}
//this block is now one child down from blockframe
@ -2445,7 +2446,7 @@ nsFrame::GetLineNumber(nsIFrame *aFrame)
thisBlock = blockFrame;
result = blockFrame->GetParent(&blockFrame);
if (NS_SUCCEEDED(result) && blockFrame){
result = blockFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = blockFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
}
else
blockFrame = nsnull;
@ -2475,7 +2476,7 @@ nsFrame::GetFrameFromDirection(nsIPresContext* aPresContext, nsPeekOffsetStruct
thisBlock = blockFrame;
result = blockFrame->GetParent(&blockFrame);
if (NS_SUCCEEDED(result) && blockFrame){
result = blockFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = blockFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
}
else
blockFrame = nsnull;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#ifndef nsFrame_h___
#define nsFrame_h___
@ -357,7 +358,7 @@ public:
nsAutoString tmp;
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(aFrame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(aFrame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->GetFrameName(tmp);
}
fputs(tmp, out);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsFrameList.h"
#ifdef NS_DEBUG
@ -360,7 +361,7 @@ nsFrameList::List(nsIPresContext* aPresContext, FILE* out) const
while (nsnull != frame) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(frame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(frame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->List(aPresContext, out, 1);
}
frame->GetNextSibling(&frame);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsLineBox.h"
#include "nsISpaceManager.h"
@ -111,7 +112,7 @@ ListFloaters(FILE* out, PRInt32 aIndent, const nsFloaterCacheList& aFloaters)
if (nsnull != frame) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(frame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(frame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->GetFrameName(frameName);
fputs(frameName, out);
}
@ -172,7 +173,7 @@ nsLineBox::List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) const
while (--n >= 0) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(frame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(frame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->List(aPresContext, out, aIndent + 1);
}
frame->GetNextSibling(&frame);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsLineLayout.h"
@ -82,7 +83,7 @@ nsTextRun::List(FILE* out, PRInt32 aIndent)
nsAutoString tmp;
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(text->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(text->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->GetFrameName(tmp);
fputs(tmp, out);
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsHTMLParts.h"
@ -1495,35 +1496,35 @@ nsresult nsPluginInstanceOwner::QueryInterface(const nsIID& aIID,
if (nsnull == aInstancePtrResult)
return NS_ERROR_NULL_POINTER;
if (aIID.Equals(nsIPluginInstanceOwner::GetIID()))
if (aIID.Equals(NS_GET_IID(nsIPluginInstanceOwner)))
{
*aInstancePtrResult = (void *)((nsIPluginInstanceOwner *)this);
AddRef();
return NS_OK;
}
if (aIID.Equals(nsIPluginTagInfo::GetIID()) || aIID.Equals(nsIPluginTagInfo2::GetIID()))
if (aIID.Equals(NS_GET_IID(nsIPluginTagInfo)) || aIID.Equals(NS_GET_IID(nsIPluginTagInfo2)))
{
*aInstancePtrResult = (void *)((nsIPluginTagInfo2 *)this);
AddRef();
return NS_OK;
}
if (aIID.Equals(nsIJVMPluginTagInfo::GetIID()))
if (aIID.Equals(NS_GET_IID(nsIJVMPluginTagInfo)))
{
*aInstancePtrResult = (void *)((nsIJVMPluginTagInfo *)this);
AddRef();
return NS_OK;
}
if (aIID.Equals(nsIEventListener::GetIID()))
if (aIID.Equals(NS_GET_IID(nsIEventListener)))
{
*aInstancePtrResult = (void *)((nsIEventListener *)this);
AddRef();
return NS_OK;
}
if (aIID.Equals(nsITimerCallback::GetIID()))
if (aIID.Equals(NS_GET_IID(nsITimerCallback)))
{
*aInstancePtrResult = (void *)((nsITimerCallback *)this);
AddRef();
@ -1679,7 +1680,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetDOMElement(nsIDOMElement* *result)
if (nsnull != cont)
{
rv = cont->QueryInterface(nsIDOMElement::GetIID(), (void **)result);
rv = cont->QueryInterface(NS_GET_IID(nsIDOMElement), (void **)result);
NS_RELEASE(cont);
}
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsSpaceManager.h"
#include "nsPoint.h"
@ -920,7 +921,7 @@ nsSpaceManager::List(FILE* out)
if (mFrame) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(mFrame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(mFrame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->GetFrameName(tmp);
fprintf(out, " frame=");
fputs(tmp, out);
@ -940,7 +941,7 @@ nsSpaceManager::List(FILE* out)
if (1 == band->mNumFrames) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(band->mFrame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(band->mFrame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->GetFrameName(tmp);
fprintf(out, " frame=");
fputs(tmp, out);
@ -956,7 +957,7 @@ nsSpaceManager::List(FILE* out)
if (frame) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(frame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(frame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->GetFrameName(tmp);
fputs(tmp, out);
fprintf(out, "@%p ", frame);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsHTMLParts.h"
@ -1353,7 +1354,7 @@ nsTextFrame::GetPositionSlowly(nsIPresContext* aPresContext,
nsCOMPtr<nsIPref> prefs;
PRInt32 prefInt = 0;
rv = nsServiceManager::GetService(kPrefCID,
nsIPref::GetIID(),
NS_GET_IID(nsIPref),
(nsISupports**)&prefs);
PRBool outofstylehandled = PR_FALSE;
if (NS_SUCCEEDED(rv) && prefs)
@ -1983,7 +1984,7 @@ nsTextFrame::GetPosition(nsIPresContext* aCX,
nsCOMPtr<nsIPref> prefs;
PRInt32 prefInt = 0;
rv = nsServiceManager::GetService(kPrefCID,
nsIPref::GetIID(),
NS_GET_IID(nsIPref),
(nsISupports**)&prefs);
PRBool outofstylehandled = PR_FALSE;
if (NS_SUCCEEDED(rv) && prefs)
@ -2636,7 +2637,7 @@ nsTextFrame::HandleMultiplePress(nsIPresContext* aPresContext,
nsCOMPtr<nsIPref> mPrefs;
PRInt32 prefInt = 0;
rv = nsServiceManager::GetService(kPrefCID,
nsIPref::GetIID(),
NS_GET_IID(nsIPref),
(nsISupports**)&mPrefs);
if (NS_SUCCEEDED(rv) && mPrefs)

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsBlockFrame.h"
@ -1173,7 +1174,7 @@ nsBlockFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
*aInstancePtr = (void*) tmp;
return NS_OK;
}
if (aIID.Equals(nsILineIterator::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsILineIterator))) {
nsLineIterator* it = new nsLineIterator;
if (!it) {
*aInstancePtr = nsnull;
@ -1282,7 +1283,7 @@ nsBlockFrame::List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) con
while (nsnull != kid) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(kid->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(kid->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->List(aPresContext, out, aIndent + 1);
}
kid->GetNextSibling(&kid);
@ -5925,9 +5926,9 @@ nsBlockFrame::HandleEvent(nsIPresContext* aPresContext,
if (!shell)
return NS_OK;
nsCOMPtr<nsIFocusTracker> tracker;
result = shell->QueryInterface(nsIFocusTracker::GetIID(),getter_AddRefs(tracker));
result = shell->QueryInterface(NS_GET_IID(nsIFocusTracker),getter_AddRefs(tracker));
result = mainframe->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = mainframe->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
nsIView* parentWithView;
nsPoint origin;
@ -5988,7 +5989,7 @@ nsBlockFrame::HandleEvent(nsIPresContext* aPresContext,
);
if (NS_SUCCEEDED(result) && pos.mResultFrame){
result = pos.mResultFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));//if this fails thats ok
result = pos.mResultFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));//if this fails thats ok
resultFrame = pos.mResultFrame;
mainframe = resultFrame;
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsBlockFrame.h"
@ -1173,7 +1174,7 @@ nsBlockFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
*aInstancePtr = (void*) tmp;
return NS_OK;
}
if (aIID.Equals(nsILineIterator::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsILineIterator))) {
nsLineIterator* it = new nsLineIterator;
if (!it) {
*aInstancePtr = nsnull;
@ -1282,7 +1283,7 @@ nsBlockFrame::List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) con
while (nsnull != kid) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(kid->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(kid->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->List(aPresContext, out, aIndent + 1);
}
kid->GetNextSibling(&kid);
@ -5925,9 +5926,9 @@ nsBlockFrame::HandleEvent(nsIPresContext* aPresContext,
if (!shell)
return NS_OK;
nsCOMPtr<nsIFocusTracker> tracker;
result = shell->QueryInterface(nsIFocusTracker::GetIID(),getter_AddRefs(tracker));
result = shell->QueryInterface(NS_GET_IID(nsIFocusTracker),getter_AddRefs(tracker));
result = mainframe->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = mainframe->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
nsIView* parentWithView;
nsPoint origin;
@ -5988,7 +5989,7 @@ nsBlockFrame::HandleEvent(nsIPresContext* aPresContext,
);
if (NS_SUCCEEDED(result) && pos.mResultFrame){
result = pos.mResultFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));//if this fails thats ok
result = pos.mResultFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));//if this fails thats ok
resultFrame = pos.mResultFrame;
mainframe = resultFrame;
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsBlockFrame.h"
@ -1173,7 +1174,7 @@ nsBlockFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
*aInstancePtr = (void*) tmp;
return NS_OK;
}
if (aIID.Equals(nsILineIterator::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsILineIterator))) {
nsLineIterator* it = new nsLineIterator;
if (!it) {
*aInstancePtr = nsnull;
@ -1282,7 +1283,7 @@ nsBlockFrame::List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) con
while (nsnull != kid) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(kid->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(kid->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->List(aPresContext, out, aIndent + 1);
}
kid->GetNextSibling(&kid);
@ -5925,9 +5926,9 @@ nsBlockFrame::HandleEvent(nsIPresContext* aPresContext,
if (!shell)
return NS_OK;
nsCOMPtr<nsIFocusTracker> tracker;
result = shell->QueryInterface(nsIFocusTracker::GetIID(),getter_AddRefs(tracker));
result = shell->QueryInterface(NS_GET_IID(nsIFocusTracker),getter_AddRefs(tracker));
result = mainframe->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = mainframe->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
nsIView* parentWithView;
nsPoint origin;
@ -5988,7 +5989,7 @@ nsBlockFrame::HandleEvent(nsIPresContext* aPresContext,
);
if (NS_SUCCEEDED(result) && pos.mResultFrame){
result = pos.mResultFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));//if this fails thats ok
result = pos.mResultFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));//if this fails thats ok
resultFrame = pos.mResultFrame;
mainframe = resultFrame;
}

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsContainerFrame.h"
#include "nsIContent.h"
@ -1018,7 +1019,7 @@ nsContainerFrame::List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent)
// Have the child frame list
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(kid->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(kid->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->List(aPresContext, out, aIndent + 1);
}
kid->GetNextSibling(&kid);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsCOMPtr.h"
#include "nsFrame.h"
@ -251,7 +252,7 @@ nsresult nsFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
static NS_DEFINE_IID(kClassIID, kIFrameIID);
#ifdef DEBUG
if (aIID.Equals(nsIFrameDebug::GetIID())) {
if (aIID.Equals(NS_GET_IID(nsIFrameDebug))) {
*aInstancePtr = (void*)(nsIFrameDebug*)this;
return NS_OK;
}
@ -769,15 +770,15 @@ nsFrame::HandleEvent(nsIPresContext* aPresContext,
#else
nsIDragService* dragService;
nsresult rv = nsServiceManager::GetService(kCDragServiceCID,
nsIDragService::GetIID(),
NS_GET_IID(nsIDragService),
(nsISupports **)&dragService);
if (NS_OK == rv) {
nsCOMPtr<nsITransferable> trans;
rv = nsComponentManager::CreateInstance(kCTransferableCID, nsnull,
nsITransferable::GetIID(), getter_AddRefs(trans));
NS_GET_IID(nsITransferable), getter_AddRefs(trans));
nsCOMPtr<nsITransferable> trans2;
rv = nsComponentManager::CreateInstance(kCTransferableCID, nsnull,
nsITransferable::GetIID(), getter_AddRefs(trans2));
NS_GET_IID(nsITransferable), getter_AddRefs(trans2));
if ( trans && trans2 ) {
nsString textPlainFlavor ( "text/plain" );
trans->AddDataFlavor(&textPlainFlavor);
@ -1843,7 +1844,7 @@ nsFrame::DumpBaseRegressionData(nsIPresContext* aPresContext, FILE* out, PRInt32
while (nsnull != kid) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(kid->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(kid->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->DumpRegressionData(aPresContext, out, aIndent);
}
kid->GetNextSibling(&kid);
@ -2028,7 +2029,7 @@ nsFrame::GetNextPrevLineFromeBlockFrame(nsIPresContext* aPresContext,
nsresult result;
nsCOMPtr<nsILineIterator> it;
result = aBlockFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = aBlockFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
if (NS_FAILED(result) || !it)
return result;
PRInt32 searchingLine = aLineStart;
@ -2100,7 +2101,7 @@ nsFrame::GetNextPrevLineFromeBlockFrame(nsIPresContext* aPresContext,
{
nsCOMPtr<nsILineIterator> newIt;
//check to see if this is ANOTHER blockframe inside the other one if so then call into its lines
result = resultFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(newIt));
result = resultFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(newIt));
if (NS_SUCCEEDED(result) && newIt)
{
aPos->mResultFrame = resultFrame;
@ -2276,13 +2277,13 @@ nsFrame::PeekOffset(nsIPresContext* aPresContext, nsPeekOffsetStruct *aPos)
result = blockFrame->GetParent(&blockFrame);
if (NS_FAILED(result) || !blockFrame) //if at line 0 then nothing to do
return result;
result = blockFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = blockFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
while (NS_FAILED(result) && blockFrame)
{
thisBlock = blockFrame;
result = blockFrame->GetParent(&blockFrame);
if (NS_SUCCEEDED(result) && blockFrame){
result = blockFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = blockFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
}
}
//this block is now one child down from blockframe
@ -2314,7 +2315,7 @@ nsFrame::PeekOffset(nsIPresContext* aPresContext, nsPeekOffsetStruct *aPos)
else
doneLooping = PR_TRUE; //do not continue with while loop
if (NS_SUCCEEDED(result) && aPos->mResultFrame){
result = aPos->mResultFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = aPos->mResultFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
if (NS_SUCCEEDED(result) && it)//we have struck another block element!
{
doneLooping = PR_FALSE;
@ -2345,13 +2346,13 @@ nsFrame::PeekOffset(nsIPresContext* aPresContext, nsPeekOffsetStruct *aPos)
result = blockFrame->GetParent(&blockFrame);
if (NS_FAILED(result) || !blockFrame) //if at line 0 then nothing to do
return result;
result = blockFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = blockFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
while (NS_FAILED(result) && blockFrame)
{
thisBlock = blockFrame;
result = blockFrame->GetParent(&blockFrame);
if (NS_SUCCEEDED(result) && blockFrame){
result = blockFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = blockFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
}
}
//this block is now one child down from blockframe
@ -2445,7 +2446,7 @@ nsFrame::GetLineNumber(nsIFrame *aFrame)
thisBlock = blockFrame;
result = blockFrame->GetParent(&blockFrame);
if (NS_SUCCEEDED(result) && blockFrame){
result = blockFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = blockFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
}
else
blockFrame = nsnull;
@ -2475,7 +2476,7 @@ nsFrame::GetFrameFromDirection(nsIPresContext* aPresContext, nsPeekOffsetStruct
thisBlock = blockFrame;
result = blockFrame->GetParent(&blockFrame);
if (NS_SUCCEEDED(result) && blockFrame){
result = blockFrame->QueryInterface(nsILineIterator::GetIID(),getter_AddRefs(it));
result = blockFrame->QueryInterface(NS_GET_IID(nsILineIterator),getter_AddRefs(it));
}
else
blockFrame = nsnull;

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#ifndef nsFrame_h___
#define nsFrame_h___
@ -357,7 +358,7 @@ public:
nsAutoString tmp;
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(aFrame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(aFrame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->GetFrameName(tmp);
}
fputs(tmp, out);

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsIFrameManager.h"
#include "nsIFrame.h"
@ -315,7 +316,7 @@ NS_NewFrameManager(nsIFrameManager** aInstancePtrResult)
if (!it) {
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(nsIFrameManager::GetIID(), (void **)aInstancePtrResult);
return it->QueryInterface(NS_GET_IID(nsIFrameManager), (void **)aInstancePtrResult);
}
FrameManager::FrameManager()
@ -827,7 +828,7 @@ DumpContext(nsIFrame* aFrame, nsIStyleContext* aContext)
nsAutoString name;
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(aFrame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(aFrame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->GetFrameName(name);
fputs(name, stdout);
}
@ -1372,7 +1373,7 @@ CaptureFrameStateFor(nsIPresContext* aPresContext, nsIFrame* aFrame, nsILayoutHi
// See if the frame is stateful.
// Frames are not ref-counted so no addref/release is required on statefulFrame.
nsIStatefulFrame* statefulFrame = nsnull;
aFrame->QueryInterface(nsIStatefulFrame::GetIID(), (void**) &statefulFrame);
aFrame->QueryInterface(NS_GET_IID(nsIStatefulFrame), (void**) &statefulFrame);
if (nsnull != statefulFrame) {
// If so, get the content ID, state type and the state and
// add an association between (ID, type) and (state) to the
@ -1434,7 +1435,7 @@ RestoreFrameStateFor(nsIPresContext* aPresContext, nsIFrame* aFrame, nsILayoutHi
// See if the frame is stateful.
// Frames are not ref-counted so no addref/release is required on statefulFrame.
nsIStatefulFrame* statefulFrame = nsnull;
aFrame->QueryInterface(nsIStatefulFrame::GetIID(), (void**) &statefulFrame);
aFrame->QueryInterface(NS_GET_IID(nsIStatefulFrame), (void**) &statefulFrame);
if (nsnull != statefulFrame) {
// If so, get the content ID, state type and the frame state and
// ask the frame object to restore its state.

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

@ -18,6 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsLineBox.h"
#include "nsISpaceManager.h"
@ -111,7 +112,7 @@ ListFloaters(FILE* out, PRInt32 aIndent, const nsFloaterCacheList& aFloaters)
if (nsnull != frame) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(frame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(frame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->GetFrameName(frameName);
fputs(frameName, out);
}
@ -172,7 +173,7 @@ nsLineBox::List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) const
while (--n >= 0) {
nsIFrameDebug* frameDebug;
if (NS_SUCCEEDED(frame->QueryInterface(nsIFrameDebug::GetIID(), (void**)&frameDebug))) {
if (NS_SUCCEEDED(frame->QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) {
frameDebug->List(aPresContext, out, aIndent + 1);
}
frame->GetNextSibling(&frame);

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше