mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Merge mozilla-central to mozilla-inbound
This commit is contained in:
commit
6ad7eab95f
@ -62,6 +62,7 @@ build/pgo/Makefile
|
||||
build/pgo/blueprint/Makefile
|
||||
build/pgo/js-input/Makefile
|
||||
build/unix/Makefile
|
||||
build/unix/test/Makefile
|
||||
build/win32/Makefile
|
||||
build/win32/crashinjectdll/Makefile
|
||||
config/Makefile
|
||||
|
@ -60,7 +60,7 @@ abspath() {
|
||||
for regex in $regexes; do
|
||||
if echo $1 | grep -q $regex; then
|
||||
echo $1
|
||||
exit 0
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
@ -88,7 +88,7 @@ for _config in "$MOZCONFIG" \
|
||||
"$topsrcdir/mozconfig"
|
||||
do
|
||||
if test -f "$_config"; then
|
||||
echo `abspath $_config`
|
||||
abspath $_config
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
@ -75,7 +75,7 @@ mk_add_options() {
|
||||
}
|
||||
|
||||
mk_echo_options() {
|
||||
echo "Adding client.mk options from $MOZCONFIG:"
|
||||
echo "Adding client.mk options from $FOUND_MOZCONFIG:"
|
||||
IFS=^
|
||||
for _opt in $opts; do
|
||||
echo " $_opt"
|
||||
|
@ -92,7 +92,7 @@ mk_add_options() {
|
||||
}
|
||||
|
||||
ac_echo_options() {
|
||||
echo "Adding configure options from $MOZCONFIG:"
|
||||
echo "Adding configure options from $FOUND_MOZCONFIG:"
|
||||
eval "set -- $mozconfig_ac_options"
|
||||
for _opt
|
||||
do
|
||||
|
@ -42,19 +42,23 @@ srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
TS = .ts
|
||||
GENERATED_DIRS += $(TS)
|
||||
GARBAGE_DIRS += $(TS)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
##################################################
|
||||
## Gather a list of tests, generate timestamp deps
|
||||
##################################################
|
||||
TS=.ts
|
||||
ifneq (,$(findstring check,$(MAKECMDGOALS)))
|
||||
allsrc = $(wildcard $(srcdir)/*)
|
||||
tests2run = $(notdir $(filter %.tpl,$(allsrc)))
|
||||
check_targets += $(addprefix $(TS)/,$(tests2run))
|
||||
endif
|
||||
|
||||
check:: $(TS) $(check_targets)
|
||||
check:: $(AUTO_DEPS) $(check_targets)
|
||||
|
||||
#############################################
|
||||
# Only invoke tests when sources have changed
|
||||
@ -63,14 +67,4 @@ $(TS)/%: $(srcdir)/%
|
||||
$(PERL) $(srcdir)/runtest $<
|
||||
@touch $@
|
||||
|
||||
#####################################################
|
||||
## Extra dep needed to synchronize parallel execution
|
||||
#####################################################
|
||||
$(TS): $(TS)/.done
|
||||
$(TS)/.done:
|
||||
$(MKDIR) -p $(dir $@)
|
||||
touch $@
|
||||
|
||||
GARBAGE_DIRS += $(TS)
|
||||
|
||||
# EOF
|
||||
|
70
config/makefiles/autotargets.mk
Normal file
70
config/makefiles/autotargets.mk
Normal file
@ -0,0 +1,70 @@
|
||||
# -*- makefile -*-
|
||||
# vim:set ts=8 sw=8 sts=8 noet:
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# The Mozilla Foundation
|
||||
# Portions created by the Initial Developer are Copyright (C) 2011
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Joey Armstrong <joey@mozilla.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
SPACE ?= $(NULL) $(NULL)
|
||||
|
||||
get_auto_arg = $(word $(2),$(subst ^,$(SPACE),$(1))) # get(1=var, 2=offset)
|
||||
gen_auto_macro = $(addsuffix ^$(1),$(2)) # gen(1=target_pattern, 2=value)
|
||||
|
||||
# Library macros
|
||||
mkdir_deps = $(foreach dir,$($(1)),$(dir)/.mkdir.done)
|
||||
|
||||
###########################################################################
|
||||
## Automatic dependency macro generation.
|
||||
## Macros should be defined prior to the inclusion of rules.mk
|
||||
## GENERATED_DIRS - a list of directories to create
|
||||
## AUTO_DEPS - [returned] a list of generated deps targets can depend on
|
||||
## Usage:
|
||||
## all bootstrap: $(AUTO_DEPS)
|
||||
## target: $(dir)/.mkdir.done $(dir)/foobar
|
||||
## mydirs = $(call mkdir_deps,dirlist_macro_name)
|
||||
###########################################################################
|
||||
ifdef GENERATED_DIRS
|
||||
AUTO_DEPS += $(call mkdir_deps,GENERATED_DIRS)
|
||||
endif
|
||||
|
||||
.SECONDARY: $(GENERATED_DIRS) # preserve intermediates: .mkdir.done
|
||||
|
||||
###################################################################
|
||||
## Thread safe directory creation
|
||||
###################################################################
|
||||
%/.mkdir.done:
|
||||
$(MKDIR) -p $(dir $@)
|
||||
@touch $@
|
@ -2030,3 +2030,12 @@ libs export libs::
|
||||
|
||||
default all::
|
||||
if test -d $(DIST)/bin ; then touch $(DIST)/bin/.purgecaches ; fi
|
||||
|
||||
|
||||
#############################################################################
|
||||
# Derived targets and dependencies
|
||||
|
||||
ifndef INCLUDED_AUTOTARGETS_MK
|
||||
include $(topsrcdir)/config/makefiles/autotargets.mk
|
||||
endif
|
||||
|
||||
|
@ -297,7 +297,7 @@ PluginPRLibrary::IsRemoteDrawingCoreAnimation(NPP instance, bool *aDrawing)
|
||||
{
|
||||
nsNPAPIPluginInstance* inst = (nsNPAPIPluginInstance*)instance->ndata;
|
||||
NS_ENSURE_TRUE(inst, NS_ERROR_NULL_POINTER);
|
||||
*aDrawing = PR_FALSE;
|
||||
*aDrawing = false;
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
@ -326,7 +326,7 @@ struct AutoCXPusher
|
||||
nsIScriptContext *scx = GetScriptContextFromJSContext(cx);
|
||||
|
||||
if (scx) {
|
||||
scx->ScriptEvaluated(PR_TRUE);
|
||||
scx->ScriptEvaluated(true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -624,14 +624,14 @@ nsJSObjWrapper::NP_HasMethod(NPObject *npobj, NPIdentifier id)
|
||||
JSContext *cx = GetJSContext(npp);
|
||||
|
||||
if (!cx) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!npobj) {
|
||||
ThrowJSException(cx,
|
||||
"Null npobj in nsJSObjWrapper::NP_HasMethod!");
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
nsJSObjWrapper *npjsobj = (nsJSObjWrapper *)npobj;
|
||||
@ -641,7 +641,7 @@ nsJSObjWrapper::NP_HasMethod(NPObject *npobj, NPIdentifier id)
|
||||
JSAutoEnterCompartment ac;
|
||||
|
||||
if (!ac.enter(cx, npjsobj->mJSObj))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
AutoJSExceptionReporter reporter(cx);
|
||||
|
||||
@ -660,13 +660,13 @@ doInvoke(NPObject *npobj, NPIdentifier method, const NPVariant *args,
|
||||
JSContext *cx = GetJSContext(npp);
|
||||
|
||||
if (!cx) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!npobj || !result) {
|
||||
ThrowJSException(cx, "Null npobj, or result in doInvoke!");
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Initialize *result
|
||||
@ -680,14 +680,14 @@ doInvoke(NPObject *npobj, NPIdentifier method, const NPVariant *args,
|
||||
JSAutoEnterCompartment ac;
|
||||
|
||||
if (!ac.enter(cx, npjsobj->mJSObj))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
AutoJSExceptionReporter reporter(cx);
|
||||
|
||||
if (method != NPIdentifier_VOID) {
|
||||
if (!GetProperty(cx, npjsobj->mJSObj, method, &fv) ||
|
||||
::JS_TypeOfValue(cx, fv) != JSTYPE_FUNCTION) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
fv = OBJECT_TO_JSVAL(npjsobj->mJSObj);
|
||||
@ -703,7 +703,7 @@ doInvoke(NPObject *npobj, NPIdentifier method, const NPVariant *args,
|
||||
if (!jsargs) {
|
||||
::JS_ReportOutOfMemory(cx);
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -753,10 +753,10 @@ nsJSObjWrapper::NP_Invoke(NPObject *npobj, NPIdentifier method,
|
||||
NPVariant *result)
|
||||
{
|
||||
if (method == NPIdentifier_VOID) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return doInvoke(npobj, method, args, argCount, PR_FALSE, result);
|
||||
return doInvoke(npobj, method, args, argCount, false, result);
|
||||
}
|
||||
|
||||
// static
|
||||
@ -764,7 +764,7 @@ bool
|
||||
nsJSObjWrapper::NP_InvokeDefault(NPObject *npobj, const NPVariant *args,
|
||||
uint32_t argCount, NPVariant *result)
|
||||
{
|
||||
return doInvoke(npobj, NPIdentifier_VOID, args, argCount, PR_FALSE,
|
||||
return doInvoke(npobj, NPIdentifier_VOID, args, argCount, false,
|
||||
result);
|
||||
}
|
||||
|
||||
@ -776,14 +776,14 @@ nsJSObjWrapper::NP_HasProperty(NPObject *npobj, NPIdentifier id)
|
||||
JSContext *cx = GetJSContext(npp);
|
||||
|
||||
if (!cx) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!npobj) {
|
||||
ThrowJSException(cx,
|
||||
"Null npobj in nsJSObjWrapper::NP_HasProperty!");
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
nsJSObjWrapper *npjsobj = (nsJSObjWrapper *)npobj;
|
||||
@ -795,7 +795,7 @@ nsJSObjWrapper::NP_HasProperty(NPObject *npobj, NPIdentifier id)
|
||||
JSAutoEnterCompartment ac;
|
||||
|
||||
if (!ac.enter(cx, npjsobj->mJSObj))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
NS_ASSERTION(NPIdentifierIsInt(id) || NPIdentifierIsString(id),
|
||||
"id must be either string or int!\n");
|
||||
@ -812,14 +812,14 @@ nsJSObjWrapper::NP_GetProperty(NPObject *npobj, NPIdentifier id,
|
||||
JSContext *cx = GetJSContext(npp);
|
||||
|
||||
if (!cx) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!npobj) {
|
||||
ThrowJSException(cx,
|
||||
"Null npobj in nsJSObjWrapper::NP_GetProperty!");
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
nsJSObjWrapper *npjsobj = (nsJSObjWrapper *)npobj;
|
||||
@ -830,7 +830,7 @@ nsJSObjWrapper::NP_GetProperty(NPObject *npobj, NPIdentifier id,
|
||||
JSAutoEnterCompartment ac;
|
||||
|
||||
if (!ac.enter(cx, npjsobj->mJSObj))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
jsval v;
|
||||
return (GetProperty(cx, npjsobj->mJSObj, id, &v) &&
|
||||
@ -846,14 +846,14 @@ nsJSObjWrapper::NP_SetProperty(NPObject *npobj, NPIdentifier id,
|
||||
JSContext *cx = GetJSContext(npp);
|
||||
|
||||
if (!cx) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!npobj) {
|
||||
ThrowJSException(cx,
|
||||
"Null npobj in nsJSObjWrapper::NP_SetProperty!");
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
nsJSObjWrapper *npjsobj = (nsJSObjWrapper *)npobj;
|
||||
@ -865,7 +865,7 @@ nsJSObjWrapper::NP_SetProperty(NPObject *npobj, NPIdentifier id,
|
||||
JSAutoEnterCompartment ac;
|
||||
|
||||
if (!ac.enter(cx, npjsobj->mJSObj))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
jsval v = NPVariantToJSVal(npp, cx, value);
|
||||
js::AutoValueRooter tvr(cx, v);
|
||||
@ -887,14 +887,14 @@ nsJSObjWrapper::NP_RemoveProperty(NPObject *npobj, NPIdentifier id)
|
||||
JSContext *cx = GetJSContext(npp);
|
||||
|
||||
if (!cx) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!npobj) {
|
||||
ThrowJSException(cx,
|
||||
"Null npobj in nsJSObjWrapper::NP_RemoveProperty!");
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
nsJSObjWrapper *npjsobj = (nsJSObjWrapper *)npobj;
|
||||
@ -907,7 +907,7 @@ nsJSObjWrapper::NP_RemoveProperty(NPObject *npobj, NPIdentifier id)
|
||||
JSAutoEnterCompartment ac;
|
||||
|
||||
if (!ac.enter(cx, npjsobj->mJSObj))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
NS_ASSERTION(NPIdentifierIsInt(id) || NPIdentifierIsString(id),
|
||||
"id must be either string or int!\n");
|
||||
@ -944,14 +944,14 @@ nsJSObjWrapper::NP_Enumerate(NPObject *npobj, NPIdentifier **idarray,
|
||||
*count = 0;
|
||||
|
||||
if (!cx) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!npobj) {
|
||||
ThrowJSException(cx,
|
||||
"Null npobj in nsJSObjWrapper::NP_Enumerate!");
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
nsJSObjWrapper *npjsobj = (nsJSObjWrapper *)npobj;
|
||||
@ -962,11 +962,11 @@ nsJSObjWrapper::NP_Enumerate(NPObject *npobj, NPIdentifier **idarray,
|
||||
JSAutoEnterCompartment ac;
|
||||
|
||||
if (!ac.enter(cx, npjsobj->mJSObj))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
JSIdArray *ida = ::JS_Enumerate(cx, npjsobj->mJSObj);
|
||||
if (!ida) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
*count = ida->length;
|
||||
@ -976,7 +976,7 @@ nsJSObjWrapper::NP_Enumerate(NPObject *npobj, NPIdentifier **idarray,
|
||||
|
||||
::JS_DestroyIdArray(cx, ida);
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (PRUint32 i = 0; i < *count; i++) {
|
||||
@ -984,7 +984,7 @@ nsJSObjWrapper::NP_Enumerate(NPObject *npobj, NPIdentifier **idarray,
|
||||
if (!::JS_IdToValue(cx, ida->vector[i], &v)) {
|
||||
::JS_DestroyIdArray(cx, ida);
|
||||
PR_Free(*idarray);
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
NPIdentifier id;
|
||||
@ -994,7 +994,7 @@ nsJSObjWrapper::NP_Enumerate(NPObject *npobj, NPIdentifier **idarray,
|
||||
::JS_DestroyIdArray(cx, ida);
|
||||
PR_Free(*idarray);
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
id = StringToNPIdentifier(cx, str);
|
||||
} else {
|
||||
@ -1008,7 +1008,7 @@ nsJSObjWrapper::NP_Enumerate(NPObject *npobj, NPIdentifier **idarray,
|
||||
|
||||
::JS_DestroyIdArray(cx, ida);
|
||||
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//static
|
||||
@ -1016,7 +1016,7 @@ bool
|
||||
nsJSObjWrapper::NP_Construct(NPObject *npobj, const NPVariant *args,
|
||||
uint32_t argCount, NPVariant *result)
|
||||
{
|
||||
return doInvoke(npobj, NPIdentifier_VOID, args, argCount, PR_TRUE, result);
|
||||
return doInvoke(npobj, NPIdentifier_VOID, args, argCount, true, result);
|
||||
}
|
||||
|
||||
|
||||
@ -1540,7 +1540,7 @@ CallNPMethod(JSContext *cx, uintN argc, jsval *vp)
|
||||
if (!obj)
|
||||
return JS_FALSE;
|
||||
|
||||
return CallNPMethodInternal(cx, obj, argc, JS_ARGV(cx, vp), vp, PR_FALSE);
|
||||
return CallNPMethodInternal(cx, obj, argc, JS_ARGV(cx, vp), vp, false);
|
||||
}
|
||||
|
||||
struct NPObjectEnumerateState {
|
||||
@ -1714,14 +1714,14 @@ static JSBool
|
||||
NPObjWrapper_Call(JSContext *cx, uintN argc, jsval *vp)
|
||||
{
|
||||
return CallNPMethodInternal(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)), argc,
|
||||
JS_ARGV(cx, vp), vp, PR_FALSE);
|
||||
JS_ARGV(cx, vp), vp, false);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
NPObjWrapper_Construct(JSContext *cx, uintN argc, jsval *vp)
|
||||
{
|
||||
return CallNPMethodInternal(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)), argc,
|
||||
JS_ARGV(cx, vp), vp, PR_TRUE);
|
||||
JS_ARGV(cx, vp), vp, true);
|
||||
}
|
||||
|
||||
class NPObjWrapperHashEntry : public PLDHashEntryHdr
|
||||
|
@ -239,7 +239,7 @@ static void CheckClassInitialized()
|
||||
if (!sPluginThreadAsyncCallLock)
|
||||
sPluginThreadAsyncCallLock = new Mutex("nsNPAPIPlugin.sPluginThreadAsyncCallLock");
|
||||
|
||||
initialized = PR_TRUE;
|
||||
initialized = true;
|
||||
|
||||
NPN_PLUGIN_LOG(PLUGIN_LOG_NORMAL,("NPN callbacks initialized\n"));
|
||||
}
|
||||
@ -290,7 +290,7 @@ static PRInt32 OSXVersion()
|
||||
#define CGLRendererIntel900ID 0x00024000
|
||||
static bool GMA9XXGraphics()
|
||||
{
|
||||
bool hasIntelGMA9XX = PR_FALSE;
|
||||
bool hasIntelGMA9XX = false;
|
||||
CGLRendererInfoObj renderer = 0;
|
||||
GLint rendererCount = 0;
|
||||
if (::CGLQueryRendererInfo(0xffffffff, &renderer, &rendererCount) == kCGLNoError) {
|
||||
@ -298,7 +298,7 @@ static bool GMA9XXGraphics()
|
||||
GLint rendProp = 0;
|
||||
if (::CGLDescribeRenderer(renderer, c, kCGLRPRendererID, &rendProp) == kCGLNoError) {
|
||||
if ((rendProp & CGLRendererIDMatchingMask) == CGLRendererIntel900ID) {
|
||||
hasIntelGMA9XX = PR_TRUE;
|
||||
hasIntelGMA9XX = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -313,17 +313,17 @@ bool
|
||||
nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
|
||||
{
|
||||
if (PR_GetEnv("MOZ_DISABLE_OOP_PLUGINS")) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!aPluginTag) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(XP_MACOSX) && defined(__i386__)
|
||||
// Only allow on Mac OS X 10.6 or higher.
|
||||
if (OSXVersion() < 0x00001060) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
// Blacklist Flash 10.0 or lower since it may try to negotiate Carbon/Quickdraw
|
||||
// which are not supported out of process. Also blacklist Flash 10.1 if this
|
||||
@ -333,16 +333,16 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
|
||||
// If the first '.' is before position 2 or the version
|
||||
// starts with 10.0 then we are dealing with Flash 10 or less.
|
||||
if (aPluginTag->mVersion.FindChar('.') < 2) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
if (aPluginTag->mVersion.Length() >= 4) {
|
||||
nsCString versionPrefix;
|
||||
aPluginTag->mVersion.Left(versionPrefix, 4);
|
||||
if (versionPrefix.EqualsASCII("10.0")) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
if (versionPrefix.EqualsASCII("10.1") && GMA9XXGraphics()) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -355,12 +355,12 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
|
||||
// Always disabled on 2K or less. (bug 536303)
|
||||
if (osVerInfo.dwMajorVersion < 5 ||
|
||||
(osVerInfo.dwMajorVersion == 5 && osVerInfo.dwMinorVersion == 0))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
|
||||
if (!prefs) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get per-library whitelist/blacklist pref string
|
||||
@ -371,7 +371,7 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
|
||||
nsCAutoString prefFile(aPluginTag->mFullPath.get());
|
||||
PRInt32 slashPos = prefFile.RFindCharInSet("/\\");
|
||||
if (kNotFound == slashPos)
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
prefFile.Cut(0, slashPos + 1);
|
||||
ToLowerCase(prefFile);
|
||||
|
||||
@ -393,7 +393,7 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
|
||||
if (aPluginTag->mIsJavaPlugin &&
|
||||
NS_SUCCEEDED(prefs->GetBoolPref("dom.ipc.plugins.java.enabled", &javaIsEnabled)) &&
|
||||
!javaIsEnabled) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
PRUint32 prefCount;
|
||||
@ -425,7 +425,7 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
|
||||
|
||||
if (match && NS_SUCCEEDED(prefs->GetBoolPref(prefNames[currentPref],
|
||||
&oopPluginsEnabled))) {
|
||||
prefSet = PR_TRUE;
|
||||
prefSet = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -433,7 +433,7 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
|
||||
}
|
||||
|
||||
if (!prefSet) {
|
||||
oopPluginsEnabled = PR_FALSE;
|
||||
oopPluginsEnabled = false;
|
||||
#ifdef XP_MACOSX
|
||||
#if defined(__i386__)
|
||||
prefs->GetBoolPref("dom.ipc.plugins.enabled.i386", &oopPluginsEnabled);
|
||||
@ -581,7 +581,7 @@ MakeNewNPAPIStreamInternal(NPP npp, const char *relativeURL, const char *target,
|
||||
eNPPStreamTypeInternal type,
|
||||
bool bDoNotify = false,
|
||||
void *notifyData = nsnull, uint32_t len = 0,
|
||||
const char *buf = nsnull, NPBool file = PR_FALSE)
|
||||
const char *buf = nsnull, NPBool file = false)
|
||||
{
|
||||
if (!npp)
|
||||
return NPERR_INVALID_INSTANCE_ERROR;
|
||||
@ -608,7 +608,7 @@ MakeNewNPAPIStreamInternal(NPP npp, const char *relativeURL, const char *target,
|
||||
inst->NewStreamListener(relativeURL, notifyData,
|
||||
getter_AddRefs(listener));
|
||||
if (listener) {
|
||||
static_cast<nsNPAPIPluginStreamListener*>(listener.get())->SetCallNotify(PR_FALSE);
|
||||
static_cast<nsNPAPIPluginStreamListener*>(listener.get())->SetCallNotify(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1000,7 +1000,7 @@ _geturlnotify(NPP npp, const char* relativeURL, const char* target,
|
||||
PluginDestructionGuard guard(npp);
|
||||
|
||||
return MakeNewNPAPIStreamInternal(npp, relativeURL, target,
|
||||
eNPPStreamTypeInternal_Get, PR_TRUE,
|
||||
eNPPStreamTypeInternal_Get, true,
|
||||
notifyData);
|
||||
}
|
||||
|
||||
@ -1024,7 +1024,7 @@ _posturlnotify(NPP npp, const char *relativeURL, const char *target,
|
||||
PluginDestructionGuard guard(npp);
|
||||
|
||||
return MakeNewNPAPIStreamInternal(npp, relativeURL, target,
|
||||
eNPPStreamTypeInternal_Post, PR_TRUE,
|
||||
eNPPStreamTypeInternal_Post, true,
|
||||
notifyData, len, buf, file);
|
||||
}
|
||||
|
||||
@ -1044,7 +1044,7 @@ _posturl(NPP npp, const char *relativeURL, const char *target,
|
||||
PluginDestructionGuard guard(npp);
|
||||
|
||||
return MakeNewNPAPIStreamInternal(npp, relativeURL, target,
|
||||
eNPPStreamTypeInternal_Post, PR_FALSE, nsnull,
|
||||
eNPPStreamTypeInternal_Post, false, nsnull,
|
||||
len, buf, file);
|
||||
}
|
||||
|
||||
@ -1208,7 +1208,7 @@ _memflush(uint32_t size)
|
||||
}
|
||||
NPN_PLUGIN_LOG(PLUGIN_LOG_NOISY, ("NPN_MemFlush: size=%d\n", size));
|
||||
|
||||
nsMemory::HeapMinimize(PR_TRUE);
|
||||
nsMemory::HeapMinimize(true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1761,7 +1761,7 @@ _getproperty(NPP npp, NPObject* npobj, NPIdentifier property,
|
||||
|
||||
bool javaCompatible = false;
|
||||
if (NS_FAILED(NS_CheckIsJavaCompatibleURLString(url, &javaCompatible)))
|
||||
javaCompatible = PR_FALSE;
|
||||
javaCompatible = false;
|
||||
if (javaCompatible)
|
||||
return true;
|
||||
|
||||
@ -2025,12 +2025,12 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
|
||||
nsNPAPIPluginInstance *inst = (nsNPAPIPluginInstance *) npp->ndata;
|
||||
bool windowless = false;
|
||||
inst->IsWindowless(&windowless);
|
||||
NPBool needXEmbed = PR_FALSE;
|
||||
NPBool needXEmbed = false;
|
||||
if (!windowless) {
|
||||
res = inst->GetValueFromPlugin(NPPVpluginNeedsXEmbed, &needXEmbed);
|
||||
// If the call returned an error code make sure we still use our default value.
|
||||
if (NS_FAILED(res)) {
|
||||
needXEmbed = PR_FALSE;
|
||||
needXEmbed = false;
|
||||
}
|
||||
}
|
||||
if (windowless || needXEmbed) {
|
||||
@ -2079,7 +2079,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
|
||||
#endif
|
||||
|
||||
case NPNVjavascriptEnabledBool: {
|
||||
*(NPBool*)result = PR_FALSE;
|
||||
*(NPBool*)result = false;
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (prefs) {
|
||||
bool js = false;;
|
||||
@ -2091,7 +2091,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
|
||||
}
|
||||
|
||||
case NPNVasdEnabledBool:
|
||||
*(NPBool*)result = PR_FALSE;
|
||||
*(NPBool*)result = false;
|
||||
return NPERR_NO_ERROR;
|
||||
|
||||
case NPNVisOfflineBool: {
|
||||
@ -2124,14 +2124,14 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
|
||||
|
||||
case NPNVSupportsXEmbedBool: {
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
*(NPBool*)result = PR_TRUE;
|
||||
*(NPBool*)result = true;
|
||||
#elif defined(MOZ_WIDGET_QT)
|
||||
// Desktop Flash fail to initialize if browser does not support NPNVSupportsXEmbedBool
|
||||
// even when wmode!=windowed, lets return fake support
|
||||
fprintf(stderr, "Fake support for XEmbed plugins in Qt port\n");
|
||||
*(NPBool*)result = PR_TRUE;
|
||||
*(NPBool*)result = true;
|
||||
#else
|
||||
*(NPBool*)result = PR_FALSE;
|
||||
*(NPBool*)result = false;
|
||||
#endif
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
@ -2151,9 +2151,9 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
|
||||
case NPNVSupportsWindowless: {
|
||||
#if defined(XP_WIN) || defined(XP_MACOSX) || \
|
||||
(defined(MOZ_X11) && (defined(MOZ_WIDGET_GTK2) || defined(MOZ_WIDGET_QT)))
|
||||
*(NPBool*)result = PR_TRUE;
|
||||
*(NPBool*)result = true;
|
||||
#else
|
||||
*(NPBool*)result = PR_FALSE;
|
||||
*(NPBool*)result = false;
|
||||
#endif
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
@ -2227,26 +2227,26 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
|
||||
|
||||
#ifndef NP_NO_QUICKDRAW
|
||||
case NPNVsupportsQuickDrawBool: {
|
||||
*(NPBool*)result = PR_TRUE;
|
||||
*(NPBool*)result = true;
|
||||
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
case NPNVsupportsCoreGraphicsBool: {
|
||||
*(NPBool*)result = PR_TRUE;
|
||||
*(NPBool*)result = true;
|
||||
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
|
||||
case NPNVsupportsCoreAnimationBool: {
|
||||
*(NPBool*)result = PR_TRUE;
|
||||
*(NPBool*)result = true;
|
||||
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
|
||||
case NPNVsupportsInvalidatingCoreAnimationBool: {
|
||||
*(NPBool*)result = PR_TRUE;
|
||||
*(NPBool*)result = true;
|
||||
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
@ -2254,13 +2254,13 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
|
||||
|
||||
#ifndef NP_NO_CARBON
|
||||
case NPNVsupportsCarbonBool: {
|
||||
*(NPBool*)result = PR_TRUE;
|
||||
*(NPBool*)result = true;
|
||||
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
#endif
|
||||
case NPNVsupportsCocoaBool: {
|
||||
*(NPBool*)result = PR_TRUE;
|
||||
*(NPBool*)result = true;
|
||||
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
@ -2830,7 +2830,7 @@ _convertpoint(NPP instance, double sourceX, double sourceY, NPCoordinateSpace so
|
||||
{
|
||||
nsNPAPIPluginInstance *inst = (nsNPAPIPluginInstance *)instance->ndata;
|
||||
if (!inst)
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
return inst->ConvertPoint(sourceX, sourceY, sourceSpace, destX, destY, destSpace);
|
||||
}
|
||||
|
@ -92,19 +92,19 @@ nsNPAPIPluginInstance::nsNPAPIPluginInstance(nsNPAPIPlugin* plugin)
|
||||
mDrawingModel(0),
|
||||
#endif
|
||||
mRunning(NOT_STARTED),
|
||||
mWindowless(PR_FALSE),
|
||||
mWindowlessLocal(PR_FALSE),
|
||||
mTransparent(PR_FALSE),
|
||||
mUsesDOMForCursor(PR_FALSE),
|
||||
mInPluginInitCall(PR_FALSE),
|
||||
mWindowless(false),
|
||||
mWindowlessLocal(false),
|
||||
mTransparent(false),
|
||||
mUsesDOMForCursor(false),
|
||||
mInPluginInitCall(false),
|
||||
mPlugin(plugin),
|
||||
mMIMEType(nsnull),
|
||||
mOwner(nsnull),
|
||||
mCurrentPluginEvent(nsnull),
|
||||
#if defined(MOZ_X11) || defined(XP_WIN) || defined(XP_MACOSX)
|
||||
mUsePluginLayersPref(PR_TRUE)
|
||||
mUsePluginLayersPref(true)
|
||||
#else
|
||||
mUsePluginLayersPref(PR_FALSE)
|
||||
mUsePluginLayersPref(false)
|
||||
#endif
|
||||
{
|
||||
NS_ASSERTION(mPlugin != NULL, "Plugin is required when creating an instance.");
|
||||
@ -404,7 +404,7 @@ nsNPAPIPluginInstance::InitializePlugin()
|
||||
}
|
||||
|
||||
bool oldVal = mInPluginInitCall;
|
||||
mInPluginInitCall = PR_TRUE;
|
||||
mInPluginInitCall = true;
|
||||
|
||||
// Need this on the stack before calling NPP_New otherwise some callbacks that
|
||||
// the plugin may make could fail (NPN_HasProperty, for example).
|
||||
@ -467,7 +467,7 @@ nsresult nsNPAPIPluginInstance::SetWindow(NPWindow* window)
|
||||
PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("nsNPAPIPluginInstance::SetWindow (about to call it) this=%p\n",this));
|
||||
|
||||
bool oldVal = mInPluginInitCall;
|
||||
mInPluginInitCall = PR_TRUE;
|
||||
mInPluginInitCall = true;
|
||||
|
||||
NPPAutoPusher nppPusher(&mNPP);
|
||||
|
||||
@ -666,7 +666,7 @@ NPError nsNPAPIPluginInstance::SetWindowless(bool aWindowless)
|
||||
// PluginInstanceChild::InitQuirksMode.
|
||||
NS_NAMED_LITERAL_CSTRING(silverlight, "application/x-silverlight");
|
||||
if (!PL_strncasecmp(mMIMEType, silverlight.get(), silverlight.Length())) {
|
||||
mTransparent = PR_TRUE;
|
||||
mTransparent = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -726,7 +726,7 @@ void nsNPAPIPluginInstance::SetDrawingModel(PRUint32 aModel)
|
||||
class SurfaceGetter : public nsRunnable {
|
||||
public:
|
||||
SurfaceGetter(NPPluginFuncs* aPluginFunctions, NPP_t aNPP) :
|
||||
mHaveSurface(PR_FALSE), mPluginFunctions(aPluginFunctions), mNPP(aNPP) {
|
||||
mHaveSurface(false), mPluginFunctions(aPluginFunctions), mNPP(aNPP) {
|
||||
mLock = new Mutex("SurfaceGetter::Lock");
|
||||
mCondVar = new CondVar(*mLock, "SurfaceGetter::CondVar");
|
||||
|
||||
@ -738,13 +738,13 @@ public:
|
||||
nsresult Run() {
|
||||
MutexAutoLock lock(*mLock);
|
||||
(*mPluginFunctions->getvalue)(&mNPP, kJavaSurface_ANPGetValue, &mSurface);
|
||||
mHaveSurface = PR_TRUE;
|
||||
mHaveSurface = true;
|
||||
mCondVar->Notify();
|
||||
return NS_OK;
|
||||
}
|
||||
void* GetSurface() {
|
||||
MutexAutoLock lock(*mLock);
|
||||
mHaveSurface = PR_FALSE;
|
||||
mHaveSurface = false;
|
||||
AndroidBridge::Bridge()->PostToJavaThread(this);
|
||||
while (!mHaveSurface)
|
||||
mCondVar->Wait();
|
||||
@ -878,7 +878,7 @@ nsNPAPIPluginInstance::IsWindowless(bool* isWindowless)
|
||||
{
|
||||
#ifdef ANDROID
|
||||
// On android, pre-honeycomb, all plugins are treated as windowless.
|
||||
*isWindowless = PR_TRUE;
|
||||
*isWindowless = true;
|
||||
#else
|
||||
*isWindowless = mWindowless;
|
||||
#endif
|
||||
@ -1057,7 +1057,7 @@ nsNPAPIPluginInstance::PushPopupsEnabledState(bool aEnabled)
|
||||
|
||||
PopupControlState oldState =
|
||||
window->PushPopupControlState(aEnabled ? openAllowed : openAbused,
|
||||
PR_TRUE);
|
||||
true);
|
||||
|
||||
if (!mPopupStates.AppendElement(oldState)) {
|
||||
// Appending to our state stack failed, pop what we just pushed.
|
||||
@ -1172,9 +1172,9 @@ PluginTimerCallback(nsITimer *aTimer, void *aClosure)
|
||||
|
||||
// Some plugins (Flash on Android) calls unscheduletimer
|
||||
// from this callback.
|
||||
t->inCallback = PR_TRUE;
|
||||
t->inCallback = true;
|
||||
(*(t->callback))(npp, id);
|
||||
t->inCallback = PR_FALSE;
|
||||
t->inCallback = false;
|
||||
|
||||
// Make sure we still have an instance and the timer is still alive
|
||||
// after the callback.
|
||||
@ -1208,7 +1208,7 @@ nsNPAPIPluginInstance::ScheduleTimer(uint32_t interval, NPBool repeat, void (*ti
|
||||
{
|
||||
nsNPAPITimer *newTimer = new nsNPAPITimer();
|
||||
|
||||
newTimer->inCallback = PR_FALSE;
|
||||
newTimer->inCallback = false;
|
||||
newTimer->npp = &mNPP;
|
||||
|
||||
// generate ID that is unique to this instance
|
||||
@ -1280,7 +1280,7 @@ nsNPAPIPluginInstance::ConvertPoint(double sourceX, double sourceY, NPCoordinate
|
||||
if (mOwner)
|
||||
return mOwner->ConvertPoint(sourceX, sourceY, sourceSpace, destX, destY, destSpace);
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -1452,7 +1452,7 @@ CarbonEventModelFailureEvent::Run()
|
||||
{
|
||||
nsString type = NS_LITERAL_STRING("npapi-carbon-event-model-failure");
|
||||
nsContentUtils::DispatchTrustedEvent(mContent->GetDocument(), mContent,
|
||||
type, PR_TRUE, PR_TRUE);
|
||||
type, true, true);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ nsPluginStreamToFile::WriteSegments(nsReadSegmentFun reader, void * closure,
|
||||
NS_IMETHODIMP
|
||||
nsPluginStreamToFile::IsNonBlocking(bool *aNonBlocking)
|
||||
{
|
||||
*aNonBlocking = PR_FALSE;
|
||||
*aNonBlocking = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -154,14 +154,14 @@ mStreamListenerPeer(nsnull),
|
||||
mStreamBufferSize(0),
|
||||
mStreamBufferByteCount(0),
|
||||
mStreamType(NP_NORMAL),
|
||||
mStreamStarted(PR_FALSE),
|
||||
mStreamCleanedUp(PR_FALSE),
|
||||
mCallNotify(notifyData ? PR_TRUE : PR_FALSE),
|
||||
mIsSuspended(PR_FALSE),
|
||||
mStreamStarted(false),
|
||||
mStreamCleanedUp(false),
|
||||
mCallNotify(notifyData ? true : false),
|
||||
mIsSuspended(false),
|
||||
mIsPluginInitJSStream(mInst->mInPluginInitCall &&
|
||||
aURL && strncmp(aURL, "javascript:",
|
||||
sizeof("javascript:") - 1) == 0),
|
||||
mRedirectDenied(PR_FALSE),
|
||||
mRedirectDenied(false),
|
||||
mResponseHeaderBuf(nsnull)
|
||||
{
|
||||
memset(&mNPStream, 0, sizeof(mNPStream));
|
||||
@ -201,7 +201,7 @@ nsNPAPIPluginStreamListener::CleanUpStream(NPReason reason)
|
||||
if (mStreamCleanedUp)
|
||||
return NS_OK;
|
||||
|
||||
mStreamCleanedUp = PR_TRUE;
|
||||
mStreamCleanedUp = true;
|
||||
|
||||
StopDataPump();
|
||||
|
||||
@ -246,7 +246,7 @@ nsNPAPIPluginStreamListener::CleanUpStream(NPReason reason)
|
||||
rv = NS_OK;
|
||||
}
|
||||
|
||||
mStreamStarted = PR_FALSE;
|
||||
mStreamStarted = false;
|
||||
|
||||
// fire notification back to plugin, just like before
|
||||
CallURLNotify(reason);
|
||||
@ -262,7 +262,7 @@ nsNPAPIPluginStreamListener::CallURLNotify(NPReason reason)
|
||||
|
||||
PluginDestructionGuard guard(mInst);
|
||||
|
||||
mCallNotify = PR_FALSE; // only do this ONCE and prevent recursion
|
||||
mCallNotify = false; // only do this ONCE and prevent recursion
|
||||
|
||||
nsNPAPIPlugin* plugin = mInst->GetPlugin();
|
||||
if (!plugin || !plugin->GetLibrary())
|
||||
@ -357,7 +357,7 @@ nsNPAPIPluginStreamListener::OnStartBinding(nsIPluginStreamInfo* pluginInfo)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
mStreamStarted = PR_TRUE;
|
||||
mStreamStarted = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -378,7 +378,7 @@ nsNPAPIPluginStreamListener::SuspendRequest()
|
||||
if (NS_FAILED(rv))
|
||||
return;
|
||||
|
||||
mIsSuspended = PR_TRUE;
|
||||
mIsSuspended = true;
|
||||
|
||||
pluginInfoNPAPI->SuspendRequests();
|
||||
}
|
||||
@ -391,7 +391,7 @@ nsNPAPIPluginStreamListener::ResumeRequest()
|
||||
|
||||
pluginInfoNPAPI->ResumeRequests();
|
||||
|
||||
mIsSuspended = PR_FALSE;
|
||||
mIsSuspended = false;
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -422,16 +422,16 @@ bool
|
||||
nsNPAPIPluginStreamListener::PluginInitJSLoadInProgress()
|
||||
{
|
||||
if (!mInst)
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
nsTArray<nsNPAPIPluginStreamListener*> *streamListeners = mInst->StreamListeners();
|
||||
for (unsigned int i = 0; i < streamListeners->Length(); i++) {
|
||||
if (streamListeners->ElementAt(i)->mIsPluginInitJSStream) {
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// This method is called when there's more data available off the
|
||||
@ -890,7 +890,7 @@ nsNPAPIPluginStreamListener::URLRedirectResponse(NPBool allow)
|
||||
{
|
||||
if (mHTTPRedirectCallback) {
|
||||
mHTTPRedirectCallback->OnRedirectVerifyCallback(allow ? NS_OK : NS_ERROR_FAILURE);
|
||||
mRedirectDenied = allow ? PR_FALSE : PR_TRUE;
|
||||
mRedirectDenied = allow ? false : true;
|
||||
mHTTPRedirectCallback = nsnull;
|
||||
}
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ nsPluginDirServiceProvider::GetFile(const char *charProp, bool *persistant,
|
||||
NS_ENSURE_ARG(charProp);
|
||||
|
||||
*_retval = nsnull;
|
||||
*persistant = PR_FALSE;
|
||||
*persistant = false;
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (!prefs)
|
||||
@ -310,7 +310,7 @@ nsPluginDirServiceProvider::GetFile(const char *charProp, bool *persistant,
|
||||
newestPath += NS_LITERAL_STRING("\\bin\\new_plugin");
|
||||
|
||||
rv = NS_NewLocalFile(newestPath,
|
||||
PR_TRUE, getter_AddRefs(localFile));
|
||||
true, getter_AddRefs(localFile));
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsIWindowsRegKey> newKey =
|
||||
@ -366,7 +366,7 @@ nsPluginDirServiceProvider::GetFile(const char *charProp, bool *persistant,
|
||||
rv = regKey->ReadStringValue(NS_LITERAL_STRING("InstallDir"), path);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
path += NS_LITERAL_STRING("\\Plugins");
|
||||
rv = NS_NewLocalFile(path, PR_TRUE,
|
||||
rv = NS_NewLocalFile(path, true,
|
||||
getter_AddRefs(localFile));
|
||||
}
|
||||
}
|
||||
@ -404,7 +404,7 @@ nsPluginDirServiceProvider::GetFile(const char *charProp, bool *persistant,
|
||||
rv = regKey->ReadStringValue(NS_LITERAL_STRING("Installation Directory"),
|
||||
path);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = NS_NewLocalFile(path, PR_TRUE,
|
||||
rv = NS_NewLocalFile(path, true,
|
||||
getter_AddRefs(localFile));
|
||||
}
|
||||
}
|
||||
@ -469,7 +469,7 @@ nsPluginDirServiceProvider::GetFile(const char *charProp, bool *persistant,
|
||||
|
||||
if (!newestPath.IsEmpty()) {
|
||||
newestPath += NS_LITERAL_STRING("\\browser");
|
||||
rv = NS_NewLocalFile(newestPath, PR_TRUE,
|
||||
rv = NS_NewLocalFile(newestPath, true,
|
||||
getter_AddRefs(localFile));
|
||||
}
|
||||
}
|
||||
@ -521,7 +521,7 @@ nsPluginDirServiceProvider::GetPLIDDirectoriesWithRootKey(PRUint32 aKey, nsCOMAr
|
||||
rv = childKey->ReadStringValue(NS_LITERAL_STRING("Path"), path);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsILocalFile> localFile;
|
||||
if (NS_SUCCEEDED(NS_NewLocalFile(path, PR_TRUE,
|
||||
if (NS_SUCCEEDED(NS_NewLocalFile(path, true,
|
||||
getter_AddRefs(localFile))) &&
|
||||
localFile) {
|
||||
// Some vendors use a path directly to the DLL so chop off
|
||||
|
@ -271,10 +271,10 @@ bool ReadSectionHeader(nsPluginManifestLineReader& reader, const char *token)
|
||||
if (PL_strcmp(values[0]+1, token)) {
|
||||
break; // it's wrong token
|
||||
}
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
} while (reader.NextLine());
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Little helper struct to asynchronously reframe any presentations (embedded)
|
||||
@ -337,7 +337,7 @@ static bool UnloadPluginsASAP()
|
||||
}
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// helper struct for asynchronous handling of plugin unloading
|
||||
@ -377,7 +377,7 @@ nsresult nsPluginHost::PostPluginUnloadEvent(PRLibrary* aLibrary)
|
||||
}
|
||||
|
||||
nsPluginHost::nsPluginHost()
|
||||
// No need to initialize members to nsnull, PR_FALSE etc because this class
|
||||
// No need to initialize members to nsnull, false etc because this class
|
||||
// has a zeroing operator new.
|
||||
{
|
||||
// check to see if pref is set at startup to let plugins take over in
|
||||
@ -400,8 +400,8 @@ nsPluginHost::nsPluginHost()
|
||||
nsCOMPtr<nsIObserverService> obsService =
|
||||
mozilla::services::GetObserverService();
|
||||
if (obsService) {
|
||||
obsService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_FALSE);
|
||||
obsService->AddObserver(this, NS_PRIVATE_BROWSING_SWITCH_TOPIC, PR_FALSE);
|
||||
obsService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
|
||||
obsService->AddObserver(this, NS_PRIVATE_BROWSING_SWITCH_TOPIC, false);
|
||||
}
|
||||
|
||||
#ifdef PLUGIN_LOGGING
|
||||
@ -454,7 +454,7 @@ nsPluginHost::GetInst()
|
||||
bool nsPluginHost::IsRunningPlugin(nsPluginTag * plugin)
|
||||
{
|
||||
if (!plugin || !plugin->mEntryPoint) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (PRUint32 i = 0; i < mInstances.Length(); i++) {
|
||||
@ -462,11 +462,11 @@ bool nsPluginHost::IsRunningPlugin(nsPluginTag * plugin)
|
||||
if (instance &&
|
||||
instance->GetPlugin() == plugin->mEntryPoint &&
|
||||
instance->IsRunning()) {
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
nsresult nsPluginHost::ReloadPlugins(bool reloadPages)
|
||||
@ -488,10 +488,10 @@ nsresult nsPluginHost::ReloadPlugins(bool reloadPages)
|
||||
|
||||
// check if plugins changed, no need to do anything else
|
||||
// if no changes to plugins have been made
|
||||
// PR_FALSE instructs not to touch the plugin list, just to
|
||||
// false instructs not to touch the plugin list, just to
|
||||
// look for possible changes
|
||||
bool pluginschanged = true;
|
||||
FindPlugins(PR_FALSE, &pluginschanged);
|
||||
FindPlugins(false, &pluginschanged);
|
||||
|
||||
// if no changed detected, return an appropriate error code
|
||||
if (!pluginschanged)
|
||||
@ -534,7 +534,7 @@ nsresult nsPluginHost::ReloadPlugins(bool reloadPages)
|
||||
}
|
||||
|
||||
// set flags
|
||||
mPluginsLoaded = PR_FALSE;
|
||||
mPluginsLoaded = false;
|
||||
|
||||
// load them again
|
||||
rv = LoadPlugins();
|
||||
@ -840,7 +840,7 @@ nsresult nsPluginHost::FindProxyForURL(const char* url, char* *result)
|
||||
// very little is probably broken by this
|
||||
*result = PR_smprintf("SOCKS %s:%d", host.get(), port);
|
||||
} else {
|
||||
NS_ASSERTION(PR_FALSE, "Unknown proxy type!");
|
||||
NS_ASSERTION(false, "Unknown proxy type!");
|
||||
*result = PL_strdup("DIRECT");
|
||||
}
|
||||
|
||||
@ -862,7 +862,7 @@ nsresult nsPluginHost::Destroy()
|
||||
if (mIsDestroyed)
|
||||
return NS_OK;
|
||||
|
||||
mIsDestroyed = PR_TRUE;
|
||||
mIsDestroyed = true;
|
||||
|
||||
// we should call nsIPluginInstance::Stop and nsIPluginInstance::SetWindow
|
||||
// for those plugins who want it
|
||||
@ -879,7 +879,7 @@ nsresult nsPluginHost::Destroy()
|
||||
|
||||
// Lets remove any of the temporary files that we created.
|
||||
if (sPluginTempDir) {
|
||||
sPluginTempDir->Remove(PR_TRUE);
|
||||
sPluginTempDir->Remove(true);
|
||||
NS_RELEASE(sPluginTempDir);
|
||||
}
|
||||
|
||||
@ -903,7 +903,7 @@ void nsPluginHost::OnPluginInstanceDestroyed(nsPluginTag* aPluginTag)
|
||||
bool hasInstance = false;
|
||||
for (PRUint32 i = 0; i < mInstances.Length(); i++) {
|
||||
if (TagForPlugin(mInstances[i]->GetPlugin()) == aPluginTag) {
|
||||
hasInstance = PR_TRUE;
|
||||
hasInstance = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1033,7 +1033,7 @@ nsPluginHost::InstantiateEmbeddedPlugin(const char *aMimeType, nsIURI* aURL,
|
||||
}
|
||||
|
||||
bool isJava = false;
|
||||
nsPluginTag* pluginTag = FindPluginForType(aMimeType, PR_TRUE);
|
||||
nsPluginTag* pluginTag = FindPluginForType(aMimeType, true);
|
||||
if (pluginTag) {
|
||||
isJava = pluginTag->mIsJavaPlugin;
|
||||
}
|
||||
@ -1051,7 +1051,7 @@ nsPluginHost::InstantiateEmbeddedPlugin(const char *aMimeType, nsIURI* aURL,
|
||||
ToLowerCase(contractID);
|
||||
nsCOMPtr<nsIProtocolHandler> handler = do_GetService(contractID.get());
|
||||
if (handler)
|
||||
bCanHandleInternally = PR_TRUE;
|
||||
bCanHandleInternally = true;
|
||||
}
|
||||
|
||||
// if we don't have a MIME type at this point, we still have one more chance by
|
||||
@ -1203,7 +1203,7 @@ nsresult nsPluginHost::SetUpPluginInstance(const char *aMimeType,
|
||||
|
||||
// ReloadPlugins will do the job smartly: nothing will be done
|
||||
// if no changes detected, in such a case just return
|
||||
if (NS_ERROR_PLUGINS_PLUGINSNOTCHANGED == ReloadPlugins(PR_FALSE))
|
||||
if (NS_ERROR_PLUGINS_PLUGINSNOTCHANGED == ReloadPlugins(false))
|
||||
return rv;
|
||||
|
||||
// other failure return codes may be not fatal, so we can still try
|
||||
@ -1236,7 +1236,7 @@ nsPluginHost::TrySetUpPluginInstance(const char *aMimeType,
|
||||
|
||||
// if don't have a mimetype or no plugin can handle this mimetype
|
||||
// check by file extension
|
||||
nsPluginTag* pluginTag = FindPluginForType(aMimeType, PR_TRUE);
|
||||
nsPluginTag* pluginTag = FindPluginForType(aMimeType, true);
|
||||
if (!pluginTag) {
|
||||
nsCOMPtr<nsIURL> url = do_QueryInterface(aURL);
|
||||
if (!url) return NS_ERROR_FAILURE;
|
||||
@ -1329,13 +1329,13 @@ nsPluginHost::TrySetUpPluginInstance(const char *aMimeType,
|
||||
nsresult
|
||||
nsPluginHost::IsPluginEnabledForType(const char* aMimeType)
|
||||
{
|
||||
nsPluginTag *plugin = FindPluginForType(aMimeType, PR_TRUE);
|
||||
nsPluginTag *plugin = FindPluginForType(aMimeType, true);
|
||||
if (plugin)
|
||||
return NS_OK;
|
||||
|
||||
// Pass PR_FALSE as the second arg so we can return NS_ERROR_PLUGIN_DISABLED
|
||||
// Pass false as the second arg so we can return NS_ERROR_PLUGIN_DISABLED
|
||||
// for disabled plug-ins.
|
||||
plugin = FindPluginForType(aMimeType, PR_FALSE);
|
||||
plugin = FindPluginForType(aMimeType, false);
|
||||
if (!plugin)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
@ -1672,7 +1672,7 @@ nsresult nsPluginHost::GetPlugin(const char *aMimeType, nsNPAPIPlugin** aPlugin)
|
||||
// If plugins haven't been scanned yet, do so now
|
||||
LoadPlugins();
|
||||
|
||||
nsPluginTag* pluginTag = FindPluginForType(aMimeType, PR_TRUE);
|
||||
nsPluginTag* pluginTag = FindPluginForType(aMimeType, true);
|
||||
if (pluginTag) {
|
||||
rv = NS_OK;
|
||||
PLUGIN_LOG(PLUGIN_LOG_BASIC,
|
||||
@ -1921,10 +1921,10 @@ nsPluginHost::IsLiveTag(nsIPluginTag* aPluginTag)
|
||||
nsPluginTag* tag;
|
||||
for (tag = mPlugins; tag; tag = tag->mNext) {
|
||||
if (tag == aPluginTag) {
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
nsPluginTag * nsPluginHost::HaveSamePlugin(nsPluginTag * aPluginTag)
|
||||
@ -1946,16 +1946,16 @@ bool nsPluginHost::IsDuplicatePlugin(nsPluginTag * aPluginTag)
|
||||
// if those are not equal, we have the same plugin with different path,
|
||||
// i.e. duplicate, return true
|
||||
if (!tag->mFileName.Equals(aPluginTag->mFileName))
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
|
||||
// if they are equal, compare mFullPath fields just in case
|
||||
// mFileName contained leaf name only, and if not equal, return true
|
||||
if (!tag->mFullPath.Equals(aPluginTag->mFullPath))
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// we do not have it at all, return false
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
typedef NS_NPAPIPLUGIN_CALLBACK(char *, NP_GETMIMEDESCRIPTION)(void);
|
||||
@ -1967,7 +1967,7 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
|
||||
NS_ENSURE_ARG_POINTER(aPluginsChanged);
|
||||
nsresult rv;
|
||||
|
||||
*aPluginsChanged = PR_FALSE;
|
||||
*aPluginsChanged = false;
|
||||
|
||||
#ifdef PLUGIN_LOGGING
|
||||
nsCAutoString dirPath;
|
||||
@ -2024,7 +2024,7 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
|
||||
bool enabled = true;
|
||||
bool seenBefore = false;
|
||||
if (pluginTag) {
|
||||
seenBefore = PR_TRUE;
|
||||
seenBefore = true;
|
||||
// If plugin changed, delete cachedPluginTag and don't use cache
|
||||
if (LL_NE(fileModTime, pluginTag->mLastModifiedTime)) {
|
||||
// Plugins has changed. Don't use cached plugin info.
|
||||
@ -2032,7 +2032,7 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
|
||||
pluginTag = nsnull;
|
||||
|
||||
// plugin file changed, flag this fact
|
||||
*aPluginsChanged = PR_TRUE;
|
||||
*aPluginsChanged = true;
|
||||
}
|
||||
else {
|
||||
// if it is unwanted plugin we are checking for, get it back to the cache info list
|
||||
@ -2040,7 +2040,7 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
|
||||
if (IsDuplicatePlugin(pluginTag)) {
|
||||
if (!pluginTag->HasFlag(NS_PLUGIN_FLAG_UNWANTED)) {
|
||||
// Plugin switched from wanted to unwanted
|
||||
*aPluginsChanged = PR_TRUE;
|
||||
*aPluginsChanged = true;
|
||||
}
|
||||
pluginTag->Mark(NS_PLUGIN_FLAG_UNWANTED);
|
||||
pluginTag->mNext = mCachedPlugins;
|
||||
@ -2048,7 +2048,7 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
|
||||
} else if (pluginTag->HasFlag(NS_PLUGIN_FLAG_UNWANTED)) {
|
||||
pluginTag->UnMark(NS_PLUGIN_FLAG_UNWANTED);
|
||||
// Plugin switched from unwanted to wanted
|
||||
*aPluginsChanged = PR_TRUE;
|
||||
*aPluginsChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2104,7 +2104,7 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
|
||||
mInvalidPlugins = invalidTag;
|
||||
|
||||
// Mark aPluginsChanged so pluginreg is rewritten
|
||||
*aPluginsChanged = PR_TRUE;
|
||||
*aPluginsChanged = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -2128,9 +2128,9 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
|
||||
if (state == nsIBlocklistService::STATE_BLOCKED)
|
||||
pluginTag->Mark(NS_PLUGIN_FLAG_BLOCKLISTED);
|
||||
else if (state == nsIBlocklistService::STATE_SOFTBLOCKED && !seenBefore)
|
||||
enabled = PR_FALSE;
|
||||
enabled = false;
|
||||
else if (state == nsIBlocklistService::STATE_OUTDATED && !seenBefore)
|
||||
warnOutdated = PR_TRUE;
|
||||
warnOutdated = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2164,14 +2164,14 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
|
||||
// we cannot get here if the plugin has just been added
|
||||
// and thus |pluginTag| is not from cache, because otherwise
|
||||
// it would not be present in the list;
|
||||
bAddIt = PR_FALSE;
|
||||
bAddIt = false;
|
||||
}
|
||||
|
||||
// do it if we still want it
|
||||
if (bAddIt) {
|
||||
if (!seenBefore) {
|
||||
// We have a valid new plugin so report that plugins have changed.
|
||||
*aPluginsChanged = PR_TRUE;
|
||||
*aPluginsChanged = true;
|
||||
}
|
||||
|
||||
// If we're not creating a plugin list, simply looking for changes,
|
||||
@ -2215,7 +2215,7 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
|
||||
}
|
||||
|
||||
if (warnOutdated) {
|
||||
mPrefService->SetBoolPref("plugins.update.notifyUser", PR_TRUE);
|
||||
mPrefService->SetBoolPref("plugins.update.notifyUser", true);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -2240,7 +2240,7 @@ nsresult nsPluginHost::ScanPluginsDirectoryList(nsISimpleEnumerator *dirEnum,
|
||||
ScanPluginsDirectory(nextDir, aCreatePluginList, &pluginschanged);
|
||||
|
||||
if (pluginschanged)
|
||||
*aPluginsChanged = PR_TRUE;
|
||||
*aPluginsChanged = true;
|
||||
|
||||
// if changes are detected and we are not creating the list, do not proceed
|
||||
if (!aCreatePluginList && *aPluginsChanged)
|
||||
@ -2260,7 +2260,7 @@ nsresult nsPluginHost::LoadPlugins()
|
||||
return NS_OK;
|
||||
|
||||
bool pluginschanged;
|
||||
nsresult rv = FindPlugins(PR_TRUE, &pluginschanged);
|
||||
nsresult rv = FindPlugins(true, &pluginschanged);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
@ -2289,7 +2289,7 @@ nsresult nsPluginHost::FindPlugins(bool aCreatePluginList, bool * aPluginsChange
|
||||
|
||||
NS_ENSURE_ARG_POINTER(aPluginsChanged);
|
||||
|
||||
*aPluginsChanged = PR_FALSE;
|
||||
*aPluginsChanged = false;
|
||||
nsresult rv;
|
||||
|
||||
// Read cached plugins info. If the profile isn't yet available then don't
|
||||
@ -2320,7 +2320,7 @@ nsresult nsPluginHost::FindPlugins(bool aCreatePluginList, bool * aPluginsChange
|
||||
ScanPluginsDirectoryList(dirList, aCreatePluginList, &pluginschanged);
|
||||
|
||||
if (pluginschanged)
|
||||
*aPluginsChanged = PR_TRUE;
|
||||
*aPluginsChanged = true;
|
||||
|
||||
// if we are just looking for possible changes,
|
||||
// no need to proceed if changes are detected
|
||||
@ -2335,7 +2335,7 @@ nsresult nsPluginHost::FindPlugins(bool aCreatePluginList, bool * aPluginsChange
|
||||
#endif
|
||||
}
|
||||
|
||||
mPluginsLoaded = PR_TRUE; // at this point 'some' plugins have been loaded,
|
||||
mPluginsLoaded = true; // at this point 'some' plugins have been loaded,
|
||||
// the rest is optional
|
||||
|
||||
#ifdef XP_WIN
|
||||
@ -2351,7 +2351,7 @@ nsresult nsPluginHost::FindPlugins(bool aCreatePluginList, bool * aPluginsChange
|
||||
ScanPluginsDirectoryList(dirList, aCreatePluginList, &pluginschanged);
|
||||
|
||||
if (pluginschanged)
|
||||
*aPluginsChanged = PR_TRUE;
|
||||
*aPluginsChanged = true;
|
||||
|
||||
// if we are just looking for possible changes,
|
||||
// no need to proceed if changes are detected
|
||||
@ -2385,7 +2385,7 @@ nsresult nsPluginHost::FindPlugins(bool aCreatePluginList, bool * aPluginsChange
|
||||
ScanPluginsDirectory(dirToScan, aCreatePluginList, &pluginschanged);
|
||||
|
||||
if (pluginschanged)
|
||||
*aPluginsChanged = PR_TRUE;
|
||||
*aPluginsChanged = true;
|
||||
|
||||
// if we are just looking for possible changes,
|
||||
// no need to proceed if changes are detected
|
||||
@ -2413,7 +2413,7 @@ nsresult nsPluginHost::FindPlugins(bool aCreatePluginList, bool * aPluginsChange
|
||||
// and therefor their info did not get removed from the cache info list during directory scan;
|
||||
// flag this fact
|
||||
if (cachecount > 0)
|
||||
*aPluginsChanged = PR_TRUE;
|
||||
*aPluginsChanged = true;
|
||||
}
|
||||
|
||||
// Remove unseen invalid plugins
|
||||
@ -2898,7 +2898,7 @@ nsPluginHost::ReadPluginInfo()
|
||||
(const char* const*)mimetypes,
|
||||
(const char* const*)mimedescriptions,
|
||||
(const char* const*)extensions,
|
||||
mimetypecount, lastmod, canunload, PR_TRUE);
|
||||
mimetypecount, lastmod, canunload, true);
|
||||
if (heapalloced)
|
||||
delete [] heapalloced;
|
||||
|
||||
@ -3063,7 +3063,7 @@ nsresult nsPluginHost::NewPluginURLStream(const nsString& aURL,
|
||||
if (scriptChannel) {
|
||||
scriptChannel->SetExecutionPolicy(nsIScriptChannel::EXECUTE_NORMAL);
|
||||
// Plug-ins seem to depend on javascript: URIs running synchronously
|
||||
scriptChannel->SetExecuteAsync(PR_FALSE);
|
||||
scriptChannel->SetExecuteAsync(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3155,8 +3155,8 @@ nsPluginHost::AddHeadersToChannel(const char *aHeadersData,
|
||||
|
||||
// Iterate over the nsString: for each "\r\n" delimited chunk,
|
||||
// add the value as a header to the nsIHTTPChannel
|
||||
while (PR_TRUE) {
|
||||
crlf = headersString.Find("\r\n", PR_TRUE);
|
||||
while (true) {
|
||||
crlf = headersString.Find("\r\n", true);
|
||||
if (-1 == crlf) {
|
||||
rv = NS_OK;
|
||||
return rv;
|
||||
@ -3175,7 +3175,7 @@ nsPluginHost::AddHeadersToChannel(const char *aHeadersData,
|
||||
|
||||
// FINALLY: we can set the header!
|
||||
|
||||
rv = aChannel->SetRequestHeader(headerName, headerValue, PR_TRUE);
|
||||
rv = aChannel->SetRequestHeader(headerName, headerValue, true);
|
||||
if (NS_FAILED(rv)) {
|
||||
rv = NS_ERROR_NULL_POINTER;
|
||||
return rv;
|
||||
@ -3401,7 +3401,7 @@ nsPluginHost::HandleBadPlugin(PRLibrary* aLibrary, nsNPAPIPluginInstance *aInsta
|
||||
|
||||
|
||||
if (NS_SUCCEEDED(rv) && checkboxState)
|
||||
mDontShowBadPluginMessage = PR_TRUE;
|
||||
mDontShowBadPluginMessage = true;
|
||||
|
||||
return rv;
|
||||
}
|
||||
@ -3571,7 +3571,7 @@ nsPluginHost::CreateTempFileToPost(const char *aPostDataURL, nsIFile **aTmpFile)
|
||||
getter_AddRefs(inFile));
|
||||
if (NS_FAILED(rv)) {
|
||||
nsCOMPtr<nsILocalFile> localFile;
|
||||
rv = NS_NewNativeLocalFile(nsDependentCString(aPostDataURL), PR_FALSE,
|
||||
rv = NS_NewNativeLocalFile(nsDependentCString(aPostDataURL), false,
|
||||
getter_AddRefs(localFile));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
inFile = localFile;
|
||||
@ -3642,7 +3642,7 @@ nsPluginHost::CreateTempFileToPost(const char *aPostDataURL, nsIFile **aTmpFile)
|
||||
if (NS_FAILED(rv) || (bw != br))
|
||||
break;
|
||||
|
||||
firstRead = PR_FALSE;
|
||||
firstRead = false;
|
||||
continue;
|
||||
}
|
||||
bw = br;
|
||||
@ -3674,9 +3674,9 @@ nsPluginHost::DeletePluginNativeWindow(nsPluginNativeWindow * aPluginNativeWindo
|
||||
nsresult
|
||||
nsPluginHost::InstantiateDummyJavaPlugin(nsIPluginInstanceOwner *aOwner)
|
||||
{
|
||||
// Pass PR_FALSE as the second arg, we want the answer to be the
|
||||
// Pass false as the second arg, we want the answer to be the
|
||||
// same here whether the Java plugin is enabled or not.
|
||||
nsPluginTag *plugin = FindPluginForType("application/x-java-vm", PR_FALSE);
|
||||
nsPluginTag *plugin = FindPluginForType("application/x-java-vm", false);
|
||||
|
||||
if (!plugin || !plugin->mIsNPRuntimeEnabledJavaPlugin) {
|
||||
// No NPRuntime enabled Java plugin found, no point in
|
||||
@ -3831,21 +3831,21 @@ CheckForDisabledWindows()
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
baseWin->GetMainWidget(getter_AddRefs(widget));
|
||||
if (widget && !widget->GetParent() &&
|
||||
NS_SUCCEEDED(widget->IsVisible(aFlag)) && aFlag == PR_TRUE &&
|
||||
NS_SUCCEEDED(widget->IsEnabled(&aFlag)) && aFlag == PR_FALSE) {
|
||||
NS_SUCCEEDED(widget->IsVisible(aFlag)) && aFlag == true &&
|
||||
NS_SUCCEEDED(widget->IsEnabled(&aFlag)) && aFlag == false) {
|
||||
nsIWidget * child = widget->GetFirstChild();
|
||||
bool enable = true;
|
||||
while (child) {
|
||||
nsWindowType aType;
|
||||
if (NS_SUCCEEDED(child->GetWindowType(aType)) &&
|
||||
aType == eWindowType_dialog) {
|
||||
enable = PR_FALSE;
|
||||
enable = false;
|
||||
break;
|
||||
}
|
||||
child = child->GetNextSibling();
|
||||
}
|
||||
if (enable) {
|
||||
widget->Enable(PR_TRUE);
|
||||
widget->Enable(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4071,12 +4071,12 @@ PluginDestructionGuard::DelayDestroy(nsNPAPIPluginInstance *aInstance)
|
||||
|
||||
while (g != &sListHead) {
|
||||
if (g->mInstance == aInstance) {
|
||||
g->mDelayedDestroy = PR_TRUE;
|
||||
g->mDelayedDestroy = true;
|
||||
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
g = static_cast<PluginDestructionGuard*>(PR_NEXT_LINK(g));
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ protected:
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Should be on the main thread");
|
||||
|
||||
mDelayedDestroy = PR_FALSE;
|
||||
mDelayedDestroy = false;
|
||||
|
||||
PR_INIT_CLIST(this);
|
||||
PR_INSERT_BEFORE(this, &sListHead);
|
||||
|
@ -163,7 +163,7 @@ public:
|
||||
{
|
||||
nsContentUtils::DispatchTrustedEvent(mContent->GetOwnerDoc(), mContent,
|
||||
mFinished ? NS_LITERAL_STRING("MozPaintWaitFinished") : NS_LITERAL_STRING("MozPaintWait"),
|
||||
PR_TRUE, PR_TRUE);
|
||||
true, true);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ nsPluginInstanceOwner::NotifyPaintWaiter(nsDisplayListBuilder* aBuilder)
|
||||
{
|
||||
// This is notification for reftests about async plugin paint start
|
||||
if (!mWaitingForPaint && !IsUpToDate() && aBuilder->ShouldSyncDecodeImages()) {
|
||||
nsCOMPtr<nsIRunnable> event = new AsyncPaintWaitEvent(mContent, PR_FALSE);
|
||||
nsCOMPtr<nsIRunnable> event = new AsyncPaintWaitEvent(mContent, false);
|
||||
// Run this event as soon as it's safe to do so, since listeners need to
|
||||
// receive it immediately
|
||||
mWaitingForPaint = nsContentUtils::AddScriptRunner(event);
|
||||
@ -218,11 +218,11 @@ nsPluginInstanceOwner::SetCurrentImage(ImageContainer* aContainer)
|
||||
}
|
||||
#endif
|
||||
aContainer->SetCurrentImage(image);
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
aContainer->SetCurrentImage(nsnull);
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
@ -308,19 +308,19 @@ nsPluginInstanceOwner::nsPluginInstanceOwner()
|
||||
memset(&mQDPluginPortCopy, 0, sizeof(NP_Port));
|
||||
#endif
|
||||
mInCGPaintLevel = 0;
|
||||
mSentInitialTopLevelWindowEvent = PR_FALSE;
|
||||
mSentInitialTopLevelWindowEvent = false;
|
||||
mColorProfile = nsnull;
|
||||
mPluginPortChanged = PR_FALSE;
|
||||
mPluginPortChanged = false;
|
||||
#endif
|
||||
mContentFocused = PR_FALSE;
|
||||
mWidgetVisible = PR_TRUE;
|
||||
mPluginWindowVisible = PR_FALSE;
|
||||
mPluginDocumentActiveState = PR_TRUE;
|
||||
mContentFocused = false;
|
||||
mWidgetVisible = true;
|
||||
mPluginWindowVisible = false;
|
||||
mPluginDocumentActiveState = true;
|
||||
mNumCachedAttrs = 0;
|
||||
mNumCachedParams = 0;
|
||||
mCachedAttrParamNames = nsnull;
|
||||
mCachedAttrParamValues = nsnull;
|
||||
mDestroyWidget = PR_FALSE;
|
||||
mDestroyWidget = false;
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#ifndef NP_NO_QUICKDRAW
|
||||
@ -330,7 +330,7 @@ nsPluginInstanceOwner::nsPluginInstanceOwner()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
mWaitingForPaint = PR_FALSE;
|
||||
mWaitingForPaint = false;
|
||||
}
|
||||
|
||||
nsPluginInstanceOwner::~nsPluginInstanceOwner()
|
||||
@ -340,7 +340,7 @@ nsPluginInstanceOwner::~nsPluginInstanceOwner()
|
||||
if (mWaitingForPaint) {
|
||||
// We don't care when the event is dispatched as long as it's "soon",
|
||||
// since whoever needs it will be waiting for it.
|
||||
nsCOMPtr<nsIRunnable> event = new AsyncPaintWaitEvent(mContent, PR_TRUE);
|
||||
nsCOMPtr<nsIRunnable> event = new AsyncPaintWaitEvent(mContent, true);
|
||||
NS_DispatchToMainThread(event);
|
||||
}
|
||||
|
||||
@ -529,7 +529,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetURL(const char *aURL,
|
||||
nsAutoPopupStatePusher popupStatePusher((PopupControlState)blockPopups);
|
||||
|
||||
rv = lh->OnLinkClick(mContent, uri, unitarget.get(),
|
||||
aPostStream, headersDataStream, PR_TRUE);
|
||||
aPostStream, headersDataStream, true);
|
||||
|
||||
return rv;
|
||||
}
|
||||
@ -594,7 +594,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::InvalidateRect(NPRect *invalidRect)
|
||||
if (mWaitingForPaint && (!mObjectFrame || IsUpToDate())) {
|
||||
// We don't care when the event is dispatched as long as it's "soon",
|
||||
// since whoever needs it will be waiting for it.
|
||||
nsCOMPtr<nsIRunnable> event = new AsyncPaintWaitEvent(mContent, PR_TRUE);
|
||||
nsCOMPtr<nsIRunnable> event = new AsyncPaintWaitEvent(mContent, true);
|
||||
NS_DispatchToMainThread(event);
|
||||
mWaitingForPaint = false;
|
||||
}
|
||||
@ -619,7 +619,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::InvalidateRect(NPRect *invalidRect)
|
||||
mWidget->Invalidate(nsIntRect(invalidRect->left, invalidRect->top,
|
||||
invalidRect->right - invalidRect->left,
|
||||
invalidRect->bottom - invalidRect->top),
|
||||
PR_FALSE);
|
||||
false);
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
@ -752,7 +752,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::SetEventModel(PRInt32 eventModel)
|
||||
NS_IMETHODIMP nsPluginInstanceOwner::SetWindow()
|
||||
{
|
||||
NS_ENSURE_TRUE(mObjectFrame, NS_ERROR_NULL_POINTER);
|
||||
return mObjectFrame->CallSetWindow(PR_FALSE);
|
||||
return mObjectFrame->CallSetWindow(false);
|
||||
}
|
||||
|
||||
NPError nsPluginInstanceOwner::ShowNativeContextMenu(NPMenu* menu, void* event)
|
||||
@ -776,13 +776,13 @@ NPBool nsPluginInstanceOwner::ConvertPoint(double sourceX, double sourceY, NPCoo
|
||||
{
|
||||
#ifdef XP_MACOSX
|
||||
if (!mWidget)
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
return NS_NPAPI_ConvertPointCocoa(mWidget->GetNativeData(NS_NATIVE_WIDGET),
|
||||
sourceX, sourceY, sourceSpace, destX, destY, destSpace);
|
||||
#else
|
||||
// we should implement this for all platforms
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1297,8 +1297,8 @@ nsresult nsPluginInstanceOwner::EnsureCachedAttrParamArrays()
|
||||
* leading or trailing white space.''
|
||||
* However, do not trim consecutive spaces as in bug 122119
|
||||
*/
|
||||
name.Trim(" \n\r\t\b", PR_TRUE, PR_TRUE, PR_FALSE);
|
||||
value.Trim(" \n\r\t\b", PR_TRUE, PR_TRUE, PR_FALSE);
|
||||
name.Trim(" \n\r\t\b", true, true, false);
|
||||
value.Trim(" \n\r\t\b", true, true, false);
|
||||
mCachedAttrParamNames [nextAttrParamIndex] = ToNewUTF8String(name);
|
||||
mCachedAttrParamValues[nextAttrParamIndex] = ToNewUTF8String(value);
|
||||
nextAttrParamIndex++;
|
||||
@ -1346,11 +1346,11 @@ NPDrawingModel nsPluginInstanceOwner::GetDrawingModel()
|
||||
bool nsPluginInstanceOwner::IsRemoteDrawingCoreAnimation()
|
||||
{
|
||||
if (!mInstance)
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
bool coreAnimation;
|
||||
if (!NS_SUCCEEDED(mInstance->IsRemoteDrawingCoreAnimation(&coreAnimation)))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
return coreAnimation;
|
||||
}
|
||||
@ -1545,7 +1545,7 @@ void* nsPluginInstanceOwner::SetPluginPortAndDetectChange()
|
||||
NP_Port* windowQDPort = static_cast<NP_Port*>(mPluginWindow->window);
|
||||
if (windowQDPort->port != mQDPluginPortCopy.port) {
|
||||
mQDPluginPortCopy.port = windowQDPort->port;
|
||||
mPluginPortChanged = PR_TRUE;
|
||||
mPluginPortChanged = true;
|
||||
}
|
||||
} else if (drawingModel == NPDrawingModelCoreGraphics ||
|
||||
drawingModel == NPDrawingModelCoreAnimation ||
|
||||
@ -1559,7 +1559,7 @@ void* nsPluginInstanceOwner::SetPluginPortAndDetectChange()
|
||||
(windowCGPort->window != mCGPluginPortCopy.window)) {
|
||||
mCGPluginPortCopy.context = windowCGPort->context;
|
||||
mCGPluginPortCopy.window = windowCGPort->window;
|
||||
mPluginPortChanged = PR_TRUE;
|
||||
mPluginPortChanged = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1691,7 +1691,7 @@ nsresult nsPluginInstanceOwner::DispatchFocusToPlugin(nsIDOMEvent* aFocusEvent)
|
||||
event.data.lifecycle.action = kLoseFocus_ANPLifecycleAction;
|
||||
}
|
||||
else {
|
||||
NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchFocusToPlugin, wierd eventType");
|
||||
NS_ASSERTION(false, "nsPluginInstanceOwner::DispatchFocusToPlugin, wierd eventType");
|
||||
}
|
||||
mInstance->HandleEvent(&event, nsnull);
|
||||
}
|
||||
@ -1717,9 +1717,9 @@ nsresult nsPluginInstanceOwner::DispatchFocusToPlugin(nsIDOMEvent* aFocusEvent)
|
||||
aFocusEvent->StopPropagation();
|
||||
}
|
||||
}
|
||||
else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchFocusToPlugin failed, focusEvent null");
|
||||
else NS_ASSERTION(false, "nsPluginInstanceOwner::DispatchFocusToPlugin failed, focusEvent null");
|
||||
}
|
||||
else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchFocusToPlugin failed, privateEvent null");
|
||||
else NS_ASSERTION(false, "nsPluginInstanceOwner::DispatchFocusToPlugin failed, privateEvent null");
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -1738,9 +1738,9 @@ nsresult nsPluginInstanceOwner::Text(nsIDOMEvent* aTextEvent)
|
||||
aTextEvent->StopPropagation();
|
||||
}
|
||||
}
|
||||
else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchTextToPlugin failed, textEvent null");
|
||||
else NS_ASSERTION(false, "nsPluginInstanceOwner::DispatchTextToPlugin failed, textEvent null");
|
||||
}
|
||||
else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchTextToPlugin failed, privateEvent null");
|
||||
else NS_ASSERTION(false, "nsPluginInstanceOwner::DispatchTextToPlugin failed, privateEvent null");
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -1775,9 +1775,9 @@ nsresult nsPluginInstanceOwner::KeyPress(nsIDOMEvent* aKeyEvent)
|
||||
if (sInKeyDispatch)
|
||||
return aKeyEvent->PreventDefault(); // consume event
|
||||
|
||||
sInKeyDispatch = PR_TRUE;
|
||||
sInKeyDispatch = true;
|
||||
nsresult rv = DispatchKeyToPlugin(aKeyEvent);
|
||||
sInKeyDispatch = PR_FALSE;
|
||||
sInKeyDispatch = false;
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
@ -1816,9 +1816,9 @@ nsresult nsPluginInstanceOwner::DispatchKeyToPlugin(nsIDOMEvent* aKeyEvent)
|
||||
aKeyEvent->StopPropagation();
|
||||
}
|
||||
}
|
||||
else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchKeyToPlugin failed, keyEvent null");
|
||||
else NS_ASSERTION(false, "nsPluginInstanceOwner::DispatchKeyToPlugin failed, keyEvent null");
|
||||
}
|
||||
else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchKeyToPlugin failed, privateEvent null");
|
||||
else NS_ASSERTION(false, "nsPluginInstanceOwner::DispatchKeyToPlugin failed, privateEvent null");
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -1854,9 +1854,9 @@ nsPluginInstanceOwner::MouseDown(nsIDOMEvent* aMouseEvent)
|
||||
return aMouseEvent->PreventDefault(); // consume event
|
||||
}
|
||||
}
|
||||
else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::MouseDown failed, mouseEvent null");
|
||||
else NS_ASSERTION(false, "nsPluginInstanceOwner::MouseDown failed, mouseEvent null");
|
||||
}
|
||||
else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::MouseDown failed, privateEvent null");
|
||||
else NS_ASSERTION(false, "nsPluginInstanceOwner::MouseDown failed, privateEvent null");
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -1882,9 +1882,9 @@ nsresult nsPluginInstanceOwner::DispatchMouseToPlugin(nsIDOMEvent* aMouseEvent)
|
||||
aMouseEvent->StopPropagation();
|
||||
}
|
||||
}
|
||||
else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchMouseToPlugin failed, mouseEvent null");
|
||||
else NS_ASSERTION(false, "nsPluginInstanceOwner::DispatchMouseToPlugin failed, mouseEvent null");
|
||||
}
|
||||
else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchMouseToPlugin failed, privateEvent null");
|
||||
else NS_ASSERTION(false, "nsPluginInstanceOwner::DispatchMouseToPlugin failed, privateEvent null");
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -1895,11 +1895,11 @@ nsPluginInstanceOwner::HandleEvent(nsIDOMEvent* aEvent)
|
||||
nsAutoString eventType;
|
||||
aEvent->GetType(eventType);
|
||||
if (eventType.EqualsLiteral("focus")) {
|
||||
mContentFocused = PR_TRUE;
|
||||
mContentFocused = true;
|
||||
return DispatchFocusToPlugin(aEvent);
|
||||
}
|
||||
if (eventType.EqualsLiteral("blur")) {
|
||||
mContentFocused = PR_FALSE;
|
||||
mContentFocused = false;
|
||||
return DispatchFocusToPlugin(aEvent);
|
||||
}
|
||||
if (eventType.EqualsLiteral("mousedown")) {
|
||||
@ -2202,7 +2202,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent)
|
||||
nsPresContext* presContext = mObjectFrame->PresContext();
|
||||
nsIntPoint ptPx(presContext->AppUnitsToDevPixels(pt.x),
|
||||
presContext->AppUnitsToDevPixels(pt.y));
|
||||
nsIntPoint widgetPtPx = ptPx + mObjectFrame->GetWindowOriginInPixels(PR_TRUE);
|
||||
nsIntPoint widgetPtPx = ptPx + mObjectFrame->GetWindowOriginInPixels(true);
|
||||
pPluginEvent->lParam = MAKELPARAM(widgetPtPx.x, widgetPtPx.y);
|
||||
}
|
||||
}
|
||||
@ -2612,30 +2612,30 @@ nsPluginInstanceOwner::Destroy()
|
||||
mCXMenuListener = nsnull;
|
||||
}
|
||||
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("focus"), this, PR_FALSE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("blur"), this, PR_FALSE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("mouseup"), this, PR_FALSE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("mousedown"), this, PR_FALSE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("mousemove"), this, PR_FALSE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("click"), this, PR_FALSE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dblclick"), this, PR_FALSE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("mouseover"), this, PR_FALSE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("mouseout"), this, PR_FALSE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("keypress"), this, PR_TRUE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("keydown"), this, PR_TRUE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("keyup"), this, PR_TRUE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("drop"), this, PR_TRUE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dragdrop"), this, PR_TRUE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("drag"), this, PR_TRUE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dragenter"), this, PR_TRUE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dragover"), this, PR_TRUE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dragleave"), this, PR_TRUE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dragexit"), this, PR_TRUE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dragstart"), this, PR_TRUE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("draggesture"), this, PR_TRUE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dragend"), this, PR_TRUE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("focus"), this, false);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("blur"), this, false);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("mouseup"), this, false);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("mousedown"), this, false);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("mousemove"), this, false);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("click"), this, false);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dblclick"), this, false);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("mouseover"), this, false);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("mouseout"), this, false);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("keypress"), this, true);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("keydown"), this, true);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("keyup"), this, true);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("drop"), this, true);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dragdrop"), this, true);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("drag"), this, true);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dragenter"), this, true);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dragover"), this, true);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dragleave"), this, true);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dragexit"), this, true);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dragstart"), this, true);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("draggesture"), this, true);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("dragend"), this, true);
|
||||
#if defined(MOZ_WIDGET_QT) && (MOZ_PLATFORM_MAEMO == 6)
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("text"), this, PR_TRUE);
|
||||
mContent->RemoveEventListener(NS_LITERAL_STRING("text"), this, true);
|
||||
#endif
|
||||
|
||||
if (mWidget) {
|
||||
@ -2683,15 +2683,15 @@ nsPluginInstanceOwner::PrepareToStop(bool aDelayedStop)
|
||||
|
||||
// Also hide and disable the widget to avoid it from appearing in
|
||||
// odd places after reparenting it, but before it gets destroyed.
|
||||
mWidget->Show(PR_FALSE);
|
||||
mWidget->Enable(PR_FALSE);
|
||||
mWidget->Show(false);
|
||||
mWidget->Enable(false);
|
||||
|
||||
// Reparent the plugins native window. This relies on the widget
|
||||
// and plugin et al not holding any other references to its
|
||||
// parent.
|
||||
mWidget->SetParent(nsnull);
|
||||
|
||||
mDestroyWidget = PR_TRUE;
|
||||
mDestroyWidget = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2858,7 +2858,7 @@ void nsPluginInstanceOwner::Paint(gfxContext* aContext,
|
||||
|
||||
/*
|
||||
gfxMatrix currentMatrix = aContext->CurrentMatrix();
|
||||
gfxSize scale = currentMatrix.ScaleFactors(PR_TRUE);
|
||||
gfxSize scale = currentMatrix.ScaleFactors(true);
|
||||
printf_stderr("!!!!!!!! scale!!: %f x %f\n", scale.width, scale.height);
|
||||
*/
|
||||
|
||||
@ -3028,13 +3028,13 @@ nsPluginInstanceOwner::Renderer::DrawWithXlib(gfxXlibSurface* xsurface,
|
||||
if (mWindow->x != offset.x || mWindow->y != offset.y) {
|
||||
mWindow->x = offset.x;
|
||||
mWindow->y = offset.y;
|
||||
doupdatewindow = PR_TRUE;
|
||||
doupdatewindow = true;
|
||||
}
|
||||
|
||||
if (nsIntSize(mWindow->width, mWindow->height) != mPluginSize) {
|
||||
mWindow->width = mPluginSize.width;
|
||||
mWindow->height = mPluginSize.height;
|
||||
doupdatewindow = PR_TRUE;
|
||||
doupdatewindow = true;
|
||||
}
|
||||
|
||||
// The clip rect is relative to drawable top-left.
|
||||
@ -3073,7 +3073,7 @@ nsPluginInstanceOwner::Renderer::DrawWithXlib(gfxXlibSurface* xsurface,
|
||||
mWindow->clipRect.right != newClipRect.right ||
|
||||
mWindow->clipRect.bottom != newClipRect.bottom) {
|
||||
mWindow->clipRect = newClipRect;
|
||||
doupdatewindow = PR_TRUE;
|
||||
doupdatewindow = true;
|
||||
}
|
||||
|
||||
NPSetWindowCallbackStruct* ws_info =
|
||||
@ -3083,7 +3083,7 @@ nsPluginInstanceOwner::Renderer::DrawWithXlib(gfxXlibSurface* xsurface,
|
||||
ws_info->visual = visual;
|
||||
ws_info->colormap = colormap;
|
||||
ws_info->depth = gfxXlibSurface::DepthOfVisual(screen, visual);
|
||||
doupdatewindow = PR_TRUE;
|
||||
doupdatewindow = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -3202,39 +3202,39 @@ nsresult nsPluginInstanceOwner::Init(nsPresContext* aPresContext,
|
||||
mCXMenuListener->Init(aContent);
|
||||
}
|
||||
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("focus"), this, PR_FALSE,
|
||||
PR_FALSE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("blur"), this, PR_FALSE,
|
||||
PR_FALSE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("mouseup"), this, PR_FALSE,
|
||||
PR_FALSE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("mousedown"), this, PR_FALSE,
|
||||
PR_FALSE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("mousemove"), this, PR_FALSE,
|
||||
PR_FALSE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("click"), this, PR_FALSE,
|
||||
PR_FALSE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dblclick"), this, PR_FALSE,
|
||||
PR_FALSE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("mouseover"), this, PR_FALSE,
|
||||
PR_FALSE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("mouseout"), this, PR_FALSE,
|
||||
PR_FALSE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("keypress"), this, PR_TRUE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("keydown"), this, PR_TRUE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("keyup"), this, PR_TRUE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("drop"), this, PR_TRUE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dragdrop"), this, PR_TRUE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("drag"), this, PR_TRUE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dragenter"), this, PR_TRUE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dragover"), this, PR_TRUE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dragleave"), this, PR_TRUE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dragexit"), this, PR_TRUE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dragstart"), this, PR_TRUE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("draggesture"), this, PR_TRUE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dragend"), this, PR_TRUE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("focus"), this, false,
|
||||
false);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("blur"), this, false,
|
||||
false);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("mouseup"), this, false,
|
||||
false);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("mousedown"), this, false,
|
||||
false);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("mousemove"), this, false,
|
||||
false);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("click"), this, false,
|
||||
false);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dblclick"), this, false,
|
||||
false);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("mouseover"), this, false,
|
||||
false);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("mouseout"), this, false,
|
||||
false);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("keypress"), this, true);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("keydown"), this, true);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("keyup"), this, true);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("drop"), this, true);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dragdrop"), this, true);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("drag"), this, true);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dragenter"), this, true);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dragover"), this, true);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dragleave"), this, true);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dragexit"), this, true);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dragstart"), this, true);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("draggesture"), this, true);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("dragend"), this, true);
|
||||
#if defined(MOZ_WIDGET_QT) && (MOZ_PLATFORM_MAEMO == 6)
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("text"), this, PR_TRUE);
|
||||
mContent->AddEventListener(NS_LITERAL_STRING("text"), this, true);
|
||||
#endif
|
||||
|
||||
// Register scroll position listeners
|
||||
@ -3302,7 +3302,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::CreateWidget(void)
|
||||
if (NS_OK == rv) {
|
||||
mWidget = mObjectFrame->GetWidget();
|
||||
|
||||
if (PR_TRUE == windowless) {
|
||||
if (true == windowless) {
|
||||
mPluginWindow->type = NPWindowTypeDrawable;
|
||||
|
||||
// this needs to be a HDC according to the spec, but I do
|
||||
@ -3348,7 +3348,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::CreateWidget(void)
|
||||
|
||||
#ifdef MAC_CARBON_PLUGINS
|
||||
// start the idle timer.
|
||||
StartTimer(PR_TRUE);
|
||||
StartTimer(true);
|
||||
#endif
|
||||
|
||||
// tell the plugin window about the widget
|
||||
@ -3475,30 +3475,30 @@ void* nsPluginInstanceOwner::FixUpPluginWindow(PRInt32 inPaintState)
|
||||
mPluginWindow->clipRect.bottom != oldClipRect.bottom)
|
||||
{
|
||||
CallSetWindow();
|
||||
mPluginPortChanged = PR_FALSE;
|
||||
mPluginPortChanged = false;
|
||||
#ifdef MAC_CARBON_PLUGINS
|
||||
// if the clipRect is of size 0, make the null timer fire less often
|
||||
CancelTimer();
|
||||
if (mPluginWindow->clipRect.left == mPluginWindow->clipRect.right ||
|
||||
mPluginWindow->clipRect.top == mPluginWindow->clipRect.bottom) {
|
||||
StartTimer(PR_FALSE);
|
||||
StartTimer(false);
|
||||
}
|
||||
else {
|
||||
StartTimer(PR_TRUE);
|
||||
StartTimer(true);
|
||||
}
|
||||
#endif
|
||||
} else if (mPluginPortChanged) {
|
||||
CallSetWindow();
|
||||
mPluginPortChanged = PR_FALSE;
|
||||
mPluginPortChanged = false;
|
||||
}
|
||||
|
||||
// After the first NPP_SetWindow call we need to send an initial
|
||||
// top-level window focus event.
|
||||
if (eventModel == NPEventModelCocoa && !mSentInitialTopLevelWindowEvent) {
|
||||
// Set this before calling ProcessEvent to avoid endless recursion.
|
||||
mSentInitialTopLevelWindowEvent = PR_TRUE;
|
||||
mSentInitialTopLevelWindowEvent = true;
|
||||
|
||||
nsPluginEvent pluginEvent(PR_TRUE, NS_PLUGIN_FOCUS_EVENT, nsnull);
|
||||
nsPluginEvent pluginEvent(true, NS_PLUGIN_FOCUS_EVENT, nsnull);
|
||||
NPCocoaEvent cocoaEvent;
|
||||
InitializeNPCocoaEvent(&cocoaEvent);
|
||||
cocoaEvent.type = NPCocoaEventWindowFocusChanged;
|
||||
@ -3529,7 +3529,7 @@ nsPluginInstanceOwner::HidePluginWindow()
|
||||
|
||||
mPluginWindow->clipRect.bottom = mPluginWindow->clipRect.top;
|
||||
mPluginWindow->clipRect.right = mPluginWindow->clipRect.left;
|
||||
mWidgetVisible = PR_FALSE;
|
||||
mWidgetVisible = false;
|
||||
if (mAsyncHidePluginWindow) {
|
||||
mInstance->AsyncSetWindow(mPluginWindow);
|
||||
} else {
|
||||
@ -3605,14 +3605,14 @@ void
|
||||
nsPluginInstanceOwner::UpdateWindowVisibility(bool aVisible)
|
||||
{
|
||||
mPluginWindowVisible = aVisible;
|
||||
UpdateWindowPositionAndClipRect(PR_TRUE);
|
||||
UpdateWindowPositionAndClipRect(true);
|
||||
}
|
||||
|
||||
void
|
||||
nsPluginInstanceOwner::UpdateDocumentActiveState(bool aIsActive)
|
||||
{
|
||||
mPluginDocumentActiveState = aIsActive;
|
||||
UpdateWindowPositionAndClipRect(PR_TRUE);
|
||||
UpdateWindowPositionAndClipRect(true);
|
||||
}
|
||||
#endif // XP_MACOSX
|
||||
|
||||
@ -3670,7 +3670,7 @@ nsresult nsPluginDOMContextMenuListener::Init(nsIContent* aContent)
|
||||
{
|
||||
nsCOMPtr<nsIDOMEventTarget> receiver(do_QueryInterface(aContent));
|
||||
if (receiver) {
|
||||
receiver->AddEventListener(NS_LITERAL_STRING("contextmenu"), this, PR_TRUE);
|
||||
receiver->AddEventListener(NS_LITERAL_STRING("contextmenu"), this, true);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -3682,7 +3682,7 @@ nsresult nsPluginDOMContextMenuListener::Destroy(nsIContent* aContent)
|
||||
// Unregister context menu listener
|
||||
nsCOMPtr<nsIDOMEventTarget> receiver(do_QueryInterface(aContent));
|
||||
if (receiver) {
|
||||
receiver->RemoveEventListener(NS_LITERAL_STRING("contextmenu"), this, PR_TRUE);
|
||||
receiver->RemoveEventListener(NS_LITERAL_STRING("contextmenu"), this, true);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -267,9 +267,9 @@ public:
|
||||
(MatchPluginName("Shockwave Flash") ||
|
||||
MatchPluginName("Test Plug-in"));
|
||||
#elif defined(MOZ_X11) || defined(XP_MACOSX)
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
#else
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ class nsPluginManifestLineReader
|
||||
bool NextLine()
|
||||
{
|
||||
if (mNext >= mLimit)
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
mCur = mNext;
|
||||
mLength = 0;
|
||||
@ -79,7 +79,7 @@ class nsPluginManifestLineReader
|
||||
if (IsEOL(*mNext)) {
|
||||
if (lastDelimiter) {
|
||||
if (lastDelimiter && *(mNext - 1) != PLUGIN_REGISTRY_END_OF_LINE_MARKER)
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
*lastDelimiter = '\0';
|
||||
} else {
|
||||
*mNext = '\0';
|
||||
@ -89,14 +89,14 @@ class nsPluginManifestLineReader
|
||||
if (!IsEOL(*mNext))
|
||||
break;
|
||||
}
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
if (*mNext == PLUGIN_REGISTRY_FIELD_DELIMITER)
|
||||
lastDelimiter = mNext;
|
||||
++mNext;
|
||||
++mLength;
|
||||
}
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
int ParseLine(char** chunks, int maxChunks)
|
||||
|
@ -124,7 +124,7 @@ nsresult nsPluginNativeWindowGtk2::CallSetWindow(nsRefPtr<nsNPAPIPluginInstance>
|
||||
rv = aPluginInstance->GetValueFromPlugin(NPPVpluginNeedsXEmbed, &needXEmbed);
|
||||
// If the call returned an error code make sure we still use our default value.
|
||||
if (NS_FAILED(rv)) {
|
||||
needXEmbed = PR_FALSE;
|
||||
needXEmbed = false;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
printf("nsPluginNativeWindowGtk2: NPPVpluginNeedsXEmbed=%d\n", needXEmbed);
|
||||
|
@ -151,7 +151,7 @@ private:
|
||||
|
||||
NS_IMETHODIMP nsDelayedPopupsEnabledEvent::Run()
|
||||
{
|
||||
mInst->PushPopupsEnabledState(PR_FALSE);
|
||||
mInst->PushPopupsEnabledState(false);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -214,15 +214,15 @@ static bool ProcessFlashMessageDelayed(nsPluginNativeWindowOS2 * aWin,
|
||||
}
|
||||
|
||||
if (msg != WM_USER_FLASH)
|
||||
return PR_FALSE; // no need to delay
|
||||
return false; // no need to delay
|
||||
|
||||
// do stuff
|
||||
nsCOMPtr<nsIRunnable> pwe = aWin->GetPluginWindowEvent(hWnd, msg, mp1, mp2);
|
||||
if (pwe) {
|
||||
NS_DispatchToCurrentThread(pwe);
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
@ -274,7 +274,7 @@ static MRESULT EXPENTRY PluginWndProc(HWND hWnd, ULONG msg, MPARAM mp1, MPARAM m
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
win->GetPluginWidget(getter_AddRefs(widget));
|
||||
if (widget)
|
||||
widget->CaptureMouse(PR_TRUE);
|
||||
widget->CaptureMouse(true);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -282,12 +282,12 @@ static MRESULT EXPENTRY PluginWndProc(HWND hWnd, ULONG msg, MPARAM mp1, MPARAM m
|
||||
case WM_BUTTON2UP:
|
||||
case WM_BUTTON3UP: {
|
||||
if (msg == WM_BUTTON1UP)
|
||||
enablePopups = PR_TRUE;
|
||||
enablePopups = true;
|
||||
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
win->GetPluginWidget(getter_AddRefs(widget));
|
||||
if (widget)
|
||||
widget->CaptureMouse(PR_FALSE);
|
||||
widget->CaptureMouse(false);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -295,7 +295,7 @@ static MRESULT EXPENTRY PluginWndProc(HWND hWnd, ULONG msg, MPARAM mp1, MPARAM m
|
||||
// Ignore repeating keydown messages...
|
||||
if (SHORT1FROMMP(mp1) & KC_PREVDOWN)
|
||||
break;
|
||||
enablePopups = PR_TRUE;
|
||||
enablePopups = true;
|
||||
break;
|
||||
|
||||
// When the child of a plugin gets the focus, nsWindow doesn't get
|
||||
@ -340,7 +340,7 @@ static MRESULT EXPENTRY PluginWndProc(HWND hWnd, ULONG msg, MPARAM mp1, MPARAM m
|
||||
PRUint16 apiVersion;
|
||||
if (NS_SUCCEEDED(inst->GetPluginAPIVersion(&apiVersion)) &&
|
||||
!versionOK(apiVersion, NP_POPUP_API_VERSION))
|
||||
inst->PushPopupsEnabledState(PR_TRUE);
|
||||
inst->PushPopupsEnabledState(true);
|
||||
}
|
||||
|
||||
MRESULT res = (MRESULT)TRUE;
|
||||
|
@ -189,15 +189,15 @@ static bool ProcessFlashMessageDelayed(nsPluginNativeWindowWin * aWin, nsNPAPIPl
|
||||
}
|
||||
|
||||
if (msg != WM_USER_FLASH)
|
||||
return PR_FALSE; // no need to delay
|
||||
return false; // no need to delay
|
||||
|
||||
// do stuff
|
||||
nsCOMPtr<nsIRunnable> pwe = aWin->GetPluginWindowEvent(hWnd, msg, wParam, lParam);
|
||||
if (pwe) {
|
||||
NS_DispatchToCurrentThread(pwe);
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
class nsDelayedPopupsEnabledEvent : public nsRunnable
|
||||
@ -215,7 +215,7 @@ private:
|
||||
|
||||
NS_IMETHODIMP nsDelayedPopupsEnabledEvent::Run()
|
||||
{
|
||||
mInst->PushPopupsEnabledState(PR_FALSE);
|
||||
mInst->PushPopupsEnabledState(false);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -239,7 +239,7 @@ static LRESULT CALLBACK PluginWndProcInternal(HWND hWnd, UINT msg, WPARAM wParam
|
||||
// on the floor if we get into this recursive situation. See bug 192914.
|
||||
if (win->mPluginType == nsPluginType_Real) {
|
||||
if (sInMessageDispatch && msg == sLastMsg)
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
// Cache the last message sent
|
||||
sLastMsg = msg;
|
||||
}
|
||||
@ -258,11 +258,11 @@ static LRESULT CALLBACK PluginWndProcInternal(HWND hWnd, UINT msg, WPARAM wParam
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
win->GetPluginWidget(getter_AddRefs(widget));
|
||||
if (widget)
|
||||
widget->CaptureMouse(PR_TRUE);
|
||||
widget->CaptureMouse(true);
|
||||
break;
|
||||
}
|
||||
case WM_LBUTTONUP:
|
||||
enablePopups = PR_TRUE;
|
||||
enablePopups = true;
|
||||
|
||||
// fall through
|
||||
case WM_MBUTTONUP:
|
||||
@ -270,7 +270,7 @@ static LRESULT CALLBACK PluginWndProcInternal(HWND hWnd, UINT msg, WPARAM wParam
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
win->GetPluginWidget(getter_AddRefs(widget));
|
||||
if (widget)
|
||||
widget->CaptureMouse(PR_FALSE);
|
||||
widget->CaptureMouse(false);
|
||||
break;
|
||||
}
|
||||
case WM_KEYDOWN:
|
||||
@ -281,7 +281,7 @@ static LRESULT CALLBACK PluginWndProcInternal(HWND hWnd, UINT msg, WPARAM wParam
|
||||
|
||||
// fall through
|
||||
case WM_KEYUP:
|
||||
enablePopups = PR_TRUE;
|
||||
enablePopups = true;
|
||||
|
||||
break;
|
||||
|
||||
@ -303,7 +303,7 @@ static LRESULT CALLBACK PluginWndProcInternal(HWND hWnd, UINT msg, WPARAM wParam
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
win->GetPluginWidget(getter_AddRefs(widget));
|
||||
if (widget) {
|
||||
nsGUIEvent event(PR_TRUE, NS_PLUGIN_ACTIVATE, widget);
|
||||
nsGUIEvent event(true, NS_PLUGIN_ACTIVATE, widget);
|
||||
nsEventStatus status;
|
||||
widget->DispatchEvent(&event, status);
|
||||
}
|
||||
@ -322,9 +322,9 @@ static LRESULT CALLBACK PluginWndProcInternal(HWND hWnd, UINT msg, WPARAM wParam
|
||||
// recursively.
|
||||
WNDPROC prevWndProc = win->GetPrevWindowProc();
|
||||
if (prevWndProc && !sInPreviousMessageDispatch) {
|
||||
sInPreviousMessageDispatch = PR_TRUE;
|
||||
sInPreviousMessageDispatch = true;
|
||||
::CallWindowProc(prevWndProc, hWnd, msg, wParam, lParam);
|
||||
sInPreviousMessageDispatch = PR_FALSE;
|
||||
sInPreviousMessageDispatch = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -342,18 +342,18 @@ static LRESULT CALLBACK PluginWndProcInternal(HWND hWnd, UINT msg, WPARAM wParam
|
||||
PRUint16 apiVersion;
|
||||
if (NS_SUCCEEDED(inst->GetPluginAPIVersion(&apiVersion)) &&
|
||||
!versionOK(apiVersion, NP_POPUP_API_VERSION)) {
|
||||
inst->PushPopupsEnabledState(PR_TRUE);
|
||||
inst->PushPopupsEnabledState(true);
|
||||
}
|
||||
}
|
||||
|
||||
sInMessageDispatch = PR_TRUE;
|
||||
sInMessageDispatch = true;
|
||||
|
||||
LRESULT res = TRUE;
|
||||
NS_TRY_SAFE_CALL_RETURN(res,
|
||||
::CallWindowProc((WNDPROC)win->GetWindowProc(), hWnd, msg, wParam, lParam),
|
||||
inst);
|
||||
|
||||
sInMessageDispatch = PR_FALSE;
|
||||
sInMessageDispatch = false;
|
||||
|
||||
if (inst) {
|
||||
// Popups are enabled (were enabled before the call to
|
||||
@ -427,8 +427,8 @@ SetWindowLongHookCheck(HWND hWnd,
|
||||
if (!win || (win && win->mPluginType != nsPluginType_Flash) ||
|
||||
(nIndex == GWLP_WNDPROC &&
|
||||
newLong == reinterpret_cast<LONG_PTR>(PluginWndProc)))
|
||||
return PR_TRUE;
|
||||
return PR_FALSE;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef _WIN64
|
||||
|
@ -73,7 +73,7 @@ PR_BEGIN_MACRO \
|
||||
{ \
|
||||
ret = fun; \
|
||||
} \
|
||||
MOZ_SEH_EXCEPT(PR_TRUE) \
|
||||
MOZ_SEH_EXCEPT(true) \
|
||||
{ \
|
||||
nsresult res; \
|
||||
nsCOMPtr<nsIPluginHost> host(do_GetService(MOZ_PLUGIN_HOST_CONTRACTID, &res));\
|
||||
@ -96,7 +96,7 @@ PR_BEGIN_MACRO \
|
||||
{ \
|
||||
fun; \
|
||||
} \
|
||||
MOZ_SEH_EXCEPT(PR_TRUE) \
|
||||
MOZ_SEH_EXCEPT(true) \
|
||||
{ \
|
||||
nsresult res; \
|
||||
nsCOMPtr<nsIPluginHost> host(do_GetService(MOZ_PLUGIN_HOST_CONTRACTID, &res));\
|
||||
|
@ -93,7 +93,7 @@ NS_IMPL_ISUPPORTS3(nsPluginByteRangeStreamListener,
|
||||
nsPluginByteRangeStreamListener::nsPluginByteRangeStreamListener(nsIWeakReference* aWeakPtr)
|
||||
{
|
||||
mWeakPtrPluginStreamListenerPeer = aWeakPtr;
|
||||
mRemoveMagicNumber = PR_FALSE;
|
||||
mRemoveMagicNumber = false;
|
||||
}
|
||||
|
||||
nsPluginByteRangeStreamListener::~nsPluginByteRangeStreamListener()
|
||||
@ -165,7 +165,7 @@ nsPluginByteRangeStreamListener::OnStartRequest(nsIRequest *request, nsISupports
|
||||
&bWantsAllNetworkStreams);
|
||||
// If the call returned an error code make sure we still use our default value.
|
||||
if (NS_FAILED(rv)) {
|
||||
bWantsAllNetworkStreams = PR_FALSE;
|
||||
bWantsAllNetworkStreams = false;
|
||||
}
|
||||
|
||||
if (!bWantsAllNetworkStreams){
|
||||
@ -176,7 +176,7 @@ nsPluginByteRangeStreamListener::OnStartRequest(nsIRequest *request, nsISupports
|
||||
// if server cannot continue with byte range (206 status) and sending us whole object (200 status)
|
||||
// reset this seekable stream & try serve it to plugin instance as a file
|
||||
mStreamConverter = finalStreamListener;
|
||||
mRemoveMagicNumber = PR_TRUE;
|
||||
mRemoveMagicNumber = true;
|
||||
|
||||
rv = pslp->ServeStreamAsFile(request, ctxt);
|
||||
return rv;
|
||||
@ -229,7 +229,7 @@ CachedFileHolder::CachedFileHolder(nsIFile* cacheFile)
|
||||
|
||||
CachedFileHolder::~CachedFileHolder()
|
||||
{
|
||||
mFile->Remove(PR_FALSE);
|
||||
mFile->Remove(false);
|
||||
}
|
||||
|
||||
void
|
||||
@ -311,15 +311,15 @@ NS_IMPL_ISUPPORTS8(nsPluginStreamListenerPeer,
|
||||
nsPluginStreamListenerPeer::nsPluginStreamListenerPeer()
|
||||
{
|
||||
mStreamType = NP_NORMAL;
|
||||
mStartBinding = PR_FALSE;
|
||||
mAbort = PR_FALSE;
|
||||
mRequestFailed = PR_FALSE;
|
||||
mStartBinding = false;
|
||||
mAbort = false;
|
||||
mRequestFailed = false;
|
||||
|
||||
mPendingRequests = 0;
|
||||
mHaveFiredOnStartRequest = PR_FALSE;
|
||||
mHaveFiredOnStartRequest = false;
|
||||
mDataForwardToRequest = nsnull;
|
||||
|
||||
mSeekable = PR_FALSE;
|
||||
mSeekable = false;
|
||||
mModified = 0;
|
||||
mStreamOffset = 0;
|
||||
mStreamComplete = 0;
|
||||
@ -371,7 +371,7 @@ nsresult nsPluginStreamListenerPeer::Initialize(nsIURI *aURL,
|
||||
|
||||
mPendingRequests = 1;
|
||||
|
||||
mDataForwardToRequest = new nsHashtable(16, PR_FALSE);
|
||||
mDataForwardToRequest = new nsHashtable(16, false);
|
||||
if (!mDataForwardToRequest)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
@ -408,7 +408,7 @@ nsresult nsPluginStreamListenerPeer::InitializeEmbedded(nsIURI *aURL,
|
||||
|
||||
mPendingRequests = 1;
|
||||
|
||||
mDataForwardToRequest = new nsHashtable(16, PR_FALSE);
|
||||
mDataForwardToRequest = new nsHashtable(16, false);
|
||||
if (!mDataForwardToRequest)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
@ -426,7 +426,7 @@ nsresult nsPluginStreamListenerPeer::InitializeFullPage(nsIURI* aURL, nsNPAPIPlu
|
||||
|
||||
mURL = aURL;
|
||||
|
||||
mDataForwardToRequest = new nsHashtable(16, PR_FALSE);
|
||||
mDataForwardToRequest = new nsHashtable(16, false);
|
||||
if (!mDataForwardToRequest)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
@ -534,7 +534,7 @@ nsPluginStreamListenerPeer::OnStartRequest(nsIRequest *request,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
mHaveFiredOnStartRequest = PR_TRUE;
|
||||
mHaveFiredOnStartRequest = true;
|
||||
|
||||
nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
|
||||
NS_ENSURE_TRUE(channel, NS_ERROR_FAILURE);
|
||||
@ -550,7 +550,7 @@ nsPluginStreamListenerPeer::OnStartRequest(nsIRequest *request,
|
||||
// in nsNPAPIPluginStreamListener::CleanUpStream
|
||||
// return error will cancel this request
|
||||
// ...and we also need to tell the plugin that
|
||||
mRequestFailed = PR_TRUE;
|
||||
mRequestFailed = true;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
@ -560,11 +560,11 @@ nsPluginStreamListenerPeer::OnStartRequest(nsIRequest *request,
|
||||
&bWantsAllNetworkStreams);
|
||||
// If the call returned an error code make sure we still use our default value.
|
||||
if (NS_FAILED(rv)) {
|
||||
bWantsAllNetworkStreams = PR_FALSE;
|
||||
bWantsAllNetworkStreams = false;
|
||||
}
|
||||
|
||||
if (!bWantsAllNetworkStreams) {
|
||||
mRequestFailed = PR_TRUE;
|
||||
mRequestFailed = true;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
@ -604,7 +604,7 @@ nsPluginStreamListenerPeer::OnStartRequest(nsIRequest *request,
|
||||
nsCOMPtr<nsIFileChannel> fileChannel = do_QueryInterface(channel);
|
||||
if (fileChannel) {
|
||||
// file does not exist
|
||||
mRequestFailed = PR_TRUE;
|
||||
mRequestFailed = true;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
mLength = 0;
|
||||
@ -755,7 +755,7 @@ nsPluginStreamListenerPeer::MakeByteRangeString(NPByteRange* aRangeList, nsACStr
|
||||
}
|
||||
|
||||
// get rid of possible trailing comma
|
||||
string.Trim(",", PR_FALSE);
|
||||
string.Trim(",", false);
|
||||
|
||||
rangeRequest = string;
|
||||
*numRequests = requestCnt;
|
||||
@ -786,9 +786,9 @@ nsPluginStreamListenerPeer::RequestRead(NPByteRange* rangeList)
|
||||
if (!httpChannel)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
httpChannel->SetRequestHeader(NS_LITERAL_CSTRING("Range"), rangeString, PR_FALSE);
|
||||
httpChannel->SetRequestHeader(NS_LITERAL_CSTRING("Range"), rangeString, false);
|
||||
|
||||
mAbort = PR_TRUE; // instruct old stream listener to cancel
|
||||
mAbort = true; // instruct old stream listener to cancel
|
||||
// the request on the next ODA.
|
||||
|
||||
nsCOMPtr<nsIStreamListener> converter;
|
||||
@ -865,7 +865,7 @@ nsresult nsPluginStreamListenerPeer::ServeStreamAsFile(nsIRequest *request,
|
||||
owner->SetWindow();
|
||||
}
|
||||
|
||||
mSeekable = PR_FALSE;
|
||||
mSeekable = false;
|
||||
mPStreamListener->OnStartBinding(this);
|
||||
mStreamOffset = 0;
|
||||
|
||||
@ -874,7 +874,7 @@ nsresult nsPluginStreamListenerPeer::ServeStreamAsFile(nsIRequest *request,
|
||||
|
||||
// then check it out if browser cache is not available
|
||||
nsCOMPtr<nsICachingChannel> cacheChannel = do_QueryInterface(request);
|
||||
if (!(cacheChannel && (NS_SUCCEEDED(cacheChannel->SetCacheAsFile(PR_TRUE))))) {
|
||||
if (!(cacheChannel && (NS_SUCCEEDED(cacheChannel->SetCacheAsFile(true))))) {
|
||||
nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
|
||||
if (channel) {
|
||||
SetupPluginCacheFile(channel);
|
||||
@ -890,16 +890,16 @@ nsresult nsPluginStreamListenerPeer::ServeStreamAsFile(nsIRequest *request,
|
||||
bool
|
||||
nsPluginStreamListenerPeer::UseExistingPluginCacheFile(nsPluginStreamListenerPeer* psi)
|
||||
{
|
||||
NS_ENSURE_TRUE(psi, PR_FALSE);
|
||||
NS_ENSURE_TRUE(psi, false);
|
||||
|
||||
if (psi->mLength == mLength &&
|
||||
psi->mModified == mModified &&
|
||||
mStreamComplete &&
|
||||
mURLSpec.Equals(psi->mURLSpec))
|
||||
{
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginStreamListenerPeer::OnDataAvailable(nsIRequest *request,
|
||||
@ -922,7 +922,7 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnDataAvailable(nsIRequest *request,
|
||||
|
||||
if (magicNumber != MAGIC_REQUEST_CONTEXT) {
|
||||
// this is not one of our range requests
|
||||
mAbort = PR_FALSE;
|
||||
mAbort = false;
|
||||
return NS_BINDING_ABORTED;
|
||||
}
|
||||
}
|
||||
@ -1124,7 +1124,7 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnStopRequest(nsIRequest *request,
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(aStatus)) {
|
||||
mStreamComplete = PR_TRUE;
|
||||
mStreamComplete = true;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -1203,7 +1203,7 @@ nsresult nsPluginStreamListenerPeer::SetUpStreamListener(nsIRequest *request,
|
||||
// Also provide all HTTP response headers to our listener.
|
||||
httpChannel->VisitResponseHeaders(this);
|
||||
|
||||
mSeekable = PR_FALSE;
|
||||
mSeekable = false;
|
||||
// first we look for a content-encoding header. If we find one, we tell the
|
||||
// plugin that stream is not seekable, because the plugin always sees
|
||||
// uncompressed data, so it can't make meaningful range requests on a
|
||||
@ -1214,7 +1214,7 @@ nsresult nsPluginStreamListenerPeer::SetUpStreamListener(nsIRequest *request,
|
||||
nsCAutoString contentEncoding;
|
||||
if (NS_SUCCEEDED(httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("Content-Encoding"),
|
||||
contentEncoding))) {
|
||||
useLocalCache = PR_TRUE;
|
||||
useLocalCache = true;
|
||||
} else {
|
||||
// set seekability (seekable if the stream has a known length and if the
|
||||
// http server accepts byte ranges).
|
||||
@ -1224,7 +1224,7 @@ nsresult nsPluginStreamListenerPeer::SetUpStreamListener(nsIRequest *request,
|
||||
nsCAutoString range;
|
||||
if (NS_SUCCEEDED(httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("accept-ranges"), range)) &&
|
||||
range.Equals(NS_LITERAL_CSTRING("bytes"), nsCaseInsensitiveCStringComparator())) {
|
||||
mSeekable = PR_TRUE;
|
||||
mSeekable = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1235,7 +1235,7 @@ nsresult nsPluginStreamListenerPeer::SetUpStreamListener(nsIRequest *request,
|
||||
if (NS_SUCCEEDED(httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("last-modified"), lastModified)) &&
|
||||
!lastModified.IsEmpty()) {
|
||||
PRTime time64;
|
||||
PR_ParseTimeString(lastModified.get(), PR_TRUE, &time64); //convert string time to integer time
|
||||
PR_ParseTimeString(lastModified.get(), true, &time64); //convert string time to integer time
|
||||
|
||||
// Convert PRTime to unix-style time_t, i.e. seconds since the epoch
|
||||
double fpTime;
|
||||
@ -1246,7 +1246,7 @@ nsresult nsPluginStreamListenerPeer::SetUpStreamListener(nsIRequest *request,
|
||||
|
||||
rv = mPStreamListener->OnStartBinding(this);
|
||||
|
||||
mStartBinding = PR_TRUE;
|
||||
mStartBinding = true;
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
@ -1259,8 +1259,8 @@ nsresult nsPluginStreamListenerPeer::SetUpStreamListener(nsIRequest *request,
|
||||
if (!fileChannel) {
|
||||
// and browser cache is not available
|
||||
nsCOMPtr<nsICachingChannel> cacheChannel = do_QueryInterface(request);
|
||||
if (!(cacheChannel && (NS_SUCCEEDED(cacheChannel->SetCacheAsFile(PR_TRUE))))) {
|
||||
useLocalCache = PR_TRUE;
|
||||
if (!(cacheChannel && (NS_SUCCEEDED(cacheChannel->SetCacheAsFile(true))))) {
|
||||
useLocalCache = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -133,11 +133,11 @@ private:
|
||||
nsCOMPtr<nsIPluginInstanceOwner> mOwner;
|
||||
nsRefPtr<nsNPAPIPluginStreamListener> mPStreamListener;
|
||||
|
||||
// Set to PR_TRUE if we request failed (like with a HTTP response of 404)
|
||||
// Set to true if we request failed (like with a HTTP response of 404)
|
||||
bool mRequestFailed;
|
||||
|
||||
/*
|
||||
* Set to PR_TRUE after nsIPluginStreamListener::OnStartBinding() has
|
||||
* Set to true after nsIPluginStreamListener::OnStartBinding() has
|
||||
* been called. Checked in ::OnStopRequest so we can call the
|
||||
* plugin's OnStartBinding if, for some reason, it has not already
|
||||
* been called.
|
||||
|
@ -80,7 +80,7 @@ mMimeTypes(aPluginTag->mMimeTypes),
|
||||
mMimeDescriptions(aPluginTag->mMimeDescriptions),
|
||||
mExtensions(aPluginTag->mExtensions),
|
||||
mLibrary(nsnull),
|
||||
mCanUnloadLibrary(PR_TRUE),
|
||||
mCanUnloadLibrary(true),
|
||||
mIsJavaPlugin(aPluginTag->mIsJavaPlugin),
|
||||
mIsNPRuntimeEnabledJavaPlugin(aPluginTag->mIsNPRuntimeEnabledJavaPlugin),
|
||||
mIsFlashPlugin(aPluginTag->mIsFlashPlugin),
|
||||
@ -98,13 +98,13 @@ mName(aPluginInfo->fName),
|
||||
mDescription(aPluginInfo->fDescription),
|
||||
mLibrary(nsnull),
|
||||
#ifdef XP_MACOSX
|
||||
mCanUnloadLibrary(PR_FALSE),
|
||||
mCanUnloadLibrary(false),
|
||||
#else
|
||||
mCanUnloadLibrary(PR_TRUE),
|
||||
mCanUnloadLibrary(true),
|
||||
#endif
|
||||
mIsJavaPlugin(PR_FALSE),
|
||||
mIsNPRuntimeEnabledJavaPlugin(PR_FALSE),
|
||||
mIsFlashPlugin(PR_FALSE),
|
||||
mIsJavaPlugin(false),
|
||||
mIsNPRuntimeEnabledJavaPlugin(false),
|
||||
mIsFlashPlugin(false),
|
||||
mFileName(aPluginInfo->fFileName),
|
||||
mFullPath(aPluginInfo->fFullPath),
|
||||
mVersion(aPluginInfo->fVersion),
|
||||
@ -124,16 +124,16 @@ mFlags(NS_PLUGIN_FLAG_ENABLED)
|
||||
// This "magic MIME type" should not be exposed, but is just a signal
|
||||
// to the browser that this is new-style java.
|
||||
// Don't add it or its associated information to our arrays.
|
||||
mIsNPRuntimeEnabledJavaPlugin = PR_TRUE;
|
||||
mIsNPRuntimeEnabledJavaPlugin = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
mMimeTypes.AppendElement(nsCString(currentMIMEType));
|
||||
if (nsPluginHost::IsJavaMIMEType(currentMIMEType)) {
|
||||
mIsJavaPlugin = PR_TRUE;
|
||||
mIsJavaPlugin = true;
|
||||
}
|
||||
else if (strcmp(currentMIMEType, "application/x-shockwave-flash") == 0) {
|
||||
mIsFlashPlugin = PR_TRUE;
|
||||
mIsFlashPlugin = true;
|
||||
}
|
||||
} else {
|
||||
continue;
|
||||
@ -197,8 +197,8 @@ mName(aName),
|
||||
mDescription(aDescription),
|
||||
mLibrary(nsnull),
|
||||
mCanUnloadLibrary(aCanUnload),
|
||||
mIsJavaPlugin(PR_FALSE),
|
||||
mIsNPRuntimeEnabledJavaPlugin(PR_FALSE),
|
||||
mIsJavaPlugin(false),
|
||||
mIsNPRuntimeEnabledJavaPlugin(false),
|
||||
mFileName(aFileName),
|
||||
mFullPath(aFullPath),
|
||||
mVersion(aVersion),
|
||||
@ -208,14 +208,14 @@ mFlags(0) // Caller will read in our flags from cache
|
||||
for (PRInt32 i = 0; i < aVariants; i++) {
|
||||
if (mIsJavaPlugin && aMimeTypes[i] &&
|
||||
strcmp(aMimeTypes[i], "application/x-java-vm-npruntime") == 0) {
|
||||
mIsNPRuntimeEnabledJavaPlugin = PR_TRUE;
|
||||
mIsNPRuntimeEnabledJavaPlugin = true;
|
||||
continue;
|
||||
}
|
||||
mMimeTypes.AppendElement(nsCString(aMimeTypes[i]));
|
||||
mMimeDescriptions.AppendElement(nsCString(aMimeDescriptions[i]));
|
||||
mExtensions.AppendElement(nsCString(aExtensions[i]));
|
||||
if (nsPluginHost::IsJavaMIMEType(mMimeTypes[i].get())) {
|
||||
mIsJavaPlugin = PR_TRUE;
|
||||
mIsJavaPlugin = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -424,7 +424,7 @@ nsPluginTag::RegisterWithCategoryManager(bool aOverrideInternalTypes,
|
||||
if (strcmp(value, contractId) == 0) {
|
||||
catMan->DeleteCategoryEntry("Gecko-Content-Viewers",
|
||||
mMimeTypes[i].get(),
|
||||
PR_TRUE);
|
||||
true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -439,7 +439,7 @@ nsPluginTag::RegisterWithCategoryManager(bool aOverrideInternalTypes,
|
||||
catMan->AddCategoryEntry("Gecko-Content-Viewers",
|
||||
mMimeTypes[i].get(),
|
||||
contractId,
|
||||
PR_FALSE, /* persist: broken by bug 193031 */
|
||||
false, /* persist: broken by bug 193031 */
|
||||
aOverrideInternalTypes, /* replace if we're told to */
|
||||
nsnull);
|
||||
}
|
||||
@ -458,9 +458,9 @@ void nsPluginTag::Mark(PRUint32 mask)
|
||||
// Update entries in the category manager if necessary.
|
||||
if (mPluginHost && wasEnabled != IsEnabled()) {
|
||||
if (wasEnabled)
|
||||
RegisterWithCategoryManager(PR_FALSE, nsPluginTag::ePluginUnregister);
|
||||
RegisterWithCategoryManager(false, nsPluginTag::ePluginUnregister);
|
||||
else
|
||||
RegisterWithCategoryManager(PR_FALSE, nsPluginTag::ePluginRegister);
|
||||
RegisterWithCategoryManager(false, nsPluginTag::ePluginRegister);
|
||||
}
|
||||
}
|
||||
|
||||
@ -471,9 +471,9 @@ void nsPluginTag::UnMark(PRUint32 mask)
|
||||
// Update entries in the category manager if necessary.
|
||||
if (mPluginHost && wasEnabled != IsEnabled()) {
|
||||
if (wasEnabled)
|
||||
RegisterWithCategoryManager(PR_FALSE, nsPluginTag::ePluginUnregister);
|
||||
RegisterWithCategoryManager(false, nsPluginTag::ePluginUnregister);
|
||||
else
|
||||
RegisterWithCategoryManager(PR_FALSE, nsPluginTag::ePluginRegister);
|
||||
RegisterWithCategoryManager(false, nsPluginTag::ePluginRegister);
|
||||
}
|
||||
}
|
||||
|
||||
@ -494,21 +494,21 @@ bool nsPluginTag::IsEnabled()
|
||||
|
||||
bool nsPluginTag::Equals(nsPluginTag *aPluginTag)
|
||||
{
|
||||
NS_ENSURE_TRUE(aPluginTag, PR_FALSE);
|
||||
NS_ENSURE_TRUE(aPluginTag, false);
|
||||
|
||||
if ((!mName.Equals(aPluginTag->mName)) ||
|
||||
(!mDescription.Equals(aPluginTag->mDescription)) ||
|
||||
(mMimeTypes.Length() != aPluginTag->mMimeTypes.Length())) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (PRUint32 i = 0; i < mMimeTypes.Length(); i++) {
|
||||
if (!mMimeTypes[i].Equals(aPluginTag->mMimeTypes[i])) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void nsPluginTag::TryUnloadPlugin()
|
||||
@ -533,6 +533,6 @@ void nsPluginTag::TryUnloadPlugin()
|
||||
// Remove mime types added to the category manager
|
||||
// only if we were made 'active' by setting the host
|
||||
if (mPluginHost) {
|
||||
RegisterWithCategoryManager(PR_FALSE, nsPluginTag::ePluginUnregister);
|
||||
RegisterWithCategoryManager(false, nsPluginTag::ePluginUnregister);
|
||||
}
|
||||
}
|
||||
|
@ -114,9 +114,9 @@ bool nsPluginsDir::IsPluginFile(nsIFile* file)
|
||||
*/
|
||||
if (!strcmp(fileName.get(), "VerifiedDownloadPlugin.plugin")) {
|
||||
NS_WARNING("Preventing load of VerifiedDownloadPlugin.plugin (see bug 436575)");
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Caller is responsible for freeing returned buffer.
|
||||
@ -392,7 +392,7 @@ static bool IsCompatibleArch(nsIFile *file)
|
||||
{
|
||||
CFURLRef pluginURL = NULL;
|
||||
if (NS_FAILED(toCFURLRef(file, pluginURL)))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
bool isPluginFile = false;
|
||||
|
||||
@ -411,7 +411,7 @@ static bool IsCompatibleArch(nsIFile *file)
|
||||
uint32 pluginLibArchitectures;
|
||||
nsresult rv = mozilla::ipc::GeckoChildProcessHost::GetArchitecturesForBinary(executablePath, &pluginLibArchitectures);
|
||||
if (NS_FAILED(rv)) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 containerArchitectures = mozilla::ipc::GeckoChildProcessHost::GetSupportedArchitecturesForProcessType(GeckoProcessType_Plugin);
|
||||
|
@ -172,7 +172,7 @@ bool nsPluginsDir::IsPluginFile(nsIFile* file)
|
||||
{
|
||||
nsCAutoString leaf;
|
||||
if (NS_FAILED(file->GetNativeLeafName(leaf)))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
const char *leafname = leaf.get();
|
||||
|
||||
@ -183,10 +183,10 @@ bool nsPluginsDir::IsPluginFile(nsIFile* file)
|
||||
(0 == strnicmp( &(leafname[len - 4]), ".dll", 4)) &&
|
||||
(0 == strnicmp( leafname, "np", 2)))
|
||||
{
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// nsPluginFile implementation
|
||||
|
@ -121,12 +121,12 @@ static bool LoadExtraSharedLib(const char *name, char **soname, bool tryToGetSon
|
||||
tempSpec.value.pathname = name;
|
||||
handle = PR_LoadLibraryWithFlags(tempSpec, PR_LD_NOW|PR_LD_GLOBAL);
|
||||
if (!handle) {
|
||||
ret = PR_FALSE;
|
||||
ret = false;
|
||||
DisplayPR_LoadLibraryErrorMessage(name);
|
||||
if (tryToGetSoname) {
|
||||
SearchForSoname(name, soname);
|
||||
if (*soname) {
|
||||
ret = LoadExtraSharedLib((const char *) *soname, NULL, PR_FALSE);
|
||||
ret = LoadExtraSharedLib((const char *) *soname, NULL, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -158,7 +158,7 @@ static void LoadExtraSharedLibs()
|
||||
res = prefs->GetCharPref(PREF_PLUGINS_SONAME, &sonameList);
|
||||
if (!sonameList) {
|
||||
// pref is not set, lets use hardcoded list
|
||||
prefSonameListIsSet = PR_FALSE;
|
||||
prefSonameListIsSet = false;
|
||||
sonameList = PL_strdup(DEFAULT_EXTRA_LIBS_LIST);
|
||||
}
|
||||
if (sonameList) {
|
||||
@ -187,7 +187,7 @@ static void LoadExtraSharedLibs()
|
||||
*p = 0;
|
||||
}
|
||||
} else {
|
||||
head = PR_FALSE;
|
||||
head = false;
|
||||
p++;
|
||||
}
|
||||
}
|
||||
@ -202,7 +202,7 @@ static void LoadExtraSharedLibs()
|
||||
//get just a file name
|
||||
arrayOfLibs[i] = PL_strrchr(arrayOfLibs[i], '/') + 1;
|
||||
} else
|
||||
tryToGetSoname = PR_FALSE;
|
||||
tryToGetSoname = false;
|
||||
}
|
||||
char *soname = NULL;
|
||||
if (LoadExtraSharedLib(arrayOfLibs[i], &soname, tryToGetSoname)) {
|
||||
@ -245,7 +245,7 @@ bool nsPluginsDir::IsPluginFile(nsIFile* file)
|
||||
{
|
||||
nsCAutoString filename;
|
||||
if (NS_FAILED(file->GetNativeLeafName(filename)))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
#ifdef ANDROID
|
||||
// It appears that if you load
|
||||
@ -254,21 +254,21 @@ bool nsPluginsDir::IsPluginFile(nsIFile* file)
|
||||
// Since these are just helper libs, we can ignore.
|
||||
const char *cFile = filename.get();
|
||||
if (strstr(cFile, "libstagefright") != NULL)
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
#endif
|
||||
|
||||
NS_NAMED_LITERAL_CSTRING(dllSuffix, LOCAL_PLUGIN_DLL_SUFFIX);
|
||||
if (filename.Length() > dllSuffix.Length() &&
|
||||
StringEndsWith(filename, dllSuffix))
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
|
||||
#ifdef LOCAL_PLUGIN_DLL_ALT_SUFFIX
|
||||
NS_NAMED_LITERAL_CSTRING(dllAltSuffix, LOCAL_PLUGIN_DLL_ALT_SUFFIX);
|
||||
if (filename.Length() > dllAltSuffix.Length() &&
|
||||
StringEndsWith(filename, dllAltSuffix))
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
#endif
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* nsPluginFile implementation */
|
||||
|
@ -208,7 +208,7 @@ static bool CanLoadPlugin(const PRUnichar* aBinaryPath)
|
||||
return canLoad;
|
||||
#else
|
||||
// Assume correct binaries for unhandled cases.
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -219,7 +219,7 @@ bool nsPluginsDir::IsPluginFile(nsIFile* file)
|
||||
{
|
||||
nsCAutoString path;
|
||||
if (NS_FAILED(file->GetNativePath(path)))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
const char *cPath = path.get();
|
||||
|
||||
@ -241,12 +241,12 @@ bool nsPluginsDir::IsPluginFile(nsIFile* file)
|
||||
// don't load OJI-based Java plugins
|
||||
if (!PL_strncasecmp(filename, "npoji", 5) ||
|
||||
!PL_strncasecmp(filename, "npjava", 6))
|
||||
return PR_FALSE;
|
||||
return PR_TRUE;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* nsPluginFile implementation */
|
||||
@ -283,7 +283,7 @@ nsresult nsPluginFile::LoadPlugin(PRLibrary **outLibrary)
|
||||
return NS_ERROR_FILE_INVALID_PATH;
|
||||
|
||||
if (Substring(pluginFolderPath, idx).LowerCaseEqualsLiteral("\\np32dsw.dll")) {
|
||||
protectCurrentDirectory = PR_FALSE;
|
||||
protectCurrentDirectory = false;
|
||||
}
|
||||
|
||||
pluginFolderPath.SetLength(idx);
|
||||
|
70
js/src/config/makefiles/autotargets.mk
Normal file
70
js/src/config/makefiles/autotargets.mk
Normal file
@ -0,0 +1,70 @@
|
||||
# -*- makefile -*-
|
||||
# vim:set ts=8 sw=8 sts=8 noet:
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# The Mozilla Foundation
|
||||
# Portions created by the Initial Developer are Copyright (C) 2011
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Joey Armstrong <joey@mozilla.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
SPACE ?= $(NULL) $(NULL)
|
||||
|
||||
get_auto_arg = $(word $(2),$(subst ^,$(SPACE),$(1))) # get(1=var, 2=offset)
|
||||
gen_auto_macro = $(addsuffix ^$(1),$(2)) # gen(1=target_pattern, 2=value)
|
||||
|
||||
# Library macros
|
||||
mkdir_deps = $(foreach dir,$($(1)),$(dir)/.mkdir.done)
|
||||
|
||||
###########################################################################
|
||||
## Automatic dependency macro generation.
|
||||
## Macros should be defined prior to the inclusion of rules.mk
|
||||
## GENERATED_DIRS - a list of directories to create
|
||||
## AUTO_DEPS - [returned] a list of generated deps targets can depend on
|
||||
## Usage:
|
||||
## all bootstrap: $(AUTO_DEPS)
|
||||
## target: $(dir)/.mkdir.done $(dir)/foobar
|
||||
## mydirs = $(call mkdir_deps,dirlist_macro_name)
|
||||
###########################################################################
|
||||
ifdef GENERATED_DIRS
|
||||
AUTO_DEPS += $(call mkdir_deps,GENERATED_DIRS)
|
||||
endif
|
||||
|
||||
.SECONDARY: $(GENERATED_DIRS) # preserve intermediates: .mkdir.done
|
||||
|
||||
###################################################################
|
||||
## Thread safe directory creation
|
||||
###################################################################
|
||||
%/.mkdir.done:
|
||||
$(MKDIR) -p $(dir $@)
|
||||
@touch $@
|
@ -2030,3 +2030,12 @@ libs export libs::
|
||||
|
||||
default all::
|
||||
if test -d $(DIST)/bin ; then touch $(DIST)/bin/.purgecaches ; fi
|
||||
|
||||
|
||||
#############################################################################
|
||||
# Derived targets and dependencies
|
||||
|
||||
ifndef INCLUDED_AUTOTARGETS_MK
|
||||
include $(topsrcdir)/config/makefiles/autotargets.mk
|
||||
endif
|
||||
|
||||
|
1
layout/generic/crashtests/512749-1.html
Normal file
1
layout/generic/crashtests/512749-1.html
Normal file
@ -0,0 +1 @@
|
||||
<html style="position:fixed"><table style="position:absolute"></table></html>
|
10
layout/generic/crashtests/655462-1.html
Normal file
10
layout/generic/crashtests/655462-1.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html><html><head>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="document.getElementById('q').style.direction = 'rtl';">
|
||||
|
||||
<div style="height: 80px; position: relative; -moz-column-count: 2;"><div style="margin-top: 40px; position: absolute; height: 100px;"></div><div style="position: absolute;" id="q"></div><div style="position: absolute;"></div></div>
|
||||
|
||||
</body></html>
|
@ -305,6 +305,7 @@ load 509749-1.html
|
||||
load 511482.html
|
||||
load 512724-1.html
|
||||
load 512725-1.html
|
||||
load 512749-1.html
|
||||
load 513394-1.html
|
||||
load 514098-1.xhtml
|
||||
load 514800-1.html
|
||||
@ -361,6 +362,7 @@ load 646561-1.html
|
||||
load 646983-1.html
|
||||
load 647332-1.html
|
||||
load 650499-1.html
|
||||
load 655462-1.html
|
||||
load 656130-1.html
|
||||
load 656130-2.html
|
||||
load 660416.html
|
||||
|
9
layout/reftests/bugs/564002-1-ref.html
Normal file
9
layout/reftests/bugs/564002-1-ref.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<div style="float:left">
|
||||
<div style="padding-bottom:1em">
|
||||
<div style="float:left">test</div>
|
||||
</div>
|
||||
<div style="margin-top:0.5em; background:gold;">
|
||||
test
|
||||
</div>
|
||||
</div>
|
9
layout/reftests/bugs/564002-1.html
Normal file
9
layout/reftests/bugs/564002-1.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<div style="float:left">
|
||||
<div style="padding-bottom:1em">
|
||||
<div style="float:left">test</div>
|
||||
</div>
|
||||
<table style="margin-top:0.5em; background:gold;" cellpadding=0 cellspacing=0>
|
||||
<tr><td>test
|
||||
</table>
|
||||
</div>
|
@ -1526,6 +1526,7 @@ fails-if(Android) == 560455-1.xul 560455-1-ref.xul
|
||||
== 563584-10a.html 563584-10-ref.html
|
||||
== 563584-10b.html 563584-10-ref.html
|
||||
== 563584-11.html 563584-11-ref.html
|
||||
== 564002-1.html 564002-1-ref.html
|
||||
== 564054-1.html 564054-1-ref.html
|
||||
fails-if(Android) random-if(layersGPUAccelerated) == 564991-1.html 564991-1-ref.html
|
||||
== 565819-1.html 565819-ref.html
|
||||
|
@ -307,6 +307,11 @@ extractFile(const char * path, const struct cdir_entry *entry, void * data)
|
||||
__android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "inflateEnd failed: %s", strm.msg);
|
||||
|
||||
close(fd);
|
||||
#ifdef ANDROID_ARM_LINKER
|
||||
/* We just extracted data that is going to be executed in the future.
|
||||
* We thus need to ensure Instruction and Data cache coherency. */
|
||||
cacheflush((unsigned) buf, (unsigned) buf + size, 0);
|
||||
#endif
|
||||
munmap(buf, size);
|
||||
}
|
||||
|
||||
|
@ -1159,7 +1159,6 @@ function buildDownloadList(aForceBuild)
|
||||
gBuilder = setTimeout(function() {
|
||||
// Start building the list and select the first item
|
||||
stepListBuilder(1);
|
||||
gDownloadsView.selectedIndex = 0;
|
||||
|
||||
// We just tried to add a single item, so we probably need to enable
|
||||
updateClearListButton();
|
||||
|
@ -166,6 +166,7 @@ function test()
|
||||
try {
|
||||
stmt.executeStep();
|
||||
let richlistbox = doc.getElementById("downloadView");
|
||||
richlistbox.selectedIndex = 0;
|
||||
is(stmt.getInt32(0), richlistbox.children.length,
|
||||
"The database and the number of downloads display matches");
|
||||
stmt.reset();
|
||||
|
@ -176,14 +176,18 @@ function test()
|
||||
if (aTopic != DLMGR_UI_DONE)
|
||||
return;
|
||||
|
||||
SimpleTest.waitForFocus(function () { sendEnter(aSubject) }, aSubject);
|
||||
}
|
||||
};
|
||||
os.removeObserver(testObs, DLMGR_UI_DONE);
|
||||
|
||||
function sendEnter(win) {
|
||||
// Send the enter key to Download Manager to retry the download
|
||||
synthesizeKey("VK_ENTER", {}, win);
|
||||
os.removeObserver(testObs, DLMGR_UI_DONE);
|
||||
SimpleTest.waitForFocus(function () {
|
||||
let win = aSubject;
|
||||
|
||||
// Down arrow to select the download
|
||||
synthesizeKey("VK_DOWN", {}, win);
|
||||
|
||||
// Enter key to retry the download
|
||||
synthesizeKey("VK_ENTER", {}, win);
|
||||
}, aSubject);
|
||||
}
|
||||
};
|
||||
|
||||
// Register with the observer service
|
||||
|
@ -171,6 +171,7 @@ function test()
|
||||
try {
|
||||
stmt.executeStep();
|
||||
let richlistbox = doc.getElementById("downloadView");
|
||||
richlistbox.selectedIndex = 0;
|
||||
is(stmt.getInt32(0), richlistbox.children.length,
|
||||
"The database and the number of downloads display matches");
|
||||
stmt.reset();
|
||||
|
@ -334,7 +334,7 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, PRInt32* aStatus,
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aStatus);
|
||||
|
||||
aSuggestedDriverVersion.SetIsVoid(PR_TRUE);
|
||||
aSuggestedDriverVersion.SetIsVoid(true);
|
||||
|
||||
PRInt32 status = nsIGfxInfo::FEATURE_NO_INFO;
|
||||
|
||||
@ -357,7 +357,7 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, PRInt32* aStatus,
|
||||
bool foundGoodDevice = false;
|
||||
|
||||
if (!IsATIRadeonX1000(mAdapterVendorID, mAdapterDeviceID)) {
|
||||
foundGoodDevice = PR_TRUE;
|
||||
foundGoodDevice = true;
|
||||
}
|
||||
|
||||
#if 0
|
||||
@ -392,7 +392,7 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, PRInt32* aStatus,
|
||||
break;
|
||||
default:
|
||||
if (mRendererIDs[i])
|
||||
foundGoodDevice = PR_TRUE;
|
||||
foundGoodDevice = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -206,13 +206,13 @@ public:
|
||||
|
||||
bool IsASCIICapable()
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
return GetBoolProperty(kTISPropertyInputSourceIsASCIICapable);
|
||||
}
|
||||
|
||||
bool IsEnabled()
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
return GetBoolProperty(kTISPropertyInputSourceIsEnabled);
|
||||
}
|
||||
|
||||
@ -222,49 +222,49 @@ public:
|
||||
|
||||
bool GetLocalizedName(CFStringRef &aName)
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
return GetStringProperty(kTISPropertyLocalizedName, aName);
|
||||
}
|
||||
|
||||
bool GetLocalizedName(nsAString &aName)
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
return GetStringProperty(kTISPropertyLocalizedName, aName);
|
||||
}
|
||||
|
||||
bool GetInputSourceID(CFStringRef &aID)
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
return GetStringProperty(kTISPropertyInputSourceID, aID);
|
||||
}
|
||||
|
||||
bool GetInputSourceID(nsAString &aID)
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
return GetStringProperty(kTISPropertyInputSourceID, aID);
|
||||
}
|
||||
|
||||
bool GetBundleID(CFStringRef &aBundleID)
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
return GetStringProperty(kTISPropertyBundleID, aBundleID);
|
||||
}
|
||||
|
||||
bool GetBundleID(nsAString &aBundleID)
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
return GetStringProperty(kTISPropertyBundleID, aBundleID);
|
||||
}
|
||||
|
||||
bool GetInputSourceType(CFStringRef &aType)
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
return GetStringProperty(kTISPropertyInputSourceType, aType);
|
||||
}
|
||||
|
||||
bool GetInputSourceType(nsAString &aType)
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
return GetStringProperty(kTISPropertyInputSourceType, aType);
|
||||
}
|
||||
|
||||
@ -505,9 +505,9 @@ protected:
|
||||
[mKeyEvent release];
|
||||
mKeyEvent = nsnull;
|
||||
}
|
||||
mKeyDownHandled = PR_FALSE;
|
||||
mKeyPressDispatched = PR_FALSE;
|
||||
mKeyPressHandled = PR_FALSE;
|
||||
mKeyDownHandled = false;
|
||||
mKeyPressDispatched = false;
|
||||
mKeyPressHandled = false;
|
||||
}
|
||||
|
||||
bool KeyDownOrPressHandled()
|
||||
@ -586,7 +586,7 @@ private:
|
||||
bool mOverrideEnabled;
|
||||
|
||||
KeyboardLayoutOverride() :
|
||||
mKeyboardLayout(0), mOverrideEnabled(PR_FALSE)
|
||||
mKeyboardLayout(0), mOverrideEnabled(false)
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -609,7 +609,7 @@ public:
|
||||
*/
|
||||
nsresult StartComplexTextInputForCurrentEvent()
|
||||
{
|
||||
mPluginComplexTextInputRequested = PR_TRUE;
|
||||
mPluginComplexTextInputRequested = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -350,7 +350,7 @@ TISInputSourceWrapper::TranslateToString(UInt32 aKeyCode, UInt32 aModifiers,
|
||||
OnOrOff(aModifiers & alphaLock),
|
||||
OnOrOff(aModifiers & kEventKeyModifierNumLockMask)));
|
||||
|
||||
NS_ENSURE_TRUE(UCKey, PR_FALSE);
|
||||
NS_ENSURE_TRUE(UCKey, false);
|
||||
|
||||
UInt32 deadKeyState = 0;
|
||||
UniCharCount len;
|
||||
@ -364,11 +364,11 @@ TISInputSourceWrapper::TranslateToString(UInt32 aKeyCode, UInt32 aModifiers,
|
||||
("%p TISInputSourceWrapper::TranslateToString, err=0x%X, len=%llu",
|
||||
this, err, len));
|
||||
|
||||
NS_ENSURE_TRUE(err == noErr, PR_FALSE);
|
||||
NS_ENSURE_TRUE(err == noErr, false);
|
||||
if (len == 0) {
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
NS_ENSURE_TRUE(EnsureStringLength(aStr, len), PR_FALSE);
|
||||
NS_ENSURE_TRUE(EnsureStringLength(aStr, len), false);
|
||||
NS_ASSERTION(sizeof(PRUnichar) == sizeof(UniChar),
|
||||
"size of PRUnichar and size of UniChar are different");
|
||||
memcpy(aStr.BeginWriting(), chars, len * sizeof(PRUnichar));
|
||||
@ -377,7 +377,7 @@ TISInputSourceWrapper::TranslateToString(UInt32 aKeyCode, UInt32 aModifiers,
|
||||
("%p TISInputSourceWrapper::TranslateToString, aStr=\"%s\"",
|
||||
this, NS_ConvertUTF16toUTF8(aStr).get()));
|
||||
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
PRUint32
|
||||
@ -551,19 +551,19 @@ TISInputSourceWrapper::GetStringProperty(const CFStringRef aKey,
|
||||
bool
|
||||
TISInputSourceWrapper::IsOpenedIMEMode()
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
if (!IsIMEMode())
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
return !IsASCIICapable();
|
||||
}
|
||||
|
||||
bool
|
||||
TISInputSourceWrapper::IsIMEMode()
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
CFStringRef str;
|
||||
GetInputSourceType(str);
|
||||
NS_ENSURE_TRUE(str, PR_FALSE);
|
||||
NS_ENSURE_TRUE(str, false);
|
||||
return ::CFStringCompare(kTISTypeKeyboardInputMode,
|
||||
str, 0) == kCFCompareEqualTo;
|
||||
}
|
||||
@ -571,7 +571,7 @@ TISInputSourceWrapper::IsIMEMode()
|
||||
bool
|
||||
TISInputSourceWrapper::GetLanguageList(CFArrayRef &aLanguageList)
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
aLanguageList = static_cast<CFArrayRef>(
|
||||
::TISGetInputSourceProperty(mInputSource,
|
||||
kTISPropertyInputSourceLanguages));
|
||||
@ -581,11 +581,11 @@ TISInputSourceWrapper::GetLanguageList(CFArrayRef &aLanguageList)
|
||||
bool
|
||||
TISInputSourceWrapper::GetPrimaryLanguage(CFStringRef &aPrimaryLanguage)
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
CFArrayRef langList;
|
||||
NS_ENSURE_TRUE(GetLanguageList(langList), PR_FALSE);
|
||||
NS_ENSURE_TRUE(GetLanguageList(langList), false);
|
||||
if (::CFArrayGetCount(langList) == 0)
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
aPrimaryLanguage =
|
||||
static_cast<CFStringRef>(::CFArrayGetValueAtIndex(langList, 0));
|
||||
return aPrimaryLanguage != nsnull;
|
||||
@ -594,9 +594,9 @@ TISInputSourceWrapper::GetPrimaryLanguage(CFStringRef &aPrimaryLanguage)
|
||||
bool
|
||||
TISInputSourceWrapper::GetPrimaryLanguage(nsAString &aPrimaryLanguage)
|
||||
{
|
||||
NS_ENSURE_TRUE(mInputSource, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mInputSource, false);
|
||||
CFStringRef primaryLanguage;
|
||||
NS_ENSURE_TRUE(GetPrimaryLanguage(primaryLanguage), PR_FALSE);
|
||||
NS_ENSURE_TRUE(GetPrimaryLanguage(primaryLanguage), false);
|
||||
nsCocoaUtils::GetStringForNSString((const NSString*)primaryLanguage,
|
||||
aPrimaryLanguage);
|
||||
return !aPrimaryLanguage.IsEmpty();
|
||||
@ -643,7 +643,7 @@ TISInputSourceWrapper::Clear()
|
||||
mInputSource = nsnull;
|
||||
mIsRTL = -1;
|
||||
mUCKeyboardLayout = nsnull;
|
||||
mOverrideKeyboard = PR_FALSE;
|
||||
mOverrideKeyboard = false;
|
||||
}
|
||||
|
||||
void
|
||||
@ -668,7 +668,7 @@ TISInputSourceWrapper::InitKeyEvent(NSEvent *aNativeKeyEvent,
|
||||
aKeyEvent.isMeta = ((modifiers & NSCommandKeyMask) != 0);
|
||||
|
||||
aKeyEvent.refPoint = nsIntPoint(0, 0);
|
||||
aKeyEvent.isChar = PR_FALSE; // XXX not used in XP level
|
||||
aKeyEvent.isChar = false; // XXX not used in XP level
|
||||
|
||||
NSString* str = nil;
|
||||
if ([aNativeKeyEvent type] != NSFlagsChanged) {
|
||||
@ -710,7 +710,7 @@ TISInputSourceWrapper::InitKeyPressEvent(NSEvent *aNativeKeyEvent,
|
||||
"aKeyEvent.message=%s",
|
||||
this, aNativeKeyEvent, GetGeckoKeyEventType(aKeyEvent)));
|
||||
|
||||
aKeyEvent.isChar = PR_TRUE; // this is not a special key XXX not used in XP
|
||||
aKeyEvent.isChar = true; // this is not a special key XXX not used in XP
|
||||
|
||||
aKeyEvent.charCode = 0;
|
||||
NSString* chars = [aNativeKeyEvent characters];
|
||||
@ -983,7 +983,7 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
|
||||
PR_LOG(gLog, PR_LOG_ALWAYS,
|
||||
("%p TextInputHandler::HandleKeyDownEvent, "
|
||||
"widget has been already destroyed", this));
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
PR_LOG(gLog, PR_LOG_ALWAYS,
|
||||
@ -1004,13 +1004,13 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
|
||||
if (nonDeadKeyPress && !IsIMEComposing()) {
|
||||
NSResponder* firstResponder = [[mView window] firstResponder];
|
||||
|
||||
nsKeyEvent keydownEvent(PR_TRUE, NS_KEY_DOWN, mWidget);
|
||||
nsKeyEvent keydownEvent(true, NS_KEY_DOWN, mWidget);
|
||||
InitKeyEvent(aNativeEvent, keydownEvent);
|
||||
|
||||
#ifndef NP_NO_CARBON
|
||||
EventRecord carbonEvent;
|
||||
if ([mView pluginEventModel] == NPEventModelCarbon) {
|
||||
ConvertCocoaKeyEventToCarbonEvent(aNativeEvent, carbonEvent, PR_TRUE);
|
||||
ConvertCocoaKeyEventToCarbonEvent(aNativeEvent, carbonEvent, true);
|
||||
keydownEvent.pluginEvent = &carbonEvent;
|
||||
}
|
||||
#endif // #ifndef NP_NO_CARBON
|
||||
@ -1038,11 +1038,11 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
|
||||
[aNativeEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask;
|
||||
if (modifierFlags == NSControlKeyMask &&
|
||||
[[aNativeEvent charactersIgnoringModifiers] isEqualToString:@" "]) {
|
||||
nsMouseEvent contextMenuEvent(PR_TRUE, NS_CONTEXTMENU,
|
||||
nsMouseEvent contextMenuEvent(true, NS_CONTEXTMENU,
|
||||
[mView widget], nsMouseEvent::eReal,
|
||||
nsMouseEvent::eContextMenuKey);
|
||||
contextMenuEvent.isShift = contextMenuEvent.isControl =
|
||||
contextMenuEvent.isAlt = contextMenuEvent.isMeta = PR_FALSE;
|
||||
contextMenuEvent.isAlt = contextMenuEvent.isMeta = false;
|
||||
|
||||
bool cmEventHandled = DispatchEvent(contextMenuEvent);
|
||||
PR_LOG(gLog, PR_LOG_ALWAYS,
|
||||
@ -1055,7 +1055,7 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
|
||||
return (cmEventHandled || mCurrentKeyEvent.KeyDownOrPressHandled());
|
||||
}
|
||||
|
||||
nsKeyEvent keypressEvent(PR_TRUE, NS_KEY_PRESS, mWidget);
|
||||
nsKeyEvent keypressEvent(true, NS_KEY_PRESS, mWidget);
|
||||
InitKeyEvent(aNativeEvent, keypressEvent);
|
||||
|
||||
// if this is a non-letter keypress, or the control key is down,
|
||||
@ -1070,7 +1070,7 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
|
||||
keypressEvent.flags |= NS_EVENT_FLAG_NO_DEFAULT;
|
||||
}
|
||||
mCurrentKeyEvent.mKeyPressHandled = DispatchEvent(keypressEvent);
|
||||
mCurrentKeyEvent.mKeyPressDispatched = PR_TRUE;
|
||||
mCurrentKeyEvent.mKeyPressDispatched = true;
|
||||
if (Destroyed()) {
|
||||
PR_LOG(gLog, PR_LOG_ALWAYS,
|
||||
("%p TextInputHandler::HandleKeyDownEvent, "
|
||||
@ -1088,7 +1088,7 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
|
||||
("%p TextInputHandler::HandleKeyDownEvent, calling interpretKeyEvents",
|
||||
this));
|
||||
[mView interpretKeyEvents:[NSArray arrayWithObject:aNativeEvent]];
|
||||
interpretKeyEventsCalled = PR_TRUE;
|
||||
interpretKeyEventsCalled = true;
|
||||
PR_LOG(gLog, PR_LOG_ALWAYS,
|
||||
("%p TextInputHandler::HandleKeyDownEvent, called interpretKeyEvents",
|
||||
this));
|
||||
@ -1108,7 +1108,7 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
|
||||
|
||||
if (!mCurrentKeyEvent.mKeyPressDispatched && nonDeadKeyPress &&
|
||||
!wasComposing && !IsIMEComposing()) {
|
||||
nsKeyEvent keypressEvent(PR_TRUE, NS_KEY_PRESS, mWidget);
|
||||
nsKeyEvent keypressEvent(true, NS_KEY_PRESS, mWidget);
|
||||
InitKeyEvent(aNativeEvent, keypressEvent);
|
||||
|
||||
// If we called interpretKeyEvents and this isn't normal character input
|
||||
@ -1143,7 +1143,7 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
|
||||
TrueOrFalse(mCurrentKeyEvent.mKeyPressHandled)));
|
||||
return mCurrentKeyEvent.KeyDownOrPressHandled();
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(PR_FALSE);
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1163,7 +1163,7 @@ TextInputHandler::HandleKeyUpEvent(NSEvent* aNativeEvent)
|
||||
TrueOrFalse(mIgnoreNextKeyUpEvent), TrueOrFalse(IsIMEComposing())));
|
||||
|
||||
if (mIgnoreNextKeyUpEvent) {
|
||||
mIgnoreNextKeyUpEvent = PR_FALSE;
|
||||
mIgnoreNextKeyUpEvent = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1179,7 +1179,7 @@ TextInputHandler::HandleKeyUpEvent(NSEvent* aNativeEvent)
|
||||
return;
|
||||
}
|
||||
|
||||
nsKeyEvent keyupEvent(PR_TRUE, NS_KEY_UP, mWidget);
|
||||
nsKeyEvent keyupEvent(true, NS_KEY_UP, mWidget);
|
||||
InitKeyEvent(aNativeEvent, keyupEvent);
|
||||
|
||||
DispatchEvent(keyupEvent);
|
||||
@ -1213,7 +1213,7 @@ TextInputHandler::HandleFlagsChanged(NSEvent* aNativeEvent)
|
||||
// modifier state does for other modifier keys on key up.
|
||||
if ([aNativeEvent keyCode] == kCapsLockKeyCode) {
|
||||
// Fire key down event for caps lock.
|
||||
DispatchKeyEventForFlagsChanged(aNativeEvent, PR_TRUE);
|
||||
DispatchKeyEventForFlagsChanged(aNativeEvent, true);
|
||||
if (Destroyed()) {
|
||||
return;
|
||||
}
|
||||
@ -1280,7 +1280,7 @@ TextInputHandler::DispatchKeyEventForFlagsChanged(NSEvent* aNativeEvent,
|
||||
NPCocoaEvent cocoaEvent;
|
||||
|
||||
// Fire a key event.
|
||||
nsKeyEvent keyEvent(PR_TRUE, message, mWidget);
|
||||
nsKeyEvent keyEvent(true, message, mWidget);
|
||||
InitKeyEvent(aNativeEvent, keyEvent);
|
||||
|
||||
// create event for use by plugins
|
||||
@ -1344,11 +1344,11 @@ TextInputHandler::InsertText(NSAttributedString *aAttrString)
|
||||
nsRefPtr<nsChildView> kungFuDeathGrip(mWidget);
|
||||
|
||||
// Dispatch keypress event with char instead of textEvent
|
||||
nsKeyEvent keypressEvent(PR_TRUE, NS_KEY_PRESS, mWidget);
|
||||
nsKeyEvent keypressEvent(true, NS_KEY_PRESS, mWidget);
|
||||
keypressEvent.time = PR_IntervalNow();
|
||||
keypressEvent.charCode = str.CharAt(0);
|
||||
keypressEvent.keyCode = 0;
|
||||
keypressEvent.isChar = PR_TRUE;
|
||||
keypressEvent.isChar = true;
|
||||
|
||||
// Don't set other modifiers from the current event, because here in
|
||||
// -insertText: they've already been taken into account in creating
|
||||
@ -1368,7 +1368,7 @@ TextInputHandler::InsertText(NSAttributedString *aAttrString)
|
||||
// doesn't match to this gecko event...
|
||||
#ifndef NP_NO_CARBON
|
||||
if ([mView pluginEventModel] == NPEventModelCarbon) {
|
||||
ConvertCocoaKeyEventToCarbonEvent(keyEvent, carbonEvent, PR_TRUE);
|
||||
ConvertCocoaKeyEventToCarbonEvent(keyEvent, carbonEvent, true);
|
||||
keypressEvent.pluginEvent = &carbonEvent;
|
||||
}
|
||||
#endif // #ifndef NP_NO_CARBON
|
||||
@ -1402,7 +1402,7 @@ TextInputHandler::InsertText(NSAttributedString *aAttrString)
|
||||
|
||||
if (mCurrentKeyEvent.mKeyEvent) {
|
||||
mCurrentKeyEvent.mKeyPressHandled = keyPressHandled;
|
||||
mCurrentKeyEvent.mKeyPressDispatched = PR_TRUE;
|
||||
mCurrentKeyEvent.mKeyPressDispatched = true;
|
||||
}
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
@ -1440,7 +1440,7 @@ IMEInputHandler::InitStaticMembers()
|
||||
{
|
||||
if (sStaticMembersInitialized)
|
||||
return;
|
||||
sStaticMembersInitialized = PR_TRUE;
|
||||
sStaticMembersInitialized = true;
|
||||
// We need to check the keyboard layout changes on all applications.
|
||||
CFNotificationCenterRef center = ::CFNotificationCenterGetDistributedCenter();
|
||||
// XXX Don't we need to remove the observer at shut down?
|
||||
@ -1681,9 +1681,9 @@ IMEInputHandler::DiscardIMEComposition()
|
||||
return;
|
||||
}
|
||||
|
||||
mIgnoreIMECommit = PR_TRUE;
|
||||
mIgnoreIMECommit = true;
|
||||
[im markedTextAbandoned: mView];
|
||||
mIgnoreIMECommit = PR_FALSE;
|
||||
mIgnoreIMECommit = false;
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK
|
||||
}
|
||||
@ -1760,7 +1760,7 @@ IMEInputHandler::ExecutePendingMethods()
|
||||
}
|
||||
|
||||
if (![[NSApplication sharedApplication] isActive]) {
|
||||
mIsInFocusProcessing = PR_FALSE;
|
||||
mIsInFocusProcessing = false;
|
||||
// If we're not active, we should retry at focus event
|
||||
return;
|
||||
}
|
||||
@ -1777,7 +1777,7 @@ IMEInputHandler::ExecutePendingMethods()
|
||||
if (pendingMethods & kResetIMEWindowLevel)
|
||||
ResetIMEWindowLevel();
|
||||
|
||||
mIsInFocusProcessing = PR_FALSE;
|
||||
mIsInFocusProcessing = false;
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
}
|
||||
@ -1927,11 +1927,11 @@ IMEInputHandler::DispatchTextEvent(const nsString& aText,
|
||||
aSelectedRange.location, aSelectedRange.length,
|
||||
TrueOrFalse(aDoCommit), TrueOrFalse(Destroyed())));
|
||||
|
||||
NS_ENSURE_TRUE(!Destroyed(), PR_FALSE);
|
||||
NS_ENSURE_TRUE(!Destroyed(), false);
|
||||
|
||||
nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
|
||||
|
||||
nsTextEvent textEvent(PR_TRUE, NS_TEXT_TEXT, mWidget);
|
||||
nsTextEvent textEvent(true, NS_TEXT_TEXT, mWidget);
|
||||
textEvent.time = PR_IntervalNow();
|
||||
textEvent.theText = aText;
|
||||
nsAutoTArray<nsTextRange, 4> textRanges;
|
||||
@ -1942,7 +1942,7 @@ IMEInputHandler::DispatchTextEvent(const nsString& aText,
|
||||
textEvent.rangeCount = textRanges.Length();
|
||||
|
||||
if (textEvent.theText != mLastDispatchedCompositionString) {
|
||||
nsCompositionEvent compositionUpdate(PR_TRUE, NS_COMPOSITION_UPDATE,
|
||||
nsCompositionEvent compositionUpdate(true, NS_COMPOSITION_UPDATE,
|
||||
mWidget);
|
||||
compositionUpdate.time = textEvent.time;
|
||||
compositionUpdate.data = textEvent.theText;
|
||||
@ -1954,7 +1954,7 @@ IMEInputHandler::DispatchTextEvent(const nsString& aText,
|
||||
"aborting the composition, mIsInFocusProcessing=%s, Destryoed()=%s",
|
||||
this, TrueOrFalse(mIsInFocusProcessing), TrueOrFalse(Destroyed())));
|
||||
if (Destroyed()) {
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1994,7 +1994,7 @@ IMEInputHandler::InsertTextAsCommittingComposition(
|
||||
if (!IsIMEComposing()) {
|
||||
// XXXmnakano Probably, we shouldn't emulate composition in this case.
|
||||
// I think that we should just fire DOM3 textInput event if we implement it.
|
||||
nsCompositionEvent compStart(PR_TRUE, NS_COMPOSITION_START, mWidget);
|
||||
nsCompositionEvent compStart(true, NS_COMPOSITION_START, mWidget);
|
||||
InitCompositionEvent(compStart);
|
||||
|
||||
DispatchEvent(compStart);
|
||||
@ -2016,7 +2016,7 @@ IMEInputHandler::InsertTextAsCommittingComposition(
|
||||
}
|
||||
|
||||
NSRange range = NSMakeRange(0, str.Length());
|
||||
DispatchTextEvent(str, aAttrString, range, PR_TRUE);
|
||||
DispatchTextEvent(str, aAttrString, range, true);
|
||||
if (Destroyed()) {
|
||||
PR_LOG(gLog, PR_LOG_ALWAYS,
|
||||
("%p IMEInputHandler::InsertTextAsCommittingComposition, "
|
||||
@ -2026,7 +2026,7 @@ IMEInputHandler::InsertTextAsCommittingComposition(
|
||||
|
||||
OnUpdateIMEComposition([aAttrString string]);
|
||||
|
||||
nsCompositionEvent compEnd(PR_TRUE, NS_COMPOSITION_END, mWidget);
|
||||
nsCompositionEvent compEnd(true, NS_COMPOSITION_END, mWidget);
|
||||
InitCompositionEvent(compEnd);
|
||||
compEnd.data = mLastDispatchedCompositionString;
|
||||
DispatchEvent(compEnd);
|
||||
@ -2072,12 +2072,12 @@ IMEInputHandler::SetMarkedText(NSAttributedString* aAttrString,
|
||||
mMarkedRange.length = str.Length();
|
||||
|
||||
if (!IsIMEComposing() && !str.IsEmpty()) {
|
||||
nsQueryContentEvent selection(PR_TRUE, NS_QUERY_SELECTED_TEXT,
|
||||
nsQueryContentEvent selection(true, NS_QUERY_SELECTED_TEXT,
|
||||
mWidget);
|
||||
DispatchEvent(selection);
|
||||
mMarkedRange.location = selection.mSucceeded ? selection.mReply.mOffset : 0;
|
||||
|
||||
nsCompositionEvent compStart(PR_TRUE, NS_COMPOSITION_START, mWidget);
|
||||
nsCompositionEvent compStart(true, NS_COMPOSITION_START, mWidget);
|
||||
InitCompositionEvent(compStart);
|
||||
|
||||
DispatchEvent(compStart);
|
||||
@ -2104,7 +2104,7 @@ IMEInputHandler::SetMarkedText(NSAttributedString* aAttrString,
|
||||
}
|
||||
|
||||
if (doCommit) {
|
||||
nsCompositionEvent compEnd(PR_TRUE, NS_COMPOSITION_END, mWidget);
|
||||
nsCompositionEvent compEnd(true, NS_COMPOSITION_END, mWidget);
|
||||
InitCompositionEvent(compEnd);
|
||||
compEnd.data = mLastDispatchedCompositionString;
|
||||
DispatchEvent(compEnd);
|
||||
@ -2135,7 +2135,7 @@ IMEInputHandler::ConversationIdentifier()
|
||||
nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
|
||||
|
||||
// NOTE: The size of NSInteger is same as pointer size.
|
||||
nsQueryContentEvent textContent(PR_TRUE, NS_QUERY_TEXT_CONTENT, mWidget);
|
||||
nsQueryContentEvent textContent(true, NS_QUERY_TEXT_CONTENT, mWidget);
|
||||
textContent.InitForQueryTextContent(0, 0);
|
||||
DispatchEvent(textContent);
|
||||
if (!textContent.mSucceeded) {
|
||||
@ -2165,7 +2165,7 @@ IMEInputHandler::GetAttributedSubstringFromRange(NSRange& aRange)
|
||||
nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
|
||||
|
||||
nsAutoString str;
|
||||
nsQueryContentEvent textContent(PR_TRUE, NS_QUERY_TEXT_CONTENT, mWidget);
|
||||
nsQueryContentEvent textContent(true, NS_QUERY_TEXT_CONTENT, mWidget);
|
||||
textContent.InitForQueryTextContent(aRange.location, aRange.length);
|
||||
DispatchEvent(textContent);
|
||||
|
||||
@ -2229,7 +2229,7 @@ IMEInputHandler::SelectedRange()
|
||||
|
||||
nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
|
||||
|
||||
nsQueryContentEvent selection(PR_TRUE, NS_QUERY_SELECTED_TEXT, mWidget);
|
||||
nsQueryContentEvent selection(true, NS_QUERY_SELECTED_TEXT, mWidget);
|
||||
DispatchEvent(selection);
|
||||
|
||||
PR_LOG(gLog, PR_LOG_ALWAYS,
|
||||
@ -2272,18 +2272,18 @@ IMEInputHandler::FirstRectForCharacterRange(NSRange& aRange)
|
||||
nsIntRect r;
|
||||
bool useCaretRect = (aRange.length == 0);
|
||||
if (!useCaretRect) {
|
||||
nsQueryContentEvent charRect(PR_TRUE, NS_QUERY_TEXT_RECT, mWidget);
|
||||
nsQueryContentEvent charRect(true, NS_QUERY_TEXT_RECT, mWidget);
|
||||
charRect.InitForQueryTextRect(aRange.location, 1);
|
||||
DispatchEvent(charRect);
|
||||
if (charRect.mSucceeded) {
|
||||
r = charRect.mReply.mRect;
|
||||
} else {
|
||||
useCaretRect = PR_TRUE;
|
||||
useCaretRect = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (useCaretRect) {
|
||||
nsQueryContentEvent caretRect(PR_TRUE, NS_QUERY_CARET_RECT, mWidget);
|
||||
nsQueryContentEvent caretRect(true, NS_QUERY_CARET_RECT, mWidget);
|
||||
caretRect.InitForQueryCaretRect(aRange.location);
|
||||
DispatchEvent(caretRect);
|
||||
if (!caretRect.mSucceeded) {
|
||||
@ -2364,9 +2364,9 @@ IMEInputHandler::IMEInputHandler(nsChildView* aWidget,
|
||||
NSView<mozView> *aNativeView) :
|
||||
PluginTextInputHandler(aWidget, aNativeView),
|
||||
mPendingMethods(0), mIMECompositionString(nsnull),
|
||||
mIsIMEComposing(PR_FALSE), mIsIMEEnabled(PR_TRUE),
|
||||
mIsASCIICapableOnly(PR_FALSE), mIgnoreIMECommit(PR_FALSE),
|
||||
mIsInFocusProcessing(PR_FALSE)
|
||||
mIsIMEComposing(false), mIsIMEEnabled(true),
|
||||
mIsASCIICapableOnly(false), mIgnoreIMECommit(false),
|
||||
mIsInFocusProcessing(false)
|
||||
{
|
||||
InitStaticMembers();
|
||||
|
||||
@ -2395,7 +2395,7 @@ IMEInputHandler::OnFocusChangeInGecko(bool aFocus)
|
||||
|
||||
// This is called when the native focus is changed and when the native focus
|
||||
// isn't changed but the focus is changed in Gecko.
|
||||
// XXX currently, we're not called this method with PR_FALSE, we need to
|
||||
// XXX currently, we're not called this method with false, we need to
|
||||
// improve the nsIMEStateManager implementation.
|
||||
if (!aFocus) {
|
||||
if (sFocusedIMEHandler == this)
|
||||
@ -2404,7 +2404,7 @@ IMEInputHandler::OnFocusChangeInGecko(bool aFocus)
|
||||
}
|
||||
|
||||
sFocusedIMEHandler = this;
|
||||
mIsInFocusProcessing = PR_TRUE;
|
||||
mIsInFocusProcessing = true;
|
||||
|
||||
// We need to reset the IME's window level by the current focused view of
|
||||
// Gecko. It may be different from mView. However, we cannot get the
|
||||
@ -2430,7 +2430,7 @@ IMEInputHandler::OnDestroyWidget(nsChildView* aDestroyingWidget)
|
||||
}
|
||||
|
||||
if (!PluginTextInputHandler::OnDestroyWidget(aDestroyingWidget)) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (IsIMEComposing()) {
|
||||
@ -2439,7 +2439,7 @@ IMEInputHandler::OnDestroyWidget(nsChildView* aDestroyingWidget)
|
||||
OnEndIMEComposition();
|
||||
}
|
||||
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
@ -2454,7 +2454,7 @@ IMEInputHandler::OnStartIMEComposition()
|
||||
TrueOrFalse(mIsIMEComposing)));
|
||||
|
||||
NS_ASSERTION(!mIsIMEComposing, "There is a composition already");
|
||||
mIsIMEComposing = PR_TRUE;
|
||||
mIsIMEComposing = true;
|
||||
|
||||
mLastDispatchedCompositionString.Truncate();
|
||||
|
||||
@ -2494,7 +2494,7 @@ IMEInputHandler::OnEndIMEComposition()
|
||||
|
||||
NS_ASSERTION(mIsIMEComposing, "We're not in composition");
|
||||
|
||||
mIsIMEComposing = PR_FALSE;
|
||||
mIsIMEComposing = false;
|
||||
|
||||
if (mIMECompositionString) {
|
||||
[mIMECompositionString release];
|
||||
@ -2603,9 +2603,9 @@ IMEInputHandler::CancelIMEComposition()
|
||||
|
||||
// For canceling the current composing, we need to ignore the param of
|
||||
// insertText. But this code is ugly...
|
||||
mIgnoreIMECommit = PR_TRUE;
|
||||
mIgnoreIMECommit = true;
|
||||
KillIMEComposition();
|
||||
mIgnoreIMECommit = PR_FALSE;
|
||||
mIgnoreIMECommit = false;
|
||||
|
||||
if (!IsIMEComposing())
|
||||
return;
|
||||
@ -2622,14 +2622,14 @@ IMEInputHandler::IsFocused()
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
NS_ENSURE_TRUE(!Destroyed(), PR_FALSE);
|
||||
NS_ENSURE_TRUE(!Destroyed(), false);
|
||||
NSWindow* window = [mView window];
|
||||
NS_ENSURE_TRUE(window, PR_FALSE);
|
||||
NS_ENSURE_TRUE(window, false);
|
||||
return [window firstResponder] == mView &&
|
||||
([window isMainWindow] || [window isSheet]) &&
|
||||
[[NSApplication sharedApplication] isActive];
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(PR_FALSE);
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
|
||||
}
|
||||
|
||||
bool
|
||||
@ -2691,7 +2691,7 @@ IMEInputHandler::SetIMEOpenState(bool aOpenIME)
|
||||
static bool sIsPrefferredIMESearched = false;
|
||||
if (sIsPrefferredIMESearched)
|
||||
return;
|
||||
sIsPrefferredIMESearched = PR_TRUE;
|
||||
sIsPrefferredIMESearched = true;
|
||||
OpenSystemPreferredLanguageIME();
|
||||
}
|
||||
|
||||
@ -2736,7 +2736,7 @@ IMEInputHandler::OpenSystemPreferredLanguageIME()
|
||||
}
|
||||
#endif // #ifdef PR_LOGGING
|
||||
tis.Select();
|
||||
changed = PR_TRUE;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
::CFRelease(locale);
|
||||
@ -2760,11 +2760,11 @@ IMEInputHandler::OpenSystemPreferredLanguageIME()
|
||||
PluginTextInputHandler::PluginTextInputHandler(nsChildView* aWidget,
|
||||
NSView<mozView> *aNativeView) :
|
||||
TextInputHandlerBase(aWidget, aNativeView),
|
||||
mIgnoreNextKeyUpEvent(PR_FALSE),
|
||||
mIgnoreNextKeyUpEvent(false),
|
||||
#ifndef NP_NO_CARBON
|
||||
mPluginTSMDoc(0), mPluginTSMInComposition(PR_FALSE),
|
||||
mPluginTSMDoc(0), mPluginTSMInComposition(false),
|
||||
#endif // #ifndef NP_NO_CARBON
|
||||
mPluginComplexTextInputRequested(PR_FALSE)
|
||||
mPluginComplexTextInputRequested(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -2829,20 +2829,20 @@ PluginTextInputHandler::ConvertUnicodeToCharCode(PRUnichar aUniChar,
|
||||
kTextRegionDontCare,
|
||||
NULL,
|
||||
&systemEncoding);
|
||||
NS_ENSURE_TRUE(err == noErr, PR_FALSE);
|
||||
NS_ENSURE_TRUE(err == noErr, false);
|
||||
|
||||
err = ::CreateUnicodeToTextInfoByEncoding(systemEncoding, &converterInfo);
|
||||
NS_ENSURE_TRUE(err == noErr, PR_FALSE);
|
||||
NS_ENSURE_TRUE(err == noErr, false);
|
||||
|
||||
err = ::ConvertFromUnicodeToPString(converterInfo, sizeof(PRUnichar),
|
||||
&aUniChar, convertedString);
|
||||
NS_ENSURE_TRUE(err == noErr, PR_FALSE);
|
||||
NS_ENSURE_TRUE(err == noErr, false);
|
||||
|
||||
*aOutChar = convertedString[1];
|
||||
::DisposeUnicodeToTextInfo(&converterInfo);
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(PR_FALSE);
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
@ -3028,7 +3028,7 @@ PluginTextInputHandler::HandleCarbonPluginKeyEvent(EventRef aKeyEvent)
|
||||
cocoaTextEvent.type = NPCocoaEventTextInput;
|
||||
cocoaTextEvent.data.text.text = (NPNSString*)text;
|
||||
|
||||
nsPluginEvent pluginEvent(PR_TRUE, NS_PLUGIN_INPUT_EVENT, mWidget);
|
||||
nsPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
|
||||
nsCocoaUtils::InitPluginEvent(pluginEvent, cocoaTextEvent);
|
||||
DispatchEvent(pluginEvent);
|
||||
|
||||
@ -3070,7 +3070,7 @@ PluginTextInputHandler::HandleCarbonPluginKeyEvent(EventRef aKeyEvent)
|
||||
|
||||
EventRecord eventRec;
|
||||
if (::ConvertEventRefToEventRecord(cloneEvent, &eventRec)) {
|
||||
nsKeyEvent keydownEvent(PR_TRUE, NS_KEY_DOWN, mWidget);
|
||||
nsKeyEvent keydownEvent(true, NS_KEY_DOWN, mWidget);
|
||||
|
||||
PRUint32 keyCode = ComputeGeckoKeyCode(macKeyCode, @"");
|
||||
PRUint32 charCode(charCodes.ElementAt(i));
|
||||
@ -3081,7 +3081,7 @@ PluginTextInputHandler::HandleCarbonPluginKeyEvent(EventRef aKeyEvent)
|
||||
keydownEvent.keyCode = keyCode;
|
||||
} else {
|
||||
keydownEvent.charCode = charCode;
|
||||
keydownEvent.isChar = PR_TRUE;
|
||||
keydownEvent.isChar = true;
|
||||
}
|
||||
keydownEvent.isShift = ((modifiers & shiftKey) != 0);
|
||||
keydownEvent.isControl = ((modifiers & controlKey) != 0);
|
||||
@ -3145,7 +3145,7 @@ PluginTextInputHandler::HandleKeyDownEventForPlugin(NSEvent* aNativeKeyEvent)
|
||||
// it.
|
||||
if (IsInPluginComposition()) {
|
||||
// Don't send key up events for key downs associated with compositions.
|
||||
mIgnoreNextKeyUpEvent = PR_TRUE;
|
||||
mIgnoreNextKeyUpEvent = true;
|
||||
|
||||
NSString* textString = nil;
|
||||
[ctiPanel interpretKeyEvent:aNativeKeyEvent string:&textString];
|
||||
@ -3157,10 +3157,10 @@ PluginTextInputHandler::HandleKeyDownEventForPlugin(NSEvent* aNativeKeyEvent)
|
||||
}
|
||||
|
||||
// Reset complex text input request flag.
|
||||
mPluginComplexTextInputRequested = PR_FALSE;
|
||||
mPluginComplexTextInputRequested = false;
|
||||
|
||||
// Send key down event to the plugin.
|
||||
nsPluginEvent pluginEvent(PR_TRUE, NS_PLUGIN_INPUT_EVENT, mWidget);
|
||||
nsPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
|
||||
NPCocoaEvent cocoaEvent;
|
||||
ConvertCocoaKeyEventToNPCocoaEvent(aNativeKeyEvent, cocoaEvent);
|
||||
nsCocoaUtils::InitPluginEvent(pluginEvent, cocoaEvent);
|
||||
@ -3172,7 +3172,7 @@ PluginTextInputHandler::HandleKeyDownEventForPlugin(NSEvent* aNativeKeyEvent)
|
||||
// Start complex text composition if requested.
|
||||
if (mPluginComplexTextInputRequested) {
|
||||
// Don't send key up events for key downs associated with compositions.
|
||||
mIgnoreNextKeyUpEvent = PR_TRUE;
|
||||
mIgnoreNextKeyUpEvent = true;
|
||||
|
||||
NSString* textString = nil;
|
||||
[ctiPanel interpretKeyEvent:aNativeKeyEvent string:&textString];
|
||||
@ -3186,16 +3186,16 @@ PluginTextInputHandler::HandleKeyDownEventForPlugin(NSEvent* aNativeKeyEvent)
|
||||
bool wasInComposition = false;
|
||||
if ([mView pluginEventModel] == NPEventModelCocoa) {
|
||||
if (IsInPluginComposition()) {
|
||||
wasInComposition = PR_TRUE;
|
||||
wasInComposition = true;
|
||||
|
||||
// Don't send key up events for key downs associated with compositions.
|
||||
mIgnoreNextKeyUpEvent = PR_TRUE;
|
||||
mIgnoreNextKeyUpEvent = true;
|
||||
} else {
|
||||
// Reset complex text input request flag.
|
||||
mPluginComplexTextInputRequested = PR_FALSE;
|
||||
mPluginComplexTextInputRequested = false;
|
||||
|
||||
// Send key down event to the plugin.
|
||||
nsPluginEvent pluginEvent(PR_TRUE, NS_PLUGIN_INPUT_EVENT, mWidget);
|
||||
nsPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
|
||||
NPCocoaEvent cocoaEvent;
|
||||
ConvertCocoaKeyEventToNPCocoaEvent(aNativeKeyEvent, cocoaEvent);
|
||||
nsCocoaUtils::InitPluginEvent(pluginEvent, cocoaEvent);
|
||||
@ -3210,7 +3210,7 @@ PluginTextInputHandler::HandleKeyDownEventForPlugin(NSEvent* aNativeKeyEvent)
|
||||
}
|
||||
|
||||
// Don't send key up events for key downs associated with compositions.
|
||||
mIgnoreNextKeyUpEvent = PR_TRUE;
|
||||
mIgnoreNextKeyUpEvent = true;
|
||||
}
|
||||
|
||||
// Don't send complex text input to a plugin in Cocoa event mode if
|
||||
@ -3247,7 +3247,7 @@ void
|
||||
PluginTextInputHandler::HandleKeyUpEventForPlugin(NSEvent* aNativeKeyEvent)
|
||||
{
|
||||
if (mIgnoreNextKeyUpEvent) {
|
||||
mIgnoreNextKeyUpEvent = PR_FALSE;
|
||||
mIgnoreNextKeyUpEvent = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3264,7 +3264,7 @@ PluginTextInputHandler::HandleKeyUpEventForPlugin(NSEvent* aNativeKeyEvent)
|
||||
return;
|
||||
}
|
||||
|
||||
nsKeyEvent keyupEvent(PR_TRUE, NS_KEY_UP, mWidget);
|
||||
nsKeyEvent keyupEvent(true, NS_KEY_UP, mWidget);
|
||||
InitKeyEvent(aNativeKeyEvent, keyupEvent);
|
||||
NPCocoaEvent pluginEvent;
|
||||
ConvertCocoaKeyEventToNPCocoaEvent(aNativeKeyEvent, pluginEvent);
|
||||
@ -3299,10 +3299,10 @@ PluginTextInputHandler::HandleKeyUpEventForPlugin(NSEvent* aNativeKeyEvent)
|
||||
// be sent when it actually happens (they need to be able to detect how
|
||||
// long a key has been held down) -- which wouldn't be possible if we sent
|
||||
// them from processPluginKeyEvent.)
|
||||
nsKeyEvent keyupEvent(PR_TRUE, NS_KEY_UP, mWidget);
|
||||
nsKeyEvent keyupEvent(true, NS_KEY_UP, mWidget);
|
||||
InitKeyEvent(aNativeKeyEvent, keyupEvent);
|
||||
EventRecord pluginEvent;
|
||||
ConvertCocoaKeyEventToCarbonEvent(aNativeKeyEvent, pluginEvent, PR_FALSE);
|
||||
ConvertCocoaKeyEventToCarbonEvent(aNativeKeyEvent, pluginEvent, false);
|
||||
keyupEvent.pluginEvent = &pluginEvent;
|
||||
DispatchEvent(keyupEvent);
|
||||
return;
|
||||
@ -3332,11 +3332,11 @@ PluginTextInputHandler::DispatchCocoaNPAPITextEvent(NSString* aString)
|
||||
cocoaTextEvent.type = NPCocoaEventTextInput;
|
||||
cocoaTextEvent.data.text.text = (NPNSString*)aString;
|
||||
|
||||
nsPluginEvent pluginEvent(PR_TRUE, NS_PLUGIN_INPUT_EVENT, mWidget);
|
||||
nsPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
|
||||
nsCocoaUtils::InitPluginEvent(pluginEvent, cocoaTextEvent);
|
||||
return DispatchEvent(pluginEvent);
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(PR_FALSE);
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
|
||||
}
|
||||
|
||||
|
||||
@ -3411,7 +3411,7 @@ PluginTextInputHandler::DispatchCocoaNPAPITextEvent(NSString* aString)
|
||||
TextInputHandler* handler =
|
||||
static_cast<nsChildView*>(widget)->GetTextInputHandler();
|
||||
if (handler) {
|
||||
handler->SetPluginTSMInComposition(PR_FALSE);
|
||||
handler->SetPluginTSMInComposition(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3429,7 +3429,7 @@ PluginTextInputHandler::DispatchCocoaNPAPITextEvent(NSString* aString)
|
||||
TextInputHandler* handler =
|
||||
static_cast<nsChildView*>(widget)->GetTextInputHandler();
|
||||
if (handler) {
|
||||
handler->SetPluginTSMInComposition(PR_FALSE);
|
||||
handler->SetPluginTSMInComposition(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3475,11 +3475,11 @@ TextInputHandlerBase::OnDestroyWidget(nsChildView* aDestroyingWidget)
|
||||
this, aDestroyingWidget, mWidget));
|
||||
|
||||
if (aDestroyingWidget != mWidget) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
mWidget = nsnull;
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
@ -3504,7 +3504,7 @@ TextInputHandlerBase::InitKeyEvent(NSEvent *aNativeKeyEvent,
|
||||
|
||||
TISInputSourceWrapper tis;
|
||||
if (mKeyboardOverride.mOverrideEnabled) {
|
||||
tis.InitByLayoutID(mKeyboardOverride.mKeyboardLayout, PR_TRUE);
|
||||
tis.InitByLayoutID(mKeyboardOverride.mKeyboardLayout, true);
|
||||
} else {
|
||||
tis.InitByCurrentKeyboardLayout();
|
||||
}
|
||||
@ -3564,7 +3564,7 @@ TextInputHandlerBase::SynthesizeNativeKeyEvent(
|
||||
if (downEvent && (sendFlagsChangedEvent || upEvent)) {
|
||||
KeyboardLayoutOverride currentLayout = mKeyboardOverride;
|
||||
mKeyboardOverride.mKeyboardLayout = aNativeKeyboardLayout;
|
||||
mKeyboardOverride.mOverrideEnabled = PR_TRUE;
|
||||
mKeyboardOverride.mOverrideEnabled = true;
|
||||
[NSApp sendEvent:downEvent];
|
||||
if (upEvent) {
|
||||
[NSApp sendEvent:upEvent];
|
||||
@ -3788,9 +3788,9 @@ TextInputHandlerBase::IsSpecialGeckoKey(UInt32 aNativeKeyCode)
|
||||
case kReturnKeyCode:
|
||||
case kEnterKeyCode:
|
||||
case kPowerbookEnterKeyCode:
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
@ -3798,12 +3798,12 @@ TextInputHandlerBase::IsNormalCharInputtingEvent(const nsKeyEvent& aKeyEvent)
|
||||
{
|
||||
// this is not character inputting event, simply.
|
||||
if (!aKeyEvent.isChar || !aKeyEvent.charCode || aKeyEvent.isMeta) {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
// if this is unicode char inputting event, we don't need to check
|
||||
// ctrl/alt/command keys
|
||||
if (aKeyEvent.charCode > 0x7F) {
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
// ASCII chars should be inputted without ctrl/alt/command keys
|
||||
return !aKeyEvent.isControl && !aKeyEvent.isAlt;
|
||||
@ -3822,7 +3822,7 @@ TextInputHandlerBase::IsModifierKey(UInt32 aNativeKeyCode)
|
||||
case kRShiftKeyCode:
|
||||
case kROptionKeyCode:
|
||||
case kRControlKeyCode:
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ NSModalSession nsCocoaAppModalWindowList::CurrentSession()
|
||||
bool nsCocoaAppModalWindowList::GeckoModalAboveCocoaModal()
|
||||
{
|
||||
if (mList.IsEmpty())
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
nsCocoaAppModalWindowListItem &topItem = mList.ElementAt(mList.Length() - 1);
|
||||
|
||||
@ -219,7 +219,7 @@ nsAppShell::ResumeNative(void)
|
||||
if (NS_SUCCEEDED(retval) && (mSuspendNativeCount == 0) &&
|
||||
mSkippedNativeCallback)
|
||||
{
|
||||
mSkippedNativeCallback = PR_FALSE;
|
||||
mSkippedNativeCallback = false;
|
||||
ScheduleNativeEventCallback();
|
||||
}
|
||||
return retval;
|
||||
@ -230,10 +230,10 @@ nsAppShell::nsAppShell()
|
||||
, mDelegate(nsnull)
|
||||
, mCFRunLoop(NULL)
|
||||
, mCFRunLoopSource(NULL)
|
||||
, mRunningEventLoop(PR_FALSE)
|
||||
, mStarted(PR_FALSE)
|
||||
, mTerminated(PR_FALSE)
|
||||
, mSkippedNativeCallback(PR_FALSE)
|
||||
, mRunningEventLoop(false)
|
||||
, mStarted(false)
|
||||
, mTerminated(false)
|
||||
, mSkippedNativeCallback(false)
|
||||
, mHadMoreEventsCount(0)
|
||||
, mRecursionDepth(0)
|
||||
, mNativeEventCallbackDepth(0)
|
||||
@ -241,7 +241,7 @@ nsAppShell::nsAppShell()
|
||||
{
|
||||
// A Cocoa event loop is running here if (and only if) we've been embedded
|
||||
// by a Cocoa app (like Camino).
|
||||
mRunningCocoaEmbedded = [NSApp isRunning] ? PR_TRUE : PR_FALSE;
|
||||
mRunningCocoaEmbedded = [NSApp isRunning] ? true : false;
|
||||
}
|
||||
|
||||
nsAppShell::~nsAppShell()
|
||||
@ -365,7 +365,7 @@ nsAppShell::Init()
|
||||
@selector(nsAppShell_PDEPluginCallback_dealloc));
|
||||
}
|
||||
}
|
||||
gAppShellMethodsSwizzled = PR_TRUE;
|
||||
gAppShellMethodsSwizzled = true;
|
||||
}
|
||||
|
||||
[localPool release];
|
||||
@ -393,7 +393,7 @@ nsAppShell::ProcessGeckoEvents(void* aInfo)
|
||||
nsAppShell* self = static_cast<nsAppShell*> (aInfo);
|
||||
|
||||
if (self->mRunningEventLoop) {
|
||||
self->mRunningEventLoop = PR_FALSE;
|
||||
self->mRunningEventLoop = false;
|
||||
|
||||
// The run loop may be sleeping -- [NSRunLoop runMode:...]
|
||||
// won't return until it's given a reason to wake up. Awaken it by
|
||||
@ -424,7 +424,7 @@ nsAppShell::ProcessGeckoEvents(void* aInfo)
|
||||
self->NativeEventCallback();
|
||||
--self->mNativeEventCallbackDepth;
|
||||
} else {
|
||||
self->mSkippedNativeCallback = PR_TRUE;
|
||||
self->mSkippedNativeCallback = true;
|
||||
}
|
||||
|
||||
// Still needed to fix bug 343033 ("5-10 second delay or hang or crash
|
||||
@ -447,7 +447,7 @@ nsAppShell::ProcessGeckoEvents(void* aInfo)
|
||||
// corresponding call to ProcessGeckoEvents() will never happen. We check
|
||||
// for this possibility in two different places -- here and in Exit()
|
||||
// itself. If we find here that Exit() has been called (that mTerminated
|
||||
// is PR_TRUE), it's because we've been called recursively, that Exit() was
|
||||
// is true), it's because we've been called recursively, that Exit() was
|
||||
// called from self->NativeEventCallback() above, and that we're unwinding
|
||||
// the recursion. In this case we'll never be called again, and we balance
|
||||
// here any extra calls to ScheduleNativeEventCallback().
|
||||
@ -502,7 +502,7 @@ nsAppShell::WillTerminate()
|
||||
// from [MacApplicationDelegate applicationShouldTerminate:]) gets run.
|
||||
NS_ProcessPendingEvents(NS_GetCurrentThread());
|
||||
|
||||
mTerminated = PR_TRUE;
|
||||
mTerminated = true;
|
||||
}
|
||||
|
||||
// ScheduleNativeEventCallback
|
||||
@ -570,7 +570,7 @@ nsAppShell::ProcessNextNativeEvent(bool aMayWait)
|
||||
NSString* currentMode = nil;
|
||||
|
||||
if (mTerminated)
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
// We don't want any native events to be processed here (via Gecko) while
|
||||
// Cocoa is displaying an app-modal dialog (as opposed to a window-modal
|
||||
@ -583,7 +583,7 @@ nsAppShell::ProcessNextNativeEvent(bool aMayWait)
|
||||
// which see below.
|
||||
if ([NSApp _isRunningAppModal] &&
|
||||
(!gCocoaAppModalWindowList || !gCocoaAppModalWindowList->GeckoModalAboveCocoaModal()))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
bool wasRunningEventLoop = mRunningEventLoop;
|
||||
mRunningEventLoop = aMayWait;
|
||||
@ -628,8 +628,8 @@ nsAppShell::ProcessNextNativeEvent(bool aMayWait)
|
||||
// that it is called from [NSRunLoop runMode:beforeDate:], and that
|
||||
// [NSRunLoop runMode:beforeDate:], though it does process timer events,
|
||||
// doesn't return after doing so. To get around this, when aWait is
|
||||
// PR_FALSE we check for timer events and process them using [NSApp
|
||||
// sendEvent:]. When aWait is PR_TRUE [NSRunLoop runMode:beforeDate:]
|
||||
// false we check for timer events and process them using [NSApp
|
||||
// sendEvent:]. When aWait is true [NSRunLoop runMode:beforeDate:]
|
||||
// will only return on a "real" event. But there's code in
|
||||
// ProcessGeckoEvents() that should (when need be) wake us up by sending
|
||||
// a "fake" "real" event. (See Apple's current doc on [NSRunLoop
|
||||
@ -671,7 +671,7 @@ nsAppShell::ProcessNextNativeEvent(bool aMayWait)
|
||||
} else {
|
||||
[NSApp sendEvent:nextEvent];
|
||||
}
|
||||
eventProcessed = PR_TRUE;
|
||||
eventProcessed = true;
|
||||
}
|
||||
} else {
|
||||
if (aMayWait ||
|
||||
@ -688,7 +688,7 @@ nsAppShell::ProcessNextNativeEvent(bool aMayWait)
|
||||
} else {
|
||||
[currentRunLoop runMode:currentMode beforeDate:waitUntil];
|
||||
}
|
||||
eventProcessed = PR_TRUE;
|
||||
eventProcessed = true;
|
||||
}
|
||||
}
|
||||
} while (mRunningEventLoop);
|
||||
@ -719,8 +719,8 @@ nsAppShell::ProcessNextNativeEvent(bool aMayWait)
|
||||
return moreEvents;
|
||||
}
|
||||
|
||||
// Returns PR_TRUE if Gecko events are currently being processed in its "main"
|
||||
// event loop (or one of its "main" event loops). Returns PR_FALSE if Gecko
|
||||
// Returns true if Gecko events are currently being processed in its "main"
|
||||
// event loop (or one of its "main" event loops). Returns false if Gecko
|
||||
// events are being processed in a "nested" event loop, or if we're not
|
||||
// running in any sort of Gecko event loop. How we process native events in
|
||||
// ProcessNextNativeEvent() turns on our decision (and if we make the wrong
|
||||
@ -742,10 +742,10 @@ bool
|
||||
nsAppShell::InGeckoMainEventLoop()
|
||||
{
|
||||
if ((gXULModalLevel > 0) || (mRecursionDepth > 0))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
if (mNativeEventCallbackDepth <= 0)
|
||||
return PR_FALSE;
|
||||
return PR_TRUE;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Run
|
||||
@ -767,7 +767,7 @@ nsAppShell::Run(void)
|
||||
if (mStarted)
|
||||
return NS_OK;
|
||||
|
||||
mStarted = PR_TRUE;
|
||||
mStarted = true;
|
||||
NS_OBJC_TRY_ABORT([NSApp run]);
|
||||
|
||||
return NS_OK;
|
||||
@ -788,7 +788,7 @@ nsAppShell::Exit(void)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
mTerminated = PR_TRUE;
|
||||
mTerminated = true;
|
||||
|
||||
delete gCocoaAppModalWindowList;
|
||||
gCocoaAppModalWindowList = NULL;
|
||||
|
@ -240,10 +240,10 @@ nsChildView::nsChildView() : nsBaseWidget()
|
||||
, mView(nsnull)
|
||||
, mParentView(nsnull)
|
||||
, mParentWidget(nsnull)
|
||||
, mVisible(PR_FALSE)
|
||||
, mDrawing(PR_FALSE)
|
||||
, mPluginDrawing(PR_FALSE)
|
||||
, mIsDispatchPaint(PR_FALSE)
|
||||
, mVisible(false)
|
||||
, mDrawing(false)
|
||||
, mPluginDrawing(false)
|
||||
, mIsDispatchPaint(false)
|
||||
, mPluginInstanceOwner(nsnull)
|
||||
{
|
||||
EnsureLogInitialized();
|
||||
@ -310,15 +310,15 @@ nsresult nsChildView::Create(nsIWidget *aParent,
|
||||
if (nsToolkit::OnLionOrLater()) {
|
||||
nsToolkit::SwizzleMethods([NSEvent class], @selector(addLocalMonitorForEventsMatchingMask:handler:),
|
||||
@selector(nsChildView_NSEvent_addLocalMonitorForEventsMatchingMask:handler:),
|
||||
PR_TRUE);
|
||||
true);
|
||||
nsToolkit::SwizzleMethods([NSEvent class], @selector(removeMonitor:),
|
||||
@selector(nsChildView_NSEvent_removeMonitor:), PR_TRUE);
|
||||
@selector(nsChildView_NSEvent_removeMonitor:), true);
|
||||
}
|
||||
#endif
|
||||
#ifndef NP_NO_CARBON
|
||||
TextInputHandler::SwizzleMethods();
|
||||
#endif
|
||||
gChildViewMethodsSwizzled = PR_TRUE;
|
||||
gChildViewMethodsSwizzled = true;
|
||||
}
|
||||
|
||||
mBounds = aRect;
|
||||
@ -361,7 +361,7 @@ nsresult nsChildView::Create(nsIWidget *aParent,
|
||||
if (mParentWidget)
|
||||
[mView setHidden:YES];
|
||||
else
|
||||
mVisible = PR_TRUE;
|
||||
mVisible = true;
|
||||
|
||||
// Hook it up in the NSView hierarchy.
|
||||
if (mParentView) {
|
||||
@ -447,7 +447,7 @@ NS_IMETHODIMP nsChildView::Destroy()
|
||||
|
||||
if (mOnDestroyCalled)
|
||||
return NS_OK;
|
||||
mOnDestroyCalled = PR_TRUE;
|
||||
mOnDestroyCalled = true;
|
||||
|
||||
[mView widgetDestroyed];
|
||||
|
||||
@ -572,7 +572,7 @@ NS_IMETHODIMP nsChildView::IsVisible(bool& outState)
|
||||
outState = ([mView window] != nil);
|
||||
// now check native widget hierarchy visibility
|
||||
if (outState && NSIsEmptyRect([mView visibleRect])) {
|
||||
outState = PR_FALSE;
|
||||
outState = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -787,7 +787,7 @@ NS_IMETHODIMP nsChildView::IsEnabled(bool *aState)
|
||||
{
|
||||
// unimplemented
|
||||
if (aState)
|
||||
*aState = PR_TRUE;
|
||||
*aState = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -946,7 +946,7 @@ bool nsChildView::ShowsResizeIndicator(nsIntRect* aResizerRect)
|
||||
|
||||
if (![[topLevelView window] showsResizeIndicator] ||
|
||||
!([[topLevelView window] styleMask] & NSResizableWindowMask))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
if (aResizerRect) {
|
||||
NSSize bounds = [topLevelView bounds].size;
|
||||
@ -956,7 +956,7 @@ bool nsChildView::ShowsResizeIndicator(nsIntRect* aResizerRect)
|
||||
NSToIntRound(corner.y) - resizeIndicatorHeight,
|
||||
resizeIndicatorWidth, resizeIndicatorHeight);
|
||||
}
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// In QuickDraw mode the coordinate system used here should be that of the
|
||||
@ -1017,12 +1017,12 @@ NS_IMETHODIMP nsChildView::GetPluginClipRect(nsIntRect& outClipRect, nsIntPoint&
|
||||
}
|
||||
|
||||
// XXXroc should this be !outClipRect.IsEmpty()?
|
||||
outWidgetVisible = PR_TRUE;
|
||||
outWidgetVisible = true;
|
||||
}
|
||||
else {
|
||||
outClipRect.width = 0;
|
||||
outClipRect.height = 0;
|
||||
outWidgetVisible = PR_FALSE;
|
||||
outWidgetVisible = false;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -1154,7 +1154,7 @@ NS_IMETHODIMP nsChildView::StartDrawPlugin()
|
||||
}
|
||||
#endif
|
||||
|
||||
mPluginDrawing = PR_TRUE;
|
||||
mPluginDrawing = true;
|
||||
return NS_OK;
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
||||
@ -1166,7 +1166,7 @@ NS_IMETHODIMP nsChildView::EndDrawPlugin()
|
||||
"EndDrawPlugin must only be called on a plugin widget");
|
||||
if (mWindowType != eWindowType_plugin) return NS_ERROR_FAILURE;
|
||||
|
||||
mPluginDrawing = PR_FALSE;
|
||||
mPluginDrawing = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -1426,7 +1426,7 @@ nsChildView::GetShouldAccelerate()
|
||||
// Don't use OpenGL for transparent windows or for popup windows.
|
||||
if (!mView || ![[mView window] isOpaque] ||
|
||||
[[mView window] isKindOfClass:[PopupWindow class]])
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
return nsBaseWidget::GetShouldAccelerate();
|
||||
}
|
||||
@ -1531,14 +1531,14 @@ bool nsChildView::DispatchWindowEvent(nsGUIEvent &event)
|
||||
|
||||
bool nsChildView::ReportDestroyEvent()
|
||||
{
|
||||
nsGUIEvent event(PR_TRUE, NS_DESTROY, this);
|
||||
nsGUIEvent event(true, NS_DESTROY, this);
|
||||
event.time = PR_IntervalNow();
|
||||
return DispatchWindowEvent(event);
|
||||
}
|
||||
|
||||
bool nsChildView::ReportMoveEvent()
|
||||
{
|
||||
nsGUIEvent moveEvent(PR_TRUE, NS_MOVE, this);
|
||||
nsGUIEvent moveEvent(true, NS_MOVE, this);
|
||||
moveEvent.refPoint.x = mBounds.x;
|
||||
moveEvent.refPoint.y = mBounds.y;
|
||||
moveEvent.time = PR_IntervalNow();
|
||||
@ -1547,7 +1547,7 @@ bool nsChildView::ReportMoveEvent()
|
||||
|
||||
bool nsChildView::ReportSizeEvent()
|
||||
{
|
||||
nsSizeEvent sizeEvent(PR_TRUE, NS_SIZE, this);
|
||||
nsSizeEvent sizeEvent(true, NS_SIZE, this);
|
||||
sizeEvent.time = PR_IntervalNow();
|
||||
sizeEvent.windowSize = &mBounds;
|
||||
sizeEvent.mWinWidth = mBounds.width;
|
||||
@ -1692,16 +1692,16 @@ NS_IMETHODIMP nsChildView::SetInputMode(const IMEContext& aContext)
|
||||
switch (aContext.mStatus) {
|
||||
case nsIWidget::IME_STATUS_ENABLED:
|
||||
case nsIWidget::IME_STATUS_PLUGIN:
|
||||
mTextInputHandler->SetASCIICapableOnly(PR_FALSE);
|
||||
mTextInputHandler->EnableIME(PR_TRUE);
|
||||
mTextInputHandler->SetASCIICapableOnly(false);
|
||||
mTextInputHandler->EnableIME(true);
|
||||
break;
|
||||
case nsIWidget::IME_STATUS_DISABLED:
|
||||
mTextInputHandler->SetASCIICapableOnly(PR_FALSE);
|
||||
mTextInputHandler->EnableIME(PR_FALSE);
|
||||
mTextInputHandler->SetASCIICapableOnly(false);
|
||||
mTextInputHandler->EnableIME(false);
|
||||
break;
|
||||
case nsIWidget::IME_STATUS_PASSWORD:
|
||||
mTextInputHandler->SetASCIICapableOnly(PR_TRUE);
|
||||
mTextInputHandler->EnableIME(PR_FALSE);
|
||||
mTextInputHandler->SetASCIICapableOnly(true);
|
||||
mTextInputHandler->EnableIME(false);
|
||||
break;
|
||||
default:
|
||||
NS_ERROR("not implemented!");
|
||||
@ -1762,7 +1762,7 @@ NSView<mozView>* nsChildView::GetEditorView()
|
||||
// We need to get editor's view. E.g., when the focus is in the bookmark
|
||||
// dialog, the view is <panel> element of the dialog. At this time, the key
|
||||
// events are processed the parent window's view that has native focus.
|
||||
nsQueryContentEvent textContent(PR_TRUE, NS_QUERY_TEXT_CONTENT, this);
|
||||
nsQueryContentEvent textContent(true, NS_QUERY_TEXT_CONTENT, this);
|
||||
textContent.InitForQueryTextContent(0, 0);
|
||||
DispatchWindowEvent(textContent);
|
||||
if (textContent.mSucceeded && textContent.mReply.mFocusedWidget) {
|
||||
@ -1835,7 +1835,7 @@ nsChildView::DrawOver(LayerManager* aManager, nsIntRect aRect)
|
||||
mResizerImage = manager->gl()->CreateTextureImage(nsIntSize(15, 15),
|
||||
gfxASurface::CONTENT_COLOR_ALPHA,
|
||||
LOCAL_GL_CLAMP_TO_EDGE,
|
||||
/* aUseNearestFilter = */ PR_TRUE);
|
||||
/* aUseNearestFilter = */ true);
|
||||
|
||||
// Creation of texture images can fail.
|
||||
if (!mResizerImage)
|
||||
@ -1940,7 +1940,7 @@ nsChildView::GetDocumentAccessible()
|
||||
|
||||
// need to fetch the accessible anew, because it has gone away.
|
||||
nsEventStatus status;
|
||||
nsAccessibleEvent event(PR_TRUE, NS_GETACCESSIBLE, this);
|
||||
nsAccessibleEvent event(true, NS_GETACCESSIBLE, this);
|
||||
DispatchEvent(&event, status);
|
||||
|
||||
// cache the accessible in our weak ptr
|
||||
@ -2133,7 +2133,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
if (!mGeckoChild)
|
||||
return;
|
||||
|
||||
nsPluginEvent pluginEvent(PR_TRUE, NS_PLUGIN_FOCUS_EVENT, mGeckoChild);
|
||||
nsPluginEvent pluginEvent(true, NS_PLUGIN_FOCUS_EVENT, mGeckoChild);
|
||||
NPCocoaEvent cocoaEvent;
|
||||
nsCocoaUtils::InitNPCocoaEvent(&cocoaEvent);
|
||||
cocoaEvent.type = NPCocoaEventWindowFocusChanged;
|
||||
@ -2192,7 +2192,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
if (!mGeckoChild)
|
||||
return;
|
||||
|
||||
nsGUIEvent guiEvent(PR_TRUE, NS_THEMECHANGED, mGeckoChild);
|
||||
nsGUIEvent guiEvent(true, NS_THEMECHANGED, mGeckoChild);
|
||||
mGeckoChild->DispatchWindowEvent(guiEvent);
|
||||
}
|
||||
|
||||
@ -2305,7 +2305,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
BOOL retval =
|
||||
!ChildViewMouseTracker::WindowAcceptsEvent([self window],
|
||||
mClickThroughMouseDownEvent,
|
||||
self, PR_TRUE);
|
||||
self, true);
|
||||
|
||||
// If we return YES here, this will result in us not being focused,
|
||||
// which will stop us receiving mClickThroughMouseDownEvent in
|
||||
@ -2345,7 +2345,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
return;
|
||||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsGUIEvent focusGuiEvent(PR_TRUE, eventType, mGeckoChild);
|
||||
nsGUIEvent focusGuiEvent(true, eventType, mGeckoChild);
|
||||
focusGuiEvent.time = PR_IntervalNow();
|
||||
mGeckoChild->DispatchEvent(&focusGuiEvent, status);
|
||||
}
|
||||
@ -2513,7 +2513,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
fprintf (stderr, " xform in: [%f %f %f %f %f %f]\n", xform.a, xform.b, xform.c, xform.d, xform.tx, xform.ty);
|
||||
#endif
|
||||
// Create the event so we can fill in its region
|
||||
nsPaintEvent paintEvent(PR_TRUE, NS_PAINT, mGeckoChild);
|
||||
nsPaintEvent paintEvent(true, NS_PAINT, mGeckoChild);
|
||||
|
||||
nsIntRect boundingRect =
|
||||
nsIntRect(aRect.origin.x, aRect.origin.y, aRect.size.width, aRect.size.height);
|
||||
@ -2571,7 +2571,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
NSSize bufferSize = [self bounds].size;
|
||||
nsRefPtr<gfxQuartzSurface> targetSurface =
|
||||
new gfxQuartzSurface(aContext, gfxSize(bufferSize.width, bufferSize.height));
|
||||
targetSurface->SetAllowUseAsSource(PR_FALSE);
|
||||
targetSurface->SetAllowUseAsSource(false);
|
||||
|
||||
nsRefPtr<gfxContext> targetContext = new gfxContext(targetSurface);
|
||||
|
||||
@ -2663,7 +2663,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
withObject:widgetArray
|
||||
afterDelay:0];
|
||||
}
|
||||
nsPaintEvent paintEvent(PR_TRUE, NS_WILL_PAINT, mGeckoChild);
|
||||
nsPaintEvent paintEvent(true, NS_WILL_PAINT, mGeckoChild);
|
||||
mGeckoChild->DispatchWindowEvent(paintEvent);
|
||||
}
|
||||
[super viewWillDraw];
|
||||
@ -2778,7 +2778,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
// that, roll up, but pass the number of popups to Rollup so
|
||||
// that only those of the same type close up.
|
||||
if (i < sameTypeCount) {
|
||||
shouldRollup = PR_FALSE;
|
||||
shouldRollup = false;
|
||||
}
|
||||
else {
|
||||
popupsToRollup = sameTypeCount;
|
||||
@ -2824,7 +2824,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
float deltaY = [anEvent deltaY]; // up=1.0, down=-1.0
|
||||
|
||||
// Setup the "swipe" event.
|
||||
nsSimpleGestureEvent geckoEvent(PR_TRUE, NS_SIMPLE_GESTURE_SWIPE, mGeckoChild, 0, 0.0);
|
||||
nsSimpleGestureEvent geckoEvent(true, NS_SIMPLE_GESTURE_SWIPE, mGeckoChild, 0, 0.0);
|
||||
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
|
||||
|
||||
// Record the left/right direction.
|
||||
@ -2886,7 +2886,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
}
|
||||
|
||||
// Setup the event.
|
||||
nsSimpleGestureEvent geckoEvent(PR_TRUE, msg, mGeckoChild, 0, deltaZ);
|
||||
nsSimpleGestureEvent geckoEvent(true, msg, mGeckoChild, 0, deltaZ);
|
||||
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
|
||||
|
||||
// Send the event.
|
||||
@ -2927,7 +2927,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
}
|
||||
|
||||
// Setup the event.
|
||||
nsSimpleGestureEvent geckoEvent(PR_TRUE, msg, mGeckoChild, 0, 0.0);
|
||||
nsSimpleGestureEvent geckoEvent(true, msg, mGeckoChild, 0, 0.0);
|
||||
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
|
||||
geckoEvent.delta = -rotation;
|
||||
if (rotation > 0.0) {
|
||||
@ -2963,7 +2963,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
case eGestureState_MagnifyGesture:
|
||||
{
|
||||
// Setup the "magnify" event.
|
||||
nsSimpleGestureEvent geckoEvent(PR_TRUE, NS_SIMPLE_GESTURE_MAGNIFY,
|
||||
nsSimpleGestureEvent geckoEvent(true, NS_SIMPLE_GESTURE_MAGNIFY,
|
||||
mGeckoChild, 0, mCumulativeMagnification);
|
||||
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
|
||||
|
||||
@ -2975,7 +2975,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
case eGestureState_RotateGesture:
|
||||
{
|
||||
// Setup the "rotate" event.
|
||||
nsSimpleGestureEvent geckoEvent(PR_TRUE, NS_SIMPLE_GESTURE_ROTATE, mGeckoChild, 0, 0.0);
|
||||
nsSimpleGestureEvent geckoEvent(true, NS_SIMPLE_GESTURE_ROTATE, mGeckoChild, 0, 0.0);
|
||||
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
|
||||
geckoEvent.delta = -mCumulativeRotation;
|
||||
if (mCumulativeRotation > 0.0) {
|
||||
@ -3106,7 +3106,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
// bug 678891.
|
||||
if (phase == NSEventPhaseEnded) {
|
||||
if (gestureAmount) {
|
||||
nsSimpleGestureEvent geckoEvent(PR_TRUE, NS_SIMPLE_GESTURE_SWIPE, mGeckoChild, 0, 0.0);
|
||||
nsSimpleGestureEvent geckoEvent(true, NS_SIMPLE_GESTURE_SWIPE, mGeckoChild, 0, 0.0);
|
||||
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
|
||||
if (gestureAmount > 0) {
|
||||
geckoEvent.direction |= nsIDOMSimpleGestureEvent::DIRECTION_LEFT;
|
||||
@ -3193,7 +3193,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
|
||||
NSUInteger modifierFlags = [theEvent modifierFlags];
|
||||
|
||||
nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_BUTTON_DOWN, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent geckoEvent(true, NS_MOUSE_BUTTON_DOWN, nsnull, nsMouseEvent::eReal);
|
||||
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
|
||||
|
||||
NSInteger clickCount = [theEvent clickCount];
|
||||
@ -3261,7 +3261,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
#endif // ifndef NP_NO_CARBON
|
||||
NPCocoaEvent cocoaEvent;
|
||||
|
||||
nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_BUTTON_UP, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent geckoEvent(true, NS_MOUSE_BUTTON_UP, nsnull, nsMouseEvent::eReal);
|
||||
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
|
||||
if ([theEvent modifierFlags] & NSControlKeyMask)
|
||||
geckoEvent.button = nsMouseEvent::eRightButton;
|
||||
@ -3310,7 +3310,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
#endif
|
||||
{
|
||||
if (ChildViewMouseTracker::ViewForEvent(theEvent) != self) {
|
||||
nsMouseEvent geckoExitEvent(PR_TRUE, NS_MOUSE_EXIT, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent geckoExitEvent(true, NS_MOUSE_EXIT, nsnull, nsMouseEvent::eReal);
|
||||
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoExitEvent];
|
||||
|
||||
NPCocoaEvent cocoaEvent;
|
||||
@ -3345,7 +3345,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
NSPoint localEventLocation = [self convertPoint:windowEventLocation fromView:nil];
|
||||
|
||||
PRUint32 msg = aEnter ? NS_MOUSE_ENTER : NS_MOUSE_EXIT;
|
||||
nsMouseEvent event(PR_TRUE, msg, mGeckoChild, nsMouseEvent::eReal);
|
||||
nsMouseEvent event(true, msg, mGeckoChild, nsMouseEvent::eReal);
|
||||
event.refPoint.x = nscoord((PRInt32)localEventLocation.x);
|
||||
event.refPoint.y = nscoord((PRInt32)localEventLocation.y);
|
||||
|
||||
@ -3394,7 +3394,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
if (!mGeckoChild)
|
||||
return;
|
||||
|
||||
nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent geckoEvent(true, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
|
||||
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
|
||||
|
||||
// Create event for use by plugins.
|
||||
@ -3449,7 +3449,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
#endif // ifndef NP_NO_CARBON
|
||||
NPCocoaEvent cocoaEvent;
|
||||
|
||||
nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent geckoEvent(true, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
|
||||
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
|
||||
|
||||
// create event for use by plugins
|
||||
@ -3502,7 +3502,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
return;
|
||||
|
||||
// The right mouse went down, fire off a right mouse down event to gecko
|
||||
nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_BUTTON_DOWN, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent geckoEvent(true, NS_MOUSE_BUTTON_DOWN, nsnull, nsMouseEvent::eReal);
|
||||
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
|
||||
geckoEvent.button = nsMouseEvent::eRightButton;
|
||||
geckoEvent.clickCount = [theEvent clickCount];
|
||||
@ -3557,7 +3557,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
#endif // ifndef NP_NO_CARBON
|
||||
NPCocoaEvent cocoaEvent;
|
||||
|
||||
nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_BUTTON_UP, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent geckoEvent(true, NS_MOUSE_BUTTON_UP, nsnull, nsMouseEvent::eReal);
|
||||
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
|
||||
geckoEvent.button = nsMouseEvent::eRightButton;
|
||||
geckoEvent.clickCount = [theEvent clickCount];
|
||||
@ -3601,7 +3601,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
if (!mGeckoChild)
|
||||
return;
|
||||
|
||||
nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent geckoEvent(true, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
|
||||
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
|
||||
geckoEvent.button = nsMouseEvent::eRightButton;
|
||||
|
||||
@ -3623,7 +3623,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
if (!mGeckoChild)
|
||||
return;
|
||||
|
||||
nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_BUTTON_DOWN, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent geckoEvent(true, NS_MOUSE_BUTTON_DOWN, nsnull, nsMouseEvent::eReal);
|
||||
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
|
||||
geckoEvent.button = nsMouseEvent::eMiddleButton;
|
||||
geckoEvent.clickCount = [theEvent clickCount];
|
||||
@ -3638,7 +3638,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
if (!mGeckoChild)
|
||||
return;
|
||||
|
||||
nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_BUTTON_UP, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent geckoEvent(true, NS_MOUSE_BUTTON_UP, nsnull, nsMouseEvent::eReal);
|
||||
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
|
||||
geckoEvent.button = nsMouseEvent::eMiddleButton;
|
||||
|
||||
@ -3650,7 +3650,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
if (!mGeckoChild)
|
||||
return;
|
||||
|
||||
nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent geckoEvent(true, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
|
||||
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
|
||||
geckoEvent.button = nsMouseEvent::eMiddleButton;
|
||||
|
||||
@ -3670,7 +3670,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
float scrollDelta = 0;
|
||||
float scrollDeltaPixels = 0;
|
||||
bool checkPixels =
|
||||
Preferences::GetBool("mousewheel.enable_pixel_scrolling", PR_TRUE);
|
||||
Preferences::GetBool("mousewheel.enable_pixel_scrolling", true);
|
||||
|
||||
// Calling deviceDeltaX or deviceDeltaY on theEvent will trigger a Cocoa
|
||||
// assertion and an Objective-C NSInternalInconsistencyException if the
|
||||
@ -3681,7 +3681,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
EventRef theCarbonEvent = [theEvent _eventRef];
|
||||
UInt32 carbonEventKind = theCarbonEvent ? ::GetEventKind(theCarbonEvent) : 0;
|
||||
if (carbonEventKind != kEventMouseScroll)
|
||||
checkPixels = PR_FALSE;
|
||||
checkPixels = false;
|
||||
}
|
||||
|
||||
// Some scrolling devices supports pixel scrolling, e.g. a Macbook
|
||||
@ -3711,7 +3711,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
|
||||
if (scrollDelta != 0) {
|
||||
// Send the line scroll event.
|
||||
nsMouseScrollEvent geckoEvent(PR_TRUE, NS_MOUSE_SCROLL, nsnull);
|
||||
nsMouseScrollEvent geckoEvent(true, NS_MOUSE_SCROLL, nsnull);
|
||||
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
|
||||
geckoEvent.scrollFlags |= inAxis;
|
||||
|
||||
@ -3803,7 +3803,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
|
||||
if (hasPixels) {
|
||||
// Send the pixel scroll event.
|
||||
nsMouseScrollEvent geckoEvent(PR_TRUE, NS_MOUSE_PIXEL_SCROLL, nsnull);
|
||||
nsMouseScrollEvent geckoEvent(true, NS_MOUSE_PIXEL_SCROLL, nsnull);
|
||||
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
|
||||
geckoEvent.scrollFlags |= inAxis;
|
||||
if (isMomentumScroll)
|
||||
@ -3867,7 +3867,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
return nil;
|
||||
}
|
||||
|
||||
nsMouseEvent geckoEvent(PR_TRUE, NS_CONTEXTMENU, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent geckoEvent(true, NS_CONTEXTMENU, nsnull, nsMouseEvent::eReal);
|
||||
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
|
||||
geckoEvent.button = nsMouseEvent::eRightButton;
|
||||
mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
@ -4172,7 +4172,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
if (!mGeckoChild)
|
||||
return YES;
|
||||
|
||||
nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_ACTIVATE, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent geckoEvent(true, NS_MOUSE_ACTIVATE, nsnull, nsMouseEvent::eReal);
|
||||
[self convertCocoaMouseEvent:aEvent toGeckoEvent:&geckoEvent];
|
||||
return !mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
}
|
||||
@ -4197,7 +4197,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
nsIntPoint widgetLoc(NSToIntRound(eventLoc.x), NSToIntRound(eventLoc.y));
|
||||
widgetLoc -= mGeckoChild->WidgetToScreenOffset();
|
||||
|
||||
nsQueryContentEvent hitTest(PR_TRUE, NS_QUERY_DOM_WIDGET_HITTEST, mGeckoChild);
|
||||
nsQueryContentEvent hitTest(true, NS_QUERY_DOM_WIDGET_HITTEST, mGeckoChild);
|
||||
hitTest.InitForQueryDOMWidgetHittest(widgetLoc);
|
||||
// This might destroy our widget (and null out mGeckoChild).
|
||||
mGeckoChild->DispatchWindowEvent(hitTest);
|
||||
@ -4236,7 +4236,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
return NO;
|
||||
|
||||
if (mPluginEventModel == NPEventModelCocoa) {
|
||||
nsPluginEvent pluginEvent(PR_TRUE, NS_PLUGIN_FOCUS_EVENT, mGeckoChild);
|
||||
nsPluginEvent pluginEvent(true, NS_PLUGIN_FOCUS_EVENT, mGeckoChild);
|
||||
NPCocoaEvent cocoaEvent;
|
||||
nsCocoaUtils::InitNPCocoaEvent(&cocoaEvent);
|
||||
cocoaEvent.type = NPCocoaEventFocusChanged;
|
||||
@ -4384,7 +4384,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
// fire the drag event at the source. Just ignore whether it was
|
||||
// cancelled or not as there isn't actually a means to stop the drag
|
||||
mDragService->FireDragEventAtSource(NS_DRAGDROP_DRAG);
|
||||
dragSession->SetCanDrop(PR_FALSE);
|
||||
dragSession->SetCanDrop(false);
|
||||
}
|
||||
else if (aMessage == NS_DRAGDROP_DROP) {
|
||||
// We make the assumption that the dragOver handlers have correctly set
|
||||
@ -4396,7 +4396,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
nsCOMPtr<nsIDOMNode> sourceNode;
|
||||
dragSession->GetSourceNode(getter_AddRefs(sourceNode));
|
||||
if (!sourceNode) {
|
||||
mDragService->EndDragSession(PR_FALSE);
|
||||
mDragService->EndDragSession(false);
|
||||
}
|
||||
return NSDragOperationNone;
|
||||
}
|
||||
@ -4415,7 +4415,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
}
|
||||
|
||||
// set up gecko event
|
||||
nsDragEvent geckoEvent(PR_TRUE, aMessage, nsnull);
|
||||
nsDragEvent geckoEvent(true, aMessage, nsnull);
|
||||
[self convertGenericCocoaEvent:[NSApp currentEvent] toGeckoEvent:&geckoEvent];
|
||||
|
||||
// Use our own coordinates in the gecko event.
|
||||
@ -4443,7 +4443,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
// initiated in a different app. End the drag session,
|
||||
// since we're done with it for now (until the user
|
||||
// drags back into mozilla).
|
||||
mDragService->EndDragSession(PR_FALSE);
|
||||
mDragService->EndDragSession(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4556,7 +4556,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
dataTransferNS->SetDropEffectInt(nsIDragService::DRAGDROP_ACTION_NONE);
|
||||
}
|
||||
|
||||
mDragService->EndDragSession(PR_TRUE);
|
||||
mDragService->EndDragSession(true);
|
||||
NS_RELEASE(mDragService);
|
||||
}
|
||||
|
||||
@ -4588,7 +4588,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
PR_LOG(sCocoaLog, PR_LOG_ALWAYS, ("ChildView namesOfPromisedFilesDroppedAtDestination: entering callback for promised files\n"));
|
||||
|
||||
nsCOMPtr<nsILocalFile> targFile;
|
||||
NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(targFile));
|
||||
NS_NewLocalFile(EmptyString(), true, getter_AddRefs(targFile));
|
||||
nsCOMPtr<nsILocalFileMac> macLocalFile = do_QueryInterface(targFile);
|
||||
if (!macLocalFile) {
|
||||
NS_ERROR("No Mac local file");
|
||||
@ -4675,7 +4675,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
|
||||
// Determine if there is a selection (if sending to the service).
|
||||
if (sendType) {
|
||||
nsQueryContentEvent event(PR_TRUE, NS_QUERY_CONTENT_STATE, mGeckoChild);
|
||||
nsQueryContentEvent event(true, NS_QUERY_CONTENT_STATE, mGeckoChild);
|
||||
// This might destroy our widget (and null out mGeckoChild).
|
||||
mGeckoChild->DispatchWindowEvent(event);
|
||||
if (!mGeckoChild || !event.mSucceeded || !event.mReply.mHasSelection)
|
||||
@ -4684,7 +4684,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
|
||||
// Determine if we can paste (if receiving data from the service).
|
||||
if (mGeckoChild && returnType) {
|
||||
nsContentCommandEvent command(PR_TRUE, NS_CONTENT_COMMAND_PASTE_TRANSFERABLE, mGeckoChild, PR_TRUE);
|
||||
nsContentCommandEvent command(true, NS_CONTENT_COMMAND_PASTE_TRANSFERABLE, mGeckoChild, true);
|
||||
// This might possibly destroy our widget (and null out mGeckoChild).
|
||||
mGeckoChild->DispatchWindowEvent(command);
|
||||
if (!mGeckoChild || !command.mSucceeded || !command.mIsEnabled)
|
||||
@ -4721,7 +4721,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
return NO;
|
||||
|
||||
// Obtain the current selection.
|
||||
nsQueryContentEvent event(PR_TRUE,
|
||||
nsQueryContentEvent event(true,
|
||||
NS_QUERY_SELECTION_AS_TRANSFERABLE,
|
||||
mGeckoChild);
|
||||
mGeckoChild->DispatchWindowEvent(event);
|
||||
@ -4778,9 +4778,9 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
if (NS_FAILED(rv))
|
||||
return NO;
|
||||
|
||||
NS_ENSURE_TRUE(mGeckoChild, PR_FALSE);
|
||||
NS_ENSURE_TRUE(mGeckoChild, false);
|
||||
|
||||
nsContentCommandEvent command(PR_TRUE,
|
||||
nsContentCommandEvent command(true,
|
||||
NS_CONTENT_COMMAND_PASTE_TRANSFERABLE,
|
||||
mGeckoChild);
|
||||
command.mTransferable = trans;
|
||||
|
@ -101,7 +101,7 @@ nsClipboard::SetNativeClipboardData(PRInt32 aWhichClipboard)
|
||||
if ((aWhichClipboard != kGlobalClipboard) || !mTransferable)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
mIgnoreEmptyNotification = PR_TRUE;
|
||||
mIgnoreEmptyNotification = true;
|
||||
|
||||
NSDictionary* pasteboardOutputDict = PasteboardDictFromTransferable(mTransferable);
|
||||
if (!pasteboardOutputDict)
|
||||
@ -130,7 +130,7 @@ nsClipboard::SetNativeClipboardData(PRInt32 aWhichClipboard)
|
||||
|
||||
mChangeCount = [generalPBoard changeCount];
|
||||
|
||||
mIgnoreEmptyNotification = PR_FALSE;
|
||||
mIgnoreEmptyNotification = false;
|
||||
|
||||
return NS_OK;
|
||||
|
||||
@ -328,7 +328,7 @@ nsClipboard::HasDataMatchingFlavors(const char** aFlavorList, PRUint32 aLength,
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
||||
|
||||
*outResult = PR_FALSE;
|
||||
*outResult = false;
|
||||
|
||||
if ((aWhichClipboard != kGlobalClipboard) || !aFlavorList)
|
||||
return NS_OK;
|
||||
@ -351,7 +351,7 @@ nsClipboard::HasDataMatchingFlavors(const char** aFlavorList, PRUint32 aLength,
|
||||
|
||||
for (PRUint32 k = 0; k < aLength; k++) {
|
||||
if (transferableFlavorStr.Equals(aFlavorList[k])) {
|
||||
*outResult = PR_TRUE;
|
||||
*outResult = true;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
@ -368,7 +368,7 @@ nsClipboard::HasDataMatchingFlavors(const char** aFlavorList, PRUint32 aLength,
|
||||
if (nsClipboard::IsStringType(mimeType, &pboardType)) {
|
||||
NSString* availableType = [generalPBoard availableTypeFromArray:[NSArray arrayWithObject:pboardType]];
|
||||
if (availableType && [availableType isEqualToString:pboardType]) {
|
||||
*outResult = PR_TRUE;
|
||||
*outResult = true;
|
||||
break;
|
||||
}
|
||||
} else if (!strcmp(aFlavorList[i], kJPEGImageMime) ||
|
||||
@ -377,7 +377,7 @@ nsClipboard::HasDataMatchingFlavors(const char** aFlavorList, PRUint32 aLength,
|
||||
NSString* availableType = [generalPBoard availableTypeFromArray:
|
||||
[NSArray arrayWithObjects:IMAGE_PASTEBOARD_TYPES]];
|
||||
if (availableType) {
|
||||
*outResult = PR_TRUE;
|
||||
*outResult = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -554,9 +554,9 @@ bool nsClipboard::IsStringType(const nsCString& aMIMEType, NSString** aPasteboar
|
||||
*aPasteboardType = NSStringPboardType;
|
||||
else
|
||||
*aPasteboardType = NSHTMLPboardType;
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
} else {
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -413,5 +413,5 @@ nsCocoaUtils::InitPluginEvent(nsPluginEvent &aPluginEvent,
|
||||
{
|
||||
aPluginEvent.time = PR_IntervalNow();
|
||||
aPluginEvent.pluginEvent = (void*)&aCocoaEvent;
|
||||
aPluginEvent.retargetToFocusedDocument = PR_FALSE;
|
||||
aPluginEvent.retargetToFocusedDocument = false;
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ typedef struct _nsCocoaWindowList {
|
||||
nsCocoaWindow* mGeckoWindow; // [WEAK] (we are owned by the window)
|
||||
// Used to avoid duplication when we send NS_ACTIVATE and
|
||||
// NS_DEACTIVATE to Gecko for toplevel widgets. Starts out
|
||||
// PR_FALSE.
|
||||
// false.
|
||||
bool mToplevelActiveState;
|
||||
BOOL mHasEverBeenZoomed;
|
||||
}
|
||||
|
@ -138,10 +138,10 @@ nsCocoaWindow::nsCocoaWindow()
|
||||
, mPopupContentView(nil)
|
||||
, mShadowStyle(NS_STYLE_WINDOW_SHADOW_DEFAULT)
|
||||
, mWindowFilter(0)
|
||||
, mWindowMadeHere(PR_FALSE)
|
||||
, mSheetNeedsShow(PR_FALSE)
|
||||
, mFullScreen(PR_FALSE)
|
||||
, mModal(PR_FALSE)
|
||||
, mWindowMadeHere(false)
|
||||
, mSheetNeedsShow(false)
|
||||
, mFullScreen(false)
|
||||
, mModal(false)
|
||||
, mNumModalDescendents(0)
|
||||
{
|
||||
|
||||
@ -236,9 +236,9 @@ static void FitRectToVisibleAreaForScreen(nsIntRect &aRect, NSScreen *screen)
|
||||
static bool UseNativePopupWindows()
|
||||
{
|
||||
#ifdef MOZ_USE_NATIVE_POPUP_WINDOWS
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
#else
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
#endif /* MOZ_USE_NATIVE_POPUP_WINDOWS */
|
||||
}
|
||||
|
||||
@ -295,7 +295,7 @@ nsresult nsCocoaWindow::Create(nsIWidget *aParent,
|
||||
return NS_OK;
|
||||
|
||||
nsresult rv = CreateNativeWindow(nsCocoaUtils::GeckoRectToCocoaRect(newBounds),
|
||||
mBorderStyle, PR_FALSE);
|
||||
mBorderStyle, false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (mWindowType == eWindowType_popup) {
|
||||
@ -470,7 +470,7 @@ nsresult nsCocoaWindow::CreateNativeWindow(const NSRect &aRect,
|
||||
[mWindow setDelegate:mDelegate];
|
||||
|
||||
[[WindowDataMap sharedWindowDataMap] ensureDataForWindow:mWindow];
|
||||
mWindowMadeHere = PR_TRUE;
|
||||
mWindowMadeHere = true;
|
||||
|
||||
return NS_OK;
|
||||
|
||||
@ -513,7 +513,7 @@ NS_IMETHODIMP nsCocoaWindow::Destroy()
|
||||
nsBaseWidget::OnDestroy();
|
||||
|
||||
if (mFullScreen) {
|
||||
nsCocoaUtils::HideOSChromeOnScreen(PR_FALSE, [mWindow screen]);
|
||||
nsCocoaUtils::HideOSChromeOnScreen(false, [mWindow screen]);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -613,7 +613,7 @@ NS_IMETHODIMP nsCocoaWindow::SetModal(bool aState)
|
||||
}
|
||||
else {
|
||||
--gXULModalLevel;
|
||||
NS_ASSERTION(gXULModalLevel >= 0, "Mismatched call to nsCocoaWindow::SetModal(PR_FALSE)!");
|
||||
NS_ASSERTION(gXULModalLevel >= 0, "Mismatched call to nsCocoaWindow::SetModal(false)!");
|
||||
if (gCocoaAppModalWindowList)
|
||||
gCocoaAppModalWindowList->PopGecko(mWindow, this);
|
||||
if (mWindowType != eWindowType_sheet) {
|
||||
@ -679,13 +679,13 @@ NS_IMETHODIMP nsCocoaWindow::Show(bool bState)
|
||||
}
|
||||
|
||||
nsCocoaWindow* sheetShown = nsnull;
|
||||
if (NS_SUCCEEDED(piParentWidget->GetChildSheet(PR_TRUE, &sheetShown)) &&
|
||||
if (NS_SUCCEEDED(piParentWidget->GetChildSheet(true, &sheetShown)) &&
|
||||
(!sheetShown || sheetShown == this)) {
|
||||
// If this sheet is already the sheet actually being shown, don't
|
||||
// tell it to show again. Otherwise the number of calls to
|
||||
// [NSApp beginSheet...] won't match up with [NSApp endSheet...].
|
||||
if (![mWindow isVisible]) {
|
||||
mSheetNeedsShow = PR_FALSE;
|
||||
mSheetNeedsShow = false;
|
||||
mSheetWindowParent = topNonSheetWindow;
|
||||
// Only set contextInfo if our parent isn't a sheet.
|
||||
NSWindow* contextInfo = parentIsSheet ? nil : mSheetWindowParent;
|
||||
@ -703,7 +703,7 @@ NS_IMETHODIMP nsCocoaWindow::Show(bool bState)
|
||||
// A sibling of this sheet is active, don't show this sheet yet.
|
||||
// When the active sheet hides, its brothers and sisters that have
|
||||
// mSheetNeedsShow set will have their opportunities to display.
|
||||
mSheetNeedsShow = PR_TRUE;
|
||||
mSheetNeedsShow = true;
|
||||
}
|
||||
}
|
||||
else if (mWindowType == eWindowType_popup) {
|
||||
@ -764,7 +764,7 @@ NS_IMETHODIMP nsCocoaWindow::Show(bool bState)
|
||||
// This is an attempt to hide a sheet that never had a chance to
|
||||
// be shown. There's nothing to do other than make sure that it
|
||||
// won't show.
|
||||
mSheetNeedsShow = PR_FALSE;
|
||||
mSheetNeedsShow = false;
|
||||
}
|
||||
else {
|
||||
// get sheet's parent *before* hiding the sheet (which breaks the linkage)
|
||||
@ -779,10 +779,10 @@ NS_IMETHODIMP nsCocoaWindow::Show(bool bState)
|
||||
bool parentIsSheet = false;
|
||||
|
||||
if (nativeParentWindow && piParentWidget &&
|
||||
NS_SUCCEEDED(piParentWidget->GetChildSheet(PR_FALSE, &siblingSheetToShow)) &&
|
||||
NS_SUCCEEDED(piParentWidget->GetChildSheet(false, &siblingSheetToShow)) &&
|
||||
siblingSheetToShow) {
|
||||
// First, give sibling sheets an opportunity to show.
|
||||
siblingSheetToShow->Show(PR_TRUE);
|
||||
siblingSheetToShow->Show(true);
|
||||
}
|
||||
else if (nativeParentWindow && piParentWidget &&
|
||||
NS_SUCCEEDED(piParentWidget->GetIsSheet(&parentIsSheet)) &&
|
||||
@ -1000,7 +1000,7 @@ NS_IMETHODIMP nsCocoaWindow::Enable(bool aState)
|
||||
NS_IMETHODIMP nsCocoaWindow::IsEnabled(bool *aState)
|
||||
{
|
||||
if (aState)
|
||||
*aState = PR_TRUE;
|
||||
*aState = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -1096,7 +1096,7 @@ NS_IMETHODIMP nsCocoaWindow::HideWindowChrome(bool aShouldHide)
|
||||
// Recreate the window with the right border style.
|
||||
NSRect frameRect = [mWindow frame];
|
||||
DestroyNativeWindow();
|
||||
nsresult rv = CreateNativeWindow(frameRect, aShouldHide ? eBorderStyle_none : mBorderStyle, PR_TRUE);
|
||||
nsresult rv = CreateNativeWindow(frameRect, aShouldHide ? eBorderStyle_none : mBorderStyle, true);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Re-import state.
|
||||
@ -1114,7 +1114,7 @@ NS_IMETHODIMP nsCocoaWindow::HideWindowChrome(bool aShouldHide)
|
||||
|
||||
// Show the new window.
|
||||
if (isVisible) {
|
||||
rv = Show(PR_TRUE);
|
||||
rv = Show(true);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
@ -1272,18 +1272,18 @@ NS_IMETHODIMP nsCocoaWindow::Update()
|
||||
// knows about it.
|
||||
bool nsCocoaWindow::DragEvent(unsigned int aMessage, Point aMouseGlobal, UInt16 aKeyModifiers)
|
||||
{
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCocoaWindow::SendSetZLevelEvent()
|
||||
{
|
||||
nsZLevelEvent event(PR_TRUE, NS_SETZLEVEL, this);
|
||||
nsZLevelEvent event(true, NS_SETZLEVEL, this);
|
||||
|
||||
event.refPoint.x = mBounds.x;
|
||||
event.refPoint.y = mBounds.y;
|
||||
event.time = PR_IntervalNow();
|
||||
|
||||
event.mImmediate = PR_TRUE;
|
||||
event.mImmediate = true;
|
||||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
DispatchEvent(&event, status);
|
||||
@ -1322,7 +1322,7 @@ NS_IMETHODIMP nsCocoaWindow::GetRealParent(nsIWidget** parent)
|
||||
|
||||
NS_IMETHODIMP nsCocoaWindow::GetIsSheet(bool* isSheet)
|
||||
{
|
||||
mWindowType == eWindowType_sheet ? *isSheet = PR_TRUE : *isSheet = PR_FALSE;
|
||||
mWindowType == eWindowType_sheet ? *isSheet = true : *isSheet = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -1371,7 +1371,7 @@ nsCocoaWindow::ReportMoveEvent()
|
||||
UpdateBounds();
|
||||
|
||||
// Dispatch the move event to Gecko
|
||||
nsGUIEvent guiEvent(PR_TRUE, NS_MOVE, this);
|
||||
nsGUIEvent guiEvent(true, NS_MOVE, this);
|
||||
guiEvent.refPoint.x = mBounds.x;
|
||||
guiEvent.refPoint.y = mBounds.y;
|
||||
guiEvent.time = PR_IntervalNow();
|
||||
@ -1384,7 +1384,7 @@ nsCocoaWindow::ReportMoveEvent()
|
||||
void
|
||||
nsCocoaWindow::DispatchSizeModeEvent()
|
||||
{
|
||||
nsSizeModeEvent event(PR_TRUE, NS_SIZEMODE, this);
|
||||
nsSizeModeEvent event(true, NS_SIZEMODE, this);
|
||||
event.mSizeMode = GetWindowSizeMode(mWindow);
|
||||
event.time = PR_IntervalNow();
|
||||
|
||||
@ -1399,7 +1399,7 @@ nsCocoaWindow::ReportSizeEvent()
|
||||
|
||||
UpdateBounds();
|
||||
|
||||
nsSizeEvent sizeEvent(PR_TRUE, NS_SIZE, this);
|
||||
nsSizeEvent sizeEvent(true, NS_SIZE, this);
|
||||
sizeEvent.time = PR_IntervalNow();
|
||||
|
||||
nsIntRect innerBounds;
|
||||
@ -1688,7 +1688,7 @@ bool nsCocoaWindow::IsChildInFailingLeftClickThrough(NSView *aChild)
|
||||
if ([aChild isKindOfClass:[ChildView class]]) {
|
||||
ChildView* childView = (ChildView*) aChild;
|
||||
if ([childView isInFailingLeftClickThrough])
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
NSArray* subviews = [aChild subviews];
|
||||
if (subviews) {
|
||||
@ -1696,10 +1696,10 @@ bool nsCocoaWindow::IsChildInFailingLeftClickThrough(NSView *aChild)
|
||||
for (NSUInteger i = 0; i < count; ++i) {
|
||||
NSView* aView = (NSView*) [subviews objectAtIndex:i];
|
||||
if (IsChildInFailingLeftClickThrough(aView))
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Don't focus a plugin if we're in a left click-through that will
|
||||
@ -1708,9 +1708,9 @@ bool nsCocoaWindow::IsChildInFailingLeftClickThrough(NSView *aChild)
|
||||
bool nsCocoaWindow::ShouldFocusPlugin()
|
||||
{
|
||||
if (IsChildInFailingLeftClickThrough([mWindow contentView]))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
@implementation WindowDelegate
|
||||
@ -1768,8 +1768,8 @@ bool nsCocoaWindow::ShouldFocusPlugin()
|
||||
|
||||
[super init];
|
||||
mGeckoWindow = geckoWind;
|
||||
mToplevelActiveState = PR_FALSE;
|
||||
mHasEverBeenZoomed = PR_FALSE;
|
||||
mToplevelActiveState = false;
|
||||
mHasEverBeenZoomed = false;
|
||||
return self;
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_NIL;
|
||||
@ -1873,7 +1873,7 @@ bool nsCocoaWindow::ShouldFocusPlugin()
|
||||
- (BOOL)windowShouldClose:(id)sender
|
||||
{
|
||||
// We only want to send NS_XUL_CLOSE and let gecko close the window
|
||||
nsGUIEvent guiEvent(PR_TRUE, NS_XUL_CLOSE, mGeckoWindow);
|
||||
nsGUIEvent guiEvent(true, NS_XUL_CLOSE, mGeckoWindow);
|
||||
guiEvent.time = PR_IntervalNow();
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
mGeckoWindow->DispatchEvent(&guiEvent, status);
|
||||
@ -1917,7 +1917,7 @@ bool nsCocoaWindow::ShouldFocusPlugin()
|
||||
return;
|
||||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsGUIEvent focusGuiEvent(PR_TRUE, eventType, mGeckoWindow);
|
||||
nsGUIEvent focusGuiEvent(true, eventType, mGeckoWindow);
|
||||
focusGuiEvent.time = PR_IntervalNow();
|
||||
mGeckoWindow->DispatchEvent(&focusGuiEvent, status);
|
||||
}
|
||||
@ -1955,7 +1955,7 @@ bool nsCocoaWindow::ShouldFocusPlugin()
|
||||
{
|
||||
if (!mToplevelActiveState) {
|
||||
[self sendFocusEvent:NS_ACTIVATE];
|
||||
mToplevelActiveState = PR_TRUE;
|
||||
mToplevelActiveState = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1963,7 +1963,7 @@ bool nsCocoaWindow::ShouldFocusPlugin()
|
||||
{
|
||||
if (mToplevelActiveState) {
|
||||
[self sendFocusEvent:NS_DEACTIVATE];
|
||||
mToplevelActiveState = PR_FALSE;
|
||||
mToplevelActiveState = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2414,7 +2414,7 @@ static const NSString* kStateShowsToolbarButton = @"showsToolbarButton";
|
||||
if (!geckoWindow)
|
||||
return;
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsGUIEvent guiEvent(PR_TRUE, NS_OS_TOOLBAR, geckoWindow);
|
||||
nsGUIEvent guiEvent(true, NS_OS_TOOLBAR, geckoWindow);
|
||||
guiEvent.time = PR_IntervalNow();
|
||||
geckoWindow->DispatchEvent(&guiEvent, status);
|
||||
}
|
||||
|
@ -187,9 +187,9 @@ NS_IMETHODIMP nsDeviceContextSpecX::GetSurfaceForPrinter(gfxASurface **surface)
|
||||
// Here, we translate it to top-left corner of the paper.
|
||||
CGContextTranslateCTM(context, 0, height);
|
||||
CGContextScaleCTM(context, 1.0, -1.0);
|
||||
newSurface = new gfxQuartzSurface(context, gfxSize(width, height), PR_TRUE);
|
||||
newSurface = new gfxQuartzSurface(context, gfxSize(width, height), true);
|
||||
} else {
|
||||
newSurface = new gfxQuartzSurface(gfxSize((PRInt32)width, (PRInt32)height), gfxASurface::ImageFormatARGB32, PR_TRUE);
|
||||
newSurface = new gfxQuartzSurface(gfxSize((PRInt32)width, (PRInt32)height), gfxASurface::ImageFormatARGB32, true);
|
||||
}
|
||||
|
||||
if (!newSurface)
|
||||
|
@ -308,7 +308,7 @@ nsDragService::InvokeDragSession(nsIDOMNode* aDOMNode, nsISupportsArray* aTransf
|
||||
mNativeDragView = [gLastDragView retain];
|
||||
mNativeDragEvent = [gLastDragMouseDownEvent retain];
|
||||
|
||||
gUserCancelledDrag = PR_FALSE;
|
||||
gUserCancelledDrag = false;
|
||||
[mNativeDragView dragImage:image
|
||||
at:localPoint
|
||||
offset:NSZeroSize
|
||||
@ -316,10 +316,10 @@ nsDragService::InvokeDragSession(nsIDOMNode* aDOMNode, nsISupportsArray* aTransf
|
||||
pasteboard:[NSPasteboard pasteboardWithName:NSDragPboard]
|
||||
source:mNativeDragView
|
||||
slideBack:YES];
|
||||
gUserCancelledDrag = PR_FALSE;
|
||||
gUserCancelledDrag = false;
|
||||
|
||||
if (mDoingDrag)
|
||||
nsBaseDragService::EndDragSession(PR_FALSE);
|
||||
nsBaseDragService::EndDragSession(false);
|
||||
|
||||
return NS_OK;
|
||||
|
||||
@ -404,7 +404,7 @@ nsDragService::GetData(nsITransferable* aTransferable, PRUint32 aItemIndex)
|
||||
clipboardDataPtr[stringLength] = 0; // null terminate
|
||||
|
||||
nsCOMPtr<nsILocalFile> file;
|
||||
nsresult rv = NS_NewLocalFile(nsDependentString(clipboardDataPtr), PR_TRUE, getter_AddRefs(file));
|
||||
nsresult rv = NS_NewLocalFile(nsDependentString(clipboardDataPtr), true, getter_AddRefs(file));
|
||||
free(clipboardDataPtr);
|
||||
if (NS_FAILED(rv))
|
||||
continue;
|
||||
@ -474,7 +474,7 @@ nsDragService::IsDataFlavorSupported(const char *aDataFlavor, bool *_retval)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
||||
|
||||
*_retval = PR_FALSE;
|
||||
*_retval = false;
|
||||
|
||||
if (!globalDragPboard)
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -511,7 +511,7 @@ nsDragService::IsDataFlavorSupported(const char *aDataFlavor, bool *_retval)
|
||||
nsXPIDLCString flavorStr;
|
||||
currentFlavor->ToString(getter_Copies(flavorStr));
|
||||
if (dataFlavor.Equals(flavorStr)) {
|
||||
*_retval = PR_TRUE;
|
||||
*_retval = true;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
@ -523,17 +523,17 @@ nsDragService::IsDataFlavorSupported(const char *aDataFlavor, bool *_retval)
|
||||
if (dataFlavor.EqualsLiteral(kFileMime)) {
|
||||
NSString* availableType = [globalDragPboard availableTypeFromArray:[NSArray arrayWithObject:NSFilenamesPboardType]];
|
||||
if (availableType && [availableType isEqualToString:NSFilenamesPboardType])
|
||||
*_retval = PR_TRUE;
|
||||
*_retval = true;
|
||||
}
|
||||
else if (dataFlavor.EqualsLiteral(kURLMime)) {
|
||||
NSString* availableType = [globalDragPboard availableTypeFromArray:[NSArray arrayWithObject:kCorePboardType_url]];
|
||||
if (availableType && [availableType isEqualToString:kCorePboardType_url])
|
||||
*_retval = PR_TRUE;
|
||||
*_retval = true;
|
||||
}
|
||||
else if (nsClipboard::IsStringType(dataFlavor, &pboardType)) {
|
||||
NSString* availableType = [globalDragPboard availableTypeFromArray:[NSArray arrayWithObject:pboardType]];
|
||||
if (availableType && [availableType isEqualToString:pboardType])
|
||||
*_retval = PR_TRUE;
|
||||
*_retval = true;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -93,7 +93,7 @@ static void SetShowHiddenFileState(NSSavePanel* panel)
|
||||
|
||||
bool show = false;
|
||||
if (NS_SUCCEEDED(Preferences::GetBool(kShowHiddenFilesPref, &show))) {
|
||||
gCallSecretHiddenFileAPI = PR_TRUE;
|
||||
gCallSecretHiddenFileAPI = true;
|
||||
}
|
||||
|
||||
if (gCallSecretHiddenFileAPI) {
|
||||
@ -252,11 +252,11 @@ NS_IMETHODIMP nsFilePicker::Show(PRInt16 *retval)
|
||||
switch (mMode)
|
||||
{
|
||||
case modeOpen:
|
||||
userClicksOK = GetLocalFiles(mTitle, PR_FALSE, mFiles);
|
||||
userClicksOK = GetLocalFiles(mTitle, false, mFiles);
|
||||
break;
|
||||
|
||||
case modeOpenMultiple:
|
||||
userClicksOK = GetLocalFiles(mTitle, PR_TRUE, mFiles);
|
||||
userClicksOK = GetLocalFiles(mTitle, true, mFiles);
|
||||
break;
|
||||
|
||||
case modeSave:
|
||||
@ -405,7 +405,7 @@ nsFilePicker::GetLocalFiles(const nsString& inTitle, bool inAllowMultiple, nsCOM
|
||||
}
|
||||
|
||||
nsCOMPtr<nsILocalFile> localFile;
|
||||
NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(localFile));
|
||||
NS_NewLocalFile(EmptyString(), true, getter_AddRefs(localFile));
|
||||
nsCOMPtr<nsILocalFileMac> macLocalFile = do_QueryInterface(localFile);
|
||||
if (macLocalFile && NS_SUCCEEDED(macLocalFile->InitWithCFURL((CFURLRef)url))) {
|
||||
outFiles.AppendObject(localFile);
|
||||
@ -457,7 +457,7 @@ nsFilePicker::GetLocalFolder(const nsString& inTitle, nsILocalFile** outFile)
|
||||
NSURL *theURL = [[thePanel URLs] objectAtIndex:0];
|
||||
if (theURL) {
|
||||
nsCOMPtr<nsILocalFile> localFile;
|
||||
NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(localFile));
|
||||
NS_NewLocalFile(EmptyString(), true, getter_AddRefs(localFile));
|
||||
nsCOMPtr<nsILocalFileMac> macLocalFile = do_QueryInterface(localFile);
|
||||
if (macLocalFile && NS_SUCCEEDED(macLocalFile->InitWithCFURL((CFURLRef)theURL))) {
|
||||
*outFile = localFile;
|
||||
@ -511,7 +511,7 @@ nsFilePicker::PutLocalFile(const nsString& inTitle, const nsString& inDefaultNam
|
||||
NSURL* fileURL = [thePanel URL];
|
||||
if (fileURL) {
|
||||
nsCOMPtr<nsILocalFile> localFile;
|
||||
NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(localFile));
|
||||
NS_NewLocalFile(EmptyString(), true, getter_AddRefs(localFile));
|
||||
nsCOMPtr<nsILocalFileMac> macLocalFile = do_QueryInterface(localFile);
|
||||
if (macLocalFile && NS_SUCCEEDED(macLocalFile->InitWithCFURL((CFURLRef)fileURL))) {
|
||||
*outFile = localFile;
|
||||
|
@ -453,7 +453,7 @@ void nsMenuBarX::HideItem(nsIDOMDocument* inDoc, const nsAString & inID, nsICont
|
||||
inDoc->GetElementById(inID, getter_AddRefs(menuItem));
|
||||
nsCOMPtr<nsIContent> menuContent(do_QueryInterface(menuItem));
|
||||
if (menuContent) {
|
||||
menuContent->SetAttr(kNameSpaceID_None, nsWidgetAtoms::hidden, NS_LITERAL_STRING("true"), PR_FALSE);
|
||||
menuContent->SetAttr(kNameSpaceID_None, nsWidgetAtoms::hidden, NS_LITERAL_STRING("true"), false);
|
||||
if (outHiddenNode) {
|
||||
*outHiddenNode = menuContent.get();
|
||||
NS_IF_ADDREF(*outHiddenNode);
|
||||
|
@ -83,8 +83,8 @@ nsMenuItemIconX::nsMenuItemIconX(nsMenuObjectX* aMenuItem,
|
||||
NSMenuItem* aNativeMenuItem)
|
||||
: mContent(aContent)
|
||||
, mMenuObject(aMenuItem)
|
||||
, mLoadedIcon(PR_FALSE)
|
||||
, mSetIcon(PR_FALSE)
|
||||
, mLoadedIcon(false)
|
||||
, mSetIcon(false)
|
||||
, mNativeMenuItem(aNativeMenuItem)
|
||||
{
|
||||
// printf("Creating icon for menu item %d, menu %d, native item is %d\n", aMenuItem, aMenu, aNativeMenuItem);
|
||||
@ -303,7 +303,7 @@ nsMenuItemIconX::LoadIcon(nsIURI* aIconURI)
|
||||
mIconRequest = nsnull;
|
||||
}
|
||||
|
||||
mLoadedIcon = PR_FALSE;
|
||||
mLoadedIcon = false;
|
||||
|
||||
if (!mContent) return NS_ERROR_FAILURE;
|
||||
|
||||
@ -327,7 +327,7 @@ nsMenuItemIconX::LoadIcon(nsIURI* aIconURI)
|
||||
static bool sInitializedPlaceholder;
|
||||
static NSImage* sPlaceholderIconImage;
|
||||
if (!sInitializedPlaceholder) {
|
||||
sInitializedPlaceholder = PR_TRUE;
|
||||
sInitializedPlaceholder = true;
|
||||
|
||||
// Note that we only create the one and reuse it forever, so this is not a leak.
|
||||
sPlaceholderIconImage = [[NSImage alloc] initWithSize:NSMakeSize(kIconWidth, kIconHeight)];
|
||||
@ -521,8 +521,8 @@ nsMenuItemIconX::OnStopFrame(imgIRequest* aRequest,
|
||||
[newImage release];
|
||||
::CGImageRelease(iconImage);
|
||||
|
||||
mLoadedIcon = PR_TRUE;
|
||||
mSetIcon = PR_TRUE;
|
||||
mLoadedIcon = true;
|
||||
mSetIcon = true;
|
||||
|
||||
return NS_OK;
|
||||
|
||||
|
@ -62,7 +62,7 @@ nsMenuItemX::nsMenuItemX()
|
||||
mNativeMenuItem = nil;
|
||||
mMenuParent = nsnull;
|
||||
mMenuGroupOwner = nsnull;
|
||||
mIsChecked = PR_FALSE;
|
||||
mIsChecked = false;
|
||||
|
||||
MOZ_COUNT_CTOR(nsMenuItemX);
|
||||
}
|
||||
@ -163,7 +163,7 @@ nsresult nsMenuItemX::SetChecked(bool aIsChecked)
|
||||
// update the content model. This will also handle unchecking our siblings
|
||||
// if we are a radiomenu
|
||||
mContent->SetAttr(kNameSpaceID_None, nsWidgetAtoms::checked,
|
||||
mIsChecked ? NS_LITERAL_STRING("true") : NS_LITERAL_STRING("false"), PR_TRUE);
|
||||
mIsChecked ? NS_LITERAL_STRING("true") : NS_LITERAL_STRING("false"), true);
|
||||
|
||||
// update native menu item
|
||||
if (mIsChecked)
|
||||
@ -223,11 +223,11 @@ nsresult nsMenuItemX::DispatchDOMEvent(const nsString &eventName, bool *preventD
|
||||
NS_WARNING("Failed to create nsIDOMEvent");
|
||||
return rv;
|
||||
}
|
||||
event->InitEvent(eventName, PR_TRUE, PR_TRUE);
|
||||
event->InitEvent(eventName, true, true);
|
||||
|
||||
// mark DOM event as trusted
|
||||
nsCOMPtr<nsIPrivateDOMEvent> privateEvent(do_QueryInterface(event));
|
||||
privateEvent->SetTrusted(PR_TRUE);
|
||||
privateEvent->SetTrusted(true);
|
||||
|
||||
// send DOM event
|
||||
nsCOMPtr<nsIDOMEventTarget> eventTarget = do_QueryInterface(mContent);
|
||||
@ -262,7 +262,7 @@ void nsMenuItemX::UncheckRadioSiblings(nsIContent* inCheckedContent)
|
||||
// if the current sibling is in the same group, clear it
|
||||
if (sibling->AttrValueIs(kNameSpaceID_None, nsWidgetAtoms::name,
|
||||
myGroupName, eCaseMatters))
|
||||
sibling->SetAttr(kNameSpaceID_None, nsWidgetAtoms::checked, NS_LITERAL_STRING("false"), PR_TRUE);
|
||||
sibling->SetAttr(kNameSpaceID_None, nsWidgetAtoms::checked, NS_LITERAL_STRING("false"), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -326,12 +326,12 @@ nsMenuItemX::ObserveAttributeChanged(nsIDocument *aDocument, nsIContent *aConten
|
||||
nsWidgetAtoms::_true, eCaseMatters))
|
||||
UncheckRadioSiblings(mContent);
|
||||
}
|
||||
mMenuParent->SetRebuild(PR_TRUE);
|
||||
mMenuParent->SetRebuild(true);
|
||||
}
|
||||
else if (aAttribute == nsWidgetAtoms::hidden ||
|
||||
aAttribute == nsWidgetAtoms::collapsed ||
|
||||
aAttribute == nsWidgetAtoms::label) {
|
||||
mMenuParent->SetRebuild(PR_TRUE);
|
||||
mMenuParent->SetRebuild(true);
|
||||
}
|
||||
else if (aAttribute == nsWidgetAtoms::key) {
|
||||
SetKeyEquiv();
|
||||
@ -358,9 +358,9 @@ nsMenuItemX::ObserveAttributeChanged(nsIDocument *aDocument, nsIContent *aConten
|
||||
if (!commandDisabled.Equals(menuDisabled)) {
|
||||
// The menu's disabled state needs to be updated to match the command.
|
||||
if (commandDisabled.IsEmpty())
|
||||
mContent->UnsetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, PR_TRUE);
|
||||
mContent->UnsetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, true);
|
||||
else
|
||||
mContent->SetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, commandDisabled, PR_TRUE);
|
||||
mContent->SetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, commandDisabled, true);
|
||||
}
|
||||
// now we sync our native menu item with the command DOM node
|
||||
if (aContent->AttrValueIs(kNameSpaceID_None, nsWidgetAtoms::disabled, nsWidgetAtoms::_true, eCaseMatters))
|
||||
@ -380,13 +380,13 @@ void nsMenuItemX::ObserveContentRemoved(nsIDocument *aDocument, nsIContent *aChi
|
||||
mCommandContent = nsnull;
|
||||
}
|
||||
|
||||
mMenuParent->SetRebuild(PR_TRUE);
|
||||
mMenuParent->SetRebuild(true);
|
||||
}
|
||||
|
||||
void nsMenuItemX::ObserveContentInserted(nsIDocument *aDocument, nsIContent* aContainer,
|
||||
nsIContent *aChild)
|
||||
{
|
||||
mMenuParent->SetRebuild(PR_TRUE);
|
||||
mMenuParent->SetRebuild(true);
|
||||
}
|
||||
|
||||
void nsMenuItemX::SetupIcon()
|
||||
|
@ -70,11 +70,11 @@ void nsMenuUtilsX::DispatchCommandTo(nsIContent* aTargetContent)
|
||||
// pressed keys, but this is a big old edge case anyway. -dwh
|
||||
if (pEvent &&
|
||||
NS_SUCCEEDED(command->InitCommandEvent(NS_LITERAL_STRING("command"),
|
||||
PR_TRUE, PR_TRUE,
|
||||
true, true,
|
||||
doc->GetWindow(), 0,
|
||||
PR_FALSE, PR_FALSE, PR_FALSE,
|
||||
PR_FALSE, nsnull))) {
|
||||
pEvent->SetTrusted(PR_TRUE);
|
||||
false, false, false,
|
||||
false, nsnull))) {
|
||||
pEvent->SetTrusted(true);
|
||||
bool dummy;
|
||||
target->DispatchEvent(event, &dummy);
|
||||
}
|
||||
|
@ -124,17 +124,17 @@ PRInt32 nsMenuX::sIndexingMenuLevel = 0;
|
||||
|
||||
nsMenuX::nsMenuX()
|
||||
: mVisibleItemsCount(0), mParent(nsnull), mMenuGroupOwner(nsnull),
|
||||
mNativeMenu(nil), mNativeMenuItem(nil), mIsEnabled(PR_TRUE),
|
||||
mDestroyHandlerCalled(PR_FALSE), mNeedsRebuild(PR_TRUE),
|
||||
mConstructed(PR_FALSE), mVisible(PR_TRUE), mXBLAttached(PR_FALSE)
|
||||
mNativeMenu(nil), mNativeMenuItem(nil), mIsEnabled(true),
|
||||
mDestroyHandlerCalled(false), mNeedsRebuild(true),
|
||||
mConstructed(false), mVisible(true), mXBLAttached(false)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
if (!gMenuMethodsSwizzled) {
|
||||
nsToolkit::SwizzleMethods([NSMenu class], @selector(_addItem:toTable:),
|
||||
@selector(nsMenuX_NSMenu_addItem:toTable:), PR_TRUE);
|
||||
@selector(nsMenuX_NSMenu_addItem:toTable:), true);
|
||||
nsToolkit::SwizzleMethods([NSMenu class], @selector(_removeItem:fromTable:),
|
||||
@selector(nsMenuX_NSMenu_removeItem:fromTable:), PR_TRUE);
|
||||
@selector(nsMenuX_NSMenu_removeItem:fromTable:), true);
|
||||
// On SnowLeopard the Shortcut framework (which contains the
|
||||
// SCTGRLIndex class) is loaded on demand, whenever the user first opens
|
||||
// a menu (which normally hasn't happened yet). So we need to load it
|
||||
@ -145,7 +145,7 @@ nsMenuX::nsMenuX()
|
||||
nsToolkit::SwizzleMethods(SCTGRLIndexClass, @selector(indexMenuBarDynamically),
|
||||
@selector(nsMenuX_SCTGRLIndex_indexMenuBarDynamically));
|
||||
|
||||
gMenuMethodsSwizzled = PR_TRUE;
|
||||
gMenuMethodsSwizzled = true;
|
||||
}
|
||||
|
||||
mMenuDelegate = [[MenuDelegate alloc] initWithGeckoMenu:this];
|
||||
@ -208,9 +208,9 @@ nsresult nsMenuX::Create(nsMenuObjectX* aParent, nsMenuGroupOwnerX* aMenuGroupOw
|
||||
"Menu parent not a menu bar, menu, or native menu!");
|
||||
|
||||
if (nsMenuUtilsX::NodeIsHiddenOrCollapsed(mContent))
|
||||
mVisible = PR_FALSE;
|
||||
mVisible = false;
|
||||
if (mContent->GetChildCount() == 0)
|
||||
mVisible = PR_FALSE;
|
||||
mVisible = false;
|
||||
|
||||
NSString *newCocoaLabelString = nsMenuUtilsX::GetTruncatedCocoaLabel(mLabel);
|
||||
mNativeMenuItem = [[NSMenuItem alloc] initWithTitle:newCocoaLabelString action:nil keyEquivalent:@""];
|
||||
@ -367,7 +367,7 @@ nsresult nsMenuX::RemoveAll()
|
||||
nsEventStatus nsMenuX::MenuOpened()
|
||||
{
|
||||
// Open the node.
|
||||
mContent->SetAttr(kNameSpaceID_None, nsWidgetAtoms::open, NS_LITERAL_STRING("true"), PR_TRUE);
|
||||
mContent->SetAttr(kNameSpaceID_None, nsWidgetAtoms::open, NS_LITERAL_STRING("true"), true);
|
||||
|
||||
// Fire a handler. If we're told to stop, don't build the menu at all
|
||||
bool keepProcessing = OnOpen();
|
||||
@ -384,7 +384,7 @@ nsEventStatus nsMenuX::MenuOpened()
|
||||
}
|
||||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsMouseEvent event(PR_TRUE, NS_XUL_POPUP_SHOWN, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent event(true, NS_XUL_POPUP_SHOWN, nsnull, nsMouseEvent::eReal);
|
||||
|
||||
nsCOMPtr<nsIContent> popupContent;
|
||||
GetMenuPopupContent(getter_AddRefs(popupContent));
|
||||
@ -404,17 +404,17 @@ void nsMenuX::MenuClosed()
|
||||
if (mNeedsRebuild)
|
||||
mConstructed = false;
|
||||
|
||||
mContent->UnsetAttr(kNameSpaceID_None, nsWidgetAtoms::open, PR_TRUE);
|
||||
mContent->UnsetAttr(kNameSpaceID_None, nsWidgetAtoms::open, true);
|
||||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsMouseEvent event(PR_TRUE, NS_XUL_POPUP_HIDDEN, nsnull, nsMouseEvent::eReal);
|
||||
nsMouseEvent event(true, NS_XUL_POPUP_HIDDEN, nsnull, nsMouseEvent::eReal);
|
||||
|
||||
nsCOMPtr<nsIContent> popupContent;
|
||||
GetMenuPopupContent(getter_AddRefs(popupContent));
|
||||
nsIContent* dispatchTo = popupContent ? popupContent : mContent;
|
||||
dispatchTo->DispatchDOMEvent(&event, nsnull, nsnull, &status);
|
||||
|
||||
mDestroyHandlerCalled = PR_TRUE;
|
||||
mDestroyHandlerCalled = true;
|
||||
mConstructed = false;
|
||||
}
|
||||
}
|
||||
@ -422,10 +422,10 @@ void nsMenuX::MenuClosed()
|
||||
void nsMenuX::MenuConstruct()
|
||||
{
|
||||
mConstructed = false;
|
||||
gConstructingMenu = PR_TRUE;
|
||||
gConstructingMenu = true;
|
||||
|
||||
// reset destroy handler flag so that we'll know to fire it next time this menu goes away.
|
||||
mDestroyHandlerCalled = PR_FALSE;
|
||||
mDestroyHandlerCalled = false;
|
||||
|
||||
//printf("nsMenuX::MenuConstruct called for %s = %d \n", NS_LossyConvertUTF16toASCII(mLabel).get(), mNativeMenu);
|
||||
|
||||
@ -433,7 +433,7 @@ void nsMenuX::MenuConstruct()
|
||||
nsCOMPtr<nsIContent> menuPopup;
|
||||
GetMenuPopupContent(getter_AddRefs(menuPopup));
|
||||
if (!menuPopup) {
|
||||
gConstructingMenu = PR_FALSE;
|
||||
gConstructingMenu = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -455,7 +455,7 @@ void nsMenuX::MenuConstruct()
|
||||
xpconnect->WrapNative(cx, global,
|
||||
menuPopup, NS_GET_IID(nsISupports),
|
||||
getter_AddRefs(wrapper));
|
||||
mXBLAttached = PR_TRUE;
|
||||
mXBLAttached = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -476,8 +476,8 @@ void nsMenuX::MenuConstruct()
|
||||
}
|
||||
} // for each menu item
|
||||
|
||||
gConstructingMenu = PR_FALSE;
|
||||
mNeedsRebuild = PR_FALSE;
|
||||
gConstructingMenu = false;
|
||||
mNeedsRebuild = false;
|
||||
// printf("Done building, mMenuObjectsArray.Count() = %d \n", mMenuObjectsArray.Count());
|
||||
}
|
||||
|
||||
@ -592,7 +592,7 @@ void nsMenuX::LoadSubMenu(nsIContent* inMenuContent)
|
||||
bool nsMenuX::OnOpen()
|
||||
{
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsMouseEvent event(PR_TRUE, NS_XUL_POPUP_SHOWING, nsnull,
|
||||
nsMouseEvent event(true, NS_XUL_POPUP_SHOWING, nsnull,
|
||||
nsMouseEvent::eReal);
|
||||
|
||||
nsCOMPtr<nsIContent> popupContent;
|
||||
@ -602,7 +602,7 @@ bool nsMenuX::OnOpen()
|
||||
nsIContent* dispatchTo = popupContent ? popupContent : mContent;
|
||||
rv = dispatchTo->DispatchDOMEvent(&event, nsnull, nsnull, &status);
|
||||
if (NS_FAILED(rv) || status == nsEventStatus_eConsumeNoDefault)
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
// If the open is going to succeed we need to walk our menu items, checking to
|
||||
// see if any of them have a command attribute. If so, several apptributes
|
||||
@ -612,11 +612,11 @@ bool nsMenuX::OnOpen()
|
||||
// NS_XUL_POPUP_SHOWING event above.
|
||||
GetMenuPopupContent(getter_AddRefs(popupContent));
|
||||
if (!popupContent)
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
|
||||
nsCOMPtr<nsIDOMDocument> domDoc(do_QueryInterface(popupContent->GetDocument()));
|
||||
if (!domDoc)
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
|
||||
PRUint32 count = popupContent->GetChildCount();
|
||||
for (PRUint32 i = 0; i < count; i++) {
|
||||
@ -638,9 +638,9 @@ bool nsMenuX::OnOpen()
|
||||
if (!commandDisabled.Equals(menuDisabled)) {
|
||||
// The menu's disabled state needs to be updated to match the command.
|
||||
if (commandDisabled.IsEmpty())
|
||||
grandChild->UnsetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, PR_TRUE);
|
||||
grandChild->UnsetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, true);
|
||||
else
|
||||
grandChild->SetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, commandDisabled, PR_TRUE);
|
||||
grandChild->SetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, commandDisabled, true);
|
||||
}
|
||||
|
||||
// The menu's value and checked states need to be updated to match the command.
|
||||
@ -651,7 +651,7 @@ bool nsMenuX::OnOpen()
|
||||
grandChild->GetAttr(kNameSpaceID_None, nsWidgetAtoms::checked, menuChecked);
|
||||
if (!commandChecked.Equals(menuChecked)) {
|
||||
if (!commandChecked.IsEmpty())
|
||||
grandChild->SetAttr(kNameSpaceID_None, nsWidgetAtoms::checked, commandChecked, PR_TRUE);
|
||||
grandChild->SetAttr(kNameSpaceID_None, nsWidgetAtoms::checked, commandChecked, true);
|
||||
}
|
||||
|
||||
nsAutoString commandValue, menuValue;
|
||||
@ -659,14 +659,14 @@ bool nsMenuX::OnOpen()
|
||||
grandChild->GetAttr(kNameSpaceID_None, nsWidgetAtoms::label, menuValue);
|
||||
if (!commandValue.Equals(menuValue)) {
|
||||
if (!commandValue.IsEmpty())
|
||||
grandChild->SetAttr(kNameSpaceID_None, nsWidgetAtoms::label, commandValue, PR_TRUE);
|
||||
grandChild->SetAttr(kNameSpaceID_None, nsWidgetAtoms::label, commandValue, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Returns TRUE if we should keep processing the event, FALSE if the handler
|
||||
@ -674,10 +674,10 @@ bool nsMenuX::OnOpen()
|
||||
bool nsMenuX::OnClose()
|
||||
{
|
||||
if (mDestroyHandlerCalled)
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsMouseEvent event(PR_TRUE, NS_XUL_POPUP_HIDING, nsnull,
|
||||
nsMouseEvent event(true, NS_XUL_POPUP_HIDING, nsnull,
|
||||
nsMouseEvent::eReal);
|
||||
|
||||
nsCOMPtr<nsIContent> popupContent;
|
||||
@ -687,12 +687,12 @@ bool nsMenuX::OnClose()
|
||||
nsIContent* dispatchTo = popupContent ? popupContent : mContent;
|
||||
rv = dispatchTo->DispatchDOMEvent(&event, nsnull, nsnull, &status);
|
||||
|
||||
mDestroyHandlerCalled = PR_TRUE;
|
||||
mDestroyHandlerCalled = true;
|
||||
|
||||
if (NS_FAILED(rv) || status == nsEventStatus_eConsumeNoDefault)
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Find the |menupopup| child in the |popup| representing this menu. It should be one
|
||||
@ -750,7 +750,7 @@ bool nsMenuX::IsXULHelpMenu(nsIContent* aMenuContent)
|
||||
nsAutoString id;
|
||||
aMenuContent->GetAttr(kNameSpaceID_None, nsWidgetAtoms::id, id);
|
||||
if (id.Equals(NS_LITERAL_STRING("helpMenu")))
|
||||
retval = PR_TRUE;
|
||||
retval = true;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
@ -787,14 +787,14 @@ void nsMenuX::ObserveAttributeChanged(nsIDocument *aDocument, nsIContent *aConte
|
||||
[mNativeMenu setTitle:newCocoaLabelString];
|
||||
}
|
||||
else if (parentType == eSubmenuObjectType) {
|
||||
static_cast<nsMenuX*>(mParent)->SetRebuild(PR_TRUE);
|
||||
static_cast<nsMenuX*>(mParent)->SetRebuild(true);
|
||||
}
|
||||
else if (parentType == eStandaloneNativeMenuObjectType) {
|
||||
static_cast<nsStandaloneNativeMenu*>(mParent)->GetMenuXObject()->SetRebuild(PR_TRUE);
|
||||
static_cast<nsStandaloneNativeMenu*>(mParent)->GetMenuXObject()->SetRebuild(true);
|
||||
}
|
||||
}
|
||||
else if (aAttribute == nsWidgetAtoms::hidden || aAttribute == nsWidgetAtoms::collapsed) {
|
||||
SetRebuild(PR_TRUE);
|
||||
SetRebuild(true);
|
||||
|
||||
bool contentIsHiddenOrCollapsed = nsMenuUtilsX::NodeIsHiddenOrCollapsed(mContent);
|
||||
|
||||
@ -811,7 +811,7 @@ void nsMenuX::ObserveAttributeChanged(nsIDocument *aDocument, nsIContent *aConte
|
||||
// in the menu.
|
||||
if ([parentMenu indexOfItem:mNativeMenuItem] != -1)
|
||||
[parentMenu removeItem:mNativeMenuItem];
|
||||
mVisible = PR_FALSE;
|
||||
mVisible = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -829,7 +829,7 @@ void nsMenuX::ObserveAttributeChanged(nsIDocument *aDocument, nsIContent *aConte
|
||||
NSMenu* parentMenu = (NSMenu*)mParent->NativeData();
|
||||
[parentMenu insertItem:mNativeMenuItem atIndex:insertionIndex];
|
||||
[mNativeMenuItem setSubmenu:mNativeMenu];
|
||||
mVisible = PR_TRUE;
|
||||
mVisible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -846,7 +846,7 @@ void nsMenuX::ObserveContentRemoved(nsIDocument *aDocument, nsIContent *aChild,
|
||||
if (gConstructingMenu)
|
||||
return;
|
||||
|
||||
SetRebuild(PR_TRUE);
|
||||
SetRebuild(true);
|
||||
mMenuGroupOwner->UnregisterForContentChanges(aChild);
|
||||
}
|
||||
|
||||
@ -856,7 +856,7 @@ void nsMenuX::ObserveContentInserted(nsIDocument *aDocument, nsIContent* aContai
|
||||
if (gConstructingMenu)
|
||||
return;
|
||||
|
||||
SetRebuild(PR_TRUE);
|
||||
SetRebuild(true);
|
||||
}
|
||||
|
||||
nsresult nsMenuX::SetupIcon()
|
||||
|
@ -1660,7 +1660,7 @@ nsNativeThemeCocoa::DrawScrollbar(CGContextRef aCGContext, const HIRect& aBoxRec
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
HIThemeTrackDrawInfo tdi;
|
||||
GetScrollbarDrawInfo(tdi, aFrame, aBoxRect.size, PR_TRUE); // True means we want the press states
|
||||
GetScrollbarDrawInfo(tdi, aFrame, aBoxRect.size, true); // True means we want the press states
|
||||
RenderTransformedHIThemeControl(aCGContext, aBoxRect, RenderScrollbar, &tdi);
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
@ -1684,7 +1684,7 @@ ToolbarCanBeUnified(CGContextRef cgContext, const HIRect& inBoxRect, NSWindow* a
|
||||
{
|
||||
if (![aWindow isKindOfClass:[ToolbarWindow class]] ||
|
||||
[(ToolbarWindow*)aWindow drawsContentsIntoWindowFrame])
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
float unifiedToolbarHeight = [(ToolbarWindow*)aWindow unifiedToolbarHeight];
|
||||
return inBoxRect.origin.x == 0 &&
|
||||
@ -2015,7 +2015,7 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsRenderingContext* aContext,
|
||||
break;
|
||||
|
||||
case NS_THEME_DROPDOWN_BUTTON:
|
||||
DrawButton(cgContext, kThemeArrowButton, macRect, PR_FALSE, kThemeButtonOn,
|
||||
DrawButton(cgContext, kThemeArrowButton, macRect, false, kThemeButtonOn,
|
||||
kThemeAdornmentArrowDownArrow, eventState, aFrame);
|
||||
break;
|
||||
|
||||
@ -2058,7 +2058,7 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsRenderingContext* aContext,
|
||||
|
||||
case NS_THEME_PROGRESSBAR_VERTICAL:
|
||||
DrawProgress(cgContext, macRect, IsIndeterminateProgress(aFrame, eventState),
|
||||
PR_FALSE, GetProgressValue(aFrame),
|
||||
false, GetProgressValue(aFrame),
|
||||
GetProgressMaxValue(aFrame), aFrame);
|
||||
break;
|
||||
|
||||
@ -2068,18 +2068,18 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsRenderingContext* aContext,
|
||||
break;
|
||||
|
||||
case NS_THEME_TREEVIEW_TWISTY:
|
||||
DrawButton(cgContext, kThemeDisclosureButton, macRect, PR_FALSE,
|
||||
DrawButton(cgContext, kThemeDisclosureButton, macRect, false,
|
||||
kThemeDisclosureRight, kThemeAdornmentNone, eventState, aFrame);
|
||||
break;
|
||||
|
||||
case NS_THEME_TREEVIEW_TWISTY_OPEN:
|
||||
DrawButton(cgContext, kThemeDisclosureButton, macRect, PR_FALSE,
|
||||
DrawButton(cgContext, kThemeDisclosureButton, macRect, false,
|
||||
kThemeDisclosureDown, kThemeAdornmentNone, eventState, aFrame);
|
||||
break;
|
||||
|
||||
case NS_THEME_TREEVIEW_HEADER_CELL: {
|
||||
TreeSortDirection sortDirection = GetTreeSortDirection(aFrame);
|
||||
DrawButton(cgContext, kThemeListHeaderButton, macRect, PR_FALSE,
|
||||
DrawButton(cgContext, kThemeListHeaderButton, macRect, false,
|
||||
sortDirection == eTreeSortDirection_Natural ? kThemeButtonOff : kThemeButtonOn,
|
||||
sortDirection == eTreeSortDirection_Ascending ?
|
||||
kThemeAdornmentHeaderButtonSortUp : kThemeAdornmentNone, eventState, aFrame);
|
||||
@ -2355,9 +2355,9 @@ nsNativeThemeCocoa::GetWidgetBorder(nsDeviceContext* aContext,
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
||||
}
|
||||
|
||||
// Return PR_FALSE here to indicate that CSS padding values should be used. There is
|
||||
// Return false here to indicate that CSS padding values should be used. There is
|
||||
// no reason to make a distinction between padding and border values, just specify
|
||||
// whatever values you want in GetWidgetBorder and only use this to return PR_TRUE
|
||||
// whatever values you want in GetWidgetBorder and only use this to return true
|
||||
// if you want to override CSS padding values.
|
||||
bool
|
||||
nsNativeThemeCocoa::GetWidgetPadding(nsDeviceContext* aContext,
|
||||
@ -2375,9 +2375,9 @@ nsNativeThemeCocoa::GetWidgetPadding(nsDeviceContext* aContext,
|
||||
case NS_THEME_CHECKBOX:
|
||||
case NS_THEME_RADIO:
|
||||
aResult->SizeTo(0, 0, 0, 0);
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
@ -2407,11 +2407,11 @@ nsNativeThemeCocoa::GetWidgetOverflow(nsDeviceContext* aContext, nsIFrame* aFram
|
||||
NSIntPixelsToAppUnits(extraSize.right, p2a),
|
||||
NSIntPixelsToAppUnits(extraSize.bottom, p2a));
|
||||
aOverflowRect->Inflate(m);
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static const PRInt32 kRegularScrollbarThumbMinSize = 22;
|
||||
@ -2427,7 +2427,7 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsRenderingContext* aContext,
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
||||
|
||||
aResult->SizeTo(0,0);
|
||||
*aIsOverridable = PR_TRUE;
|
||||
*aIsOverridable = true;
|
||||
|
||||
switch (aWidgetType) {
|
||||
case NS_THEME_BUTTON:
|
||||
@ -2449,7 +2449,7 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsRenderingContext* aContext,
|
||||
::GetThemeMetric(kThemeMetricLittleArrowsWidth, &buttonWidth);
|
||||
::GetThemeMetric(kThemeMetricLittleArrowsHeight, &buttonHeight);
|
||||
aResult->SizeTo(buttonWidth, buttonHeight);
|
||||
*aIsOverridable = PR_FALSE;
|
||||
*aIsOverridable = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2488,7 +2488,7 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsRenderingContext* aContext,
|
||||
::GetThemeMetric(kThemeMetricDisclosureButtonWidth, &twistyWidth);
|
||||
::GetThemeMetric(kThemeMetricDisclosureButtonHeight, &twistyHeight);
|
||||
aResult->SizeTo(twistyWidth, twistyHeight);
|
||||
*aIsOverridable = PR_FALSE;
|
||||
*aIsOverridable = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2512,7 +2512,7 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsRenderingContext* aContext,
|
||||
SInt32 scaleHeight = 0;
|
||||
::GetThemeMetric(kThemeMetricHSliderHeight, &scaleHeight);
|
||||
aResult->SizeTo(scaleHeight, scaleHeight);
|
||||
*aIsOverridable = PR_FALSE;
|
||||
*aIsOverridable = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2521,7 +2521,7 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsRenderingContext* aContext,
|
||||
SInt32 scaleWidth = 0;
|
||||
::GetThemeMetric(kThemeMetricVSliderWidth, &scaleWidth);
|
||||
aResult->SizeTo(scaleWidth, scaleWidth);
|
||||
*aIsOverridable = PR_FALSE;
|
||||
*aIsOverridable = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2530,7 +2530,7 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsRenderingContext* aContext,
|
||||
SInt32 scrollbarWidth = 0;
|
||||
::GetThemeMetric(kThemeMetricSmallScrollBarWidth, &scrollbarWidth);
|
||||
aResult->SizeTo(scrollbarWidth, scrollbarWidth);
|
||||
*aIsOverridable = PR_FALSE;
|
||||
*aIsOverridable = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2568,7 +2568,7 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsRenderingContext* aContext,
|
||||
SInt32 scrollbarWidth = 0;
|
||||
::GetThemeMetric(themeMetric, &scrollbarWidth);
|
||||
aResult->SizeTo(scrollbarWidth, scrollbarWidth);
|
||||
*aIsOverridable = PR_FALSE;
|
||||
*aIsOverridable = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2593,7 +2593,7 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsRenderingContext* aContext,
|
||||
else
|
||||
aResult->SizeTo(scrollbarWidth, scrollbarWidth+1);
|
||||
|
||||
*aIsOverridable = PR_FALSE;
|
||||
*aIsOverridable = false;
|
||||
break;
|
||||
}
|
||||
case NS_THEME_RESIZER:
|
||||
@ -2608,7 +2608,7 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsRenderingContext* aContext,
|
||||
HIRect bounds;
|
||||
HIThemeGetGrowBoxBounds(&pnt, &drawInfo, &bounds);
|
||||
aResult->SizeTo(bounds.size.width, bounds.size.height);
|
||||
*aIsOverridable = PR_FALSE;
|
||||
*aIsOverridable = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2641,7 +2641,7 @@ nsNativeThemeCocoa::WidgetStateChanged(nsIFrame* aFrame, PRUint8 aWidgetType,
|
||||
case NS_THEME_PROGRESSBAR_CHUNK_VERTICAL:
|
||||
case NS_THEME_PROGRESSBAR:
|
||||
case NS_THEME_PROGRESSBAR_VERTICAL:
|
||||
*aShouldRepaint = PR_FALSE;
|
||||
*aShouldRepaint = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -2650,11 +2650,11 @@ nsNativeThemeCocoa::WidgetStateChanged(nsIFrame* aFrame, PRUint8 aWidgetType,
|
||||
// For example, a toolbar doesn't care about any states.
|
||||
if (!aAttribute) {
|
||||
// Hover/focus/active changed. Always repaint.
|
||||
*aShouldRepaint = PR_TRUE;
|
||||
*aShouldRepaint = true;
|
||||
} else {
|
||||
// Check the attribute to see if it's relevant.
|
||||
// disabled, checked, dlgtype, default, etc.
|
||||
*aShouldRepaint = PR_FALSE;
|
||||
*aShouldRepaint = false;
|
||||
if (aAttribute == nsWidgetAtoms::disabled ||
|
||||
aAttribute == nsWidgetAtoms::checked ||
|
||||
aAttribute == nsWidgetAtoms::selected ||
|
||||
@ -2663,7 +2663,7 @@ nsNativeThemeCocoa::WidgetStateChanged(nsIFrame* aFrame, PRUint8 aWidgetType,
|
||||
aAttribute == nsWidgetAtoms::focused ||
|
||||
aAttribute == nsWidgetAtoms::_default ||
|
||||
aAttribute == nsWidgetAtoms::open)
|
||||
*aShouldRepaint = PR_TRUE;
|
||||
*aShouldRepaint = true;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -2685,13 +2685,13 @@ nsNativeThemeCocoa::ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* a
|
||||
// render natively even if native theme support is disabled.
|
||||
if (aWidgetType != NS_THEME_SCROLLBAR &&
|
||||
aPresContext && !aPresContext->PresShell()->IsThemeSupportEnabled())
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
|
||||
// if this is a dropdown button in a combobox the answer is always no
|
||||
if (aWidgetType == NS_THEME_DROPDOWN_BUTTON) {
|
||||
nsIFrame* parentFrame = aFrame->GetParent();
|
||||
if (parentFrame && (parentFrame->GetType() == nsWidgetAtoms::comboboxControlFrame))
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (aWidgetType) {
|
||||
@ -2766,7 +2766,7 @@ nsNativeThemeCocoa::ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* a
|
||||
{
|
||||
nsIFrame* parentFrame = aFrame->GetParent();
|
||||
if (!parentFrame || parentFrame->GetType() != nsWidgetAtoms::scrollFrame)
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
|
||||
// Note that IsWidgetStyled is not called for resizers on Mac. This is
|
||||
// because for scrollable containers, the native resizer looks better
|
||||
@ -2779,7 +2779,7 @@ nsNativeThemeCocoa::ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* a
|
||||
}
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
@ -2791,10 +2791,10 @@ nsNativeThemeCocoa::WidgetIsContainer(PRUint8 aWidgetType)
|
||||
case NS_THEME_RADIO:
|
||||
case NS_THEME_CHECKBOX:
|
||||
case NS_THEME_PROGRESSBAR:
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
@ -2805,15 +2805,15 @@ nsNativeThemeCocoa::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFra
|
||||
aWidgetType == NS_THEME_BUTTON ||
|
||||
aWidgetType == NS_THEME_RADIO ||
|
||||
aWidgetType == NS_THEME_CHECKBOX)
|
||||
return PR_TRUE;
|
||||
return true;
|
||||
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
nsNativeThemeCocoa::ThemeNeedsComboboxDropmarker()
|
||||
{
|
||||
return PR_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
nsITheme::Transparency
|
||||
|
@ -80,7 +80,7 @@ nsresult nsPrintOptionsX::_CreatePrintSettings(nsIPrintSettings **_retval)
|
||||
return rv;
|
||||
}
|
||||
|
||||
InitPrintSettingsFromPrefs(*_retval, PR_FALSE, nsIPrintSettings::kInitSaveAll);
|
||||
InitPrintSettingsFromPrefs(*_retval, false, nsIPrintSettings::kInitSaveAll);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ nsStandaloneNativeMenu::MenuWillOpen(bool * aResult)
|
||||
// its submenus.
|
||||
UpdateMenu(mMenu);
|
||||
|
||||
*aResult = PR_TRUE;
|
||||
*aResult = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user