Bug 690834: Replace PR_TRUE and PR_FALSE with true and false in in plugin code outside of dom/plugins. r=roc

This commit is contained in:
Josh Aas 2011-10-01 11:43:07 -04:00
Родитель aa7afa50d1
Коммит e4a4cfce64
2 изменённых файлов: 101 добавлений и 101 удалений

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

@ -166,7 +166,7 @@ nsAsyncInstantiateEvent::Run()
nsresult rv = mContent->Instantiate(frame, mContentType, mURI);
if (NS_FAILED(rv)) {
mContent->Fallback(PR_TRUE);
mContent->Fallback(true);
}
} else {
LOG(("OBJLC [%p]: Discarding event, data changed\n", mContent));
@ -216,7 +216,7 @@ nsPluginErrorEvent::Run()
return NS_OK;
}
nsContentUtils::DispatchTrustedEvent(mContent->GetDocument(), mContent,
type, PR_TRUE, PR_TRUE);
type, true, true);
return NS_OK;
}
@ -275,8 +275,8 @@ nsPluginCrashedEvent::Run()
return NS_OK;
}
event->InitEvent(NS_LITERAL_STRING("PluginCrashed"), PR_TRUE, PR_TRUE);
privateEvent->SetTrusted(PR_TRUE);
event->InitEvent(NS_LITERAL_STRING("PluginCrashed"), true, true);
privateEvent->SetTrusted(true);
privateEvent->GetInternalNSEvent()->flags |= NS_EVENT_FLAG_ONLY_CHROME_DISPATCH;
nsCOMPtr<nsIWritableVariant> variant;
@ -338,7 +338,7 @@ class AutoNotifier {
mOldState = aContent->ObjectState();
}
~AutoNotifier() {
mContent->NotifyStateChanged(mOldType, mOldState, PR_FALSE, mNotify);
mContent->NotifyStateChanged(mOldType, mOldState, false, mNotify);
}
/**
@ -349,7 +349,7 @@ class AutoNotifier {
void Notify() {
NS_ASSERTION(mNotify, "Should not notify when notify=false");
mContent->NotifyStateChanged(mOldType, mOldState, PR_TRUE, PR_TRUE);
mContent->NotifyStateChanged(mOldType, mOldState, true, true);
mOldType = mContent->Type();
mOldState = mContent->ObjectState();
}
@ -372,7 +372,7 @@ class AutoFallback {
~AutoFallback() {
if (NS_FAILED(*mResult)) {
LOG(("OBJLC [%p]: rv=%08x, falling back\n", mContent, *mResult));
mContent->Fallback(PR_FALSE);
mContent->Fallback(false);
if (mPluginState != ePluginOtherState) {
mContent->mFallbackReason = mPluginState;
}
@ -400,7 +400,7 @@ class AutoFallback {
class AutoSetInstantiatingToFalse {
public:
AutoSetInstantiatingToFalse(nsObjectLoadingContent* objlc) : mContent(objlc) {}
~AutoSetInstantiatingToFalse() { mContent->mInstantiating = PR_FALSE; }
~AutoSetInstantiatingToFalse() { mContent->mInstantiating = false; }
private:
nsObjectLoadingContent* mContent;
};
@ -411,7 +411,7 @@ IsSupportedImage(const nsCString& aMimeType)
{
imgILoader* loader = nsContentUtils::GetImgLoader();
if (!loader) {
return PR_FALSE;
return false;
}
bool supported;
@ -425,7 +425,7 @@ IsSupportedPlugin(const nsCString& aMIMEType)
nsCOMPtr<nsIPluginHost> pluginHostCOM(do_GetService(MOZ_PLUGIN_HOST_CONTRACTID));
nsPluginHost *pluginHost = static_cast<nsPluginHost*>(pluginHostCOM.get());
if (!pluginHost) {
return PR_FALSE;
return false;
}
nsresult rv = pluginHost->IsPluginEnabledForType(aMIMEType.get());
return NS_SUCCEEDED(rv);
@ -459,31 +459,31 @@ IsPluginEnabledByExtension(nsIURI* uri, nsCString& mimeType)
GetExtensionFromURI(uri, ext);
if (ext.IsEmpty()) {
return PR_FALSE;
return false;
}
nsCOMPtr<nsIPluginHost> pluginHostCOM(do_GetService(MOZ_PLUGIN_HOST_CONTRACTID));
nsPluginHost *pluginHost = static_cast<nsPluginHost*>(pluginHostCOM.get());
if (!pluginHost) {
return PR_FALSE;
return false;
}
const char* typeFromExt;
if (NS_SUCCEEDED(pluginHost->IsPluginEnabledForExtension(ext.get(), typeFromExt))) {
mimeType = typeFromExt;
return PR_TRUE;
return true;
}
return PR_FALSE;
return false;
}
nsObjectLoadingContent::nsObjectLoadingContent()
: mPendingInstantiateEvent(nsnull)
, mChannel(nsnull)
, mType(eType_Loading)
, mInstantiating(PR_FALSE)
, mUserDisabled(PR_FALSE)
, mSuppressed(PR_FALSE)
, mNetworkCreated(PR_TRUE)
, mInstantiating(false)
, mUserDisabled(false)
, mSuppressed(false)
, mNetworkCreated(true)
, mFallbackReason(ePluginOtherState)
{
}
@ -507,11 +507,11 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
return NS_BINDING_ABORTED;
}
AutoNotifier notifier(this, PR_TRUE);
AutoNotifier notifier(this, true);
if (!IsSuccessfulRequest(aRequest)) {
LOG(("OBJLC [%p]: OnStartRequest: Request failed\n", this));
Fallback(PR_FALSE);
Fallback(false);
return NS_BINDING_ABORTED;
}
@ -598,7 +598,7 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
nsIDocument* doc = thisContent->GetOwnerDoc();
if (!doc) {
Fallback(PR_FALSE);
Fallback(false);
return NS_BINDING_ABORTED;
}
@ -640,14 +640,14 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
if (!mFrameLoader) {
mFrameLoader = nsFrameLoader::Create(thisContent, mNetworkCreated);
if (!mFrameLoader) {
Fallback(PR_FALSE);
Fallback(false);
return NS_ERROR_UNEXPECTED;
}
}
rv = mFrameLoader->CheckForRecursiveLoad(uri);
if (NS_FAILED(rv)) {
Fallback(PR_FALSE);
Fallback(false);
return rv;
}
@ -687,7 +687,7 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
break;
}
case eType_Plugin:
mInstantiating = PR_TRUE;
mInstantiating = true;
if (mType != newType) {
// This can go away once plugin loading moves to content (bug 90268)
mType = newType;
@ -699,7 +699,7 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
// Do nothing in this case: This is probably due to a display:none
// frame. If we ever get a frame, HasNewFrame will do the right thing.
// Abort the load though, we have no use for the data.
mInstantiating = PR_FALSE;
mInstantiating = false;
return NS_BINDING_ABORTED;
}
@ -710,7 +710,7 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
rv = frame->Instantiate(chan, getter_AddRefs(mFinalListener));
mInstantiating = PR_FALSE;
mInstantiating = false;
if (!weakFrame.IsAlive()) {
// The frame was destroyed while instantiating. Abort the load.
@ -726,7 +726,7 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
// Need to fallback here (instead of using the case below), so that we can
// set mFallbackReason without it being overwritten. This is also why we
// return early.
Fallback(PR_FALSE);
Fallback(false);
PluginSupportState pluginState = GetPluginSupportState(thisContent,
mContentType);
@ -753,7 +753,7 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
return NS_BINDING_ABORTED;
}
#endif
Fallback(PR_FALSE);
Fallback(false);
} else if (mType == eType_Plugin) {
nsIObjectFrame* frame = GetExistingFrame(eFlushContent);
if (frame) {
@ -767,7 +767,7 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
}
LOG(("OBJLC [%p]: Found no listener, falling back\n", this));
Fallback(PR_FALSE);
Fallback(false);
return NS_BINDING_ABORTED;
}
@ -874,7 +874,7 @@ nsObjectLoadingContent::EnsureInstantiation(nsNPAPIPluginInstance** aInstance)
}
// Trigger frame construction
mInstantiating = PR_TRUE;
mInstantiating = true;
nsCOMPtr<nsIContent> thisContent =
do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
@ -883,13 +883,13 @@ nsObjectLoadingContent::EnsureInstantiation(nsNPAPIPluginInstance** aInstance)
nsIDocument* doc = thisContent->GetCurrentDoc();
if (!doc) {
// Nothing we can do while plugin loading is done in layout...
mInstantiating = PR_FALSE;
mInstantiating = false;
return NS_OK;
}
doc->FlushPendingNotifications(Flush_Frames);
mInstantiating = PR_FALSE;
mInstantiating = false;
frame = GetExistingFrame(eFlushContent);
if (!frame) {
@ -922,7 +922,7 @@ nsObjectLoadingContent::EnsureInstantiation(nsNPAPIPluginInstance** aInstance)
if (NS_SUCCEEDED(rv) && weakFrame.IsAlive()) {
rv = frame->GetPluginInstance(aInstance);
} else {
Fallback(PR_TRUE);
Fallback(true);
}
}
return rv;
@ -1173,10 +1173,10 @@ nsObjectLoadingContent::LoadObject(nsIURI* aURI,
// the AutoNotifier triggers frame construction, events can be posted as
// appropriate.
NS_ASSERTION(!mInstantiating, "LoadObject was reentered?");
mInstantiating = PR_TRUE;
mInstantiating = true;
AutoSetInstantiatingToFalse autoset(this);
mUserDisabled = mSuppressed = PR_FALSE;
mUserDisabled = mSuppressed = false;
mURI = aURI;
mContentType = aTypeHint;
@ -1213,7 +1213,7 @@ nsObjectLoadingContent::LoadObject(nsIURI* aURI,
// Security checks
if (doc->IsLoadedAsData()) {
if (!doc->IsStaticDocument()) {
Fallback(PR_FALSE);
Fallback(false);
}
return NS_OK;
}
@ -1228,7 +1228,7 @@ nsObjectLoadingContent::LoadObject(nsIURI* aURI,
nsresult rv =
secMan->CheckLoadURIWithPrincipal(thisContent->NodePrincipal(), aURI, 0);
if (NS_FAILED(rv)) {
Fallback(PR_FALSE);
Fallback(false);
return NS_OK;
}
@ -1296,7 +1296,7 @@ nsObjectLoadingContent::LoadObject(nsIURI* aURI,
case eType_Image:
// Don't notify, because we will take care of that ourselves.
if (aURI) {
rv = LoadImage(aURI, aForceLoad, PR_FALSE);
rv = LoadImage(aURI, aForceLoad, false);
} else {
rv = NS_ERROR_NOT_AVAILABLE;
}
@ -1324,13 +1324,13 @@ nsObjectLoadingContent::LoadObject(nsIURI* aURI,
// If the class ID specifies a supported plugin, or if we have no explicit URI
// but a type, immediately instantiate the plugin.
bool isSupportedClassID = false;
nsCAutoString typeForID; // Will be set iff isSupportedClassID == PR_TRUE
nsCAutoString typeForID; // Will be set iff isSupportedClassID == true
bool hasID = false;
if (caps & eSupportClassID) {
nsAutoString classid;
thisContent->GetAttr(kNameSpaceID_None, nsGkAtoms::classid, classid);
if (!classid.IsEmpty()) {
hasID = PR_TRUE;
hasID = true;
isSupportedClassID = NS_SUCCEEDED(TypeForClassID(classid, typeForID));
}
}
@ -1444,7 +1444,7 @@ nsObjectLoadingContent::LoadObject(nsIURI* aURI,
// Set up the channel's principal and such, like nsDocShell::DoURILoad does
nsContentUtils::SetUpChannelOwner(thisContent->NodePrincipal(),
chan, aURI, PR_TRUE);
chan, aURI, true);
nsCOMPtr<nsIScriptChannel> scriptChannel = do_QueryInterface(chan);
if (scriptChannel) {
@ -1515,7 +1515,7 @@ nsObjectLoadingContent::IsSuccessfulRequest(nsIRequest* aRequest)
nsresult status;
nsresult rv = aRequest->GetStatus(&status);
if (NS_FAILED(rv) || NS_FAILED(status)) {
return PR_FALSE;
return false;
}
// This may still be an error page or somesuch
@ -1524,12 +1524,12 @@ nsObjectLoadingContent::IsSuccessfulRequest(nsIRequest* aRequest)
bool success;
rv = httpChan->GetRequestSucceeded(&success);
if (NS_FAILED(rv) || !success) {
return PR_FALSE;
return false;
}
}
// Otherwise, the request is successful
return PR_TRUE;
return true;
}
/* static */ bool
@ -1537,17 +1537,17 @@ nsObjectLoadingContent::CanHandleURI(nsIURI* aURI)
{
nsCAutoString scheme;
if (NS_FAILED(aURI->GetScheme(scheme))) {
return PR_FALSE;
return false;
}
nsIIOService* ios = nsContentUtils::GetIOService();
if (!ios)
return PR_FALSE;
return false;
nsCOMPtr<nsIProtocolHandler> handler;
ios->GetProtocolHandler(scheme.get(), getter_AddRefs(handler));
if (!handler) {
return PR_FALSE;
return false;
}
nsCOMPtr<nsIExternalProtocolHandler> extHandler =
@ -1596,20 +1596,20 @@ nsObjectLoadingContent::IsSupportedDocument(const nsCString& aMimeType)
return supported != nsIWebNavigationInfo::PLUGIN;
}
return PR_FALSE;
return false;
}
void
nsObjectLoadingContent::UnloadContent()
{
// Don't notify in CancelImageRequests. We do it ourselves.
CancelImageRequests(PR_FALSE);
CancelImageRequests(false);
if (mFrameLoader) {
mFrameLoader->Destroy();
mFrameLoader = nsnull;
}
mType = eType_Null;
mUserDisabled = mSuppressed = PR_FALSE;
mUserDisabled = mSuppressed = false;
mFallbackReason = ePluginOtherState;
}
@ -1804,9 +1804,9 @@ nsObjectLoadingContent::HandleBeingBlockedByContentPolicy(nsresult aStatus,
UnloadContent();
if (NS_SUCCEEDED(aStatus)) {
if (aRetval == nsIContentPolicy::REJECT_TYPE) {
mUserDisabled = PR_TRUE;
mUserDisabled = true;
} else if (aRetval == nsIContentPolicy::REJECT_SERVER) {
mSuppressed = PR_TRUE;
mSuppressed = true;
}
}
}
@ -1856,7 +1856,7 @@ nsObjectLoadingContent::Instantiate(nsIObjectFrame* aFrame,
// Mark that we're instantiating now so that we don't end up
// re-entering instantiation code.
bool oldInstantiatingValue = mInstantiating;
mInstantiating = PR_TRUE;
mInstantiating = true;
nsCString typeToUse(aMIMEType);
if (typeToUse.IsEmpty() && aURI) {
@ -1936,7 +1936,7 @@ nsObjectLoadingContent::GetPluginSupportState(nsIContent* aContent,
}
} else if (!hasAlternateContent) {
hasAlternateContent =
nsStyleUtil::IsSignificantChild(child, PR_TRUE, PR_FALSE);
nsStyleUtil::IsSignificantChild(child, true, false);
}
}
@ -1980,7 +1980,7 @@ nsObjectLoadingContent::CreateStaticClone(nsObjectLoadingContent* aDest) const
if (mFrameLoader) {
nsCOMPtr<nsIContent> content =
do_QueryInterface(static_cast<nsIImageLoadingContent*>((aDest)));
nsFrameLoader* fl = nsFrameLoader::Create(content, PR_FALSE);
nsFrameLoader* fl = nsFrameLoader::Create(content, false);
if (fl) {
aDest->mFrameLoader = fl;
mFrameLoader->CreateStaticClone(fl);
@ -2001,7 +2001,7 @@ nsObjectLoadingContent::PluginCrashed(nsIPluginTag* aPluginTag,
const nsAString& browserDumpID,
bool submittedCrashReport)
{
AutoNotifier notifier(this, PR_TRUE);
AutoNotifier notifier(this, true);
UnloadContent();
mFallbackReason = ePluginCrashed;
nsCOMPtr<nsIContent> thisContent = do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));

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

@ -275,9 +275,9 @@ protected:
if (aSequenceNumber > mLastSequenceNumber && mFrame &&
mFrame->mInstanceOwner) {
mLastSequenceNumber = aSequenceNumber;
return PR_TRUE;
return true;
}
return PR_FALSE;
return false;
}
PRUint64 mLastSequenceNumber;
@ -286,7 +286,7 @@ protected:
nsObjectFrame::nsObjectFrame(nsStyleContext* aContext)
: nsObjectFrameSuper(aContext)
, mReflowCallbackPosted(PR_FALSE)
, mReflowCallbackPosted(false)
{
PR_LOG(nsObjectFrameLM, PR_LOG_DEBUG,
("Created new nsObjectFrame %p\n", this));
@ -350,7 +350,7 @@ nsObjectFrame::DestroyFrom(nsIFrame* aDestructRoot)
// we need to finish with the plugin before native window is destroyed
// doing this in the destructor is too late.
StopPluginInternal(PR_TRUE);
StopPluginInternal(true);
// StopPluginInternal might have disowned the widget; if it has,
// mWidget will be null.
@ -450,7 +450,7 @@ nsObjectFrame::CreateWidget(nscoord aWidth,
NS_ERROR("Could not create inner view");
return NS_ERROR_OUT_OF_MEMORY;
}
viewMan->InsertChild(view, mInnerView, nsnull, PR_TRUE);
viewMan->InsertChild(view, mInnerView, nsnull, true);
nsresult rv;
mWidget = do_CreateInstance(kWidgetCID, &rv);
@ -459,9 +459,9 @@ nsObjectFrame::CreateWidget(nscoord aWidth,
nsWidgetInitData initData;
initData.mWindowType = eWindowType_plugin;
initData.mUnicode = PR_FALSE;
initData.clipChildren = PR_TRUE;
initData.clipSiblings = PR_TRUE;
initData.mUnicode = false;
initData.clipChildren = true;
initData.clipSiblings = true;
// We want mWidget to be able to deliver events to us, especially on
// Mac where events to the plugin are routed through Gecko. So we
// allow the view to attach its event handler to mWidget even though
@ -475,7 +475,7 @@ nsObjectFrame::CreateWidget(nscoord aWidth,
return rv;
}
mWidget->EnableDragDrop(PR_TRUE);
mWidget->EnableDragDrop(true);
// If this frame has an ancestor with a widget which is not
// the root prescontext's widget, then this plugin should not be
@ -483,7 +483,7 @@ nsObjectFrame::CreateWidget(nscoord aWidth,
// plugin may appear in the main window. In Web content this would
// only happen with a plugin in a XUL popup.
if (parentWidget == GetNearestWidget()) {
mWidget->Show(PR_TRUE);
mWidget->Show(true);
#ifdef XP_MACOSX
// On Mac, we need to invalidate ourselves since even windowed
// plugins are painted through Thebes and we need to ensure
@ -545,7 +545,7 @@ nsObjectFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
{
nscoord result = 0;
if (!IsHidden(PR_FALSE)) {
if (!IsHidden(false)) {
nsIAtom *atom = mContent->Tag();
if (atom == nsGkAtoms::applet || atom == nsGkAtoms::embed) {
result = nsPresContext::CSSPixelsToAppUnits(EMBED_DEF_WIDTH);
@ -571,7 +571,7 @@ nsObjectFrame::GetDesiredSize(nsPresContext* aPresContext,
aMetrics.width = 0;
aMetrics.height = 0;
if (IsHidden(PR_FALSE)) {
if (IsHidden(false)) {
return;
}
@ -662,12 +662,12 @@ nsObjectFrame::Reflow(nsPresContext* aPresContext,
if (mInnerView) {
nsIViewManager* vm = mInnerView->GetViewManager();
vm->MoveViewTo(mInnerView, r.x, r.y);
vm->ResizeView(mInnerView, nsRect(nsPoint(0, 0), r.Size()), PR_TRUE);
vm->ResizeView(mInnerView, nsRect(nsPoint(0, 0), r.Size()), true);
}
FixupWindow(r.Size());
if (!mReflowCallbackPosted) {
mReflowCallbackPosted = PR_TRUE;
mReflowCallbackPosted = true;
aPresContext->PresShell()->PostReflowCallback(this);
}
@ -682,15 +682,15 @@ nsObjectFrame::Reflow(nsPresContext* aPresContext,
bool
nsObjectFrame::ReflowFinished()
{
mReflowCallbackPosted = PR_FALSE;
mReflowCallbackPosted = false;
CallSetWindow();
return PR_TRUE;
return true;
}
void
nsObjectFrame::ReflowCallbackCanceled()
{
mReflowCallbackPosted = PR_FALSE;
mReflowCallbackPosted = false;
}
nsresult
@ -773,7 +773,7 @@ nsObjectFrame::FixupWindow(const nsSize& aSize)
window->clipRect.bottom = 0;
window->clipRect.right = 0;
#else
mInstanceOwner->UpdateWindowPositionAndClipRect(PR_FALSE);
mInstanceOwner->UpdateWindowPositionAndClipRect(false);
#endif
NotifyPluginReflowObservers();
@ -845,7 +845,7 @@ nsObjectFrame::IsHidden(bool aCheckVisibilityStyle) const
{
if (aCheckVisibilityStyle) {
if (!GetStyleVisibility()->IsVisibleOrCollapsed())
return PR_TRUE;
return true;
}
// only <embed> tags support the HIDDEN attribute
@ -863,11 +863,11 @@ nsObjectFrame::IsHidden(bool aCheckVisibilityStyle) const
(!hidden.LowerCaseEqualsLiteral("false") &&
!hidden.LowerCaseEqualsLiteral("no") &&
!hidden.LowerCaseEqualsLiteral("off")))) {
return PR_TRUE;
return true;
}
}
return PR_FALSE;
return false;
}
nsIntPoint nsObjectFrame::GetWindowOriginInPixels(bool aWindowless)
@ -985,7 +985,7 @@ nsDisplayPluginReadback::ComputeVisibility(nsDisplayListBuilder* aBuilder,
{
if (!nsDisplayItem::ComputeVisibility(aBuilder, aVisibleRegion,
aAllowVisibleRegionExpansion))
return PR_FALSE;
return false;
nsRect expand;
expand.IntersectRect(aAllowVisibleRegionExpansion, GetBounds(aBuilder));
@ -993,7 +993,7 @@ nsDisplayPluginReadback::ComputeVisibility(nsDisplayListBuilder* aBuilder,
// likely to be made visible, so we can use it for a background! This is
// a bit crazy since we normally only subtract from the visible region.
aVisibleRegion->Or(*aVisibleRegion, expand);
return PR_TRUE;
return true;
}
nsRect
@ -1025,7 +1025,7 @@ nsDisplayPlugin::GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
bool* aForceTransparentSurface)
{
if (aForceTransparentSurface) {
*aForceTransparentSurface = PR_FALSE;
*aForceTransparentSurface = false;
}
nsRegion result;
nsObjectFrame* f = static_cast<nsObjectFrame*>(mFrame);
@ -1142,7 +1142,7 @@ nsObjectFrame::IsOpaque() const
{
#if defined(XP_MACOSX)
// ???
return PR_FALSE;
return false;
#else
return !IsTransparentMode();
#endif
@ -1153,21 +1153,21 @@ nsObjectFrame::IsTransparentMode() const
{
#if defined(XP_MACOSX)
// ???
return PR_FALSE;
return false;
#else
if (!mInstanceOwner)
return PR_FALSE;
return false;
NPWindow *window;
mInstanceOwner->GetWindow(window);
if (window->type != NPWindowTypeDrawable)
return PR_FALSE;
return false;
nsresult rv;
nsRefPtr<nsNPAPIPluginInstance> pi;
rv = mInstanceOwner->GetInstance(getter_AddRefs(pi));
if (NS_FAILED(rv) || !pi)
return PR_FALSE;
return false;
bool transparent = false;
pi->IsTransparent(&transparent);
@ -1210,7 +1210,7 @@ nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
bool isVisible = window && window->width > 0 && window->height > 0;
if (isVisible && aBuilder->ShouldSyncDecodeImages()) {
#ifndef XP_MACOSX
mInstanceOwner->UpdateWindowVisibility(PR_TRUE);
mInstanceOwner->UpdateWindowVisibility(true);
#endif
}
@ -1788,7 +1788,7 @@ nsObjectFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
windowContext->context != cgContext) {
windowContext->context = cgContext;
cgPluginPortCopy->context = cgContext;
mInstanceOwner->SetPluginPortChanged(PR_TRUE);
mInstanceOwner->SetPluginPortChanged(true);
}
#endif
@ -1839,7 +1839,7 @@ nsObjectFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
gfxContext *ctx = aRenderingContext.ThebesContext();
gfxMatrix currentMatrix = ctx->CurrentMatrix();
if (ctx->UserToDevicePixelSnapped(frameGfxRect, PR_FALSE)) {
if (ctx->UserToDevicePixelSnapped(frameGfxRect, false)) {
dirtyGfxRect = ctx->UserToDevice(dirtyGfxRect);
ctx->IdentityMatrix();
}
@ -1901,7 +1901,7 @@ nsObjectFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
// on information here for clipping their drawing, and we can safely use this message
// to tell the plugin exactly where it is in all cases.
nsIntPoint origin = GetWindowOriginInPixels(PR_TRUE);
nsIntPoint origin = GetWindowOriginInPixels(true);
nsIntRect winlessRect = nsIntRect(origin, nsIntSize(window->width, window->height));
if (!mWindowlessRect.IsEqualEdges(winlessRect)) {
@ -1992,7 +1992,7 @@ nsObjectFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
HPS hps = (HPS)GetPSFromRC(aRenderingContext);
if (reinterpret_cast<HPS>(window->window) != hps) {
window->window = reinterpret_cast<void*>(hps);
doupdatewindow = PR_TRUE;
doupdatewindow = true;
}
LONG lPSid = GpiSavePS(hps);
RECTL rclViewport;
@ -2009,7 +2009,7 @@ nsObjectFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
if ((window->x != origin.x) || (window->y != origin.y)) {
window->x = origin.x;
window->y = origin.y;
doupdatewindow = PR_TRUE;
doupdatewindow = true;
}
// if our location or visible area has changed, we need to tell the plugin
@ -2113,7 +2113,7 @@ nsObjectFrame::PrepareInstanceOwner()
nsWeakFrame weakFrame(this);
// First, have to stop any possibly running plugins.
StopPluginInternal(PR_FALSE);
StopPluginInternal(false);
if (!weakFrame.IsAlive()) {
return NS_ERROR_NOT_AVAILABLE;
@ -2160,7 +2160,7 @@ nsObjectFrame::Instantiate(nsIChannel* aChannel, nsIStreamListener** aStreamList
nsWeakFrame weakFrame(this);
NS_ASSERTION(!mPreventInstantiation, "Say what?");
mPreventInstantiation = PR_TRUE;
mPreventInstantiation = true;
rv = pluginHost->InstantiatePluginForChannel(aChannel, mInstanceOwner, aStreamListener);
if (!weakFrame.IsAlive()) {
@ -2169,7 +2169,7 @@ nsObjectFrame::Instantiate(nsIChannel* aChannel, nsIStreamListener** aStreamList
NS_ASSERTION(mPreventInstantiation,
"Instantiation should still be prevented!");
mPreventInstantiation = PR_FALSE;
mPreventInstantiation = false;
#ifdef ACCESSIBILITY
nsAccessibilityService* accService = nsIPresShell::AccService();
@ -2218,7 +2218,7 @@ nsObjectFrame::Instantiate(const char* aMimeType, nsIURI* aURI)
mInstanceOwner->SetPluginHost(pluginHost);
NS_ASSERTION(!mPreventInstantiation, "Say what?");
mPreventInstantiation = PR_TRUE;
mPreventInstantiation = true;
rv = InstantiatePlugin(static_cast<nsPluginHost*>(pluginHost.get()), aMimeType, aURI);
@ -2247,7 +2247,7 @@ nsObjectFrame::Instantiate(const char* aMimeType, nsIURI* aURI)
}
#endif
mPreventInstantiation = PR_FALSE;
mPreventInstantiation = false;
return rv;
}
@ -2309,7 +2309,7 @@ DoDelayedStop(nsPluginInstanceOwner *aInstanceOwner, bool aDelayedStop)
#if (MOZ_PLATFORM_MAEMO==5)
// Don't delay stop on Maemo/Hildon (bug 530739).
if (aDelayedStop && aInstanceOwner->MatchPluginName("Shockwave Flash"))
return PR_FALSE;
return false;
#endif
// Don't delay stopping QuickTime (bug 425157), Flip4Mac (bug 426524),
@ -2324,9 +2324,9 @@ DoDelayedStop(nsPluginInstanceOwner *aInstanceOwner, bool aDelayedStop)
) {
nsCOMPtr<nsIRunnable> evt = new nsStopPluginRunnable(aInstanceOwner);
NS_DispatchToCurrentThread(evt);
return PR_TRUE;
return true;
}
return PR_FALSE;
return false;
}
static void
@ -2399,7 +2399,7 @@ nsStopPluginRunnable::Run()
mTimer = nsnull;
DoStopPlugin(mInstanceOwner, PR_FALSE);
DoStopPlugin(mInstanceOwner, false);
return NS_OK;
}
@ -2465,7 +2465,7 @@ nsObjectFrame::StopPluginInternal(bool aDelayedStop)
mWindowlessRect.SetEmpty();
bool oldVal = mPreventInstantiation;
mPreventInstantiation = PR_TRUE;
mPreventInstantiation = true;
nsWeakFrame weakFrame(this);