Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones

This commit is contained in:
Michael Wu
2011-09-28 23:19:26 -07:00
parent d91d87f072
commit 0fe7772ece
3264 changed files with 30122 additions and 30123 deletions

View File

@@ -115,12 +115,12 @@ public:
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener** aDocListener,
PRBool aReset = PR_TRUE,
bool aReset = true,
nsIContentSink* aSink = nsnull);
virtual void SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject);
virtual void Destroy();
virtual void OnPageShow(PRBool aPersisted,
virtual void OnPageShow(bool aPersisted,
nsIDOMEventTarget* aDispatchStartTarget);
NS_DECL_NSIIMAGEDOCUMENT
@@ -142,11 +142,11 @@ public:
protected:
virtual nsresult CreateSyntheticDocument();
nsresult CheckOverflowing(PRBool changeState);
nsresult CheckOverflowing(bool changeState);
void UpdateTitleAndCharset();
nsresult ScrollImageTo(PRInt32 aX, PRInt32 aY, PRBool restoreImage);
nsresult ScrollImageTo(PRInt32 aX, PRInt32 aY, bool restoreImage);
float GetRatio() {
return NS_MIN((float)mVisibleWidth / mImageWidth,
@@ -163,18 +163,18 @@ protected:
PRInt32 mImageWidth;
PRInt32 mImageHeight;
PRPackedBool mResizeImageByDefault;
PRPackedBool mClickResizingEnabled;
PRPackedBool mImageIsOverflowing;
bool mResizeImageByDefault;
bool mClickResizingEnabled;
bool mImageIsOverflowing;
// mImageIsResized is true if the image is currently resized
PRPackedBool mImageIsResized;
bool mImageIsResized;
// mShouldResize is true if the image should be resized when it doesn't fit
// mImageIsResized cannot be true when this is false, but mImageIsResized
// can be false when this is true
PRPackedBool mShouldResize;
PRPackedBool mFirstResize;
bool mShouldResize;
bool mFirstResize;
// mObservingImageLoader is true while the observer is set.
PRPackedBool mObservingImageLoader;
bool mObservingImageLoader;
float mOriginalZoomLevel;
};
@@ -300,7 +300,7 @@ ImageDocument::StartDocumentLoad(const char* aCommand,
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener** aDocListener,
PRBool aReset,
bool aReset,
nsIContentSink* aSink)
{
nsresult rv =
@@ -311,7 +311,7 @@ ImageDocument::StartDocumentLoad(const char* aCommand,
}
mOriginalZoomLevel =
Preferences::GetBool(SITE_SPECIFIC_ZOOM, PR_FALSE) ? 1.0 : GetZoomLevel();
Preferences::GetBool(SITE_SPECIFIC_ZOOM, false) ? 1.0 : GetZoomLevel();
NS_ASSERTION(aDocListener, "null aDocListener");
*aDocListener = new ImageListener(this);
@@ -385,32 +385,32 @@ ImageDocument::SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject)
}
void
ImageDocument::OnPageShow(PRBool aPersisted,
ImageDocument::OnPageShow(bool aPersisted,
nsIDOMEventTarget* aDispatchStartTarget)
{
if (aPersisted) {
mOriginalZoomLevel =
Preferences::GetBool(SITE_SPECIFIC_ZOOM, PR_FALSE) ? 1.0 : GetZoomLevel();
Preferences::GetBool(SITE_SPECIFIC_ZOOM, false) ? 1.0 : GetZoomLevel();
}
MediaDocument::OnPageShow(aPersisted, aDispatchStartTarget);
}
NS_IMETHODIMP
ImageDocument::GetImageResizingEnabled(PRBool* aImageResizingEnabled)
ImageDocument::GetImageResizingEnabled(bool* aImageResizingEnabled)
{
*aImageResizingEnabled = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP
ImageDocument::GetImageIsOverflowing(PRBool* aImageIsOverflowing)
ImageDocument::GetImageIsOverflowing(bool* aImageIsOverflowing)
{
*aImageIsOverflowing = mImageIsOverflowing;
return NS_OK;
}
NS_IMETHODIMP
ImageDocument::GetImageIsResized(PRBool* aImageIsResized)
ImageDocument::GetImageIsResized(bool* aImageIsResized)
{
*aImageIsResized = mImageIsResized;
return NS_OK;
@@ -467,7 +467,7 @@ ImageDocument::RestoreImageTo(PRInt32 aX, PRInt32 aY)
}
nsresult
ImageDocument::ScrollImageTo(PRInt32 aX, PRInt32 aY, PRBool restoreImage)
ImageDocument::ScrollImageTo(PRInt32 aX, PRInt32 aY, bool restoreImage)
{
float ratio = GetRatio();
@@ -611,7 +611,7 @@ ImageDocument::HandleEvent(nsIDOMEvent* aEvent)
else if (eventType.EqualsLiteral("keypress")) {
nsCOMPtr<nsIDOMKeyEvent> keyEvent = do_QueryInterface(aEvent);
PRUint32 charCode;
PRBool ctrlKey, metaKey, altKey;
bool ctrlKey, metaKey, altKey;
keyEvent->GetCharCode(&charCode);
keyEvent->GetCtrlKey(&ctrlKey);
keyEvent->GetMetaKey(&metaKey);
@@ -710,7 +710,7 @@ ImageDocument::CreateSyntheticDocument()
}
nsresult
ImageDocument::CheckOverflowing(PRBool changeState)
ImageDocument::CheckOverflowing(bool changeState)
{
/* Create a scope so that the style context gets destroyed before we might
* call RebuildStyleData. Also, holding onto pointers to the
@@ -746,10 +746,10 @@ ImageDocument::CheckOverflowing(PRBool changeState)
mVisibleHeight = nsPresContext::AppUnitsToIntCSSPixels(visibleArea.height);
}
PRBool imageWasOverflowing = mImageIsOverflowing;
bool imageWasOverflowing = mImageIsOverflowing;
mImageIsOverflowing =
mImageWidth > mVisibleWidth || mImageHeight > mVisibleHeight;
PRBool windowBecameBigEnough = imageWasOverflowing && !mImageIsOverflowing;
bool windowBecameBigEnough = imageWasOverflowing && !mImageIsOverflowing;
if (changeState || mShouldResize || mFirstResize ||
windowBecameBigEnough) {

View File

@@ -162,7 +162,7 @@ MediaDocument::StartDocumentLoad(const char* aCommand,
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener** aDocListener,
PRBool aReset,
bool aReset,
nsIContentSink* aSink)
{
nsresult rv = nsDocument::StartDocumentLoad(aCommand, aChannel, aLoadGroup,

View File

@@ -61,7 +61,7 @@ public:
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener** aDocListener,
PRBool aReset = PR_TRUE,
bool aReset = true,
nsIContentSink* aSink = nsnull);
protected:

View File

@@ -66,11 +66,11 @@ public:
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener** aDocListener,
PRBool aReset = PR_TRUE,
bool aReset = true,
nsIContentSink* aSink = nsnull);
virtual void SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject);
virtual PRBool CanSavePresentation(nsIRequest *aNewRequest);
virtual bool CanSavePresentation(nsIRequest *aNewRequest);
const nsCString& GetType() const { return mMimeType; }
nsIContent* GetPluginContent() { return mPluginContent; }
@@ -92,7 +92,7 @@ protected:
// Hack to handle the fact that plug-in loading lives in frames and that the
// frames may not be around when we need to instantiate. Once plug-in
// loading moves to content, this can all go away.
PRBool mWillHandleInstantiation;
bool mWillHandleInstantiation;
};
class PluginStreamListener : public MediaDocumentStreamListener
@@ -221,7 +221,7 @@ PluginDocument::SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject
}
PRBool
bool
PluginDocument::CanSavePresentation(nsIRequest *aNewRequest)
{
// Full-page plugins cannot be cached, currently, because we don't have
@@ -236,14 +236,14 @@ PluginDocument::StartDocumentLoad(const char* aCommand,
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener** aDocListener,
PRBool aReset,
bool aReset,
nsIContentSink* aSink)
{
// do not allow message panes to host full-page plugins
// returning an error causes helper apps to take over
nsCOMPtr<nsIDocShellTreeItem> dsti (do_QueryInterface(aContainer));
if (dsti) {
PRBool isMsgPane = PR_FALSE;
bool isMsgPane = false;
dsti->NameEquals(NS_LITERAL_STRING("messagepane").get(), &isMsgPane);
if (isMsgPane) {
return NS_ERROR_FAILURE;
@@ -372,7 +372,7 @@ PluginDocument::Print()
}
NS_IMETHODIMP
PluginDocument::GetWillHandleInstantiation(PRBool* aWillHandle)
PluginDocument::GetWillHandleInstantiation(bool* aWillHandle)
{
*aWillHandle = mWillHandleInstantiation;
return NS_OK;

View File

@@ -55,7 +55,7 @@ public:
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener** aDocListener,
PRBool aReset = PR_TRUE,
bool aReset = true,
nsIContentSink* aSink = nsnull);
protected:
@@ -75,7 +75,7 @@ VideoDocument::StartDocumentLoad(const char* aCommand,
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener** aDocListener,
PRBool aReset,
bool aReset,
nsIContentSink* aSink)
{
nsresult rv =

View File

@@ -186,14 +186,14 @@ public:
// nsIContentSink
NS_IMETHOD WillParse(void);
NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode);
NS_IMETHOD DidBuildModel(PRBool aTerminated);
NS_IMETHOD DidBuildModel(bool aTerminated);
NS_IMETHOD WillInterrupt(void);
NS_IMETHOD WillResume(void);
NS_IMETHOD SetParser(nsIParser* aParser);
virtual void FlushPendingNotifications(mozFlushType aType);
NS_IMETHOD SetDocumentCharset(nsACString& aCharset);
virtual nsISupports *GetTarget();
virtual PRBool IsScriptExecuting();
virtual bool IsScriptExecuting();
// nsIHTMLContentSink
NS_IMETHOD OpenContainer(const nsIParserNode& aNode);
@@ -210,8 +210,8 @@ public:
NS_IMETHOD BeginContext(PRInt32 aID);
NS_IMETHOD EndContext(PRInt32 aID);
NS_IMETHOD OpenHead();
NS_IMETHOD IsEnabled(PRInt32 aTag, PRBool* aReturn);
NS_IMETHOD_(PRBool) IsFormOnStack();
NS_IMETHOD IsEnabled(PRInt32 aTag, bool* aReturn);
NS_IMETHOD_(bool) IsFormOnStack();
#ifdef DEBUG
// nsIDebugDumpContent
@@ -222,8 +222,8 @@ protected:
// If aCheckIfPresent is true, will only set an attribute in cases
// when it's not already set.
nsresult AddAttributes(const nsIParserNode& aNode, nsIContent* aContent,
PRBool aNotify = PR_FALSE,
PRBool aCheckIfPresent = PR_FALSE);
bool aNotify = false,
bool aCheckIfPresent = false);
already_AddRefed<nsGenericHTMLElement>
CreateContentObject(const nsIParserNode& aNode, nsHTMLTag aNodeType);
@@ -257,11 +257,11 @@ protected:
// Boolean indicating whether we've seen a <head> tag that might have had
// attributes once already.
PRPackedBool mHaveSeenHead;
bool mHaveSeenHead;
// Boolean indicating whether we've notified insertion of our root content
// yet. We want to make sure to only do this once.
PRPackedBool mNotifiedRootInsertion;
bool mNotifiedRootInsertion;
PRUint8 mScriptEnabled : 1;
PRUint8 mFramesEnabled : 1;
@@ -274,7 +274,7 @@ protected:
nsresult FlushTags();
void StartLayout(PRBool aIgnorePendingSheets);
void StartLayout(bool aIgnorePendingSheets);
// Routines for tags that require special handling
nsresult CloseHTML();
@@ -289,7 +289,7 @@ protected:
// Routines for tags that require special handling when we reach their end
// tag.
nsresult ProcessSCRIPTEndTag(nsGenericHTMLElement* content,
PRBool aMalformed);
bool aMalformed);
nsresult ProcessSTYLEEndTag(nsGenericHTMLElement* content);
nsresult OpenHeadContext();
@@ -306,7 +306,7 @@ protected:
PRInt32 aIndexInContainer);
void NotifyRootInsertion();
PRBool IsMonolithicContainer(nsHTMLTag aTag);
bool IsMonolithicContainer(nsHTMLTag aTag);
#ifdef NS_DEBUG
void ForceReflow();
@@ -322,7 +322,7 @@ public:
nsresult Begin(nsHTMLTag aNodeType, nsGenericHTMLElement* aRoot,
PRUint32 aNumFlushed, PRInt32 aInsertionPoint);
nsresult OpenContainer(const nsIParserNode& aNode);
nsresult CloseContainer(const nsHTMLTag aTag, PRBool aMalformed);
nsresult CloseContainer(const nsHTMLTag aTag, bool aMalformed);
nsresult AddLeaf(const nsIParserNode& aNode);
nsresult AddLeaf(nsIContent* aContent);
nsresult AddComment(const nsIParserNode& aNode);
@@ -330,16 +330,16 @@ public:
nsresult GrowStack();
nsresult AddText(const nsAString& aText);
nsresult FlushText(PRBool* aDidFlush = nsnull,
PRBool aReleaseLast = PR_FALSE);
nsresult FlushTextAndRelease(PRBool* aDidFlush = nsnull)
nsresult FlushText(bool* aDidFlush = nsnull,
bool aReleaseLast = false);
nsresult FlushTextAndRelease(bool* aDidFlush = nsnull)
{
return FlushText(aDidFlush, PR_TRUE);
}
nsresult FlushTags();
PRBool IsCurrentContainer(nsHTMLTag mType);
bool IsCurrentContainer(nsHTMLTag mType);
void DidAddContent(nsIContent* aContent);
void UpdateChildCounts();
@@ -348,7 +348,7 @@ private:
// Function to check whether we've notified for the current content.
// What this actually does is check whether we've notified for all
// of the parent's kids.
PRBool HaveNotifiedForCurrentContent() const;
bool HaveNotifiedForCurrentContent() const;
public:
HTMLContentSink* mSink;
@@ -374,7 +374,7 @@ public:
PRInt32 mTextSize;
private:
PRBool mLastTextCharWasCR;
bool mLastTextCharWasCR;
};
//----------------------------------------------------------------------
@@ -401,8 +401,8 @@ HTMLContentSink::SinkTraceNode(PRUint32 aBit,
nsresult
HTMLContentSink::AddAttributes(const nsIParserNode& aNode,
nsIContent* aContent, PRBool aNotify,
PRBool aCheckIfPresent)
nsIContent* aContent, bool aNotify,
bool aCheckIfPresent)
{
// Add tag attributes to the content attributes
@@ -651,7 +651,7 @@ SinkContext::Begin(nsHTMLTag aNodeType,
return NS_OK;
}
PRBool
bool
SinkContext::IsCurrentContainer(nsHTMLTag aTag)
{
if (aTag == mStack[mStackPos - 1].mType) {
@@ -816,7 +816,7 @@ SinkContext::OpenContainer(const nsIParserNode& aNode)
return NS_OK;
}
PRBool
bool
SinkContext::HaveNotifiedForCurrentContent() const
{
if (0 < mStackPos) {
@@ -842,7 +842,7 @@ SinkContext::Node::Add(nsIContent *child)
}
nsresult
SinkContext::CloseContainer(const nsHTMLTag aTag, PRBool aMalformed)
SinkContext::CloseContainer(const nsHTMLTag aTag, bool aMalformed)
{
nsresult result = NS_OK;
@@ -1233,7 +1233,7 @@ nsresult
SinkContext::FlushTags()
{
mSink->mDeferredFlushTags = PR_FALSE;
PRBool oldBeganUpdate = mSink->mBeganUpdate;
bool oldBeganUpdate = mSink->mBeganUpdate;
PRUint32 oldUpdates = mSink->mUpdatesInNotification;
++(mSink->mInNotification);
@@ -1255,7 +1255,7 @@ SinkContext::FlushTags()
// responsibility to handle flushing interactions between contexts (see
// HTMLContentSink::BeginContext).
PRInt32 stackPos = 0;
PRBool flushed = PR_FALSE;
bool flushed = false;
PRUint32 childCount;
nsGenericHTMLElement* content;
@@ -1337,10 +1337,10 @@ SinkContext::UpdateChildCounts()
* adding it to the content.
*/
nsresult
SinkContext::FlushText(PRBool* aDidFlush, PRBool aReleaseLast)
SinkContext::FlushText(bool* aDidFlush, bool aReleaseLast)
{
nsresult rv = NS_OK;
PRBool didFlush = PR_FALSE;
bool didFlush = false;
if (mTextLength != 0) {
if (mLastTextNode) {
@@ -1349,7 +1349,7 @@ SinkContext::FlushText(PRBool* aDidFlush, PRBool aReleaseLast)
mLastTextNode = nsnull;
FlushText(aDidFlush, aReleaseLast);
} else {
PRBool notify = HaveNotifiedForCurrentContent();
bool notify = HaveNotifiedForCurrentContent();
// We could probably always increase mInNotification here since
// if AppendText doesn't notify it shouldn't trigger evil code.
// But just in case it does, we don't want to mask any notifications.
@@ -1524,7 +1524,7 @@ NS_INTERFACE_TABLE_TAIL_INHERITING(nsContentSink)
NS_IMPL_ADDREF_INHERITED(HTMLContentSink, nsContentSink)
NS_IMPL_RELEASE_INHERITED(HTMLContentSink, nsContentSink)
static PRBool
static bool
IsScriptEnabled(nsIDocument *aDoc, nsIDocShell *aContainer)
{
NS_ENSURE_TRUE(aDoc && aContainer, PR_TRUE);
@@ -1547,7 +1547,7 @@ IsScriptEnabled(nsIDocument *aDoc, nsIDocShell *aContainer)
JSContext* cx = scriptContext->GetNativeContext();
NS_ENSURE_TRUE(cx, PR_TRUE);
PRBool enabled = PR_TRUE;
bool enabled = true;
nsContentUtils::GetSecurityManager()->
CanExecuteScripts(cx, aDoc->NodePrincipal(), &enabled);
return enabled;
@@ -1583,7 +1583,7 @@ HTMLContentSink::Init(nsIDocument* aDoc,
// Find out if subframes are enabled
if (mDocShell) {
PRBool subFramesEnabled = PR_TRUE;
bool subFramesEnabled = true;
mDocShell->GetAllowSubframes(&subFramesEnabled);
if (subFramesEnabled) {
mFramesEnabled = PR_TRUE;
@@ -1678,7 +1678,7 @@ HTMLContentSink::WillBuildModel(nsDTDMode aDTDMode)
}
NS_IMETHODIMP
HTMLContentSink::DidBuildModel(PRBool aTerminated)
HTMLContentSink::DidBuildModel(bool aTerminated)
{
DidBuildModelImpl(aTerminated);
@@ -1698,7 +1698,7 @@ HTMLContentSink::DidBuildModel(PRBool aTerminated)
// docshell. If we are destroying it, then starting layout will
// likely cause us to crash, or at best waste a lot of time as we
// are just going to tear it down anyway.
PRBool bDestroying = PR_TRUE;
bool bDestroying = true;
if (mDocShell) {
mDocShell->IsBeingDestroyed(&bDestroying);
}
@@ -1736,7 +1736,7 @@ HTMLContentSink::SetParser(nsIParser* aParser)
return NS_OK;
}
NS_IMETHODIMP_(PRBool)
NS_IMETHODIMP_(bool)
HTMLContentSink::IsFormOnStack()
{
return mFormOnStack;
@@ -1939,7 +1939,7 @@ HTMLContentSink::CloseBody()
mCurrentContext->mStackPos - 1,
this);
PRBool didFlush;
bool didFlush;
nsresult rv = mCurrentContext->FlushTextAndRelease(&didFlush);
if (NS_FAILED(rv)) {
return rv;
@@ -2029,7 +2029,7 @@ HTMLContentSink::OpenFrameset(const nsIParserNode& aNode)
// Need to keep track of whether OpenContainer changes mFrameset
nsGenericHTMLElement* oldFrameset = mFrameset;
nsresult rv = mCurrentContext->OpenContainer(aNode);
PRBool isFirstFrameset = NS_SUCCEEDED(rv) && mFrameset != oldFrameset;
bool isFirstFrameset = NS_SUCCEEDED(rv) && mFrameset != oldFrameset;
if (isFirstFrameset && mCurrentContext->mStackPos > 1) {
NS_ASSERTION(mFrameset, "Must have frameset!");
@@ -2076,11 +2076,11 @@ HTMLContentSink::CloseFrameset()
SinkContext* sc = mCurrentContext;
nsGenericHTMLElement* fs = sc->mStack[sc->mStackPos - 1].mContent;
PRBool done = fs == mFrameset;
bool done = fs == mFrameset;
nsresult rv;
if (done) {
PRBool didFlush;
bool didFlush;
rv = sc->FlushTextAndRelease(&didFlush);
if (NS_FAILED(rv)) {
return rv;
@@ -2103,7 +2103,7 @@ HTMLContentSink::CloseFrameset()
}
NS_IMETHODIMP
HTMLContentSink::IsEnabled(PRInt32 aTag, PRBool* aReturn)
HTMLContentSink::IsEnabled(PRInt32 aTag, bool* aReturn)
{
nsHTMLTag theHTMLTag = nsHTMLTag(aTag);
@@ -2284,7 +2284,7 @@ HTMLContentSink::AddDocTypeDecl(const nsIParserNode& aNode)
// Strip quotes
PRUnichar ch = publicId.IsEmpty() ? '\0' : publicId.First();
PRBool hasQuote = PR_FALSE;
bool hasQuote = false;
if (ch == '"' || ch == '\'') {
publicId.Cut(0, 1);
@@ -2526,7 +2526,7 @@ HTMLContentSink::NotifyTagObservers(nsIParserNode* aNode)
}
void
HTMLContentSink::StartLayout(PRBool aIgnorePendingSheets)
HTMLContentSink::StartLayout(bool aIgnorePendingSheets)
{
if (mLayoutStarted) {
return;
@@ -2628,8 +2628,8 @@ HTMLContentSink::ProcessLINKTag(const nsIParserNode& aNode)
if (ssle) {
ssle->SetEnableUpdates(PR_TRUE);
PRBool willNotify;
PRBool isAlternate;
bool willNotify;
bool isAlternate;
result = ssle->UpdateStyleSheet(mFragmentMode ? nsnull : this,
&willNotify,
&isAlternate);
@@ -2645,7 +2645,7 @@ HTMLContentSink::ProcessLINKTag(const nsIParserNode& aNode)
// XXX seems overkill to generate this string array
nsAutoTArray<nsString, 4> linkTypes;
nsStyleLinkElement::ParseLinkTypes(relVal, linkTypes);
PRBool hasPrefetch = linkTypes.Contains(NS_LITERAL_STRING("prefetch"));
bool hasPrefetch = linkTypes.Contains(NS_LITERAL_STRING("prefetch"));
if (hasPrefetch || linkTypes.Contains(NS_LITERAL_STRING("next"))) {
nsAutoString hrefVal;
element->GetAttr(kNameSpaceID_None, nsGkAtoms::href, hrefVal);
@@ -2723,7 +2723,7 @@ HTMLContentSink::NotifyRootInsertion()
UpdateChildCounts();
}
PRBool
bool
HTMLContentSink::IsMonolithicContainer(nsHTMLTag aTag)
{
if (aTag == eHTMLTag_tr ||
@@ -2770,7 +2770,7 @@ HTMLContentSink::PostEvaluateScript(nsIScriptElement *aElement)
nsresult
HTMLContentSink::ProcessSCRIPTEndTag(nsGenericHTMLElement *content,
PRBool aMalformed)
bool aMalformed)
{
// Flush all tags up front so that we are in as stable state as possible
// when calling DoneAddingChildren. This may not be strictly needed since
@@ -2843,8 +2843,8 @@ HTMLContentSink::ProcessSTYLEEndTag(nsGenericHTMLElement* content)
// Note: if we are inside a noXXX tag, then we init'ed this style element
// with mDontLoadStyle = PR_TRUE, so these two calls will have no effect.
ssle->SetEnableUpdates(PR_TRUE);
PRBool willNotify;
PRBool isAlternate;
bool willNotify;
bool isAlternate;
rv = ssle->UpdateStyleSheet(mFragmentMode ? nsnull : this,
&willNotify,
&isAlternate);
@@ -2946,7 +2946,7 @@ HTMLContentSink::GetTarget()
return mDocument;
}
PRBool
bool
HTMLContentSink::IsScriptExecuting()
{
return IsScriptExecutingImpl();

View File

@@ -146,8 +146,8 @@ using namespace mozilla::dom;
#define DETECTOR_CONTRACTID_MAX 127
static char g_detector_contractid[DETECTOR_CONTRACTID_MAX + 1];
static PRBool gInitDetector = PR_FALSE;
static PRBool gPlugDetector = PR_FALSE;
static bool gInitDetector = false;
static bool gPlugDetector = false;
#include "prmem.h"
#include "prtime.h"
@@ -168,14 +168,14 @@ PRUint32 nsHTMLDocument::gWyciwygSessionCnt = 0;
// outParam will be Empty if no parameter is needed or if returning a boolean
// outIsBoolean will determine whether to send param as a boolean or string
// outBooleanParam will not be set unless outIsBoolean
static PRBool ConvertToMidasInternalCommand(const nsAString & inCommandID,
static bool ConvertToMidasInternalCommand(const nsAString & inCommandID,
const nsAString & inParam,
nsACString& outCommandID,
nsACString& outParam,
PRBool& isBoolean,
PRBool& boolValue);
bool& isBoolean,
bool& boolValue);
static PRBool ConvertToMidasInternalCommand(const nsAString & inCommandID,
static bool ConvertToMidasInternalCommand(const nsAString & inCommandID,
nsACString& outCommandID);
static int
MyPrefChangedCallback(const char*aPrefName, void* instance_data)
@@ -223,7 +223,7 @@ RemoveFromAgentSheets(nsCOMArray<nsIStyleSheet> &aAgentSheets, const nsAString&
nsIStyleSheet* sheet = aAgentSheets[i];
nsIURI* sheetURI = sheet->GetSheetURI();
PRBool equals = PR_FALSE;
bool equals = false;
uri->Equals(sheetURI, &equals);
if (equals) {
aAgentSheets.RemoveObjectAt(i);
@@ -379,7 +379,7 @@ nsHTMLDocument::CreateShell(nsPresContext* aContext,
// should be considered (ie. aCharsetSource < thisCharsetSource) but we failed
// to get the charset from this source.
PRBool
bool
nsHTMLDocument::TryHintCharset(nsIMarkupDocumentViewer* aMarkupDV,
PRInt32& aCharsetSource, nsACString& aCharset)
{
@@ -407,7 +407,7 @@ nsHTMLDocument::TryHintCharset(nsIMarkupDocumentViewer* aMarkupDV,
}
PRBool
bool
nsHTMLDocument::TryUserForcedCharset(nsIMarkupDocumentViewer* aMarkupDV,
nsIDocumentCharsetInfo* aDocInfo,
PRInt32& aCharsetSource,
@@ -441,7 +441,7 @@ nsHTMLDocument::TryUserForcedCharset(nsIMarkupDocumentViewer* aMarkupDV,
return PR_FALSE;
}
PRBool
bool
nsHTMLDocument::TryCacheCharset(nsICachingChannel* aCachingChannel,
PRInt32& aCharsetSource,
nsACString& aCharset)
@@ -465,20 +465,20 @@ nsHTMLDocument::TryCacheCharset(nsICachingChannel* aCachingChannel,
return PR_FALSE;
}
static PRBool
static bool
CheckSameOrigin(nsINode* aNode1, nsINode* aNode2)
{
NS_PRECONDITION(aNode1, "Null node?");
NS_PRECONDITION(aNode2, "Null node?");
PRBool equal;
bool equal;
return
NS_SUCCEEDED(aNode1->NodePrincipal()->
Equals(aNode2->NodePrincipal(), &equal)) &&
equal;
}
PRBool
bool
nsHTMLDocument::TryParentCharset(nsIDocumentCharsetInfo* aDocInfo,
nsIDocument* aParentDocument,
PRInt32& aCharsetSource,
@@ -525,7 +525,7 @@ nsHTMLDocument::TryParentCharset(nsIDocumentCharsetInfo* aDocInfo,
return PR_FALSE;
}
PRBool
bool
nsHTMLDocument::UseWeakDocTypeDefault(PRInt32& aCharsetSource,
nsACString& aCharset)
{
@@ -544,7 +544,7 @@ nsHTMLDocument::UseWeakDocTypeDefault(PRInt32& aCharsetSource,
return PR_TRUE;
}
PRBool
bool
nsHTMLDocument::TryDefaultCharset( nsIMarkupDocumentViewer* aMarkupDV,
PRInt32& aCharsetSource,
nsACString& aCharset)
@@ -643,10 +643,10 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener **aDocListener,
PRBool aReset,
bool aReset,
nsIContentSink* aSink)
{
PRBool loadAsHtml5 = nsHtml5Module::sEnabled;
bool loadAsHtml5 = nsHtml5Module::sEnabled;
if (aSink) {
loadAsHtml5 = PR_FALSE;
}
@@ -683,7 +683,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
aChannel->GetOriginalURI(getter_AddRefs(uri));
// Adapted from nsDocShell:
// GetSpec can be expensive for some URIs, so check the scheme first.
PRBool isAbout = PR_FALSE;
bool isAbout = false;
if (uri && NS_SUCCEEDED(uri->SchemeIs("about", &isAbout)) && isAbout) {
nsCAutoString str;
uri->GetSpec(str);
@@ -695,7 +695,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
CSSLoader()->SetCompatibilityMode(mCompatMode);
PRBool needsParser = PR_TRUE;
bool needsParser = true;
if (aCommand)
{
if (!nsCRT::strcmp(aCommand, "view delayedContentLoad")) {
@@ -768,7 +768,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
// The following logic is mirrored in nsWebShell::Embed!
//
nsCOMPtr<nsIMarkupDocumentViewer> muCV;
PRBool muCVIsParent = PR_FALSE;
bool muCVIsParent = false;
nsCOMPtr<nsIContentViewer> cv;
if (docShell) {
docShell->GetContentViewer(getter_AddRefs(cv));
@@ -848,7 +848,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
}
}
PRBool isPostPage = PR_FALSE;
bool isPostPage = false;
// check if current doc is from POST command
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(aChannel));
if (httpChannel) {
@@ -1128,7 +1128,7 @@ nsHTMLDocument::EndLoad()
mWriteState == eDocumentClosed, "EndLoad called early");
mWriteState = eNotWriting;
PRBool turnOnEditing =
bool turnOnEditing =
mParser && (HasFlag(NODE_IS_EDITABLE) || mContentEditableCount > 0);
// Note: nsDocument::EndLoad nulls out mParser.
nsDocument::EndLoad();
@@ -1229,7 +1229,7 @@ nsHTMLDocument::SetDomain(const nsAString& aDomain)
if (NS_FAILED(newURI->GetAsciiHost(domain)))
domain.Truncate();
PRBool ok = current.Equals(domain);
bool ok = current.Equals(domain);
if (current.Length() > domain.Length() &&
StringEndsWith(current, domain) &&
current.CharAt(current.Length() - domain.Length() - 1) == '.') {
@@ -1364,7 +1364,7 @@ nsHTMLDocument::GetApplets(nsIDOMHTMLCollection** aApplets)
return NS_OK;
}
PRBool
bool
nsHTMLDocument::MatchLinks(nsIContent *aContent, PRInt32 aNamespaceID,
nsIAtom* aAtom, void* aData)
{
@@ -1409,7 +1409,7 @@ nsHTMLDocument::GetLinks(nsIDOMHTMLCollection** aLinks)
return NS_OK;
}
PRBool
bool
nsHTMLDocument::MatchAnchors(nsIContent *aContent, PRInt32 aNamespaceID,
nsIAtom* aAtom, void* aData)
{
@@ -1579,7 +1579,7 @@ nsHTMLDocument::Open(const nsAString& aContentTypeOrUrl,
return NS_OK;
}
PRBool inUnload;
bool inUnload;
shell->GetIsInUnload(&inUnload);
if (inUnload) {
return NS_OK;
@@ -1614,7 +1614,7 @@ nsHTMLDocument::Open(const nsAString& aContentTypeOrUrl,
// needed because of the way we use our XOW code, and is a sane
// thing to do anyways.
PRBool equals = PR_FALSE;
bool equals = false;
if (NS_FAILED(callerPrincipal->Equals(NodePrincipal(), &equals)) ||
!equals) {
@@ -1641,7 +1641,7 @@ nsHTMLDocument::Open(const nsAString& aContentTypeOrUrl,
shell->GetContentViewer(getter_AddRefs(cv));
if (cv) {
PRBool okToUnload;
bool okToUnload;
if (NS_SUCCEEDED(cv->PermitUnload(PR_FALSE, &okToUnload)) && !okToUnload) {
// We don't want to unload, so stop here, but don't throw an
// exception.
@@ -1692,7 +1692,7 @@ nsHTMLDocument::Open(const nsAString& aContentTypeOrUrl,
nsCOMPtr<nsIScriptGlobalObject> oldScope(do_QueryReferent(mScopeObject));
#ifdef DEBUG
PRBool willReparent = mWillReparent;
bool willReparent = mWillReparent;
mWillReparent = PR_TRUE;
#endif
@@ -1725,7 +1725,7 @@ nsHTMLDocument::Open(const nsAString& aContentTypeOrUrl,
// resetting the document.
mSecurityInfo = securityInfo;
PRBool loadAsHtml5 = nsHtml5Module::sEnabled;
bool loadAsHtml5 = nsHtml5Module::sEnabled;
if (loadAsHtml5) {
mParser = nsHtml5Module::NewHtml5Parser();
rv = NS_OK;
@@ -1864,7 +1864,7 @@ nsHTMLDocument::Close()
nsresult
nsHTMLDocument::WriteCommon(JSContext *cx,
const nsAString& aText,
PRBool aNewlineTerminate)
bool aNewlineTerminate)
{
mTooDeepWriteRecursion =
(mWriteLevel > NS_MAX_DOCUMENT_WRITE_DEPTH || mTooDeepWriteRecursion);
@@ -1971,7 +1971,7 @@ nsHTMLDocument::Writeln(const nsAString& aText, JSContext *cx)
return WriteCommon(cx, aText, PR_TRUE);
}
PRBool
bool
nsHTMLDocument::MatchNameAttribute(nsIContent* aContent, PRInt32 aNamespaceID,
nsIAtom* aAtom, void* aData)
{
@@ -2362,7 +2362,7 @@ nsHTMLDocument::GetForms()
return mForms;
}
static PRBool MatchFormControls(nsIContent* aContent, PRInt32 aNamespaceID,
static bool MatchFormControls(nsIContent* aContent, PRInt32 aNamespaceID,
nsIAtom* aAtom, void* aData)
{
return aContent->IsNodeOfType(nsIContent::eHTML_FORM_CONTROL);
@@ -2615,7 +2615,7 @@ nsHTMLDocument::DeferredContentEditableCountChange(nsIContent *aElement)
}
}
static PRBool
static bool
DocAllResultMatch(nsIContent* aContent, PRInt32 aNamespaceID, nsIAtom* aAtom,
void* aData)
{
@@ -2698,7 +2698,7 @@ nsHTMLDocument::GetDocumentAllResult(const nsAString& aID,
static void
NotifyEditableStateChange(nsINode *aNode, nsIDocument *aDocument,
PRBool aEditable)
bool aEditable)
{
for (nsIContent* child = aNode->GetFirstChild();
child;
@@ -2761,7 +2761,7 @@ nsHTMLDocument::TurnEditingOff()
return NS_OK;
}
static PRBool HasPresShell(nsPIDOMWindow *aWindow)
static bool HasPresShell(nsPIDOMWindow *aWindow)
{
nsIDocShell *docShell = aWindow->GetDocShell();
if (!docShell)
@@ -2790,7 +2790,7 @@ nsHTMLDocument::EditingStateChanged()
return NS_OK;
}
PRBool designMode = HasFlag(NODE_IS_EDITABLE);
bool designMode = HasFlag(NODE_IS_EDITABLE);
EditingState newState = designMode ? eDesignMode :
(mContentEditableCount > 0 ? eContentEditable : eOff);
if (mEditingState == newState) {
@@ -2845,9 +2845,9 @@ nsHTMLDocument::EditingStateChanged()
return NS_OK;
}
PRBool makeWindowEditable = mEditingState == eOff;
bool makeWindowEditable = mEditingState == eOff;
bool updateState = false;
PRBool spellRecheckAll = PR_FALSE;
bool spellRecheckAll = false;
nsCOMPtr<nsIEditor> editor;
{
@@ -2940,7 +2940,7 @@ nsHTMLDocument::EditingStateChanged()
// Set the editor to not insert br's on return when in p
// elements by default.
// XXX Do we only want to do this for designMode?
PRBool unused;
bool unused;
rv = ExecCommand(NS_LITERAL_STRING("insertBrOnReturn"), PR_FALSE,
NS_LITERAL_STRING("false"), &unused);
@@ -2988,7 +2988,7 @@ nsHTMLDocument::SetDesignMode(const nsAString & aDesignMode)
rv = secMan->GetSubjectPrincipal(getter_AddRefs(subject));
NS_ENSURE_SUCCESS(rv, rv);
if (subject) {
PRBool subsumes;
bool subsumes;
rv = subject->Subsumes(NodePrincipal(), &subsumes);
NS_ENSURE_SUCCESS(rv, rv);
@@ -2996,7 +2996,7 @@ nsHTMLDocument::SetDesignMode(const nsAString & aDesignMode)
}
}
PRBool editableMode = HasFlag(NODE_IS_EDITABLE);
bool editableMode = HasFlag(NODE_IS_EDITABLE);
if (aDesignMode.LowerCaseEqualsASCII(editableMode ? "off" : "on")) {
SetEditableFlag(!editableMode);
@@ -3042,8 +3042,8 @@ struct MidasCommand {
const char* incomingCommandString;
const char* internalCommandString;
const char* internalParamString;
PRPackedBool useNewParam;
PRPackedBool convertToBoolean;
bool useNewParam;
bool convertToBoolean;
};
static const struct MidasCommand gMidasCommandTable[] = {
@@ -3120,19 +3120,19 @@ static const char* const gBlocks[] = {
"PRE"
};
static PRBool
static bool
ConvertToMidasInternalCommandInner(const nsAString & inCommandID,
const nsAString & inParam,
nsACString& outCommandID,
nsACString& outParam,
PRBool& outIsBoolean,
PRBool& outBooleanValue,
PRBool aIgnoreParams)
bool& outIsBoolean,
bool& outBooleanValue,
bool aIgnoreParams)
{
NS_ConvertUTF16toUTF8 convertedCommandID(inCommandID);
// Hack to support old boolean commands that were backwards (see bug 301490).
PRBool invertBool = PR_FALSE;
bool invertBool = false;
if (convertedCommandID.LowerCaseEqualsLiteral("usecss")) {
convertedCommandID.Assign("styleWithCSS");
invertBool = PR_TRUE;
@@ -3143,7 +3143,7 @@ ConvertToMidasInternalCommandInner(const nsAString & inCommandID,
}
PRUint32 i;
PRBool found = PR_FALSE;
bool found = false;
for (i = 0; i < MidasCommandCount; ++i) {
if (convertedCommandID.Equals(gMidasCommandTable[i].incomingCommandString,
nsCaseInsensitiveCStringComparator())) {
@@ -3216,26 +3216,26 @@ ConvertToMidasInternalCommandInner(const nsAString & inCommandID,
return found;
}
static PRBool
static bool
ConvertToMidasInternalCommand(const nsAString & inCommandID,
const nsAString & inParam,
nsACString& outCommandID,
nsACString& outParam,
PRBool& outIsBoolean,
PRBool& outBooleanValue)
bool& outIsBoolean,
bool& outBooleanValue)
{
return ConvertToMidasInternalCommandInner(inCommandID, inParam, outCommandID,
outParam, outIsBoolean,
outBooleanValue, PR_FALSE);
}
static PRBool
static bool
ConvertToMidasInternalCommand(const nsAString & inCommandID,
nsACString& outCommandID)
{
nsCAutoString dummyCString;
nsAutoString dummyString;
PRBool dummyBool;
bool dummyBool;
return ConvertToMidasInternalCommandInner(inCommandID, dummyString,
outCommandID, dummyCString,
dummyBool, dummyBool, PR_TRUE);
@@ -3249,7 +3249,7 @@ nsHTMLDocument::sPasteInternal_id = JSID_VOID;
/* Helper function to check security of clipboard commands. If aPaste is */
/* true, we check paste, else we check cutcopy */
nsresult
nsHTMLDocument::DoClipboardSecurityCheck(PRBool aPaste)
nsHTMLDocument::DoClipboardSecurityCheck(bool aPaste)
{
nsresult rv = NS_ERROR_FAILURE;
@@ -3295,9 +3295,9 @@ nsHTMLDocument::DoClipboardSecurityCheck(PRBool aPaste)
in DOMString value); */
NS_IMETHODIMP
nsHTMLDocument::ExecCommand(const nsAString & commandID,
PRBool doShowUI,
bool doShowUI,
const nsAString & value,
PRBool *_retval)
bool *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
@@ -3340,7 +3340,7 @@ nsHTMLDocument::ExecCommand(const nsAString & commandID,
return NS_ERROR_FAILURE;
nsCAutoString cmdToDispatch, paramStr;
PRBool isBool, boolVal;
bool isBool, boolVal;
if (!ConvertToMidasInternalCommand(commandID, value,
cmdToDispatch, paramStr, isBool, boolVal))
return NS_OK;
@@ -3376,7 +3376,7 @@ nsHTMLDocument::ExecCommand(const nsAString & commandID,
/* boolean execCommandShowHelp(in DOMString commandID); */
NS_IMETHODIMP
nsHTMLDocument::ExecCommandShowHelp(const nsAString & commandID,
PRBool *_retval)
bool *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = PR_FALSE;
@@ -3391,7 +3391,7 @@ nsHTMLDocument::ExecCommandShowHelp(const nsAString & commandID,
/* boolean queryCommandEnabled(in DOMString commandID); */
NS_IMETHODIMP
nsHTMLDocument::QueryCommandEnabled(const nsAString & commandID,
PRBool *_retval)
bool *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = PR_FALSE;
@@ -3420,7 +3420,7 @@ nsHTMLDocument::QueryCommandEnabled(const nsAString & commandID,
/* boolean queryCommandIndeterm (in DOMString commandID); */
NS_IMETHODIMP
nsHTMLDocument::QueryCommandIndeterm(const nsAString & commandID,
PRBool *_retval)
bool *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = PR_FALSE;
@@ -3440,7 +3440,7 @@ nsHTMLDocument::QueryCommandIndeterm(const nsAString & commandID,
return NS_ERROR_FAILURE;
nsCAutoString cmdToDispatch, paramToCheck;
PRBool dummy;
bool dummy;
if (!ConvertToMidasInternalCommand(commandID, commandID,
cmdToDispatch, paramToCheck, dummy, dummy))
return NS_ERROR_NOT_IMPLEMENTED;
@@ -3462,7 +3462,7 @@ nsHTMLDocument::QueryCommandIndeterm(const nsAString & commandID,
/* boolean queryCommandState(in DOMString commandID); */
NS_IMETHODIMP
nsHTMLDocument::QueryCommandState(const nsAString & commandID, PRBool *_retval)
nsHTMLDocument::QueryCommandState(const nsAString & commandID, bool *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = PR_FALSE;
@@ -3482,7 +3482,7 @@ nsHTMLDocument::QueryCommandState(const nsAString & commandID, PRBool *_retval)
return NS_ERROR_FAILURE;
nsCAutoString cmdToDispatch, paramToCheck;
PRBool dummy, dummy2;
bool dummy, dummy2;
if (!ConvertToMidasInternalCommand(commandID, commandID,
cmdToDispatch, paramToCheck, dummy, dummy2))
return NS_ERROR_NOT_IMPLEMENTED;
@@ -3524,7 +3524,7 @@ nsHTMLDocument::QueryCommandState(const nsAString & commandID, PRBool *_retval)
/* boolean queryCommandSupported(in DOMString commandID); */
NS_IMETHODIMP
nsHTMLDocument::QueryCommandSupported(const nsAString & commandID,
PRBool *_retval)
bool *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = PR_FALSE;
@@ -3639,7 +3639,7 @@ nsHTMLDocument::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
return CallQueryInterface(clone.get(), aResult);
}
PRBool
bool
nsHTMLDocument::IsEditingOnAfterFlush()
{
nsIDocument* doc = GetParentDocument();

View File

@@ -95,7 +95,7 @@ public:
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener **aDocListener,
PRBool aReset = PR_TRUE,
bool aReset = true,
nsIContentSink* aSink = nsnull);
virtual void StopDocumentLoad();
@@ -105,13 +105,13 @@ public:
virtual void SetCompatibilityMode(nsCompatibility aMode);
virtual PRBool IsWriting()
virtual bool IsWriting()
{
return mWriteLevel != PRUint32(0);
}
virtual PRBool GetIsFrameset() { return mIsFrameset; }
virtual void SetIsFrameset(PRBool aFrameset) { mIsFrameset = aFrameset; }
virtual bool GetIsFrameset() { return mIsFrameset; }
virtual void SetIsFrameset(bool aFrameset) { mIsFrameset = aFrameset; }
virtual NS_HIDDEN_(nsContentList*) GetForms();
@@ -155,8 +155,8 @@ public:
virtual void RemovedForm();
virtual PRInt32 GetNumFormsSynchronous();
virtual void TearingDownEditor(nsIEditor *aEditor);
virtual void SetIsXHTML(PRBool aXHTML) { mIsRegularHTML = !aXHTML; }
virtual void SetDocWriteDisabled(PRBool aDisabled)
virtual void SetIsXHTML(bool aXHTML) { mIsRegularHTML = !aXHTML; }
virtual void SetDocWriteDisabled(bool aDisabled)
{
mDisableDocWrite = aDisabled;
}
@@ -212,11 +212,11 @@ protected:
nsIContent *MatchId(nsIContent *aContent, const nsAString& aId);
static PRBool MatchLinks(nsIContent *aContent, PRInt32 aNamespaceID,
static bool MatchLinks(nsIContent *aContent, PRInt32 aNamespaceID,
nsIAtom* aAtom, void* aData);
static PRBool MatchAnchors(nsIContent *aContent, PRInt32 aNamespaceID,
static bool MatchAnchors(nsIContent *aContent, PRInt32 aNamespaceID,
nsIAtom* aAtom, void* aData);
static PRBool MatchNameAttribute(nsIContent* aContent, PRInt32 aNamespaceID,
static bool MatchNameAttribute(nsIContent* aContent, PRInt32 aNamespaceID,
nsIAtom* aAtom, void* aData);
static void* UseExistingNameString(nsINode* aRootNode, const nsString* aName);
@@ -225,7 +225,7 @@ protected:
void GetDomainURI(nsIURI **uri);
nsresult WriteCommon(JSContext *cx, const nsAString& aText,
PRBool aNewlineTerminate);
bool aNewlineTerminate);
nsresult CreateAndAddWyciwygChannel(void);
nsresult RemoveWyciwygChannel(void);
@@ -233,7 +233,7 @@ protected:
/**
* Like IsEditingOn(), but will flush as needed first.
*/
PRBool IsEditingOnAfterFlush();
bool IsEditingOnAfterFlush();
void *GenerateParserKey(void);
@@ -256,23 +256,23 @@ protected:
static PRUint32 gWyciwygSessionCnt;
static PRBool TryHintCharset(nsIMarkupDocumentViewer* aMarkupDV,
static bool TryHintCharset(nsIMarkupDocumentViewer* aMarkupDV,
PRInt32& aCharsetSource,
nsACString& aCharset);
static PRBool TryUserForcedCharset(nsIMarkupDocumentViewer* aMarkupDV,
static bool TryUserForcedCharset(nsIMarkupDocumentViewer* aMarkupDV,
nsIDocumentCharsetInfo* aDocInfo,
PRInt32& aCharsetSource,
nsACString& aCharset);
static PRBool TryCacheCharset(nsICachingChannel* aCachingChannel,
static bool TryCacheCharset(nsICachingChannel* aCachingChannel,
PRInt32& aCharsetSource,
nsACString& aCharset);
// aParentDocument could be null.
PRBool TryParentCharset(nsIDocumentCharsetInfo* aDocInfo,
bool TryParentCharset(nsIDocumentCharsetInfo* aDocInfo,
nsIDocument* aParentDocument,
PRInt32& charsetSource, nsACString& aCharset);
static PRBool UseWeakDocTypeDefault(PRInt32& aCharsetSource,
static bool UseWeakDocTypeDefault(PRInt32& aCharsetSource,
nsACString& aCharset);
static PRBool TryDefaultCharset(nsIMarkupDocumentViewer* aMarkupDV,
static bool TryDefaultCharset(nsIMarkupDocumentViewer* aMarkupDV,
PRInt32& aCharsetSource,
nsACString& aCharset);
@@ -308,13 +308,13 @@ protected:
// Load flags of the document's channel
PRUint32 mLoadFlags;
PRPackedBool mIsFrameset;
bool mIsFrameset;
PRPackedBool mTooDeepWriteRecursion;
bool mTooDeepWriteRecursion;
PRPackedBool mDisableDocWrite;
bool mDisableDocWrite;
PRPackedBool mWarnedWidthHeight;
bool mWarnedWidthHeight;
nsCOMPtr<nsIWyciwygChannel> mWyciwygChannel;
@@ -330,12 +330,12 @@ protected:
PRUint32 mContentEditableCount;
EditingState mEditingState;
nsresult DoClipboardSecurityCheck(PRBool aPaste);
nsresult DoClipboardSecurityCheck(bool aPaste);
static jsid sCutCopyInternal_id;
static jsid sPasteInternal_id;
// When false, the .cookies property is completely disabled
PRBool mDisableCookieAccess;
bool mDisableCookieAccess;
};
#define NS_HTML_DOCUMENT_INTERFACE_TABLE_BEGIN(_class) \

View File

@@ -101,10 +101,10 @@ public:
// not the rest?
virtual PRInt32 GetNumFormsSynchronous() = 0;
virtual PRBool IsWriting() = 0;
virtual bool IsWriting() = 0;
virtual PRBool GetIsFrameset() = 0;
virtual void SetIsFrameset(PRBool aFrameset) = 0;
virtual bool GetIsFrameset() = 0;
virtual void SetIsFrameset(bool aFrameset) = 0;
/**
* Get the list of form elements in the document.
@@ -140,7 +140,7 @@ public:
/**
* Returns whether the document is editable.
*/
PRBool IsEditingOn()
bool IsEditingOn()
{
return GetEditingState() == eDesignMode ||
GetEditingState() == eContentEditable;
@@ -169,9 +169,9 @@ public:
*/
virtual void TearingDownEditor(nsIEditor *aEditor) = 0;
virtual void SetIsXHTML(PRBool aXHTML) = 0;
virtual void SetIsXHTML(bool aXHTML) = 0;
virtual void SetDocWriteDisabled(PRBool aDisabled) = 0;
virtual void SetDocWriteDisabled(bool aDisabled) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIHTMLDocument, NS_IHTMLDOCUMENT_IID)