mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1165515 - Part 5: Convert instances of PR_LOG_ALWAYS. r=froydnj
Most instances were converted to PR_LOG_INFO, some to PR_LOG_DEBUG, and some to PR_LOG_ERROR.
This commit is contained in:
parent
a703d6cf7e
commit
0a502beb23
@ -43,7 +43,7 @@ using namespace widget;
|
||||
|
||||
/**
|
||||
* When a method is called, log its arguments and/or related static variables
|
||||
* with PR_LOG_ALWAYS. However, if it puts too many logs like
|
||||
* with PR_LOG_INFO. However, if it puts too many logs like
|
||||
* OnDestroyPresContext(), should long only when the method actually does
|
||||
* something. In this case, the log should start with "ISM: <method name>".
|
||||
*
|
||||
@ -200,7 +200,7 @@ IMEStateManager::Init()
|
||||
void
|
||||
IMEStateManager::Shutdown()
|
||||
{
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::Shutdown(), "
|
||||
"sTextCompositions=0x%p, sTextCompositions->Length()=%u",
|
||||
sTextCompositions, sTextCompositions ? sTextCompositions->Length() : 0));
|
||||
@ -241,7 +241,7 @@ IMEStateManager::OnDestroyPresContext(nsPresContext* aPresContext)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::OnDestroyPresContext(aPresContext=0x%p), "
|
||||
"sPresContext=0x%p, sContent=0x%p, sTextCompositions=0x%p",
|
||||
aPresContext, sPresContext, sContent, sTextCompositions));
|
||||
@ -296,7 +296,7 @@ IMEStateManager::OnRemoveContent(nsPresContext* aPresContext,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::OnRemoveContent(aPresContext=0x%p, "
|
||||
"aContent=0x%p), sPresContext=0x%p, sContent=0x%p, sTextCompositions=0x%p",
|
||||
aPresContext, aContent, sPresContext, sContent, sTextCompositions));
|
||||
@ -324,7 +324,7 @@ IMEStateManager::OnChangeFocus(nsPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
InputContextAction::Cause aCause)
|
||||
{
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::OnChangeFocus(aPresContext=0x%p, "
|
||||
"aContent=0x%p, aCause=%s)",
|
||||
aPresContext, aContent, GetActionCauseName(aCause)));
|
||||
@ -339,7 +339,7 @@ IMEStateManager::OnChangeFocusInternal(nsPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
InputContextAction aAction)
|
||||
{
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::OnChangeFocusInternal(aPresContext=0x%p, "
|
||||
"aContent=0x%p, aAction={ mCause=%s, mFocusChange=%s }), "
|
||||
"sPresContext=0x%p, sContent=0x%p, sActiveIMEContentObserver=0x%p",
|
||||
@ -449,7 +449,7 @@ IMEStateManager::OnChangeFocusInternal(nsPresContext* aPresContext,
|
||||
void
|
||||
IMEStateManager::OnInstalledMenuKeyboardListener(bool aInstalling)
|
||||
{
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::OnInstalledMenuKeyboardListener(aInstalling=%s), "
|
||||
"sInstalledMenuKeyboardListener=%s",
|
||||
GetBoolName(aInstalling), GetBoolName(sInstalledMenuKeyboardListener)));
|
||||
@ -468,7 +468,7 @@ IMEStateManager::OnMouseButtonEventInEditor(nsPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
nsIDOMMouseEvent* aMouseEvent)
|
||||
{
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::OnMouseButtonEventInEditor(aPresContext=0x%p, "
|
||||
"aContent=0x%p, aMouseEvent=0x%p), sPresContext=0x%p, sContent=0x%p",
|
||||
aPresContext, aContent, aMouseEvent, sPresContext, sContent));
|
||||
@ -506,10 +506,10 @@ IMEStateManager::OnMouseButtonEventInEditor(nsPresContext* aPresContext,
|
||||
bool consumed =
|
||||
sActiveIMEContentObserver->OnMouseButtonEvent(aPresContext, internalEvent);
|
||||
|
||||
if (MOZ_LOG_TEST(sISMLog, PR_LOG_ALWAYS)) {
|
||||
if (MOZ_LOG_TEST(sISMLog, PR_LOG_INFO)) {
|
||||
nsAutoString eventType;
|
||||
aMouseEvent->GetType(eventType);
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::OnMouseButtonEventInEditor(), "
|
||||
"mouse event (type=%s, button=%d) is %s",
|
||||
NS_ConvertUTF16toUTF8(eventType).get(), internalEvent->button,
|
||||
@ -525,7 +525,7 @@ IMEStateManager::OnClickInEditor(nsPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
nsIDOMMouseEvent* aMouseEvent)
|
||||
{
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::OnClickInEditor(aPresContext=0x%p, aContent=0x%p, "
|
||||
"aMouseEvent=0x%p), sPresContext=0x%p, sContent=0x%p",
|
||||
aPresContext, aContent, aMouseEvent, sPresContext, sContent));
|
||||
@ -582,7 +582,7 @@ IMEStateManager::OnFocusInEditor(nsPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
nsIEditor* aEditor)
|
||||
{
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::OnFocusInEditor(aPresContext=0x%p, aContent=0x%p, "
|
||||
"aEditor=0x%p), sPresContext=0x%p, sContent=0x%p, "
|
||||
"sActiveIMEContentObserver=0x%p",
|
||||
@ -617,7 +617,7 @@ IMEStateManager::UpdateIMEState(const IMEState& aNewIMEState,
|
||||
nsIContent* aContent,
|
||||
nsIEditor* aEditor)
|
||||
{
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::UpdateIMEState(aNewIMEState={ mEnabled=%s, "
|
||||
"mOpen=%s }, aContent=0x%p, aEditor=0x%p), "
|
||||
"sPresContext=0x%p, sContent=0x%p, sActiveIMEContentObserver=0x%p, "
|
||||
@ -697,7 +697,7 @@ IMEState
|
||||
IMEStateManager::GetNewIMEState(nsPresContext* aPresContext,
|
||||
nsIContent* aContent)
|
||||
{
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::GetNewIMEState(aPresContext=0x%p, aContent=0x%p), "
|
||||
"sInstalledMenuKeyboardListener=%s",
|
||||
aPresContext, aContent, GetBoolName(sInstalledMenuKeyboardListener)));
|
||||
@ -763,7 +763,7 @@ public:
|
||||
nsCOMPtr<nsIObserverService> observerService =
|
||||
services::GetObserverService();
|
||||
if (observerService) {
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEEnabledStateChangedEvent::Run(), notifies observers of "
|
||||
"\"ime-enabled-state-changed\""));
|
||||
nsAutoString state;
|
||||
@ -785,7 +785,7 @@ IMEStateManager::SetIMEState(const IMEState& aState,
|
||||
nsIWidget* aWidget,
|
||||
InputContextAction aAction)
|
||||
{
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::SetIMEState(aState={ mEnabled=%s, mOpen=%s }, "
|
||||
"aContent=0x%p, aWidget=0x%p, aAction={ mCause=%s, mFocusChange=%s })",
|
||||
GetIMEStateEnabledName(aState.mEnabled),
|
||||
@ -913,7 +913,7 @@ IMEStateManager::DispatchCompositionEvent(
|
||||
EventDispatchingCallback* aCallBack,
|
||||
bool aIsSynthesized)
|
||||
{
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::DispatchCompositionEvent(aNode=0x%p, "
|
||||
"aPresContext=0x%p, aCompositionEvent={ message=%s, "
|
||||
"mFlags={ mIsTrusted=%s, mPropagationStopped=%s } }, "
|
||||
@ -996,7 +996,7 @@ IMEStateManager::OnCompositionEventDiscarded(
|
||||
// Note that this method is never called for synthesized events for emulating
|
||||
// commit or cancel composition.
|
||||
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::OnCompositionEventDiscarded(aCompositionEvent={ "
|
||||
"message=%s, mFlags={ mIsTrusted=%s } })",
|
||||
GetEventMessageName(aCompositionEvent->message),
|
||||
@ -1019,7 +1019,7 @@ IMEStateManager::OnCompositionEventDiscarded(
|
||||
// a TextComposition instance for the composition was already removed from
|
||||
// the array and destroyed in OnDestroyPresContext(). Therefore, we may
|
||||
// fail to retrieve a TextComposition instance here.
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::OnCompositionEventDiscarded(), "
|
||||
"TextComposition instance for the widget has already gone"));
|
||||
return;
|
||||
@ -1040,7 +1040,7 @@ IMEStateManager::NotifyIME(IMEMessage aMessage,
|
||||
bool isSynthesizedForTests =
|
||||
composition && composition->IsSynthesizedForTests();
|
||||
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::NotifyIME(aMessage=%s, aWidget=0x%p), "
|
||||
"composition=0x%p, composition->IsSynthesizedForTests()=%s",
|
||||
GetNotifyIMEMessageName(aMessage), aWidget, composition.get(),
|
||||
@ -1075,7 +1075,7 @@ nsresult
|
||||
IMEStateManager::NotifyIME(IMEMessage aMessage,
|
||||
nsPresContext* aPresContext)
|
||||
{
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::NotifyIME(aMessage=%s, aPresContext=0x%p)",
|
||||
GetNotifyIMEMessageName(aMessage), aPresContext));
|
||||
|
||||
@ -1150,7 +1150,7 @@ IMEStateManager::IsIMEObserverNeeded(const IMEState& aState)
|
||||
void
|
||||
IMEStateManager::DestroyIMEContentObserver()
|
||||
{
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::DestroyIMEContentObserver(), "
|
||||
"sActiveIMEContentObserver=0x%p",
|
||||
sActiveIMEContentObserver));
|
||||
@ -1173,7 +1173,7 @@ IMEStateManager::DestroyIMEContentObserver()
|
||||
void
|
||||
IMEStateManager::CreateIMEContentObserver(nsIEditor* aEditor)
|
||||
{
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sISMLog, PR_LOG_INFO,
|
||||
("ISM: IMEStateManager::CreateIMEContentObserver(aEditor=0x%p), "
|
||||
"sPresContext=0x%p, sContent=0x%p, sActiveIMEContentObserver=0x%p, "
|
||||
"sActiveIMEContentObserver->IsManaging(sPresContext, sContent)=%s",
|
||||
|
@ -195,7 +195,7 @@ HTMLTrackElement::LoadResource()
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsresult rv = NewURIFromString(src, getter_AddRefs(uri));
|
||||
NS_ENSURE_TRUE_VOID(NS_SUCCEEDED(rv));
|
||||
LOG(PR_LOG_ALWAYS, ("%p Trying to load from src=%s", this,
|
||||
LOG(PR_LOG_INFO, ("%p Trying to load from src=%s", this,
|
||||
NS_ConvertUTF16toUTF8(src).get()));
|
||||
|
||||
if (mChannel) {
|
||||
|
@ -16,13 +16,13 @@ extern PRLogModuleInfo* gMediaStreamGraphLog;
|
||||
void
|
||||
StreamBuffer::DumpTrackInfo() const
|
||||
{
|
||||
STREAM_LOG(PR_LOG_ALWAYS, ("DumpTracks: mTracksKnownTime %lld", mTracksKnownTime));
|
||||
STREAM_LOG(PR_LOG_INFO, ("DumpTracks: mTracksKnownTime %lld", mTracksKnownTime));
|
||||
for (uint32_t i = 0; i < mTracks.Length(); ++i) {
|
||||
Track* track = mTracks[i];
|
||||
if (track->IsEnded()) {
|
||||
STREAM_LOG(PR_LOG_ALWAYS, ("Track[%d] %d: ended", i, track->GetID()));
|
||||
STREAM_LOG(PR_LOG_INFO, ("Track[%d] %d: ended", i, track->GetID()));
|
||||
} else {
|
||||
STREAM_LOG(PR_LOG_ALWAYS, ("Track[%d] %d: %lld", i, track->GetID(),
|
||||
STREAM_LOG(PR_LOG_INFO, ("Track[%d] %d: %lld", i, track->GetID(),
|
||||
track->GetEnd()));
|
||||
}
|
||||
}
|
||||
|
@ -519,7 +519,7 @@ TX_LoadSheet(nsIURI* aUri, txMozillaXSLTProcessor* aProcessor,
|
||||
|
||||
nsAutoCString spec;
|
||||
aUri->GetSpec(spec);
|
||||
MOZ_LOG(txLog::xslt, PR_LOG_ALWAYS, ("TX_LoadSheet: %s\n", spec.get()));
|
||||
MOZ_LOG(txLog::xslt, PR_LOG_INFO, ("TX_LoadSheet: %s\n", spec.get()));
|
||||
|
||||
// Content Policy
|
||||
int16_t shouldLoad = nsIContentPolicy::ACCEPT;
|
||||
|
@ -377,7 +377,7 @@ txStylesheetCompiler::characters(const nsAString& aStr)
|
||||
nsresult
|
||||
txStylesheetCompiler::doneLoading()
|
||||
{
|
||||
MOZ_LOG(txLog::xslt, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(txLog::xslt, PR_LOG_INFO,
|
||||
("Compiler::doneLoading: %s\n",
|
||||
NS_LossyConvertUTF16toASCII(mStylesheetURI).get()));
|
||||
if (NS_FAILED(mStatus)) {
|
||||
@ -393,7 +393,7 @@ void
|
||||
txStylesheetCompiler::cancel(nsresult aError, const char16_t *aErrorText,
|
||||
const char16_t *aParam)
|
||||
{
|
||||
MOZ_LOG(txLog::xslt, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(txLog::xslt, PR_LOG_INFO,
|
||||
("Compiler::cancel: %s, module: %d, code %d\n",
|
||||
NS_LossyConvertUTF16toASCII(mStylesheetURI).get(),
|
||||
NS_ERROR_GET_MODULE(aError),
|
||||
@ -422,7 +422,7 @@ txStylesheetCompiler::loadURI(const nsAString& aUri,
|
||||
ReferrerPolicy aReferrerPolicy,
|
||||
txStylesheetCompiler* aCompiler)
|
||||
{
|
||||
MOZ_LOG(txLog::xslt, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(txLog::xslt, PR_LOG_INFO,
|
||||
("Compiler::loadURI forwards %s thru %s\n",
|
||||
NS_LossyConvertUTF16toASCII(aUri).get(),
|
||||
NS_LossyConvertUTF16toASCII(mStylesheetURI).get()));
|
||||
@ -750,7 +750,7 @@ txStylesheetCompilerState::addInstruction(nsAutoPtr<txInstruction>&& aInstructio
|
||||
nsresult
|
||||
txStylesheetCompilerState::loadIncludedStylesheet(const nsAString& aURI)
|
||||
{
|
||||
MOZ_LOG(txLog::xslt, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(txLog::xslt, PR_LOG_INFO,
|
||||
("CompilerState::loadIncludedStylesheet: %s\n",
|
||||
NS_LossyConvertUTF16toASCII(aURI).get()));
|
||||
if (mStylesheetURI.Equals(aURI)) {
|
||||
@ -795,7 +795,7 @@ nsresult
|
||||
txStylesheetCompilerState::loadImportedStylesheet(const nsAString& aURI,
|
||||
txStylesheet::ImportFrame* aFrame)
|
||||
{
|
||||
MOZ_LOG(txLog::xslt, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(txLog::xslt, PR_LOG_INFO,
|
||||
("CompilerState::loadImportedStylesheet: %s\n",
|
||||
NS_LossyConvertUTF16toASCII(aURI).get()));
|
||||
if (mStylesheetURI.Equals(aURI)) {
|
||||
|
@ -447,14 +447,14 @@ nsXULContentBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode,
|
||||
nsresult rv;
|
||||
|
||||
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
|
||||
("nsXULContentBuilder::BuildContentFromTemplate (is unique: %d)",
|
||||
aIsUnique));
|
||||
|
||||
nsAutoString id;
|
||||
aChild->GetId(id);
|
||||
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
|
||||
("Tags: [Template: %s Resource: %s Real: %s] for id %s",
|
||||
nsAtomCString(aTemplateNode->NodeInfo()->NameAtom()).get(),
|
||||
nsAtomCString(aResourceNode->NodeInfo()->NameAtom()).get(),
|
||||
@ -939,7 +939,7 @@ nsXULContentBuilder::CreateTemplateAndContainerContents(nsIContent* aElement,
|
||||
// and 2) recursive subcontent (if the current element refers to a
|
||||
// container result).
|
||||
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_INFO,
|
||||
("nsXULContentBuilder::CreateTemplateAndContainerContents start - flags: %d",
|
||||
mFlags));
|
||||
|
||||
@ -975,7 +975,7 @@ nsXULContentBuilder::CreateTemplateAndContainerContents(nsIContent* aElement,
|
||||
false, true);
|
||||
}
|
||||
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_INFO,
|
||||
("nsXULContentBuilder::CreateTemplateAndContainerContents end"));
|
||||
|
||||
return NS_OK;
|
||||
@ -1076,7 +1076,7 @@ nsXULContentBuilder::CreateContainerContentsForQuerySet(nsIContent* aElement,
|
||||
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
|
||||
nsAutoString id;
|
||||
aResult->GetId(id);
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
|
||||
("nsXULContentBuilder::CreateContainerContentsForQuerySet start for ref %s\n",
|
||||
NS_ConvertUTF16toUTF8(id).get()));
|
||||
}
|
||||
|
@ -363,6 +363,6 @@ nsXULContentUtils::LogTemplateError(const char* aStr)
|
||||
nsCOMPtr<nsIConsoleService> cs = do_GetService(NS_CONSOLESERVICE_CONTRACTID);
|
||||
if (cs) {
|
||||
cs->LogStringMessage(message.get());
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS, ("Error parsing template: %s", aStr));
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_INFO, ("Error parsing template: %s", aStr));
|
||||
}
|
||||
}
|
||||
|
@ -502,7 +502,7 @@ nsXULTemplateBuilder::UpdateResult(nsIXULTemplateResult* aOldResult,
|
||||
nsIXULTemplateResult* aNewResult,
|
||||
nsIDOMNode* aQueryNode)
|
||||
{
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_INFO,
|
||||
("nsXULTemplateBuilder::UpdateResult %p %p %p",
|
||||
aOldResult, aNewResult, aQueryNode));
|
||||
|
||||
|
@ -492,7 +492,7 @@ nsXULTemplateQueryProcessorRDF::GenerateResults(nsISupports* aDatasource,
|
||||
nsAutoString mvar;
|
||||
query->mMemberVariable->ToString(mvar);
|
||||
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
|
||||
("QueryProcessor::GenerateResults using ref %s and vars [ ref: %s member: %s]",
|
||||
NS_ConvertUTF16toUTF8(id).get(),
|
||||
NS_ConvertUTF16toUTF8(rvar).get(),
|
||||
@ -871,7 +871,7 @@ nsXULTemplateQueryProcessorRDF::Propagate(nsIRDFResource* aSource,
|
||||
nsAutoString targetStr;
|
||||
nsXULContentUtils::GetTextForNode(aTarget, targetStr);
|
||||
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
|
||||
("nsXULTemplateQueryProcessorRDF::Propagate: [%s] -> [%s] -> [%s]\n",
|
||||
sourceStr, propertyStr, NS_ConvertUTF16toUTF8(targetStr).get()));
|
||||
}
|
||||
@ -958,7 +958,7 @@ nsXULTemplateQueryProcessorRDF::Retract(nsIRDFResource* aSource,
|
||||
nsAutoString targetStr;
|
||||
nsXULContentUtils::GetTextForNode(aTarget, targetStr);
|
||||
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
|
||||
("nsXULTemplateQueryProcessorRDF::Retract: [%s] -> [%s] -> [%s]\n",
|
||||
sourceStr, propertyStr, NS_ConvertUTF16toUTF8(targetStr).get()));
|
||||
}
|
||||
@ -1269,13 +1269,13 @@ nsXULTemplateQueryProcessorRDF::CompileQueryChild(nsIAtom* aTag,
|
||||
else if (aTag == nsGkAtoms::member) {
|
||||
rv = CompileMemberCondition(aQuery, aCondition, aParentNode, aResult);
|
||||
}
|
||||
else if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_ALWAYS)) {
|
||||
else if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_INFO)) {
|
||||
nsAutoString tagstr;
|
||||
aTag->ToString(tagstr);
|
||||
|
||||
nsAutoCString tagstrC;
|
||||
tagstrC.AssignWithConversion(tagstr);
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gXULTemplateLog, PR_LOG_INFO,
|
||||
("xultemplate[%p] unrecognized condition test <%s>",
|
||||
this, tagstrC.get()));
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ inline PRLogModuleLevel PRLogLevelForLevel(int aLevel) {
|
||||
case LOG_DEBUG_PRLOG:
|
||||
return PR_LOG_DEBUG;
|
||||
case LOG_EVERYTHING:
|
||||
return PR_LOG_ALWAYS;
|
||||
return PR_LOG_ERROR;
|
||||
}
|
||||
return PR_LOG_DEBUG;
|
||||
}
|
||||
|
@ -264,13 +264,11 @@ GetLoaderLog()
|
||||
return sLog;
|
||||
}
|
||||
|
||||
#define LOG_FORCE(args) MOZ_LOG(GetLoaderLog(), PR_LOG_ALWAYS, args)
|
||||
#define LOG_ERROR(args) MOZ_LOG(GetLoaderLog(), PR_LOG_ERROR, args)
|
||||
#define LOG_WARN(args) MOZ_LOG(GetLoaderLog(), PR_LOG_WARNING, args)
|
||||
#define LOG_DEBUG(args) MOZ_LOG(GetLoaderLog(), PR_LOG_DEBUG, args)
|
||||
#define LOG(args) LOG_DEBUG(args)
|
||||
|
||||
#define LOG_FORCE_ENABLED() MOZ_LOG_TEST(GetLoaderLog(), PR_LOG_ALWAYS)
|
||||
#define LOG_ERROR_ENABLED() MOZ_LOG_TEST(GetLoaderLog(), PR_LOG_ERROR)
|
||||
#define LOG_WARN_ENABLED() MOZ_LOG_TEST(GetLoaderLog(), PR_LOG_WARNING)
|
||||
#define LOG_DEBUG_ENABLED() MOZ_LOG_TEST(GetLoaderLog(), PR_LOG_DEBUG)
|
||||
|
2
netwerk/cache/nsCache.h
vendored
2
netwerk/cache/nsCache.h
vendored
@ -25,7 +25,7 @@ void CacheLogPrintPath(PRLogModuleLevel level,
|
||||
const char * format,
|
||||
nsIFile * item);
|
||||
#define CACHE_LOG_INIT() CacheLogInit()
|
||||
#define CACHE_LOG_ALWAYS(args) MOZ_LOG(gCacheLog, PR_LOG_ALWAYS, args)
|
||||
#define CACHE_LOG_INFO(args) MOZ_LOG(gCacheLog, PR_LOG_INFO, args)
|
||||
#define CACHE_LOG_ERROR(args) MOZ_LOG(gCacheLog, PR_LOG_ERROR, args)
|
||||
#define CACHE_LOG_WARNING(args) MOZ_LOG(gCacheLog, PR_LOG_WARNING, args)
|
||||
#define CACHE_LOG_DEBUG(args) MOZ_LOG(gCacheLog, PR_LOG_DEBUG, args)
|
||||
|
30
netwerk/cache/nsCacheService.cpp
vendored
30
netwerk/cache/nsCacheService.cpp
vendored
@ -384,7 +384,7 @@ nsCacheProfilePrefObserver::Observe(nsISupports * subject,
|
||||
{
|
||||
nsresult rv;
|
||||
NS_ConvertUTF16toUTF8 data(data_unicode);
|
||||
CACHE_LOG_ALWAYS(("Observe [topic=%s data=%s]\n", topic, data.get()));
|
||||
CACHE_LOG_INFO(("Observe [topic=%s data=%s]\n", topic, data.get()));
|
||||
|
||||
if (!nsCacheService::IsInitialized()) {
|
||||
if (!strcmp("resume_process_notification", topic)) {
|
||||
@ -1744,7 +1744,7 @@ nsCacheService::GetCustomOfflineDevice(nsIFile *aProfileDir,
|
||||
nsresult
|
||||
nsCacheService::CreateOfflineDevice()
|
||||
{
|
||||
CACHE_LOG_ALWAYS(("Creating default offline device"));
|
||||
CACHE_LOG_INFO(("Creating default offline device"));
|
||||
|
||||
if (mOfflineDevice) return NS_OK;
|
||||
if (!nsCacheService::IsInitialized()) {
|
||||
@ -1767,10 +1767,10 @@ nsCacheService::CreateCustomOfflineDevice(nsIFile *aProfileDir,
|
||||
{
|
||||
NS_ENSURE_ARG(aProfileDir);
|
||||
|
||||
if (MOZ_LOG_TEST(gCacheLog, PR_LOG_ALWAYS)) {
|
||||
if (MOZ_LOG_TEST(gCacheLog, PR_LOG_INFO)) {
|
||||
nsAutoCString profilePath;
|
||||
aProfileDir->GetNativePath(profilePath);
|
||||
CACHE_LOG_ALWAYS(("Creating custom offline device, %s, %d",
|
||||
CACHE_LOG_INFO(("Creating custom offline device, %s, %d",
|
||||
profilePath.BeginReading(), aQuota));
|
||||
}
|
||||
|
||||
@ -3118,18 +3118,18 @@ nsCacheService::LogCacheStatistics()
|
||||
{
|
||||
uint32_t hitPercentage = (uint32_t)((((double)mCacheHits) /
|
||||
((double)(mCacheHits + mCacheMisses))) * 100);
|
||||
CACHE_LOG_ALWAYS(("\nCache Service Statistics:\n\n"));
|
||||
CACHE_LOG_ALWAYS((" TotalEntries = %d\n", mTotalEntries));
|
||||
CACHE_LOG_ALWAYS((" Cache Hits = %d\n", mCacheHits));
|
||||
CACHE_LOG_ALWAYS((" Cache Misses = %d\n", mCacheMisses));
|
||||
CACHE_LOG_ALWAYS((" Cache Hit %% = %d%%\n", hitPercentage));
|
||||
CACHE_LOG_ALWAYS((" Max Key Length = %d\n", mMaxKeyLength));
|
||||
CACHE_LOG_ALWAYS((" Max Meta Size = %d\n", mMaxMetaSize));
|
||||
CACHE_LOG_ALWAYS((" Max Data Size = %d\n", mMaxDataSize));
|
||||
CACHE_LOG_ALWAYS(("\n"));
|
||||
CACHE_LOG_ALWAYS((" Deactivate Failures = %d\n",
|
||||
CACHE_LOG_INFO(("\nCache Service Statistics:\n\n"));
|
||||
CACHE_LOG_INFO((" TotalEntries = %d\n", mTotalEntries));
|
||||
CACHE_LOG_INFO((" Cache Hits = %d\n", mCacheHits));
|
||||
CACHE_LOG_INFO((" Cache Misses = %d\n", mCacheMisses));
|
||||
CACHE_LOG_INFO((" Cache Hit %% = %d%%\n", hitPercentage));
|
||||
CACHE_LOG_INFO((" Max Key Length = %d\n", mMaxKeyLength));
|
||||
CACHE_LOG_INFO((" Max Meta Size = %d\n", mMaxMetaSize));
|
||||
CACHE_LOG_INFO((" Max Data Size = %d\n", mMaxDataSize));
|
||||
CACHE_LOG_INFO(("\n"));
|
||||
CACHE_LOG_INFO((" Deactivate Failures = %d\n",
|
||||
mDeactivateFailures));
|
||||
CACHE_LOG_ALWAYS((" Deactivated Unbound Entries = %d\n",
|
||||
CACHE_LOG_INFO((" Deactivated Unbound Entries = %d\n",
|
||||
mDeactivatedUnboundEntries));
|
||||
}
|
||||
|
||||
|
4
netwerk/cache/nsDiskCacheDevice.cpp
vendored
4
netwerk/cache/nsDiskCacheDevice.cpp
vendored
@ -995,8 +995,8 @@ nsDiskCacheDevice::OpenDiskCache()
|
||||
if (!exists) {
|
||||
nsCacheService::MarkStartingFresh();
|
||||
rv = mCacheDirectory->Create(nsIFile::DIRECTORY_TYPE, 0777);
|
||||
CACHE_LOG_PATH(PR_LOG_ALWAYS, "\ncreate cache directory: %s\n", mCacheDirectory);
|
||||
CACHE_LOG_ALWAYS(("mCacheDirectory->Create() = %x\n", rv));
|
||||
CACHE_LOG_PATH(PR_LOG_INFO, "\ncreate cache directory: %s\n", mCacheDirectory);
|
||||
CACHE_LOG_INFO(("mCacheDirectory->Create() = %x\n", rv));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
extern PRLogModuleInfo* gFTPLog;
|
||||
#define LOG(args) MOZ_LOG(gFTPLog, PR_LOG_DEBUG, args)
|
||||
#define LOG_ALWAYS(args) MOZ_LOG(gFTPLog, PR_LOG_ALWAYS, args)
|
||||
#define LOG_INFO(args) MOZ_LOG(gFTPLog, PR_LOG_INFO, args)
|
||||
|
||||
using namespace mozilla::net;
|
||||
|
||||
@ -92,7 +92,7 @@ nsFtpState::nsFtpState()
|
||||
, mControlStatus(NS_OK)
|
||||
, mDeferredCallbackPending(false)
|
||||
{
|
||||
LOG_ALWAYS(("FTP:(%x) nsFtpState created", this));
|
||||
LOG_INFO(("FTP:(%x) nsFtpState created", this));
|
||||
|
||||
// make sure handler stays around
|
||||
NS_ADDREF(gFtpHandler);
|
||||
@ -100,7 +100,7 @@ nsFtpState::nsFtpState()
|
||||
|
||||
nsFtpState::~nsFtpState()
|
||||
{
|
||||
LOG_ALWAYS(("FTP:(%x) nsFtpState destroyed", this));
|
||||
LOG_INFO(("FTP:(%x) nsFtpState destroyed", this));
|
||||
|
||||
if (mProxyRequest)
|
||||
mProxyRequest->Cancel(NS_ERROR_FAILURE);
|
||||
@ -1763,7 +1763,7 @@ nsFtpState::KillControlConnection()
|
||||
mControlConnection->IsAlive() &&
|
||||
mCacheConnection) {
|
||||
|
||||
LOG_ALWAYS(("FTP:(%p) caching CC(%p)", this, mControlConnection.get()));
|
||||
LOG_INFO(("FTP:(%p) caching CC(%p)", this, mControlConnection.get()));
|
||||
|
||||
// Store connection persistent data
|
||||
mControlConnection->mServerType = mServerType;
|
||||
@ -1821,7 +1821,7 @@ nsFtpState::StopProcessing()
|
||||
return NS_OK;
|
||||
mKeepRunning = false;
|
||||
|
||||
LOG_ALWAYS(("FTP:(%x) nsFtpState stopping", this));
|
||||
LOG_INFO(("FTP:(%x) nsFtpState stopping", this));
|
||||
|
||||
#ifdef DEBUG_dougt
|
||||
printf("FTP Stopped: [response code %d] [response msg follows:]\n%s\n", mResponseCode, mResponseMsg.get());
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
extern PRLogModuleInfo* gFTPLog;
|
||||
#define LOG(args) MOZ_LOG(gFTPLog, PR_LOG_DEBUG, args)
|
||||
#define LOG_ALWAYS(args) MOZ_LOG(gFTPLog, PR_LOG_ALWAYS, args)
|
||||
#define LOG_INFO(args) MOZ_LOG(gFTPLog, PR_LOG_INFO, args)
|
||||
|
||||
//
|
||||
// nsFtpControlConnection implementation ...
|
||||
@ -66,12 +66,12 @@ nsFtpControlConnection::nsFtpControlConnection(const nsCSubstring& host,
|
||||
: mServerType(0), mSessionId(gFtpHandler->GetSessionId())
|
||||
, mUseUTF8(false), mHost(host), mPort(port)
|
||||
{
|
||||
LOG_ALWAYS(("FTP:CC created @%p", this));
|
||||
LOG_INFO(("FTP:CC created @%p", this));
|
||||
}
|
||||
|
||||
nsFtpControlConnection::~nsFtpControlConnection()
|
||||
{
|
||||
LOG_ALWAYS(("FTP:CC destroyed @%p", this));
|
||||
LOG_INFO(("FTP:CC destroyed @%p", this));
|
||||
}
|
||||
|
||||
bool
|
||||
@ -153,7 +153,7 @@ nsFtpControlConnection::Disconnect(nsresult status)
|
||||
if (!mSocket)
|
||||
return NS_OK; // already disconnected
|
||||
|
||||
LOG_ALWAYS(("FTP:(%p) CC disconnecting (%x)", this, status));
|
||||
LOG_INFO(("FTP:(%p) CC disconnecting (%x)", this, status));
|
||||
|
||||
if (NS_FAILED(status)) {
|
||||
// break cyclic reference!
|
||||
|
@ -31,7 +31,7 @@
|
||||
// set NSPR_LOG_MODULES=nsHttp:5
|
||||
// set NSPR_LOG_FILE=http.log
|
||||
//
|
||||
// this enables PR_LOG_ALWAYS level information and places all output in
|
||||
// this enables PR_LOG_DEBUG level information and places all output in
|
||||
// the file http.log
|
||||
//
|
||||
extern PRLogModuleInfo *gHttpLog;
|
||||
|
@ -31,7 +31,7 @@ static nsResProtocolHandler *gResHandler = nullptr;
|
||||
// set NSPR_LOG_MODULES=nsResProtocol:5
|
||||
// set NSPR_LOG_FILE=log.txt
|
||||
//
|
||||
// this enables PR_LOG_ALWAYS level information and places all output in
|
||||
// this enables PR_LOG_DEBUG level information and places all output in
|
||||
// the file log.txt
|
||||
//
|
||||
static PRLogModuleInfo *gResLog;
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
extern PRLogModuleInfo* gRtspLog;
|
||||
|
||||
#define LOGI(msg, ...) MOZ_LOG(gRtspLog, PR_LOG_ALWAYS, (msg, ##__VA_ARGS__))
|
||||
#define LOGI(msg, ...) MOZ_LOG(gRtspLog, PR_LOG_INFO, (msg, ##__VA_ARGS__))
|
||||
#define LOGV(msg, ...) MOZ_LOG(gRtspLog, PR_LOG_DEBUG, (msg, ##__VA_ARGS__))
|
||||
#define LOGE(msg, ...) MOZ_LOG(gRtspLog, PR_LOG_ERROR, (msg, ##__VA_ARGS__))
|
||||
#define LOGW(msg, ...) MOZ_LOG(gRtspLog, PR_LOG_WARNING, (msg, ##__VA_ARGS__))
|
||||
|
@ -20,7 +20,7 @@
|
||||
// set NSPR_LOG_MODULES=nsWyciwyg:5
|
||||
// set NSPR_LOG_FILE=wyciwyg.log
|
||||
//
|
||||
// this enables PR_LOG_ALWAYS level information and places all output in
|
||||
// this enables PR_LOG_DEBUG level information and places all output in
|
||||
// the file wyciwyg.log
|
||||
//
|
||||
extern PRLogModuleInfo *gWyciwygLog;
|
||||
|
@ -178,7 +178,7 @@ debug_printf(const char *format, ...)
|
||||
va_list ap;
|
||||
char buffer[1024];
|
||||
|
||||
if (MOZ_LOG_TEST(GetSCTPLog(), PR_LOG_ALWAYS)) {
|
||||
if (MOZ_LOG_TEST(GetSCTPLog(), PR_LOG_DEBUG)) {
|
||||
va_start(ap, format);
|
||||
#ifdef _WIN32
|
||||
if (vsnprintf_s(buffer, sizeof(buffer), _TRUNCATE, format, ap) > 0) {
|
||||
@ -335,7 +335,7 @@ DataChannelConnection::Init(unsigned short aPort, uint16_t aNumStreams, bool aUs
|
||||
}
|
||||
|
||||
// Set logging to SCTP:PR_LOG_DEBUG to get SCTP debugs
|
||||
if (MOZ_LOG_TEST(GetSCTPLog(), PR_LOG_ALWAYS)) {
|
||||
if (MOZ_LOG_TEST(GetSCTPLog(), PR_LOG_DEBUG)) {
|
||||
usrsctp_sysctl_set_sctp_debug_on(SCTP_DEBUG_ALL);
|
||||
}
|
||||
|
||||
|
@ -1039,7 +1039,7 @@ RDFContentSinkImpl::OpenRDF(const char16_t* aName)
|
||||
SplitExpatName(aName, getter_AddRefs(localName));
|
||||
|
||||
if (!nameSpaceURI.EqualsLiteral(RDF_NAMESPACE_URI) || localName != kRDFAtom) {
|
||||
// MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
// MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
// ("rdfxml: expected RDF:RDF at line %d",
|
||||
// aNode.GetSourceLineNumber()));
|
||||
|
||||
@ -1213,7 +1213,7 @@ RDFContentSinkImpl::OpenMember(const char16_t* aName,
|
||||
|
||||
if (!nameSpaceURI.EqualsLiteral(RDF_NAMESPACE_URI) ||
|
||||
localName != kLiAtom) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_ERROR,
|
||||
("rdfxml: expected RDF:li at line %d",
|
||||
-1)); // XXX pass in line number
|
||||
|
||||
|
@ -1147,7 +1147,7 @@ nsNSSComponent::ShutdownNSS()
|
||||
mShutdownObjectList->evaporateAllNSSResources();
|
||||
EnsureNSSInitialized(nssShutdown);
|
||||
if (SECSuccess != ::NSS_Shutdown()) {
|
||||
MOZ_LOG(gPIPNSSLog, PR_LOG_ALWAYS, ("NSS SHUTDOWN FAILURE\n"));
|
||||
MOZ_LOG(gPIPNSSLog, PR_LOG_ERROR, ("NSS SHUTDOWN FAILURE\n"));
|
||||
}
|
||||
else {
|
||||
MOZ_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("NSS shutdown =====>> OK <<=====\n"));
|
||||
|
@ -42,7 +42,7 @@ using mozilla::dom::ContentChild;
|
||||
// set NSPR_LOG_MODULES=nsOfflineCacheUpdate:5
|
||||
// set NSPR_LOG_FILE=offlineupdate.log
|
||||
//
|
||||
// this enables PR_LOG_ALWAYS level information and places all output in
|
||||
// this enables PR_LOG_DEBUG level information and places all output in
|
||||
// the file offlineupdate.log
|
||||
//
|
||||
extern PRLogModuleInfo *gOfflineCacheUpdateLog;
|
||||
|
@ -20,7 +20,7 @@
|
||||
// set NSPR_LOG_MODULES=nsOfflineCacheUpdate:5
|
||||
// set NSPR_LOG_FILE=offlineupdate.log
|
||||
//
|
||||
// this enables PR_LOG_ALWAYS level information and places all output in
|
||||
// this enables PR_LOG_INFO level information and places all output in
|
||||
// the file offlineupdate.log
|
||||
//
|
||||
extern PRLogModuleInfo *gOfflineCacheUpdateLog;
|
||||
|
@ -23,7 +23,7 @@ using mozilla::dom::TabParent;
|
||||
// set NSPR_LOG_MODULES=nsOfflineCacheUpdate:5
|
||||
// set NSPR_LOG_FILE=offlineupdate.log
|
||||
//
|
||||
// this enables PR_LOG_ALWAYS level information and places all output in
|
||||
// this enables PR_LOG_DEBUG level information and places all output in
|
||||
// the file offlineupdate.log
|
||||
//
|
||||
extern PRLogModuleInfo *gOfflineCacheUpdateLog;
|
||||
|
@ -57,7 +57,7 @@ static const int32_t kCustomProfileQuota = 512000;
|
||||
// set NSPR_LOG_MODULES=nsOfflineCacheUpdate:5
|
||||
// set NSPR_LOG_FILE=offlineupdate.log
|
||||
//
|
||||
// this enables PR_LOG_ALWAYS level information and places all output in
|
||||
// this enables PR_LOG_DEBUG level information and places all output in
|
||||
// the file offlineupdate.log
|
||||
//
|
||||
extern PRLogModuleInfo *gOfflineCacheUpdateLog;
|
||||
|
@ -76,7 +76,7 @@ typedef mozilla::docshell::OfflineCacheUpdateGlue OfflineCacheUpdateGlue;
|
||||
// set NSPR_LOG_MODULES=nsOfflineCacheUpdate:5
|
||||
// set NSPR_LOG_FILE=offlineupdate.log
|
||||
//
|
||||
// this enables PR_LOG_ALWAYS level information and places all output in
|
||||
// this enables PR_LOG_DEBUG level information and places all output in
|
||||
// the file offlineupdate.log
|
||||
//
|
||||
PRLogModuleInfo *gOfflineCacheUpdateLog;
|
||||
|
@ -38,7 +38,7 @@ using namespace mozilla;
|
||||
// set NSPR_LOG_MODULES=nsPrefetch:5
|
||||
// set NSPR_LOG_FILE=prefetch.log
|
||||
//
|
||||
// this enables PR_LOG_ALWAYS level information and places all output in
|
||||
// this enables PR_LOG_DEBUG level information and places all output in
|
||||
// the file http.log
|
||||
//
|
||||
static PRLogModuleInfo *gPrefetchLog;
|
||||
|
@ -67,7 +67,7 @@ NativeKeyBindings::Init(NativeKeyBindingsType aType)
|
||||
gNativeKeyBindingsLog = PR_NewLogModule("NativeKeyBindings");
|
||||
}
|
||||
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_INFO,
|
||||
("%p NativeKeyBindings::Init", this));
|
||||
|
||||
// Many selectors have a one-to-one mapping to a Gecko command. Those mappings
|
||||
@ -203,7 +203,7 @@ NativeKeyBindings::Execute(const WidgetKeyboardEvent& aEvent,
|
||||
DoCommandCallback aCallback,
|
||||
void* aCallbackData)
|
||||
{
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_INFO,
|
||||
("%p NativeKeyBindings::KeyPress", this));
|
||||
|
||||
// Recover the current event, which should always be the key down we are
|
||||
@ -212,19 +212,19 @@ NativeKeyBindings::Execute(const WidgetKeyboardEvent& aEvent,
|
||||
NSEvent* cocoaEvent = reinterpret_cast<NSEvent*>(aEvent.mNativeKeyEvent);
|
||||
|
||||
if (!cocoaEvent || [cocoaEvent type] != NSKeyDown) {
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_INFO,
|
||||
("%p NativeKeyBindings::KeyPress, no Cocoa key down event", this));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_INFO,
|
||||
("%p NativeKeyBindings::KeyPress, interpreting", this));
|
||||
|
||||
nsAutoTArray<KeyBindingsCommand, 2> bindingCommands;
|
||||
nsCocoaUtils::GetCommandsFromKeyEvent(cocoaEvent, bindingCommands);
|
||||
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_INFO,
|
||||
("%p NativeKeyBindings::KeyPress, bindingCommands=%u",
|
||||
this, bindingCommands.Length()));
|
||||
|
||||
@ -233,12 +233,12 @@ NativeKeyBindings::Execute(const WidgetKeyboardEvent& aEvent,
|
||||
for (uint32_t i = 0; i < bindingCommands.Length(); i++) {
|
||||
SEL selector = bindingCommands[i].selector;
|
||||
|
||||
if (MOZ_LOG_TEST(gNativeKeyBindingsLog, PR_LOG_ALWAYS)) {
|
||||
if (MOZ_LOG_TEST(gNativeKeyBindingsLog, PR_LOG_INFO)) {
|
||||
NSString* selectorString = NSStringFromSelector(selector);
|
||||
nsAutoString nsSelectorString;
|
||||
nsCocoaUtils::GetStringForNSString(selectorString, nsSelectorString);
|
||||
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_INFO,
|
||||
("%p NativeKeyBindings::KeyPress, selector=%s",
|
||||
this, NS_LossyConvertUTF16toASCII(nsSelectorString).get()));
|
||||
}
|
||||
@ -265,7 +265,7 @@ NativeKeyBindings::Execute(const WidgetKeyboardEvent& aEvent,
|
||||
}
|
||||
|
||||
if (geckoCommands.IsEmpty()) {
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_INFO,
|
||||
("%p NativeKeyBindings::KeyPress, handled=false", this));
|
||||
|
||||
return false;
|
||||
@ -274,7 +274,7 @@ NativeKeyBindings::Execute(const WidgetKeyboardEvent& aEvent,
|
||||
for (uint32_t i = 0; i < geckoCommands.Length(); i++) {
|
||||
Command geckoCommand = geckoCommands[i];
|
||||
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_INFO,
|
||||
("%p NativeKeyBindings::KeyPress, command=%s",
|
||||
this, WidgetKeyboardEvent::GetCommandStr(geckoCommand)));
|
||||
|
||||
@ -282,7 +282,7 @@ NativeKeyBindings::Execute(const WidgetKeyboardEvent& aEvent,
|
||||
aCallback(geckoCommand, aCallbackData);
|
||||
}
|
||||
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gNativeKeyBindingsLog, PR_LOG_INFO,
|
||||
("%p NativeKeyBindings::KeyPress, handled=true", this));
|
||||
|
||||
return true;
|
||||
|
@ -364,7 +364,7 @@ TISInputSourceWrapper::TranslateToString(UInt32 aKeyCode, UInt32 aModifiers,
|
||||
|
||||
const UCKeyboardLayout* UCKey = GetUCKeyboardLayout();
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TISInputSourceWrapper::TranslateToString, aKeyCode=0x%X, "
|
||||
"aModifiers=0x%X, aKbType=0x%X UCKey=%p\n "
|
||||
"Shift: %s, Ctrl: %s, Opt: %s, Cmd: %s, CapsLock: %s, NumLock: %s",
|
||||
@ -384,7 +384,7 @@ TISInputSourceWrapper::TranslateToString(UInt32 aKeyCode, UInt32 aModifiers,
|
||||
aKbType, kUCKeyTranslateNoDeadKeysMask,
|
||||
&deadKeyState, 5, &len, chars);
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TISInputSourceWrapper::TranslateToString, err=0x%X, len=%llu",
|
||||
this, err, len));
|
||||
|
||||
@ -397,7 +397,7 @@ TISInputSourceWrapper::TranslateToString(UInt32 aKeyCode, UInt32 aModifiers,
|
||||
"size of char16_t and size of UniChar are different");
|
||||
memcpy(aStr.BeginWriting(), chars, len * sizeof(char16_t));
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TISInputSourceWrapper::TranslateToString, aStr=\"%s\"",
|
||||
this, NS_ConvertUTF16toUTF8(aStr).get()));
|
||||
|
||||
@ -759,7 +759,7 @@ TISInputSourceWrapper::InitKeyEvent(NSEvent *aNativeKeyEvent,
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TISInputSourceWrapper::InitKeyEvent, aNativeKeyEvent=%p, "
|
||||
"aKeyEvent.message=%s, aInsertString=%p, IsOpenedIMEMode()=%s",
|
||||
this, aNativeKeyEvent, GetGeckoKeyEventType(aKeyEvent), aInsertString,
|
||||
@ -942,7 +942,7 @@ TISInputSourceWrapper::InitKeyEvent(NSEvent *aNativeKeyEvent,
|
||||
aKeyEvent.mIsRepeat =
|
||||
([aNativeKeyEvent type] == NSKeyDown) ? [aNativeKeyEvent isARepeat] : false;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TISInputSourceWrapper::InitKeyEvent, "
|
||||
"shift=%s, ctrl=%s, alt=%s, meta=%s",
|
||||
this, OnOrOff(aKeyEvent.IsShift()), OnOrOff(aKeyEvent.IsControl()),
|
||||
@ -959,7 +959,7 @@ TISInputSourceWrapper::InitKeyEvent(NSEvent *aNativeKeyEvent,
|
||||
aKeyEvent.charCode = 0;
|
||||
aKeyEvent.isChar = false; // XXX not used in XP level
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TISInputSourceWrapper::InitKeyEvent, keyCode=0x%X charCode=0x0",
|
||||
this, aKeyEvent.keyCode));
|
||||
}
|
||||
@ -1041,13 +1041,13 @@ TISInputSourceWrapper::InitKeyPressEvent(NSEvent *aNativeKeyEvent,
|
||||
NS_ASSERTION(aKeyEvent.message == NS_KEY_PRESS,
|
||||
"aKeyEvent must be NS_KEY_PRESS event");
|
||||
|
||||
if (MOZ_LOG_TEST(gLog, PR_LOG_ALWAYS)) {
|
||||
if (MOZ_LOG_TEST(gLog, PR_LOG_INFO)) {
|
||||
nsAutoString chars;
|
||||
nsCocoaUtils::GetStringForNSString([aNativeKeyEvent characters], chars);
|
||||
NS_ConvertUTF16toUTF8 utf8Chars(chars);
|
||||
char16_t expectedChar = static_cast<char16_t>(aInsertChar);
|
||||
NS_ConvertUTF16toUTF8 utf8ExpectedChar(&expectedChar, 1);
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TISInputSourceWrapper::InitKeyPressEvent, aNativeKeyEvent=%p, "
|
||||
"[aNativeKeyEvent characters]=\"%s\", aInsertChar=0x%X(%s), "
|
||||
"aKeyEvent.message=%s, aKbType=0x%X, IsOpenedIMEMode()=%s",
|
||||
@ -1062,7 +1062,7 @@ TISInputSourceWrapper::InitKeyPressEvent(NSEvent *aNativeKeyEvent,
|
||||
aKeyEvent.keyCode = 0;
|
||||
}
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TISInputSourceWrapper::InitKeyPressEvent, "
|
||||
"aKeyEvent.keyCode=0x%X, aKeyEvent.charCode=0x%X",
|
||||
this, aKeyEvent.keyCode, aKeyEvent.charCode));
|
||||
@ -1085,7 +1085,7 @@ TISInputSourceWrapper::InitKeyPressEvent(NSEvent *aNativeKeyEvent,
|
||||
lockState |= kEventKeyModifierNumLockMask;
|
||||
}
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TISInputSourceWrapper::InitKeyPressEvent, "
|
||||
"isRomanKeyboardLayout=%s, key=0x%X",
|
||||
this, TrueOrFalse(isRomanKeyboardLayout), aKbType, key));
|
||||
@ -1127,7 +1127,7 @@ TISInputSourceWrapper::InitKeyPressEvent(NSEvent *aNativeKeyEvent,
|
||||
AlternativeCharCode altCharCodes(unshiftedChar, shiftedChar);
|
||||
aKeyEvent.alternativeCharCodes.AppendElement(altCharCodes);
|
||||
}
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TISInputSourceWrapper::InitKeyPressEvent, "
|
||||
"aKeyEvent.isMeta=%s, isDvorakQWERTY=%s, "
|
||||
"unshiftedChar=U+%X, shiftedChar=U+%X",
|
||||
@ -1189,7 +1189,7 @@ TISInputSourceWrapper::InitKeyPressEvent(NSEvent *aNativeKeyEvent,
|
||||
AlternativeCharCode altCharCodes(cmdedChar, cmdedShiftChar);
|
||||
aKeyEvent.alternativeCharCodes.AppendElement(altCharCodes);
|
||||
}
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TISInputSourceWrapper::InitKeyPressEvent, "
|
||||
"hasCmdShiftOnlyChar=%s, isCmdSwitchLayout=%s, isDvorakQWERTY=%s, "
|
||||
"cmdedChar=U+%X, cmdedShiftChar=U+%X",
|
||||
@ -1201,7 +1201,7 @@ TISInputSourceWrapper::InitKeyPressEvent(NSEvent *aNativeKeyEvent,
|
||||
AlternativeCharCode altCharCodes(0, originalCmdedShiftChar);
|
||||
aKeyEvent.alternativeCharCodes.AppendElement(altCharCodes);
|
||||
}
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TISInputSourceWrapper::InitKeyPressEvent, "
|
||||
"hasCmdShiftOnlyChar=%s, originalCmdedShiftChar=U+%X",
|
||||
this, TrueOrFalse(hasCmdShiftOnlyChar), originalCmdedShiftChar));
|
||||
@ -1214,7 +1214,7 @@ TISInputSourceWrapper::ComputeGeckoKeyCode(UInt32 aNativeKeyCode,
|
||||
UInt32 aKbType,
|
||||
bool aCmdIsPressed)
|
||||
{
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TISInputSourceWrapper::ComputeGeckoKeyCode, aNativeKeyCode=0x%X, "
|
||||
"aKbType=0x%X, aCmdIsPressed=%s, IsOpenedIMEMode()=%s, "
|
||||
"IsASCIICapable()=%s",
|
||||
@ -1443,9 +1443,9 @@ TextInputHandler::CreateAllKeyboardLayoutList()
|
||||
void
|
||||
TextInputHandler::DebugPrintAllKeyboardLayouts()
|
||||
{
|
||||
if (MOZ_LOG_TEST(gLog, PR_LOG_ALWAYS)) {
|
||||
if (MOZ_LOG_TEST(gLog, PR_LOG_INFO)) {
|
||||
CFArrayRef list = CreateAllKeyboardLayoutList();
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS, ("Keyboard layout configuration:"));
|
||||
MOZ_LOG(gLog, PR_LOG_INFO, ("Keyboard layout configuration:"));
|
||||
CFIndex idx = ::CFArrayGetCount(list);
|
||||
TISInputSourceWrapper tis;
|
||||
for (CFIndex i = 0; i < idx; ++i) {
|
||||
@ -1455,7 +1455,7 @@ TextInputHandler::DebugPrintAllKeyboardLayouts()
|
||||
nsAutoString name, isid;
|
||||
tis.GetLocalizedName(name);
|
||||
tis.GetInputSourceID(isid);
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
(" %s\t<%s>%s%s\n",
|
||||
NS_ConvertUTF16toUTF8(name).get(),
|
||||
NS_ConvertUTF16toUTF8(isid).get(),
|
||||
@ -1496,13 +1496,13 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
|
||||
|
||||
if (Destroyed()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleKeyDownEvent, "
|
||||
"widget has been already destroyed", this));
|
||||
return false;
|
||||
}
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleKeyDownEvent, aNativeEvent=%p, "
|
||||
"type=%s, keyCode=%lld (0x%X), modifierFlags=0x%X, characters=\"%s\", "
|
||||
"charactersIgnoringModifiers=\"%s\"",
|
||||
@ -1537,7 +1537,7 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
|
||||
|
||||
currentKeyEvent->mKeyDownHandled = DispatchEvent(keydownEvent);
|
||||
if (Destroyed()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleKeyDownEvent, "
|
||||
"widget was destroyed by keydown event", this));
|
||||
return currentKeyEvent->IsDefaultPrevented();
|
||||
@ -1547,14 +1547,14 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
|
||||
// case we should not fire the key press.
|
||||
// XXX This is a special code only on Cocoa widget, why is this needed?
|
||||
if (firstResponder != [[mView window] firstResponder]) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleKeyDownEvent, "
|
||||
"view lost focus by keydown event", this));
|
||||
return currentKeyEvent->IsDefaultPrevented();
|
||||
}
|
||||
|
||||
if (currentKeyEvent->IsDefaultPrevented()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleKeyDownEvent, "
|
||||
"keydown event's default is prevented", this));
|
||||
return true;
|
||||
@ -1573,24 +1573,24 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
|
||||
bool wasComposing = IsIMEComposing();
|
||||
bool interpretKeyEventsCalled = false;
|
||||
if (IsIMEEnabled() || IsASCIICapableOnly()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleKeyDownEvent, calling interpretKeyEvents",
|
||||
this));
|
||||
[mView interpretKeyEvents:[NSArray arrayWithObject:aNativeEvent]];
|
||||
interpretKeyEventsCalled = true;
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleKeyDownEvent, called interpretKeyEvents",
|
||||
this));
|
||||
}
|
||||
|
||||
if (Destroyed()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleKeyDownEvent, widget was destroyed",
|
||||
this));
|
||||
return currentKeyEvent->IsDefaultPrevented();
|
||||
}
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleKeyDownEvent, wasComposing=%s, "
|
||||
"IsIMEComposing()=%s",
|
||||
this, TrueOrFalse(wasComposing), TrueOrFalse(IsIMEComposing())));
|
||||
@ -1615,7 +1615,7 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
|
||||
IsNormalCharInputtingEvent(keypressEvent))) {
|
||||
currentKeyEvent->mKeyPressHandled = DispatchEvent(keypressEvent);
|
||||
currentKeyEvent->mKeyPressDispatched = true;
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleKeyDownEvent, keypress event dispatched",
|
||||
this));
|
||||
}
|
||||
@ -1623,7 +1623,7 @@ TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
|
||||
|
||||
// Note: mWidget might have become null here. Don't count on it from here on.
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleKeyDownEvent, "
|
||||
"keydown handled=%s, keypress handled=%s, causedOtherKeyEvents=%s",
|
||||
this, TrueOrFalse(currentKeyEvent->mKeyDownHandled),
|
||||
@ -1639,7 +1639,7 @@ TextInputHandler::HandleKeyUpEvent(NSEvent* aNativeEvent)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleKeyUpEvent, aNativeEvent=%p, "
|
||||
"type=%s, keyCode=%lld (0x%X), modifierFlags=0x%X, characters=\"%s\", "
|
||||
"charactersIgnoringModifiers=\"%s\", "
|
||||
@ -1651,7 +1651,7 @@ TextInputHandler::HandleKeyUpEvent(NSEvent* aNativeEvent)
|
||||
TrueOrFalse(IsIMEComposing())));
|
||||
|
||||
if (Destroyed()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleKeyUpEvent, "
|
||||
"widget has been already destroyed", this));
|
||||
return;
|
||||
@ -1676,7 +1676,7 @@ TextInputHandler::HandleFlagsChanged(NSEvent* aNativeEvent)
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
if (Destroyed()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleFlagsChanged, "
|
||||
"widget has been already destroyed", this));
|
||||
return;
|
||||
@ -1684,7 +1684,7 @@ TextInputHandler::HandleFlagsChanged(NSEvent* aNativeEvent)
|
||||
|
||||
nsRefPtr<nsChildView> kungFuDeathGrip(mWidget);
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::HandleFlagsChanged, aNativeEvent=%p, "
|
||||
"type=%s, keyCode=%s (0x%X), modifierFlags=0x%08X, "
|
||||
"sLastModifierState=0x%08X, IsIMEComposing()=%s",
|
||||
@ -1995,7 +1995,7 @@ TextInputHandler::DispatchKeyEventForFlagsChanged(NSEvent* aNativeEvent,
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::DispatchKeyEventForFlagsChanged, aNativeEvent=%p, "
|
||||
"type=%s, keyCode=%s (0x%X), aDispatchKeyDown=%s, IsIMEComposing()=%s",
|
||||
this, aNativeEvent, GetNativeKeyEventType(aNativeEvent),
|
||||
@ -2039,7 +2039,7 @@ TextInputHandler::InsertText(NSAttributedString* aAttrString,
|
||||
|
||||
KeyEventState* currentKeyEvent = GetCurrentKeyEvent();
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::InsertText, aAttrString=\"%s\", "
|
||||
"aReplacementRange=%p { location=%llu, length=%llu }, "
|
||||
"IsIMEComposing()=%s, IgnoreIMEComposition()=%s, "
|
||||
@ -2180,7 +2180,7 @@ TextInputHandler::DoCommandBySelector(const char* aSelector)
|
||||
|
||||
KeyEventState* currentKeyEvent = GetCurrentKeyEvent();
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::DoCommandBySelector, aSelector=\"%s\", "
|
||||
"Destroyed()=%s, keydownHandled=%s, keypressHandled=%s, "
|
||||
"causedOtherKeyEvents=%s",
|
||||
@ -2197,7 +2197,7 @@ TextInputHandler::DoCommandBySelector(const char* aSelector)
|
||||
InitKeyEvent(currentKeyEvent->mKeyEvent, keypressEvent);
|
||||
currentKeyEvent->mKeyPressHandled = DispatchEvent(keypressEvent);
|
||||
currentKeyEvent->mKeyPressDispatched = true;
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandler::DoCommandBySelector, keypress event "
|
||||
"dispatched, Destroyed()=%s, keypressHandled=%s",
|
||||
this, TrueOrFalse(Destroyed()),
|
||||
@ -2260,7 +2260,7 @@ IMEInputHandler::OnCurrentTextInputSourceChange(CFNotificationCenterRef aCenter,
|
||||
tis.GetInputSourceID(sLatestIMEOpenedModeInputSourceID);
|
||||
}
|
||||
|
||||
if (MOZ_LOG_TEST(gLog, PR_LOG_ALWAYS)) {
|
||||
if (MOZ_LOG_TEST(gLog, PR_LOG_INFO)) {
|
||||
static CFStringRef sLastTIS = nullptr;
|
||||
CFStringRef newTIS;
|
||||
tis.GetInputSourceID(newTIS);
|
||||
@ -2285,7 +2285,7 @@ IMEInputHandler::OnCurrentTextInputSourceChange(CFNotificationCenterRef aCenter,
|
||||
tis.GetPrimaryLanguage(lang0);
|
||||
tis.GetBundleID(bundleID0);
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("IMEInputHandler::OnCurrentTextInputSourceChange,\n"
|
||||
" Current Input Source is changed to:\n"
|
||||
" currentInputContext=%p\n"
|
||||
@ -2348,9 +2348,9 @@ IMEInputHandler::CreateAllIMEModeList()
|
||||
void
|
||||
IMEInputHandler::DebugPrintAllIMEModes()
|
||||
{
|
||||
if (MOZ_LOG_TEST(gLog, PR_LOG_ALWAYS)) {
|
||||
if (MOZ_LOG_TEST(gLog, PR_LOG_INFO)) {
|
||||
CFArrayRef list = CreateAllIMEModeList();
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS, ("IME mode configuration:"));
|
||||
MOZ_LOG(gLog, PR_LOG_INFO, ("IME mode configuration:"));
|
||||
CFIndex idx = ::CFArrayGetCount(list);
|
||||
TISInputSourceWrapper tis;
|
||||
for (CFIndex i = 0; i < idx; ++i) {
|
||||
@ -2360,7 +2360,7 @@ IMEInputHandler::DebugPrintAllIMEModes()
|
||||
nsAutoString name, isid;
|
||||
tis.GetLocalizedName(name);
|
||||
tis.GetInputSourceID(isid);
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
(" %s\t<%s>%s%s\n",
|
||||
NS_ConvertUTF16toUTF8(name).get(),
|
||||
NS_ConvertUTF16toUTF8(isid).get(),
|
||||
@ -2404,7 +2404,7 @@ IMEInputHandler::NotifyIMEOfFocusChangeInGecko()
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::NotifyIMEOfFocusChangeInGecko, "
|
||||
"Destroyed()=%s, IsFocused()=%s, inputContext=%p",
|
||||
this, TrueOrFalse(Destroyed()), TrueOrFalse(IsFocused()),
|
||||
@ -2443,7 +2443,7 @@ IMEInputHandler::DiscardIMEComposition()
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::DiscardIMEComposition, "
|
||||
"Destroyed()=%s, IsFocused()=%s, mView=%p, inputContext=%p",
|
||||
this, TrueOrFalse(Destroyed()), TrueOrFalse(IsFocused()),
|
||||
@ -2474,7 +2474,7 @@ IMEInputHandler::SyncASCIICapableOnly()
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::SyncASCIICapableOnly, "
|
||||
"Destroyed()=%s, IsFocused()=%s, mIsASCIICapableOnly=%s, "
|
||||
"GetCurrentTSMDocumentID()=%p",
|
||||
@ -2577,7 +2577,7 @@ uint32_t
|
||||
IMEInputHandler::ConvertToTextRangeType(uint32_t aUnderlineStyle,
|
||||
NSRange& aSelectedRange)
|
||||
{
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::ConvertToTextRangeType, "
|
||||
"aUnderlineStyle=%llu, aSelectedRange.length=%llu,",
|
||||
this, aUnderlineStyle, aSelectedRange.length));
|
||||
@ -2630,7 +2630,7 @@ IMEInputHandler::GetRangeCount(NSAttributedString *aAttrString)
|
||||
count++;
|
||||
}
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::GetRangeCount, aAttrString=\"%s\", count=%llu",
|
||||
this, GetCharacters([aAttrString string]), count));
|
||||
|
||||
@ -2667,7 +2667,7 @@ IMEInputHandler::CreateTextRangeArray(NSAttributedString *aAttrString,
|
||||
ConvertToTextRangeType([attributeValue intValue], aSelectedRange);
|
||||
textRangeArray->AppendElement(range);
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::CreateTextRangeArray, "
|
||||
"range={ mStartOffset=%llu, mEndOffset=%llu, mRangeType=%s }",
|
||||
this, range.mStartOffset, range.mEndOffset,
|
||||
@ -2685,7 +2685,7 @@ IMEInputHandler::CreateTextRangeArray(NSAttributedString *aAttrString,
|
||||
range.mRangeType = NS_TEXTRANGE_CARETPOSITION;
|
||||
textRangeArray->AppendElement(range);
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::CreateTextRangeArray, "
|
||||
"range={ mStartOffset=%llu, mEndOffset=%llu, mRangeType=%s }",
|
||||
this, range.mStartOffset, range.mEndOffset,
|
||||
@ -2701,7 +2701,7 @@ IMEInputHandler::DispatchCompositionChangeEvent(const nsString& aText,
|
||||
NSAttributedString* aAttrString,
|
||||
NSRange& aSelectedRange)
|
||||
{
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::DispatchCompositionChangeEvent, "
|
||||
"aText=\"%s\", aAttrString=\"%s\", "
|
||||
"aSelectedRange={ location=%llu, length=%llu }, "
|
||||
@ -2727,7 +2727,7 @@ IMEInputHandler::DispatchCompositionChangeEvent(const nsString& aText,
|
||||
bool
|
||||
IMEInputHandler::DispatchCompositionCommitEvent(const nsAString* aCommitString)
|
||||
{
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::DispatchCompositionCommitEvent, "
|
||||
"aCommitString=0x%p (\"%s\"), Destroyed()=%s",
|
||||
this, aCommitString,
|
||||
@ -2763,7 +2763,7 @@ IMEInputHandler::InsertTextAsCommittingComposition(
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::InsertTextAsCommittingComposition, "
|
||||
"aAttrString=\"%s\", aReplacementRange=%p { location=%llu, length=%llu }, "
|
||||
"Destroyed()=%s, IsIMEComposing()=%s, "
|
||||
@ -2790,7 +2790,7 @@ IMEInputHandler::InsertTextAsCommittingComposition(
|
||||
!NSEqualRanges(MarkedRange(), *aReplacementRange)) {
|
||||
DispatchCompositionCommitEvent();
|
||||
if (Destroyed()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::InsertTextAsCommittingComposition, "
|
||||
"destroyed by commiting composition for setting replacement range",
|
||||
this));
|
||||
@ -2819,7 +2819,7 @@ IMEInputHandler::InsertTextAsCommittingComposition(
|
||||
|
||||
DispatchEvent(compStart);
|
||||
if (Destroyed()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::InsertTextAsCommittingComposition, "
|
||||
"destroyed by compositionstart event", this));
|
||||
return;
|
||||
@ -2830,7 +2830,7 @@ IMEInputHandler::InsertTextAsCommittingComposition(
|
||||
|
||||
DispatchCompositionCommitEvent(&str);
|
||||
if (Destroyed()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::InsertTextAsCommittingComposition, "
|
||||
"destroyed by compositioncommit event", this));
|
||||
return;
|
||||
@ -2850,7 +2850,7 @@ IMEInputHandler::SetMarkedText(NSAttributedString* aAttrString,
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::SetMarkedText, "
|
||||
"aAttrString=\"%s\", aSelectedRange={ location=%llu, length=%llu }, "
|
||||
"aReplacementRange=%p { location=%llu, length=%llu }, "
|
||||
@ -2880,7 +2880,7 @@ IMEInputHandler::SetMarkedText(NSAttributedString* aAttrString,
|
||||
DispatchCompositionCommitEvent();
|
||||
mIgnoreIMECommit = ignoreIMECommit;
|
||||
if (Destroyed()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::SetMarkedText, "
|
||||
"destroyed by commiting composition for setting replacement range",
|
||||
this));
|
||||
@ -2909,7 +2909,7 @@ IMEInputHandler::SetMarkedText(NSAttributedString* aAttrString,
|
||||
|
||||
DispatchEvent(compStart);
|
||||
if (Destroyed()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::SetMarkedText, "
|
||||
"destroyed by compositionstart event", this));
|
||||
return;
|
||||
@ -2927,7 +2927,7 @@ IMEInputHandler::SetMarkedText(NSAttributedString* aAttrString,
|
||||
|
||||
DispatchCompositionChangeEvent(str, aAttrString, aSelectedRange);
|
||||
if (Destroyed()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::SetMarkedText, "
|
||||
"destroyed by compositionchange event", this));
|
||||
}
|
||||
@ -2938,7 +2938,7 @@ IMEInputHandler::SetMarkedText(NSAttributedString* aAttrString,
|
||||
// current composition.
|
||||
DispatchCompositionCommitEvent(&EmptyString());
|
||||
if (Destroyed()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::SetMarkedText, "
|
||||
"destroyed by compositioncommit event", this));
|
||||
return;
|
||||
@ -2951,7 +2951,7 @@ IMEInputHandler::SetMarkedText(NSAttributedString* aAttrString,
|
||||
NSInteger
|
||||
IMEInputHandler::ConversationIdentifier()
|
||||
{
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::ConversationIdentifier, Destroyed()=%s",
|
||||
this, TrueOrFalse(Destroyed())));
|
||||
|
||||
@ -2966,7 +2966,7 @@ IMEInputHandler::ConversationIdentifier()
|
||||
textContent.InitForQueryTextContent(0, 0);
|
||||
DispatchEvent(textContent);
|
||||
if (!textContent.mSucceeded) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::ConversationIdentifier, Failed", this));
|
||||
return reinterpret_cast<NSInteger>(mView);
|
||||
}
|
||||
@ -2981,7 +2981,7 @@ IMEInputHandler::GetAttributedSubstringFromRange(NSRange& aRange,
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::GetAttributedSubstringFromRange, "
|
||||
"aRange={ location=%llu, length=%llu }, aActualRange=%p, Destroyed()=%s",
|
||||
this, aRange.location, aRange.length, aActualRange,
|
||||
@ -3003,7 +3003,7 @@ IMEInputHandler::GetAttributedSubstringFromRange(NSRange& aRange,
|
||||
textContent.RequestFontRanges();
|
||||
DispatchEvent(textContent);
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::GetAttributedSubstringFromRange, "
|
||||
"textContent={ mSucceeded=%s, mReply={ mString=\"%s\", mOffset=%llu } }",
|
||||
this, TrueOrFalse(textContent.mSucceeded),
|
||||
@ -3047,7 +3047,7 @@ IMEInputHandler::GetAttributedSubstringFromRange(NSRange& aRange,
|
||||
bool
|
||||
IMEInputHandler::HasMarkedText()
|
||||
{
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::HasMarkedText, "
|
||||
"mMarkedRange={ location=%llu, length=%llu }",
|
||||
this, mMarkedRange.location, mMarkedRange.length));
|
||||
@ -3058,7 +3058,7 @@ IMEInputHandler::HasMarkedText()
|
||||
NSRange
|
||||
IMEInputHandler::MarkedRange()
|
||||
{
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::MarkedRange, "
|
||||
"mMarkedRange={ location=%llu, length=%llu }",
|
||||
this, mMarkedRange.location, mMarkedRange.length));
|
||||
@ -3074,7 +3074,7 @@ IMEInputHandler::SelectedRange()
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::SelectedRange, Destroyed()=%s, mSelectedRange={ "
|
||||
"location=%llu, length=%llu }",
|
||||
this, TrueOrFalse(Destroyed()), mSelectedRange.location,
|
||||
@ -3094,7 +3094,7 @@ IMEInputHandler::SelectedRange()
|
||||
WidgetQueryContentEvent selection(true, NS_QUERY_SELECTED_TEXT, mWidget);
|
||||
DispatchEvent(selection);
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::SelectedRange, selection={ mSucceeded=%s, "
|
||||
"mReply={ mOffset=%llu, mString.Length()=%llu } }",
|
||||
this, TrueOrFalse(selection.mSucceeded), selection.mReply.mOffset,
|
||||
@ -3156,7 +3156,7 @@ IMEInputHandler::FirstRectForCharacterRange(NSRange& aRange,
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::FirstRectForCharacterRange, Destroyed()=%s, "
|
||||
"aRange={ location=%llu, length=%llu }, aActualRange=%p }",
|
||||
this, TrueOrFalse(Destroyed()), aRange.location, aRange.length,
|
||||
@ -3224,7 +3224,7 @@ IMEInputHandler::FirstRectForCharacterRange(NSRange& aRange,
|
||||
*aActualRange = actualRange;
|
||||
}
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::FirstRectForCharacterRange, "
|
||||
"useCaretRect=%s rect={ x=%f, y=%f, width=%f, height=%f }, "
|
||||
"actualRange={ location=%llu, length=%llu }",
|
||||
@ -3242,7 +3242,7 @@ IMEInputHandler::CharacterIndexForPoint(NSPoint& aPoint)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::CharacterIndexForPoint, aPoint={ x=%f, y=%f }",
|
||||
this, aPoint.x, aPoint.y));
|
||||
|
||||
@ -3275,7 +3275,7 @@ IMEInputHandler::GetValidAttributesForMarkedText()
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::GetValidAttributesForMarkedText", this));
|
||||
|
||||
//nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
|
||||
@ -3330,7 +3330,7 @@ IMEInputHandler::~IMEInputHandler()
|
||||
void
|
||||
IMEInputHandler::OnFocusChangeInGecko(bool aFocus)
|
||||
{
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::OnFocusChangeInGecko, aFocus=%s, Destroyed()=%s, "
|
||||
"sFocusedIMEHandler=%p",
|
||||
this, TrueOrFalse(aFocus), TrueOrFalse(Destroyed()), sFocusedIMEHandler));
|
||||
@ -3358,7 +3358,7 @@ IMEInputHandler::OnFocusChangeInGecko(bool aFocus)
|
||||
bool
|
||||
IMEInputHandler::OnDestroyWidget(nsChildView* aDestroyingWidget)
|
||||
{
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::OnDestroyWidget, aDestroyingWidget=%p, "
|
||||
"sFocusedIMEHandler=%p, IsIMEComposing()=%s",
|
||||
this, aDestroyingWidget, sFocusedIMEHandler,
|
||||
@ -3391,7 +3391,7 @@ IMEInputHandler::OnStartIMEComposition()
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::OnStartIMEComposition, mView=%p, mWidget=%p"
|
||||
"inputContext=%p, mIsIMEComposing=%s",
|
||||
this, mView, mWidget, mView ? [mView inputContext] : nullptr,
|
||||
@ -3408,7 +3408,7 @@ IMEInputHandler::OnUpdateIMEComposition(NSString* aIMECompositionString)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::OnUpdateIMEComposition, mView=%p, mWidget=%p, "
|
||||
"inputContext=%p, mIsIMEComposing=%s, aIMECompositionString=\"%s\"",
|
||||
this, mView, mWidget, mView ? [mView inputContext] : nullptr,
|
||||
@ -3428,7 +3428,7 @@ IMEInputHandler::OnEndIMEComposition()
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::OnEndIMEComposition, mView=%p, mWidget=%p, "
|
||||
"inputContext=%p, mIsIMEComposing=%s",
|
||||
this, mView, mWidget, mView ? [mView inputContext] : nullptr,
|
||||
@ -3451,7 +3451,7 @@ IMEInputHandler::SendCommittedText(NSString *aString)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::SendCommittedText, mView=%p, mWidget=%p, "
|
||||
"inputContext=%p, mIsIMEComposing=%s",
|
||||
this, mView, mWidget, mView ? [mView inputContext] : nullptr,
|
||||
@ -3476,7 +3476,7 @@ IMEInputHandler::KillIMEComposition()
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::KillIMEComposition, mView=%p, mWidget=%p, "
|
||||
"inputContext=%p, mIsIMEComposing=%s, "
|
||||
"Destroyed()=%s, IsFocused()=%s",
|
||||
@ -3496,7 +3496,7 @@ IMEInputHandler::KillIMEComposition()
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::KillIMEComposition, Pending...", this));
|
||||
|
||||
// Commit the composition internally.
|
||||
@ -3516,7 +3516,7 @@ IMEInputHandler::CommitIMEComposition()
|
||||
if (!IsIMEComposing())
|
||||
return;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::CommitIMEComposition, mIMECompositionString=%s",
|
||||
this, GetCharacters(mIMECompositionString)));
|
||||
|
||||
@ -3540,7 +3540,7 @@ IMEInputHandler::CancelIMEComposition()
|
||||
if (!IsIMEComposing())
|
||||
return;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::CancelIMEComposition, mIMECompositionString=%s",
|
||||
this, GetCharacters(mIMECompositionString)));
|
||||
|
||||
@ -3654,12 +3654,12 @@ IMEInputHandler::SetIMEOpenState(bool aOpenIME)
|
||||
void
|
||||
IMEInputHandler::OpenSystemPreferredLanguageIME()
|
||||
{
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::OpenSystemPreferredLanguageIME", this));
|
||||
|
||||
CFArrayRef langList = ::CFLocaleCopyPreferredLanguages();
|
||||
if (!langList) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::OpenSystemPreferredLanguageIME, langList is NULL",
|
||||
this));
|
||||
return;
|
||||
@ -3681,10 +3681,10 @@ IMEInputHandler::OpenSystemPreferredLanguageIME()
|
||||
TISInputSourceWrapper tis;
|
||||
tis.InitByLanguage(lang);
|
||||
if (tis.IsOpenedIMEMode()) {
|
||||
if (MOZ_LOG_TEST(gLog, PR_LOG_ALWAYS)) {
|
||||
if (MOZ_LOG_TEST(gLog, PR_LOG_INFO)) {
|
||||
CFStringRef foundTIS;
|
||||
tis.GetInputSourceID(foundTIS);
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p IMEInputHandler::OpenSystemPreferredLanguageIME, "
|
||||
"foundTIS=%s, lang=%s",
|
||||
this, GetCharacters(foundTIS), GetCharacters(lang)));
|
||||
@ -3732,7 +3732,7 @@ TextInputHandlerBase::~TextInputHandlerBase()
|
||||
bool
|
||||
TextInputHandlerBase::OnDestroyWidget(nsChildView* aDestroyingWidget)
|
||||
{
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandlerBase::OnDestroyWidget, "
|
||||
"aDestroyingWidget=%p, mWidget=%p",
|
||||
this, aDestroyingWidget, mWidget));
|
||||
@ -3751,7 +3751,7 @@ TextInputHandlerBase::DispatchEvent(WidgetGUIEvent& aEvent)
|
||||
if (aEvent.message == NS_KEY_PRESS) {
|
||||
WidgetInputEvent& inputEvent = *aEvent.AsInputEvent();
|
||||
if (!inputEvent.IsMeta()) {
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandlerBase::DispatchEvent, hiding mouse cursor", this));
|
||||
[NSCursor setHiddenUntilMouseMoves:YES];
|
||||
}
|
||||
@ -3849,7 +3849,7 @@ TextInputHandlerBase::GetWindowLevel()
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandlerBase::GetWindowLevel, Destryoed()=%s",
|
||||
this, TrueOrFalse(Destroyed())));
|
||||
|
||||
@ -3864,7 +3864,7 @@ TextInputHandlerBase::GetWindowLevel()
|
||||
NS_ENSURE_TRUE(editorView, NSNormalWindowLevel);
|
||||
NSInteger windowLevel = [[editorView window] level];
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandlerBase::GetWindowLevel, windowLevel=%s (%X)",
|
||||
this, GetWindowLevelName(windowLevel), windowLevel));
|
||||
|
||||
@ -3884,7 +3884,7 @@ TextInputHandlerBase::AttachNativeKeyEvent(WidgetKeyboardEvent& aKeyEvent)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MOZ_LOG(gLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gLog, PR_LOG_INFO,
|
||||
("%p TextInputHandlerBase::AttachNativeKeyEvent, key=0x%X, char=0x%X, "
|
||||
"mod=0x%X", this, aKeyEvent.keyCode, aKeyEvent.charCode,
|
||||
aKeyEvent.modifiers));
|
||||
|
@ -5623,7 +5623,7 @@ static int32_t RoundUp(double aDouble)
|
||||
if (!mGeckoChild)
|
||||
return NSDragOperationNone;
|
||||
|
||||
MOZ_LOG(sCocoaLog, PR_LOG_ALWAYS, ("ChildView doDragAction: entered\n"));
|
||||
MOZ_LOG(sCocoaLog, PR_LOG_INFO, ("ChildView doDragAction: entered\n"));
|
||||
|
||||
if (!mDragService) {
|
||||
CallGetService(kDragServiceContractID, &mDragService);
|
||||
@ -5717,7 +5717,7 @@ static int32_t RoundUp(double aDouble)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
|
||||
|
||||
MOZ_LOG(sCocoaLog, PR_LOG_ALWAYS, ("ChildView draggingEntered: entered\n"));
|
||||
MOZ_LOG(sCocoaLog, PR_LOG_INFO, ("ChildView draggingEntered: entered\n"));
|
||||
|
||||
// there should never be a globalDragPboard when "draggingEntered:" is
|
||||
// called, but just in case we'll take care of it here.
|
||||
@ -5735,14 +5735,14 @@ static int32_t RoundUp(double aDouble)
|
||||
|
||||
- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
MOZ_LOG(sCocoaLog, PR_LOG_ALWAYS, ("ChildView draggingUpdated: entered\n"));
|
||||
MOZ_LOG(sCocoaLog, PR_LOG_INFO, ("ChildView draggingUpdated: entered\n"));
|
||||
|
||||
return [self doDragAction:NS_DRAGDROP_OVER sender:sender];
|
||||
}
|
||||
|
||||
- (void)draggingExited:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
MOZ_LOG(sCocoaLog, PR_LOG_ALWAYS, ("ChildView draggingExited: entered\n"));
|
||||
MOZ_LOG(sCocoaLog, PR_LOG_INFO, ("ChildView draggingExited: entered\n"));
|
||||
|
||||
nsAutoRetainCocoaObject kungFuDeathGrip(self);
|
||||
[self doDragAction:NS_DRAGDROP_EXIT sender:sender];
|
||||
@ -5841,7 +5841,7 @@ static int32_t RoundUp(double aDouble)
|
||||
|
||||
nsresult rv;
|
||||
|
||||
MOZ_LOG(sCocoaLog, PR_LOG_ALWAYS, ("ChildView namesOfPromisedFilesDroppedAtDestination: entering callback for promised files\n"));
|
||||
MOZ_LOG(sCocoaLog, PR_LOG_INFO, ("ChildView namesOfPromisedFilesDroppedAtDestination: entering callback for promised files\n"));
|
||||
|
||||
nsCOMPtr<nsIFile> targFile;
|
||||
NS_NewLocalFile(EmptyString(), true, getter_AddRefs(targFile));
|
||||
|
@ -418,7 +418,7 @@ nsClipboard::PasteboardDictFromTransferable(nsITransferable* aTransferable)
|
||||
nsXPIDLCString flavorStr;
|
||||
currentFlavor->ToString(getter_Copies(flavorStr));
|
||||
|
||||
MOZ_LOG(sCocoaLog, PR_LOG_ALWAYS, ("writing out clipboard data of type %s (%d)\n", flavorStr.get(), i));
|
||||
MOZ_LOG(sCocoaLog, PR_LOG_INFO, ("writing out clipboard data of type %s (%d)\n", flavorStr.get(), i));
|
||||
|
||||
NSString *pboardType = nil;
|
||||
|
||||
|
@ -366,7 +366,7 @@ nsDragService::GetData(nsITransferable* aTransferable, uint32_t aItemIndex)
|
||||
nsXPIDLCString flavorStr;
|
||||
currentFlavor->ToString(getter_Copies(flavorStr));
|
||||
|
||||
MOZ_LOG(sCocoaLog, PR_LOG_ALWAYS, ("nsDragService::GetData: looking for clipboard data of type %s\n", flavorStr.get()));
|
||||
MOZ_LOG(sCocoaLog, PR_LOG_INFO, ("nsDragService::GetData: looking for clipboard data of type %s\n", flavorStr.get()));
|
||||
|
||||
if (flavorStr.EqualsLiteral(kFileMime)) {
|
||||
NSArray* pFiles = [globalDragPboard propertyListForType:NSFilenamesPboardType];
|
||||
|
@ -111,7 +111,7 @@ nsGtkIMModule::nsGtkIMModule(nsWindow* aOwnerWindow)
|
||||
void
|
||||
nsGtkIMModule::Init()
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): Init, mOwnerWindow=%p",
|
||||
this, mOwnerWindow));
|
||||
|
||||
@ -178,14 +178,14 @@ nsGtkIMModule::~nsGtkIMModule()
|
||||
if (this == sLastFocusedModule) {
|
||||
sLastFocusedModule = nullptr;
|
||||
}
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p) was gone", this));
|
||||
}
|
||||
|
||||
void
|
||||
nsGtkIMModule::OnDestroyWindow(nsWindow* aWindow)
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): OnDestroyWindow, aWindow=%p, mLastFocusedWindow=%p, mOwnerWindow=%p, mLastFocusedModule=%p",
|
||||
this, aWindow, mLastFocusedWindow, mOwnerWindow, sLastFocusedModule));
|
||||
|
||||
@ -245,7 +245,7 @@ nsGtkIMModule::OnDestroyWindow(nsWindow* aWindow)
|
||||
mLastFocusedWindow = nullptr;
|
||||
mInputContext.mIMEState.mEnabled = IMEState::DISABLED;
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" SUCCEEDED, Completely destroyed"));
|
||||
}
|
||||
|
||||
@ -298,7 +298,7 @@ nsGtkIMModule::OnFocusWindow(nsWindow* aWindow)
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): OnFocusWindow, aWindow=%p, mLastFocusedWindow=%p",
|
||||
this, aWindow, mLastFocusedWindow));
|
||||
mLastFocusedWindow = aWindow;
|
||||
@ -312,7 +312,7 @@ nsGtkIMModule::OnBlurWindow(nsWindow* aWindow)
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): OnBlurWindow, aWindow=%p, mLastFocusedWindow=%p, "
|
||||
"mIsIMFocused=%s",
|
||||
this, aWindow, mLastFocusedWindow, GetBoolName(mIsIMFocused)));
|
||||
@ -335,7 +335,7 @@ nsGtkIMModule::OnKeyEvent(nsWindow* aCaller, GdkEventKey* aEvent,
|
||||
return false;
|
||||
}
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): OnKeyEvent, aCaller=%p, aKeyDownEventWasSent=%s, "
|
||||
"mCompositionState=%s, current context=%p, active context=%p, "
|
||||
"aEvent(%p): { type=%s, keyval=%s, unicode=0x%X }",
|
||||
@ -345,7 +345,7 @@ nsGtkIMModule::OnKeyEvent(nsWindow* aCaller, GdkEventKey* aEvent,
|
||||
gdk_keyval_to_unicode(aEvent->keyval)));
|
||||
|
||||
if (aCaller != mLastFocusedWindow) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, the caller isn't focused window, mLastFocusedWindow=%p",
|
||||
mLastFocusedWindow));
|
||||
return false;
|
||||
@ -355,7 +355,7 @@ nsGtkIMModule::OnKeyEvent(nsWindow* aCaller, GdkEventKey* aEvent,
|
||||
// current context since the user expects so.
|
||||
GtkIMContext* currentContext = GetCurrentContext();
|
||||
if (MOZ_UNLIKELY(!currentContext)) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, there are no context"));
|
||||
return false;
|
||||
}
|
||||
@ -398,7 +398,7 @@ nsGtkIMModule::OnKeyEvent(nsWindow* aCaller, GdkEventKey* aEvent,
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" filterThisEvent=%s (isFiltered=%s, mFilterKeyEvent=%s), "
|
||||
"mCompositionState=%s",
|
||||
GetBoolName(filterThisEvent), GetBoolName(isFiltered),
|
||||
@ -410,7 +410,7 @@ nsGtkIMModule::OnKeyEvent(nsWindow* aCaller, GdkEventKey* aEvent,
|
||||
void
|
||||
nsGtkIMModule::OnFocusChangeInGecko(bool aFocus)
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): OnFocusChangeInGecko, aFocus=%s, "
|
||||
"mCompositionState=%s, mIsIMFocused=%s",
|
||||
this, GetBoolName(aFocus), GetCompositionStateName(),
|
||||
@ -423,13 +423,13 @@ nsGtkIMModule::OnFocusChangeInGecko(bool aFocus)
|
||||
void
|
||||
nsGtkIMModule::ResetIME()
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): ResetIME, mCompositionState=%s, mIsIMFocused=%s",
|
||||
this, GetCompositionStateName(), GetBoolName(mIsIMFocused)));
|
||||
|
||||
GtkIMContext* activeContext = GetActiveContext();
|
||||
if (MOZ_UNLIKELY(!activeContext)) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, there are no context"));
|
||||
return;
|
||||
}
|
||||
@ -450,7 +450,7 @@ nsGtkIMModule::ResetIME()
|
||||
nsAutoString compositionString;
|
||||
GetCompositionString(activeContext, compositionString);
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): ResetIME() called gtk_im_context_reset(), "
|
||||
"activeContext=%p, mCompositionState=%s, compositionString=%s, "
|
||||
"mIsIMFocused=%s",
|
||||
@ -476,13 +476,13 @@ nsGtkIMModule::EndIMEComposition(nsWindow* aCaller)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): EndIMEComposition, aCaller=%p, "
|
||||
"mCompositionState=%s",
|
||||
this, aCaller, GetCompositionStateName()));
|
||||
|
||||
if (aCaller != mLastFocusedWindow) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" WARNING: the caller isn't focused window, mLastFocusedWindow=%p",
|
||||
mLastFocusedWindow));
|
||||
return NS_OK;
|
||||
@ -524,20 +524,20 @@ nsGtkIMModule::SetInputContext(nsWindow* aCaller,
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): SetInputContext, aCaller=%p, aState=%s mHTMLInputType=%s",
|
||||
this, aCaller, GetEnabledStateName(aContext->mIMEState.mEnabled),
|
||||
NS_ConvertUTF16toUTF8(aContext->mHTMLInputType).get()));
|
||||
|
||||
if (aCaller != mLastFocusedWindow) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, the caller isn't focused window, mLastFocusedWindow=%p",
|
||||
mLastFocusedWindow));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mContext) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, there are no context"));
|
||||
return;
|
||||
}
|
||||
@ -545,7 +545,7 @@ nsGtkIMModule::SetInputContext(nsWindow* aCaller,
|
||||
|
||||
if (sLastFocusedModule != this) {
|
||||
mInputContext = *aContext;
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" SUCCEEDED, but we're not active"));
|
||||
return;
|
||||
}
|
||||
@ -658,7 +658,7 @@ nsGtkIMModule::IsEnabled() const
|
||||
void
|
||||
nsGtkIMModule::Focus()
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): Focus, sLastFocusedModule=%p",
|
||||
this, sLastFocusedModule));
|
||||
|
||||
@ -670,7 +670,7 @@ nsGtkIMModule::Focus()
|
||||
|
||||
GtkIMContext* currentContext = GetCurrentContext();
|
||||
if (!currentContext) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, there are no context"));
|
||||
return;
|
||||
}
|
||||
@ -694,7 +694,7 @@ nsGtkIMModule::Focus()
|
||||
void
|
||||
nsGtkIMModule::Blur()
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): Blur, mIsIMFocused=%s",
|
||||
this, GetBoolName(mIsIMFocused)));
|
||||
|
||||
@ -704,7 +704,7 @@ nsGtkIMModule::Blur()
|
||||
|
||||
GtkIMContext* currentContext = GetCurrentContext();
|
||||
if (!currentContext) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, there are no context"));
|
||||
return;
|
||||
}
|
||||
@ -720,14 +720,14 @@ nsGtkIMModule::OnSelectionChange(nsWindow* aCaller)
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): OnSelectionChange(aCaller=0x%p), "
|
||||
"mCompositionState=%s, mIsDeletingSurrounding=%s",
|
||||
this, aCaller, GetCompositionStateName(),
|
||||
mIsDeletingSurrounding ? "true" : "false"));
|
||||
|
||||
if (aCaller != mLastFocusedWindow) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" WARNING: the caller isn't focused window, "
|
||||
"mLastFocusedWindow=%p",
|
||||
mLastFocusedWindow));
|
||||
@ -748,26 +748,26 @@ nsGtkIMModule::OnSelectionChange(nsWindow* aCaller)
|
||||
|
||||
bool cannotContinueComposition = false;
|
||||
if (MOZ_UNLIKELY(IsDestroyed())) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" ERROR: nsGtkIMModule instance is destroyed during "
|
||||
"querying selection offset"));
|
||||
return;
|
||||
} else if (NS_WARN_IF(!selection.mSucceeded)) {
|
||||
cannotContinueComposition = true;
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" ERROR: failed to retrieve new caret offset"));
|
||||
} else if (selection.mReply.mOffset == UINT32_MAX) {
|
||||
cannotContinueComposition = true;
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" ERROR: new offset is too large, cannot keep composing"));
|
||||
} else if (!mLastFocusedWindow || focusedWindow != mLastFocusedWindow) {
|
||||
cannotContinueComposition = true;
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" ERROR: focus is changed during querying selection "
|
||||
"offset"));
|
||||
} else if (focusedWindow->Destroyed()) {
|
||||
cannotContinueComposition = true;
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" ERROR: focused window started to be being destroyed "
|
||||
"during querying selection offset"));
|
||||
}
|
||||
@ -775,7 +775,7 @@ nsGtkIMModule::OnSelectionChange(nsWindow* aCaller)
|
||||
if (!cannotContinueComposition) {
|
||||
// Modify the selection start offset with new offset.
|
||||
mCompositionStart = selection.mReply.mOffset;
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" NOTE: mCompositionStart is updated to %u, "
|
||||
"the selection change doesn't cause resetting IM context",
|
||||
mCompositionStart));
|
||||
@ -805,14 +805,14 @@ nsGtkIMModule::OnStartCompositionCallback(GtkIMContext *aContext,
|
||||
void
|
||||
nsGtkIMModule::OnStartCompositionNative(GtkIMContext *aContext)
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): OnStartCompositionNative, aContext=%p, "
|
||||
"current context=%p",
|
||||
this, aContext, GetCurrentContext()));
|
||||
|
||||
// See bug 472635, we should do nothing if IM context doesn't match.
|
||||
if (GetCurrentContext() != aContext) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, given context doesn't match"));
|
||||
return;
|
||||
}
|
||||
@ -836,7 +836,7 @@ nsGtkIMModule::OnEndCompositionCallback(GtkIMContext *aContext,
|
||||
void
|
||||
nsGtkIMModule::OnEndCompositionNative(GtkIMContext *aContext)
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): OnEndCompositionNative, aContext=%p",
|
||||
this, aContext));
|
||||
|
||||
@ -844,7 +844,7 @@ nsGtkIMModule::OnEndCompositionNative(GtkIMContext *aContext)
|
||||
// Note that if this is called after focus move, the context may different
|
||||
// from any our owning context.
|
||||
if (!IsValidContext(aContext)) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, given context doesn't match with any context"));
|
||||
return;
|
||||
}
|
||||
@ -872,7 +872,7 @@ nsGtkIMModule::OnChangeCompositionCallback(GtkIMContext *aContext,
|
||||
void
|
||||
nsGtkIMModule::OnChangeCompositionNative(GtkIMContext *aContext)
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): OnChangeCompositionNative, aContext=%p",
|
||||
this, aContext));
|
||||
|
||||
@ -880,7 +880,7 @@ nsGtkIMModule::OnChangeCompositionNative(GtkIMContext *aContext)
|
||||
// Note that if this is called after focus move, the context may different
|
||||
// from any our owning context.
|
||||
if (!IsValidContext(aContext)) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, given context doesn't match with any context"));
|
||||
return;
|
||||
}
|
||||
@ -907,14 +907,14 @@ nsGtkIMModule::OnRetrieveSurroundingCallback(GtkIMContext *aContext,
|
||||
gboolean
|
||||
nsGtkIMModule::OnRetrieveSurroundingNative(GtkIMContext *aContext)
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): OnRetrieveSurroundingNative, aContext=%p, "
|
||||
"current context=%p",
|
||||
this, aContext, GetCurrentContext()));
|
||||
|
||||
// See bug 472635, we should do nothing if IM context doesn't match.
|
||||
if (GetCurrentContext() != aContext) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, given context doesn't match"));
|
||||
return FALSE;
|
||||
}
|
||||
@ -948,14 +948,14 @@ nsGtkIMModule::OnDeleteSurroundingNative(GtkIMContext *aContext,
|
||||
gint aOffset,
|
||||
gint aNChars)
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): OnDeleteSurroundingNative, aContext=%p, "
|
||||
"current context=%p",
|
||||
this, aContext, GetCurrentContext()));
|
||||
|
||||
// See bug 472635, we should do nothing if IM context doesn't match.
|
||||
if (GetCurrentContext() != aContext) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, given context doesn't match"));
|
||||
return FALSE;
|
||||
}
|
||||
@ -967,7 +967,7 @@ nsGtkIMModule::OnDeleteSurroundingNative(GtkIMContext *aContext,
|
||||
}
|
||||
|
||||
// failed
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, cannot delete text"));
|
||||
return FALSE;
|
||||
}
|
||||
@ -988,7 +988,7 @@ nsGtkIMModule::OnCommitCompositionNative(GtkIMContext *aContext,
|
||||
const gchar emptyStr = 0;
|
||||
const gchar *commitString = aUTF8Char ? aUTF8Char : &emptyStr;
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): OnCommitCompositionNative, aContext=%p, "
|
||||
"current context=%p, active context=%p, commitString=\"%s\", "
|
||||
"mProcessingKeyEvent=%p, IsComposingOn(aContext)=%s",
|
||||
@ -997,7 +997,7 @@ nsGtkIMModule::OnCommitCompositionNative(GtkIMContext *aContext,
|
||||
|
||||
// See bug 472635, we should do nothing if IM context doesn't match.
|
||||
if (!IsValidContext(aContext)) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, given context doesn't match"));
|
||||
return;
|
||||
}
|
||||
@ -1027,7 +1027,7 @@ nsGtkIMModule::OnCommitCompositionNative(GtkIMContext *aContext,
|
||||
keyval_utf8[keyval_utf8_len] = '\0';
|
||||
|
||||
if (!strcmp(commitString, keyval_utf8)) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): OnCommitCompositionNative, we'll send normal key event",
|
||||
this));
|
||||
mFilterKeyEvent = false;
|
||||
@ -1055,7 +1055,7 @@ nsGtkIMModule::GetCompositionString(GtkIMContext* aContext,
|
||||
aCompositionString.Truncate();
|
||||
}
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): GetCompositionString, result=\"%s\"",
|
||||
this, preedit_string));
|
||||
|
||||
@ -1066,18 +1066,18 @@ nsGtkIMModule::GetCompositionString(GtkIMContext* aContext,
|
||||
bool
|
||||
nsGtkIMModule::DispatchCompositionStart(GtkIMContext* aContext)
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): DispatchCompositionStart, aContext=%p",
|
||||
this, aContext));
|
||||
|
||||
if (IsComposing()) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" WARNING, we're already in composition"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!mLastFocusedWindow) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, there are no focused window in this module"));
|
||||
return false;
|
||||
}
|
||||
@ -1089,7 +1089,7 @@ nsGtkIMModule::DispatchCompositionStart(GtkIMContext* aContext)
|
||||
mLastFocusedWindow->DispatchEvent(&selection, status);
|
||||
|
||||
if (!selection.mSucceeded || selection.mReply.mOffset == UINT32_MAX) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, cannot query the selection offset"));
|
||||
return false;
|
||||
}
|
||||
@ -1109,17 +1109,17 @@ nsGtkIMModule::DispatchCompositionStart(GtkIMContext* aContext)
|
||||
bool isCancelled;
|
||||
mLastFocusedWindow->DispatchKeyDownEvent(mProcessingKeyEvent,
|
||||
&isCancelled);
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" keydown event is dispatched"));
|
||||
if (static_cast<nsWindow*>(kungFuDeathGrip.get())->IsDestroyed() ||
|
||||
kungFuDeathGrip != mLastFocusedWindow) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" NOTE, the focused widget was destroyed/changed by keydown event"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" mCompositionStart=%u", mCompositionStart));
|
||||
mCompositionState = eCompositionState_CompositionStartDispatched;
|
||||
WidgetCompositionEvent compEvent(true, NS_COMPOSITION_START,
|
||||
@ -1129,7 +1129,7 @@ nsGtkIMModule::DispatchCompositionStart(GtkIMContext* aContext)
|
||||
mLastFocusedWindow->DispatchEvent(&compEvent, status);
|
||||
if (static_cast<nsWindow*>(kungFuDeathGrip.get())->IsDestroyed() ||
|
||||
kungFuDeathGrip != mLastFocusedWindow) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" NOTE, the focused widget was destroyed/changed by compositionstart event"));
|
||||
return false;
|
||||
}
|
||||
@ -1142,18 +1142,18 @@ nsGtkIMModule::DispatchCompositionChangeEvent(
|
||||
GtkIMContext* aContext,
|
||||
const nsAString& aCompositionString)
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): DispatchCompositionChangeEvent, aContext=%p",
|
||||
this, aContext));
|
||||
|
||||
if (!mLastFocusedWindow) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, there are no focused window in this module"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!IsComposing()) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" The composition wasn't started, force starting..."));
|
||||
nsCOMPtr<nsIWidget> kungFuDeathGrip = mLastFocusedWindow;
|
||||
if (!DispatchCompositionStart(aContext)) {
|
||||
@ -1197,7 +1197,7 @@ nsGtkIMModule::DispatchCompositionChangeEvent(
|
||||
mLastFocusedWindow->DispatchEvent(&compositionChangeEvent, status);
|
||||
if (lastFocusedWindow->IsDestroyed() ||
|
||||
lastFocusedWindow != mLastFocusedWindow) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" NOTE, the focused widget was destroyed/changed by "
|
||||
"compositionchange event"));
|
||||
return false;
|
||||
@ -1216,26 +1216,26 @@ nsGtkIMModule::DispatchCompositionCommitEvent(
|
||||
GtkIMContext* aContext,
|
||||
const nsAString* aCommitString)
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): DispatchCompositionCommitEvent, aContext=%p, "
|
||||
"aCommitString=%p, (\"%s\")",
|
||||
this, aContext, aCommitString,
|
||||
aCommitString ? NS_ConvertUTF16toUTF8(*aCommitString).get() : ""));
|
||||
|
||||
if (!mLastFocusedWindow) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, there are no focused window in this module"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!IsComposing()) {
|
||||
if (!aCommitString || aCommitString->IsEmpty()) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, there is no composition and empty commit "
|
||||
"string"));
|
||||
return true;
|
||||
}
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" The composition wasn't started, force starting..."));
|
||||
nsCOMPtr<nsIWidget> kungFuDeathGrip(mLastFocusedWindow);
|
||||
if (!DispatchCompositionStart(aContext)) {
|
||||
@ -1264,7 +1264,7 @@ nsGtkIMModule::DispatchCompositionCommitEvent(
|
||||
|
||||
if (lastFocusedWindow->IsDestroyed() ||
|
||||
lastFocusedWindow != mLastFocusedWindow) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" NOTE, the focused widget was destroyed/changed by "
|
||||
"compositioncommit event"));
|
||||
return false;
|
||||
@ -1277,7 +1277,7 @@ already_AddRefed<TextRangeArray>
|
||||
nsGtkIMModule::CreateTextRangeArray(GtkIMContext* aContext,
|
||||
const nsAString& aLastDispatchedData)
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): CreateTextRangeArray, aContext=%p, "
|
||||
"aLastDispatchedData=\"%s\" (length=%u)",
|
||||
this, aContext, NS_ConvertUTF16toUTF8(aLastDispatchedData).get(),
|
||||
@ -1291,7 +1291,7 @@ nsGtkIMModule::CreateTextRangeArray(GtkIMContext* aContext,
|
||||
gtk_im_context_get_preedit_string(aContext, &preedit_string,
|
||||
&feedback_list, &cursor_pos);
|
||||
if (!preedit_string || !*preedit_string) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" preedit_string is null"));
|
||||
pango_attr_list_unref(feedback_list);
|
||||
g_free(preedit_string);
|
||||
@ -1301,7 +1301,7 @@ nsGtkIMModule::CreateTextRangeArray(GtkIMContext* aContext,
|
||||
PangoAttrIterator* iter;
|
||||
iter = pango_attr_list_get_iterator(feedback_list);
|
||||
if (!iter) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, iterator couldn't be allocated"));
|
||||
pango_attr_list_unref(feedback_list);
|
||||
g_free(preedit_string);
|
||||
@ -1373,7 +1373,7 @@ nsGtkIMModule::CreateTextRangeArray(GtkIMContext* aContext,
|
||||
|
||||
textRangeArray->AppendElement(range);
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" mStartOffset=%u, mEndOffset=%u, mRangeType=%s",
|
||||
range.mStartOffset, range.mEndOffset,
|
||||
GetRangeTypeName(range.mRangeType)));
|
||||
@ -1391,7 +1391,7 @@ nsGtkIMModule::CreateTextRangeArray(GtkIMContext* aContext,
|
||||
range.mRangeType = NS_TEXTRANGE_CARETPOSITION;
|
||||
textRangeArray->AppendElement(range);
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" mStartOffset=%u, mEndOffset=%u, mRangeType=%s",
|
||||
range.mStartOffset, range.mEndOffset,
|
||||
GetRangeTypeName(range.mRangeType)));
|
||||
@ -1407,24 +1407,24 @@ void
|
||||
nsGtkIMModule::SetCursorPosition(GtkIMContext* aContext,
|
||||
uint32_t aTargetOffset)
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): SetCursorPosition, aContext=%p, aTargetOffset=%u",
|
||||
this, aContext, aTargetOffset));
|
||||
|
||||
if (aTargetOffset == UINT32_MAX) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, aTargetOffset is wrong offset"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mLastFocusedWindow) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, there are no focused window"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (MOZ_UNLIKELY(!aContext)) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, there are no context"));
|
||||
return;
|
||||
}
|
||||
@ -1436,7 +1436,7 @@ nsGtkIMModule::SetCursorPosition(GtkIMContext* aContext,
|
||||
nsEventStatus status;
|
||||
mLastFocusedWindow->DispatchEvent(&charRect, status);
|
||||
if (!charRect.mSucceeded) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, NS_QUERY_TEXT_RECT was failed"));
|
||||
return;
|
||||
}
|
||||
@ -1464,12 +1464,12 @@ nsGtkIMModule::SetCursorPosition(GtkIMContext* aContext,
|
||||
nsresult
|
||||
nsGtkIMModule::GetCurrentParagraph(nsAString& aText, uint32_t& aCursorPos)
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): GetCurrentParagraph, mCompositionState=%s",
|
||||
this, GetCompositionStateName()));
|
||||
|
||||
if (!mLastFocusedWindow) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, there are no focused window in this module"));
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
@ -1493,7 +1493,7 @@ nsGtkIMModule::GetCurrentParagraph(nsAString& aText, uint32_t& aCursorPos)
|
||||
selLength = querySelectedTextEvent.mReply.mString.Length();
|
||||
}
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" selOffset=%u, selLength=%u",
|
||||
selOffset, selLength));
|
||||
|
||||
@ -1502,7 +1502,7 @@ nsGtkIMModule::GetCurrentParagraph(nsAString& aText, uint32_t& aCursorPos)
|
||||
// than INT32_MAX.
|
||||
if (selOffset > INT32_MAX || selLength > INT32_MAX ||
|
||||
selOffset + selLength > INT32_MAX) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, The selection is out of range"));
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@ -1517,7 +1517,7 @@ nsGtkIMModule::GetCurrentParagraph(nsAString& aText, uint32_t& aCursorPos)
|
||||
|
||||
nsAutoString textContent(queryTextContentEvent.mReply.mString);
|
||||
if (selOffset + selLength > textContent.Length()) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, The selection is invalid, textContent.Length()=%u",
|
||||
textContent.Length()));
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -1542,7 +1542,7 @@ nsGtkIMModule::GetCurrentParagraph(nsAString& aText, uint32_t& aCursorPos)
|
||||
aText = nsDependentSubstring(textContent, parStart, parEnd - parStart);
|
||||
aCursorPos = selOffset - uint32_t(parStart);
|
||||
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" aText=%s, aText.Length()=%u, aCursorPos=%u",
|
||||
NS_ConvertUTF16toUTF8(aText).get(),
|
||||
aText.Length(), aCursorPos));
|
||||
@ -1555,19 +1555,19 @@ nsGtkIMModule::DeleteText(GtkIMContext* aContext,
|
||||
int32_t aOffset,
|
||||
uint32_t aNChars)
|
||||
{
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
("GtkIMModule(%p): DeleteText, aContext=%p, aOffset=%d, aNChars=%d, "
|
||||
"mCompositionState=%s",
|
||||
this, aContext, aOffset, aNChars, GetCompositionStateName()));
|
||||
|
||||
if (!mLastFocusedWindow) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, there are no focused window in this module"));
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!aNChars) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, aNChars must not be zero"));
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
@ -1583,7 +1583,7 @@ nsGtkIMModule::DeleteText(GtkIMContext* aContext,
|
||||
if (wasComposing) {
|
||||
selOffset = mCompositionStart;
|
||||
if (!DispatchCompositionCommitEvent(aContext, &mSelectedString)) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, quitting from DeletText"));
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@ -1606,7 +1606,7 @@ nsGtkIMModule::DeleteText(GtkIMContext* aContext,
|
||||
mLastFocusedWindow->DispatchEvent(&queryTextContentEvent, status);
|
||||
NS_ENSURE_TRUE(queryTextContentEvent.mSucceeded, NS_ERROR_FAILURE);
|
||||
if (queryTextContentEvent.mReply.mString.IsEmpty()) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, there is no contents"));
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@ -1617,7 +1617,7 @@ nsGtkIMModule::DeleteText(GtkIMContext* aContext,
|
||||
glong offsetInUTF8Characters =
|
||||
g_utf8_strlen(utf8Str.get(), utf8Str.Length()) + aOffset;
|
||||
if (offsetInUTF8Characters < 0) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, aOffset is too small for current cursor pos "
|
||||
"(computed offset: %d)",
|
||||
offsetInUTF8Characters));
|
||||
@ -1632,7 +1632,7 @@ nsGtkIMModule::DeleteText(GtkIMContext* aContext,
|
||||
glong endInUTF8Characters =
|
||||
offsetInUTF8Characters + aNChars;
|
||||
if (countOfCharactersInUTF8 < endInUTF8Characters) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, aNChars is too large for current contents "
|
||||
"(content length: %d, computed end offset: %d)",
|
||||
countOfCharactersInUTF8, endInUTF8Characters));
|
||||
@ -1666,7 +1666,7 @@ nsGtkIMModule::DeleteText(GtkIMContext* aContext,
|
||||
if (!selectionEvent.mSucceeded ||
|
||||
lastFocusedWindow != mLastFocusedWindow ||
|
||||
lastFocusedWindow->Destroyed()) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, setting selection caused focus change "
|
||||
"or window destroyed"));
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -1681,7 +1681,7 @@ nsGtkIMModule::DeleteText(GtkIMContext* aContext,
|
||||
if (!contentCommandEvent.mSucceeded ||
|
||||
lastFocusedWindow != mLastFocusedWindow ||
|
||||
lastFocusedWindow->Destroyed()) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, deleting the selection caused focus change "
|
||||
"or window destroyed"));
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -1693,7 +1693,7 @@ nsGtkIMModule::DeleteText(GtkIMContext* aContext,
|
||||
|
||||
// Restore the composition at new caret position.
|
||||
if (!DispatchCompositionStart(aContext)) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, resterting composition start"));
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@ -1705,7 +1705,7 @@ nsGtkIMModule::DeleteText(GtkIMContext* aContext,
|
||||
nsAutoString compositionString;
|
||||
GetCompositionString(aContext, compositionString);
|
||||
if (!DispatchCompositionChangeEvent(aContext, compositionString)) {
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gGtkIMLog, PR_LOG_INFO,
|
||||
(" FAILED, restoring composition string"));
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ KeymapWrapper::KeymapWrapper() :
|
||||
if (!gKeymapWrapperLog) {
|
||||
gKeymapWrapperLog = PR_NewLogModule("KeymapWrapperWidgets");
|
||||
}
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): Constructor, mGdkKeymap=%p",
|
||||
this, mGdkKeymap));
|
||||
|
||||
@ -181,7 +181,7 @@ KeymapWrapper::Init()
|
||||
}
|
||||
mInitialized = true;
|
||||
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): Init, mGdkKeymap=%p",
|
||||
this, mGdkKeymap));
|
||||
|
||||
@ -193,7 +193,7 @@ KeymapWrapper::Init()
|
||||
|
||||
gdk_window_add_filter(nullptr, FilterEvents, this);
|
||||
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): Init, CapsLock=0x%X, NumLock=0x%X, "
|
||||
"ScrollLock=0x%X, Level3=0x%X, Level5=0x%X, "
|
||||
"Shift=0x%X, Ctrl=0x%X, Alt=0x%X, Meta=0x%X, Super=0x%X, Hyper=0x%X",
|
||||
@ -214,7 +214,7 @@ KeymapWrapper::InitXKBExtension()
|
||||
int xkbMajorVer = XkbMajorVersion;
|
||||
int xkbMinorVer = XkbMinorVersion;
|
||||
if (!XkbLibraryVersion(&xkbMajorVer, &xkbMinorVer)) {
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitXKBExtension failed due to failure of "
|
||||
"XkbLibraryVersion()", this));
|
||||
return;
|
||||
@ -232,7 +232,7 @@ KeymapWrapper::InitXKBExtension()
|
||||
int opcode, baseErrorCode;
|
||||
if (!XkbQueryExtension(display, &opcode, &mXKBBaseEventCode, &baseErrorCode,
|
||||
&xkbMajorVer, &xkbMinorVer)) {
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitXKBExtension failed due to failure of "
|
||||
"XkbQueryExtension(), display=0x%p", this, display));
|
||||
return;
|
||||
@ -240,7 +240,7 @@ KeymapWrapper::InitXKBExtension()
|
||||
|
||||
if (!XkbSelectEventDetails(display, XkbUseCoreKbd, XkbStateNotify,
|
||||
XkbModifierStateMask, XkbModifierStateMask)) {
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitXKBExtension failed due to failure of "
|
||||
"XkbSelectEventDetails() for XModifierStateMask, display=0x%p",
|
||||
this, display));
|
||||
@ -249,7 +249,7 @@ KeymapWrapper::InitXKBExtension()
|
||||
|
||||
if (!XkbSelectEventDetails(display, XkbUseCoreKbd, XkbControlsNotify,
|
||||
XkbPerKeyRepeatMask, XkbPerKeyRepeatMask)) {
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitXKBExtension failed due to failure of "
|
||||
"XkbSelectEventDetails() for XkbControlsNotify, display=0x%p",
|
||||
this, display));
|
||||
@ -257,21 +257,21 @@ KeymapWrapper::InitXKBExtension()
|
||||
}
|
||||
|
||||
if (!XGetKeyboardControl(display, &mKeyboardState)) {
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitXKBExtension failed due to failure of "
|
||||
"XGetKeyboardControl(), display=0x%p",
|
||||
this, display));
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitXKBExtension, Succeeded", this));
|
||||
}
|
||||
|
||||
void
|
||||
KeymapWrapper::InitBySystemSettings()
|
||||
{
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitBySystemSettings, mGdkKeymap=%p",
|
||||
this, mGdkKeymap));
|
||||
|
||||
@ -287,7 +287,7 @@ KeymapWrapper::InitBySystemSettings()
|
||||
max_keycode - min_keycode + 1,
|
||||
&keysyms_per_keycode);
|
||||
if (!xkeymap) {
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitBySystemSettings, "
|
||||
"Failed due to null xkeymap", this));
|
||||
return;
|
||||
@ -295,13 +295,13 @@ KeymapWrapper::InitBySystemSettings()
|
||||
|
||||
XModifierKeymap* xmodmap = XGetModifierMapping(display);
|
||||
if (!xmodmap) {
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitBySystemSettings, "
|
||||
"Failed due to null xmodmap", this));
|
||||
XFree(xkeymap);
|
||||
return;
|
||||
}
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitBySystemSettings, min_keycode=%d, "
|
||||
"max_keycode=%d, keysyms_per_keycode=%d, max_keypermod=%d",
|
||||
this, min_keycode, max_keycode, keysyms_per_keycode,
|
||||
@ -328,7 +328,7 @@ KeymapWrapper::InitBySystemSettings()
|
||||
const uint32_t map_size = 8 * xmodmap->max_keypermod;
|
||||
for (uint32_t i = 0; i < map_size; i++) {
|
||||
KeyCode keycode = xmodmap->modifiermap[i];
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitBySystemSettings, "
|
||||
" i=%d, keycode=0x%08X",
|
||||
this, i, keycode));
|
||||
@ -355,7 +355,7 @@ KeymapWrapper::InitBySystemSettings()
|
||||
const int32_t modIndex = bit - 3;
|
||||
for (int32_t j = 0; j < keysyms_per_keycode; j++) {
|
||||
Modifier modifier = GetModifierForGDKKeyval(syms[j]);
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitBySystemSettings, "
|
||||
" Mod%d, j=%d, syms[j]=%s(0x%X), modifier=%s",
|
||||
this, modIndex + 1, j, gdk_keyval_name(syms[j]), syms[j],
|
||||
@ -437,7 +437,7 @@ KeymapWrapper::~KeymapWrapper()
|
||||
{
|
||||
gdk_window_remove_filter(nullptr, FilterEvents, this);
|
||||
NS_IF_RELEASE(sBidiKeyboard);
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): Destructor", this));
|
||||
}
|
||||
|
||||
@ -500,7 +500,7 @@ KeymapWrapper::FilterEvents(GdkXEvent* aXEvent,
|
||||
}
|
||||
if (!XGetKeyboardControl(xkbEvent->any.display,
|
||||
&self->mKeyboardState)) {
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): FilterEvents failed due to failure "
|
||||
"of XGetKeyboardControl(), display=0x%p",
|
||||
self, xkbEvent->any.display));
|
||||
@ -516,7 +516,7 @@ KeymapWrapper::FilterEvents(GdkXEvent* aXEvent,
|
||||
KeymapWrapper::OnDestroyKeymap(KeymapWrapper* aKeymapWrapper,
|
||||
GdkKeymap *aGdkKeymap)
|
||||
{
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper: OnDestroyKeymap, aGdkKeymap=%p, aKeymapWrapper=%p",
|
||||
aGdkKeymap, aKeymapWrapper));
|
||||
MOZ_ASSERT(aKeymapWrapper == sInstance,
|
||||
@ -529,7 +529,7 @@ KeymapWrapper::OnDestroyKeymap(KeymapWrapper* aKeymapWrapper,
|
||||
KeymapWrapper::OnKeysChanged(GdkKeymap *aGdkKeymap,
|
||||
KeymapWrapper* aKeymapWrapper)
|
||||
{
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper: OnKeysChanged, aGdkKeymap=%p, aKeymapWrapper=%p",
|
||||
aGdkKeymap, aKeymapWrapper));
|
||||
|
||||
@ -973,7 +973,7 @@ KeymapWrapper::InitKeyEvent(WidgetKeyboardEvent& aKeyEvent,
|
||||
break;
|
||||
}
|
||||
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitKeyEvent, modifierState=0x%08X "
|
||||
"aGdkKeyEvent={ type=%s, keyval=%s(0x%X), state=0x%08X, "
|
||||
"hardware_keycode=0x%08X, is_modifier=%s } "
|
||||
@ -1330,7 +1330,7 @@ KeymapWrapper::InitKeypressEvent(WidgetKeyboardEvent& aKeyEvent,
|
||||
|
||||
aKeyEvent.charCode = GetCharCodeFor(aGdkKeyEvent);
|
||||
if (!aKeyEvent.charCode) {
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitKeypressEvent, "
|
||||
"keyCode=0x%02X, charCode=0x%08X",
|
||||
this, aKeyEvent.keyCode, aKeyEvent.charCode));
|
||||
@ -1345,7 +1345,7 @@ KeymapWrapper::InitKeypressEvent(WidgetKeyboardEvent& aKeyEvent,
|
||||
// work.
|
||||
if (!aKeyEvent.IsControl() && !aKeyEvent.IsAlt() &&
|
||||
!aKeyEvent.IsMeta() && !aKeyEvent.IsOS()) {
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitKeypressEvent, "
|
||||
"keyCode=0x%02X, charCode=0x%08X",
|
||||
this, aKeyEvent.keyCode, aKeyEvent.charCode));
|
||||
@ -1354,7 +1354,7 @@ KeymapWrapper::InitKeypressEvent(WidgetKeyboardEvent& aKeyEvent,
|
||||
|
||||
gint level = GetKeyLevel(aGdkKeyEvent);
|
||||
if (level != 0 && level != 1) {
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitKeypressEvent, "
|
||||
"keyCode=0x%02X, charCode=0x%08X, level=%d",
|
||||
this, aKeyEvent.keyCode, aKeyEvent.charCode, level));
|
||||
@ -1394,7 +1394,7 @@ KeymapWrapper::InitKeypressEvent(WidgetKeyboardEvent& aKeyEvent,
|
||||
// If current keyboard layout can input Latin characters, we don't need
|
||||
// more information.
|
||||
if (!needLatinKeyCodes) {
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitKeypressEvent, keyCode=0x%02X, "
|
||||
"charCode=0x%08X, level=%d, altCharCodes={ "
|
||||
"mUnshiftedCharCode=0x%08X, mShiftedCharCode=0x%08X }",
|
||||
@ -1406,7 +1406,7 @@ KeymapWrapper::InitKeypressEvent(WidgetKeyboardEvent& aKeyEvent,
|
||||
// Next, find Latin inputtable keyboard layout.
|
||||
gint minGroup = GetFirstLatinGroup();
|
||||
if (minGroup < 0) {
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitKeypressEvent, "
|
||||
"Latin keyboard layout isn't found: "
|
||||
"keyCode=0x%02X, charCode=0x%08X, level=%d, "
|
||||
@ -1447,7 +1447,7 @@ KeymapWrapper::InitKeypressEvent(WidgetKeyboardEvent& aKeyEvent,
|
||||
aKeyEvent.charCode = ch;
|
||||
}
|
||||
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gKeymapWrapperLog, PR_LOG_INFO,
|
||||
("KeymapWrapper(%p): InitKeypressEvent, "
|
||||
"keyCode=0x%02X, charCode=0x%08X, level=%d, minGroup=%d, "
|
||||
"altCharCodes={ mUnshiftedCharCode=0x%08X, "
|
||||
|
@ -679,7 +679,7 @@ nsIdleService::IdleTimerCallback(void)
|
||||
uint32_t currentIdleTimeInMS;
|
||||
|
||||
if (NS_FAILED(GetIdleTime(¤tIdleTimeInMS))) {
|
||||
MOZ_LOG(sLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sLog, PR_LOG_INFO,
|
||||
("idleService: Idle timer callback: failed to get idle time"));
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
__android_log_print(LOG_LEVEL, LOG_TAG,
|
||||
|
@ -127,14 +127,14 @@ MouseScrollHandler::MouseScrollHandler() :
|
||||
mIsWaitingInternalMessage(false),
|
||||
mSynthesizingEvent(nullptr)
|
||||
{
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll: Creating an instance, this=%p, sInstance=%p",
|
||||
this, sInstance));
|
||||
}
|
||||
|
||||
MouseScrollHandler::~MouseScrollHandler()
|
||||
{
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll: Destroying an instance, this=%p, sInstance=%p",
|
||||
this, sInstance));
|
||||
|
||||
@ -221,7 +221,7 @@ MouseScrollHandler::ProcessMessage(nsWindowBase* aWidget, UINT msg,
|
||||
|
||||
case WM_KEYDOWN:
|
||||
case WM_KEYUP:
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::ProcessMessage(): aWidget=%p, "
|
||||
"msg=%s(0x%04X), wParam=0x%02X, ::GetMessageTime()=%d",
|
||||
aWidget, msg == WM_KEYDOWN ? "WM_KEYDOWN" :
|
||||
@ -360,7 +360,7 @@ MouseScrollHandler::ComputeMessagePos(UINT aMessage,
|
||||
POINT point;
|
||||
if (Device::SetPoint::IsGetMessagePosResponseValid(aMessage,
|
||||
aWParam, aLParam)) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::ComputeMessagePos: Using ::GetCursorPos()"));
|
||||
::GetCursorPos(&point);
|
||||
} else {
|
||||
@ -384,7 +384,7 @@ MouseScrollHandler::ProcessNativeMouseWheelMessage(nsWindowBase* aWidget,
|
||||
|
||||
POINT point = ComputeMessagePos(aMessage, aWParam, aLParam);
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::ProcessNativeMouseWheelMessage: aWidget=%p, "
|
||||
"aMessage=%s, wParam=0x%08X, lParam=0x%08X, point: { x=%d, y=%d }",
|
||||
aWidget, aMessage == WM_MOUSEWHEEL ? "WM_MOUSEWHEEL" :
|
||||
@ -395,7 +395,7 @@ MouseScrollHandler::ProcessNativeMouseWheelMessage(nsWindowBase* aWidget,
|
||||
|
||||
HWND underCursorWnd = ::WindowFromPoint(point);
|
||||
if (!underCursorWnd) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::ProcessNativeMouseWheelMessage: "
|
||||
"No window is not found under the cursor"));
|
||||
return;
|
||||
@ -409,7 +409,7 @@ MouseScrollHandler::ProcessNativeMouseWheelMessage(nsWindowBase* aWidget,
|
||||
// be beneath the cursor if that window wasn't there.
|
||||
underCursorWnd = WinUtils::FindOurWindowAtPoint(point);
|
||||
if (!underCursorWnd) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::ProcessNativeMouseWheelMessage: "
|
||||
"Our window is not found under the Elantech helper window"));
|
||||
return;
|
||||
@ -422,7 +422,7 @@ MouseScrollHandler::ProcessNativeMouseWheelMessage(nsWindowBase* aWidget,
|
||||
if (WinUtils::IsOurProcessWindow(underCursorWnd)) {
|
||||
nsWindowBase* destWindow = WinUtils::GetNSWindowBasePtr(underCursorWnd);
|
||||
if (!destWindow) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::ProcessNativeMouseWheelMessage: "
|
||||
"Found window under the cursor isn't managed by nsWindow..."));
|
||||
HWND wnd = ::GetParent(underCursorWnd);
|
||||
@ -433,7 +433,7 @@ MouseScrollHandler::ProcessNativeMouseWheelMessage(nsWindowBase* aWidget,
|
||||
}
|
||||
}
|
||||
if (!wnd) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::ProcessNativeMouseWheelMessage: Our window which is "
|
||||
"managed by nsWindow is not found under the cursor"));
|
||||
return;
|
||||
@ -450,13 +450,13 @@ MouseScrollHandler::ProcessNativeMouseWheelMessage(nsWindowBase* aWidget,
|
||||
if (destWindow->IsPlugin()) {
|
||||
destWindow = destWindow->GetParentWindowBase(false);
|
||||
if (!destWindow) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::ProcessNativeMouseWheelMessage: "
|
||||
"Our window which is a parent of a plugin window is not found"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::ProcessNativeMouseWheelMessage: Succeeded, "
|
||||
"Posting internal message to an nsWindow (%p)...",
|
||||
destWindow));
|
||||
@ -475,7 +475,7 @@ MouseScrollHandler::ProcessNativeMouseWheelMessage(nsWindowBase* aWidget,
|
||||
// If there is no plugin window in ancestors of the window under cursor,
|
||||
// the window is for another applications (case 2).
|
||||
// We don't need to handle this message.
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::ProcessNativeMouseWheelMessage: "
|
||||
"Our window is not found under the cursor"));
|
||||
return;
|
||||
@ -490,12 +490,12 @@ MouseScrollHandler::ProcessNativeMouseWheelMessage(nsWindowBase* aWidget,
|
||||
aWidget->GetWindowHandle() == pluginWnd) {
|
||||
nsWindowBase* destWindow = aWidget->GetParentWindowBase(false);
|
||||
if (!destWindow) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::ProcessNativeMouseWheelMessage: Our normal window which "
|
||||
"is a parent of this plugin window is not found"));
|
||||
return;
|
||||
}
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::ProcessNativeMouseWheelMessage: Succeeded, "
|
||||
"Posting internal message to an nsWindow (%p) which is parent of this "
|
||||
"plugin window...",
|
||||
@ -508,7 +508,7 @@ MouseScrollHandler::ProcessNativeMouseWheelMessage(nsWindowBase* aWidget,
|
||||
}
|
||||
|
||||
// If the window is a part of plugin, we should post the message to it.
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::ProcessNativeMouseWheelMessage: Succeeded, "
|
||||
"Redirecting the message to a window which is a plugin child window"));
|
||||
::PostMessage(underCursorWnd, aMessage, aWParam, aLParam);
|
||||
@ -534,7 +534,7 @@ MouseScrollHandler::ProcessNativeScrollMessage(nsWindowBase* aWidget,
|
||||
aWParam, aLParam);
|
||||
}
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::ProcessNativeScrollMessage: aWidget=%p, "
|
||||
"aMessage=%s, wParam=0x%08X, lParam=0x%08X",
|
||||
aWidget, aMessage == WM_VSCROLL ? "WM_VSCROLL" : "WM_HSCROLL",
|
||||
@ -597,7 +597,7 @@ MouseScrollHandler::HandleMouseWheelMessage(nsWindowBase* aWidget,
|
||||
"HandleMouseWheelMessage must be called with "
|
||||
"MOZ_WM_MOUSEVWHEEL or MOZ_WM_MOUSEHWHEEL");
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::HandleMouseWheelMessage: aWidget=%p, "
|
||||
"aMessage=MOZ_WM_MOUSE%sWHEEL, aWParam=0x%08X, aLParam=0x%08X",
|
||||
aWidget, aMessage == MOZ_WM_MOUSEVWHEEL ? "V" : "H",
|
||||
@ -608,7 +608,7 @@ MouseScrollHandler::HandleMouseWheelMessage(nsWindowBase* aWidget,
|
||||
EventInfo eventInfo(aWidget, WinUtils::GetNativeMessage(aMessage),
|
||||
aWParam, aLParam);
|
||||
if (!eventInfo.CanDispatchWheelEvent()) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::HandleMouseWheelMessage: Cannot dispatch the events"));
|
||||
mLastEventInfo.ResetTransaction();
|
||||
return;
|
||||
@ -630,12 +630,12 @@ MouseScrollHandler::HandleMouseWheelMessage(nsWindowBase* aWidget,
|
||||
|
||||
WidgetWheelEvent wheelEvent(true, NS_WHEEL_WHEEL, aWidget);
|
||||
if (mLastEventInfo.InitWheelEvent(aWidget, wheelEvent, modKeyState)) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::HandleMouseWheelMessage: dispatching "
|
||||
"NS_WHEEL_WHEEL event"));
|
||||
aWidget->DispatchWheelEvent(&wheelEvent);
|
||||
if (aWidget->Destroyed()) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::HandleMouseWheelMessage: The window was destroyed "
|
||||
"by NS_WHEEL_WHEEL event"));
|
||||
mLastEventInfo.ResetTransaction();
|
||||
@ -643,7 +643,7 @@ MouseScrollHandler::HandleMouseWheelMessage(nsWindowBase* aWidget,
|
||||
}
|
||||
}
|
||||
else {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::HandleMouseWheelMessage: NS_WHEEL_WHEEL event is not "
|
||||
"dispatched"));
|
||||
}
|
||||
@ -698,7 +698,7 @@ MouseScrollHandler::HandleScrollMessageAsMouseWheelMessage(nsWindowBase* aWidget
|
||||
// the original message was received.
|
||||
InitEvent(aWidget, wheelEvent);
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::HandleScrollMessageAsMouseWheelMessage: aWidget=%p, "
|
||||
"aMessage=MOZ_WM_%sSCROLL, aWParam=0x%08X, aLParam=0x%08X, "
|
||||
"wheelEvent { refPoint: { x: %d, y: %d }, deltaX: %f, deltaY: %f, "
|
||||
@ -791,7 +791,7 @@ MouseScrollHandler::LastEventInfo::ResetTransaction()
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::LastEventInfo::ResetTransaction()"));
|
||||
|
||||
mWnd = nullptr;
|
||||
@ -853,7 +853,7 @@ MouseScrollHandler::LastEventInfo::InitWheelEvent(
|
||||
mAccumulatedDelta -=
|
||||
lineOrPageDelta * orienter * RoundDelta(nativeDeltaPerUnit);
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::LastEventInfo::InitWheelEvent: aWidget=%p, "
|
||||
"aWheelEvent { refPoint: { x: %d, y: %d }, deltaX: %f, deltaY: %f, "
|
||||
"lineOrPageDeltaX: %d, lineOrPageDeltaY: %d, "
|
||||
@ -891,20 +891,20 @@ MouseScrollHandler::SystemSettings::Init()
|
||||
mScrollLines = userPrefs.GetOverriddenVerticalScrollAmout();
|
||||
if (mScrollLines >= 0) {
|
||||
// overridden by the pref.
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::SystemSettings::Init(): mScrollLines is overridden by "
|
||||
"the pref: %d",
|
||||
mScrollLines));
|
||||
} else if (!::SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0,
|
||||
&mScrollLines, 0)) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::SystemSettings::Init(): ::SystemParametersInfo("
|
||||
"SPI_GETWHEELSCROLLLINES) failed"));
|
||||
mScrollLines = 3;
|
||||
}
|
||||
|
||||
if (mScrollLines > WHEEL_DELTA) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::SystemSettings::Init(): the result of "
|
||||
"::SystemParametersInfo(SPI_GETWHEELSCROLLLINES) is too large: %d",
|
||||
mScrollLines));
|
||||
@ -920,13 +920,13 @@ MouseScrollHandler::SystemSettings::Init()
|
||||
mScrollChars = userPrefs.GetOverriddenHorizontalScrollAmout();
|
||||
if (mScrollChars >= 0) {
|
||||
// overridden by the pref.
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::SystemSettings::Init(): mScrollChars is overridden by "
|
||||
"the pref: %d",
|
||||
mScrollChars));
|
||||
} else if (!::SystemParametersInfo(SPI_GETWHEELSCROLLCHARS, 0,
|
||||
&mScrollChars, 0)) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::SystemSettings::Init(): ::SystemParametersInfo("
|
||||
"SPI_GETWHEELSCROLLCHARS) failed, %s",
|
||||
IsVistaOrLater() ?
|
||||
@ -936,7 +936,7 @@ MouseScrollHandler::SystemSettings::Init()
|
||||
}
|
||||
|
||||
if (mScrollChars > WHEEL_DELTA) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::SystemSettings::Init(): the result of "
|
||||
"::SystemParametersInfo(SPI_GETWHEELSCROLLCHARS) is too large: %d",
|
||||
mScrollChars));
|
||||
@ -944,7 +944,7 @@ MouseScrollHandler::SystemSettings::Init()
|
||||
mScrollChars = WHEEL_PAGESCROLL;
|
||||
}
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::SystemSettings::Init(): initialized, "
|
||||
"mScrollLines=%d, mScrollChars=%d",
|
||||
mScrollLines, mScrollChars));
|
||||
@ -953,7 +953,7 @@ MouseScrollHandler::SystemSettings::Init()
|
||||
void
|
||||
MouseScrollHandler::SystemSettings::MarkDirty()
|
||||
{
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScrollHandler::SystemSettings::MarkDirty(): "
|
||||
"Marking SystemSettings dirty"));
|
||||
mInitialized = false;
|
||||
@ -1007,7 +1007,7 @@ MouseScrollHandler::UserPrefs::Init()
|
||||
Preferences::GetInt("mousewheel.windows.transaction.timeout",
|
||||
DEFAULT_TIMEOUT_DURATION);
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::UserPrefs::Init(): initialized, "
|
||||
"mScrollMessageHandledAsWheelMessage=%s, "
|
||||
"mOverriddenVerticalScrollAmount=%d, "
|
||||
@ -1021,7 +1021,7 @@ MouseScrollHandler::UserPrefs::Init()
|
||||
void
|
||||
MouseScrollHandler::UserPrefs::MarkDirty()
|
||||
{
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScrollHandler::UserPrefs::MarkDirty(): Marking UserPrefs dirty"));
|
||||
mInitialized = false;
|
||||
// Some prefs might override system settings, so, we should mark them dirty.
|
||||
@ -1045,21 +1045,21 @@ MouseScrollHandler::Device::GetWorkaroundPref(const char* aPrefName,
|
||||
bool aValueIfAutomatic)
|
||||
{
|
||||
if (!aPrefName) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::GetWorkaroundPref(): Failed, aPrefName is NULL"));
|
||||
return aValueIfAutomatic;
|
||||
}
|
||||
|
||||
int32_t lHackValue = 0;
|
||||
if (NS_FAILED(Preferences::GetInt(aPrefName, &lHackValue))) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::GetWorkaroundPref(): Preferences::GetInt() failed,"
|
||||
" aPrefName=\"%s\", aValueIfAutomatic=%s",
|
||||
aPrefName, GetBoolName(aValueIfAutomatic)));
|
||||
return aValueIfAutomatic;
|
||||
}
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::GetWorkaroundPref(): Succeeded, "
|
||||
"aPrefName=\"%s\", aValueIfAutomatic=%s, lHackValue=%d",
|
||||
aPrefName, GetBoolName(aValueIfAutomatic), lHackValue));
|
||||
@ -1083,7 +1083,7 @@ MouseScrollHandler::Device::Init()
|
||||
(TrackPoint::IsDriverInstalled() ||
|
||||
UltraNav::IsObsoleteDriverInstalled()));
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::Init(): sFakeScrollableWindowNeeded=%s",
|
||||
GetBoolName(sFakeScrollableWindowNeeded)));
|
||||
|
||||
@ -1107,7 +1107,7 @@ MouseScrollHandler::Device::Elantech::Init()
|
||||
sUseSwipeHack = needsHack && version <= 7;
|
||||
sUsePinchHack = needsHack && version <= 8;
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::Elantech::Init(): version=%d, sUseSwipeHack=%s, "
|
||||
"sUsePinchHack=%s",
|
||||
version, GetBoolName(sUseSwipeHack), GetBoolName(sUsePinchHack)));
|
||||
@ -1211,7 +1211,7 @@ MouseScrollHandler::Device::Elantech::HandleKeyMessage(nsWindowBase* aWidget,
|
||||
(aWParam == VK_NEXT || aWParam == VK_PRIOR) &&
|
||||
(IS_VK_DOWN(0xFF) || IS_VK_DOWN(0xCC))) {
|
||||
if (aMsg == WM_KEYDOWN) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::Elantech::HandleKeyMessage(): Dispatching "
|
||||
"%s command event",
|
||||
aWParam == VK_NEXT ? "Forward" : "Back"));
|
||||
@ -1222,7 +1222,7 @@ MouseScrollHandler::Device::Elantech::HandleKeyMessage(nsWindowBase* aWidget,
|
||||
aWidget->DispatchWindowEvent(&commandEvent);
|
||||
}
|
||||
else {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::Elantech::HandleKeyMessage(): Consumed"));
|
||||
}
|
||||
return true; // consume the message (doesn't need to dispatch key events)
|
||||
@ -1250,7 +1250,7 @@ MouseScrollHandler::Device::Elantech::HandleKeyMessage(nsWindowBase* aWidget,
|
||||
// that are more easily comparable.
|
||||
sZoomUntil = ::GetTickCount() & 0x7FFFFFFF;
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::Elantech::HandleKeyMessage(): sZoomUntil=%d",
|
||||
sZoomUntil));
|
||||
}
|
||||
@ -1281,7 +1281,7 @@ MouseScrollHandler::Device::Elantech::UpdateZoomUntil()
|
||||
(sZoomUntil < DWORD(msgTime))) {
|
||||
sZoomUntil = 0;
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::Elantech::UpdateZoomUntil(): "
|
||||
"sZoomUntil was reset"));
|
||||
}
|
||||
@ -1309,7 +1309,7 @@ MouseScrollHandler::Device::TrackPoint::IsDriverInstalled()
|
||||
{
|
||||
if (WinUtils::HasRegistryKey(HKEY_CURRENT_USER,
|
||||
L"Software\\Lenovo\\TrackPoint")) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::TrackPoint::IsDriverInstalled(): "
|
||||
"Lenovo's TrackPoint driver is found"));
|
||||
return true;
|
||||
@ -1317,7 +1317,7 @@ MouseScrollHandler::Device::TrackPoint::IsDriverInstalled()
|
||||
|
||||
if (WinUtils::HasRegistryKey(HKEY_CURRENT_USER,
|
||||
L"Software\\Alps\\Apoint\\TrackPoint")) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::TrackPoint::IsDriverInstalled(): "
|
||||
"Alps's TrackPoint driver is found"));
|
||||
}
|
||||
@ -1337,7 +1337,7 @@ MouseScrollHandler::Device::UltraNav::IsObsoleteDriverInstalled()
|
||||
{
|
||||
if (WinUtils::HasRegistryKey(HKEY_CURRENT_USER,
|
||||
L"Software\\Lenovo\\UltraNav")) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::UltraNav::IsObsoleteDriverInstalled(): "
|
||||
"Lenovo's UltraNav driver is found"));
|
||||
return true;
|
||||
@ -1346,13 +1346,13 @@ MouseScrollHandler::Device::UltraNav::IsObsoleteDriverInstalled()
|
||||
bool installed = false;
|
||||
if (WinUtils::HasRegistryKey(HKEY_CURRENT_USER,
|
||||
L"Software\\Synaptics\\SynTPEnh\\UltraNavUSB")) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::UltraNav::IsObsoleteDriverInstalled(): "
|
||||
"Synaptics's UltraNav (USB) driver is found"));
|
||||
installed = true;
|
||||
} else if (WinUtils::HasRegistryKey(HKEY_CURRENT_USER,
|
||||
L"Software\\Synaptics\\SynTPEnh\\UltraNavPS2")) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::UltraNav::IsObsoleteDriverInstalled(): "
|
||||
"Synaptics's UltraNav (PS/2) driver is found"));
|
||||
installed = true;
|
||||
@ -1369,7 +1369,7 @@ MouseScrollHandler::Device::UltraNav::IsObsoleteDriverInstalled()
|
||||
L"DriverVersion",
|
||||
buf, sizeof buf);
|
||||
if (!foundKey) {
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::UltraNav::IsObsoleteDriverInstalled(): "
|
||||
"Failed to get UltraNav driver version"));
|
||||
return false;
|
||||
@ -1381,7 +1381,7 @@ MouseScrollHandler::Device::UltraNav::IsObsoleteDriverInstalled()
|
||||
if (p) {
|
||||
minorVersion = wcstol(p + 1, nullptr, 10);
|
||||
}
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::UltraNav::IsObsoleteDriverInstalled(): "
|
||||
"found driver version = %d.%d",
|
||||
majorVersion, minorVersion));
|
||||
@ -1421,14 +1421,14 @@ MouseScrollHandler::Device::SetPoint::IsGetMessagePosResponseValid(
|
||||
if (!sMightBeUsing && !aLParam && aLParam != messagePos &&
|
||||
::InSendMessage()) {
|
||||
sMightBeUsing = true;
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::SetPoint::IsGetMessagePosResponseValid(): "
|
||||
"Might using SetPoint"));
|
||||
} else if (sMightBeUsing && aLParam != 0 && ::InSendMessage()) {
|
||||
// The user has changed the mouse from Logitech's to another one (e.g.,
|
||||
// the user has changed to the touchpad of the notebook.
|
||||
sMightBeUsing = false;
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScroll::Device::SetPoint::IsGetMessagePosResponseValid(): "
|
||||
"Might stop using SetPoint"));
|
||||
}
|
||||
@ -1459,7 +1459,7 @@ MouseScrollHandler::SynthesizingEvent::Synthesize(const POINTS& aCursorPoint,
|
||||
LPARAM aLParam,
|
||||
const BYTE (&aKeyStates)[256])
|
||||
{
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScrollHandler::SynthesizingEvent::Synthesize(): aCursorPoint: { "
|
||||
"x: %d, y: %d }, aWnd=0x%X, aMessage=0x%04X, aWParam=0x%08X, "
|
||||
"aLParam=0x%08X, IsSynthesized()=%s, mStatus=%s",
|
||||
@ -1515,7 +1515,7 @@ MouseScrollHandler::SynthesizingEvent::NativeMessageReceived(nsWindowBase* aWidg
|
||||
// Otherwise, the message may not be sent by us.
|
||||
}
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScrollHandler::SynthesizingEvent::NativeMessageReceived(): "
|
||||
"aWidget=%p, aWidget->GetWindowHandle()=0x%X, mWnd=0x%X, "
|
||||
"aMessage=0x%04X, aWParam=0x%08X, aLParam=0x%08X, mStatus=%s",
|
||||
@ -1535,7 +1535,7 @@ MouseScrollHandler::SynthesizingEvent::NotifyNativeMessageHandlingFinished()
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScrollHandler::SynthesizingEvent::"
|
||||
"NotifyNativeMessageHandlingFinished(): IsWaitingInternalMessage=%s",
|
||||
GetBoolName(MouseScrollHandler::IsWaitingInternalMessage())));
|
||||
@ -1558,7 +1558,7 @@ MouseScrollHandler::SynthesizingEvent::NotifyInternalMessageHandlingFinished()
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScrollHandler::SynthesizingEvent::"
|
||||
"NotifyInternalMessageHandlingFinished()"));
|
||||
|
||||
@ -1572,7 +1572,7 @@ MouseScrollHandler::SynthesizingEvent::Finish()
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gMouseScrollLog, PR_LOG_INFO,
|
||||
("MouseScrollHandler::SynthesizingEvent::Finish()"));
|
||||
|
||||
// Restore the original key state.
|
||||
|
@ -484,7 +484,7 @@ WinUtils::LogW(const wchar_t *fmt, ...)
|
||||
printf("%s\n", utf8);
|
||||
NS_ASSERTION(gWindowsLog, "Called WinUtils Log() but Widget "
|
||||
"log module doesn't exist!");
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, (utf8));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ERROR, (utf8));
|
||||
}
|
||||
delete[] utf8;
|
||||
}
|
||||
@ -518,7 +518,7 @@ WinUtils::Log(const char *fmt, ...)
|
||||
|
||||
NS_ASSERTION(gWindowsLog, "Called WinUtils Log() but Widget "
|
||||
"log module doesn't exist!");
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, (buffer));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ERROR, (buffer));
|
||||
delete[] buffer;
|
||||
}
|
||||
|
||||
|
@ -336,39 +336,39 @@ static void DisplayErrCode(HRESULT hres)
|
||||
{
|
||||
#if defined(DEBUG_rods) || defined(DEBUG_pinkerton)
|
||||
if (hres == E_INVALIDARG) {
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_ALWAYS, ("E_INVALIDARG\n"));
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_INFO, ("E_INVALIDARG\n"));
|
||||
} else
|
||||
if (hres == E_UNEXPECTED) {
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_ALWAYS, ("E_UNEXPECTED\n"));
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_INFO, ("E_UNEXPECTED\n"));
|
||||
} else
|
||||
if (hres == E_OUTOFMEMORY) {
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_ALWAYS, ("E_OUTOFMEMORY\n"));
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_INFO, ("E_OUTOFMEMORY\n"));
|
||||
} else
|
||||
if (hres == DV_E_LINDEX ) {
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_ALWAYS, ("DV_E_LINDEX\n"));
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_INFO, ("DV_E_LINDEX\n"));
|
||||
} else
|
||||
if (hres == DV_E_FORMATETC) {
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_ALWAYS, ("DV_E_FORMATETC\n"));
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_INFO, ("DV_E_FORMATETC\n"));
|
||||
} else
|
||||
if (hres == DV_E_TYMED) {
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_ALWAYS, ("DV_E_TYMED\n"));
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_INFO, ("DV_E_TYMED\n"));
|
||||
} else
|
||||
if (hres == DV_E_DVASPECT) {
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_ALWAYS, ("DV_E_DVASPECT\n"));
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_INFO, ("DV_E_DVASPECT\n"));
|
||||
} else
|
||||
if (hres == OLE_E_NOTRUNNING) {
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_ALWAYS, ("OLE_E_NOTRUNNING\n"));
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_INFO, ("OLE_E_NOTRUNNING\n"));
|
||||
} else
|
||||
if (hres == STG_E_MEDIUMFULL) {
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_ALWAYS, ("STG_E_MEDIUMFULL\n"));
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_INFO, ("STG_E_MEDIUMFULL\n"));
|
||||
} else
|
||||
if (hres == DV_E_CLIPFORMAT) {
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_ALWAYS, ("DV_E_CLIPFORMAT\n"));
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_INFO, ("DV_E_CLIPFORMAT\n"));
|
||||
} else
|
||||
if (hres == S_OK) {
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_ALWAYS, ("S_OK\n"));
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_INFO, ("S_OK\n"));
|
||||
} else {
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_INFO,
|
||||
("****** DisplayErrCode 0x%X\n", hres));
|
||||
}
|
||||
#endif
|
||||
@ -546,7 +546,7 @@ nsresult nsClipboard::GetNativeDataOffClipboard(IDataObject * aDataObject, UINT
|
||||
case TYMED_GDI:
|
||||
{
|
||||
#ifdef DEBUG
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWin32ClipboardLog, PR_LOG_INFO,
|
||||
("*********************** TYMED_GDI\n"));
|
||||
#endif
|
||||
} break;
|
||||
|
@ -546,7 +546,7 @@ STDMETHODIMP nsDataObj::GetData(LPFORMATETC aFormat, LPSTGMEDIUM pSTM)
|
||||
return GetFileContents ( *aFormat, *pSTM );
|
||||
if ( format == PreferredDropEffect )
|
||||
return GetPreferredDropEffect( *aFormat, *pSTM );
|
||||
//MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
//MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
// ("***** nsDataObj::GetData - Unknown format %u\n", format));
|
||||
return GetText(df, *aFormat, *pSTM);
|
||||
} //switch
|
||||
|
@ -279,7 +279,7 @@ nsIMM32Handler::InitKeyboardLayout(nsWindow* aWindow,
|
||||
MaybeAdjustCompositionFont(aWindow, sWritingModeOfCompositionFont, true);
|
||||
}
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: InitKeyboardLayout, aKeyboardLayout=%08x (\"%s\"), sCodePage=%lu, "
|
||||
"sIMEProperty=%s, sIMEUIProperty=%s",
|
||||
aKeyboardLayout, NS_ConvertUTF16toUTF8(sIMEName).get(),
|
||||
@ -316,16 +316,16 @@ nsIMM32Handler::nsIMM32Handler() :
|
||||
mIsComposing(false), mIsComposingOnPlugin(false),
|
||||
mNativeCaretIsCreated(false)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS, ("IMM32: nsIMM32Handler is created\n"));
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO, ("IMM32: nsIMM32Handler is created\n"));
|
||||
}
|
||||
|
||||
nsIMM32Handler::~nsIMM32Handler()
|
||||
{
|
||||
if (mIsComposing) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: ~nsIMM32Handler, ERROR, the instance is still composing\n"));
|
||||
}
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS, ("IMM32: nsIMM32Handler is destroyed\n"));
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO, ("IMM32: nsIMM32Handler is destroyed\n"));
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -347,7 +347,7 @@ nsIMM32Handler::EnsureAttributeArray(int32_t aCount)
|
||||
/* static */ void
|
||||
nsIMM32Handler::CommitComposition(nsWindow* aWindow, bool aForce)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: CommitComposition, aForce=%s, aWindow=%p, hWnd=%08x, mComposingWindow=%p%s\n",
|
||||
aForce ? "TRUE" : "FALSE",
|
||||
aWindow, aWindow->GetWindowHandle(),
|
||||
@ -361,7 +361,7 @@ nsIMM32Handler::CommitComposition(nsWindow* aWindow, bool aForce)
|
||||
|
||||
nsIMEContext IMEContext(aWindow->GetWindowHandle());
|
||||
bool associated = IMEContext.AssociateDefaultContext();
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: CommitComposition, associated=%s\n",
|
||||
associated ? "YES" : "NO"));
|
||||
|
||||
@ -378,7 +378,7 @@ nsIMM32Handler::CommitComposition(nsWindow* aWindow, bool aForce)
|
||||
/* static */ void
|
||||
nsIMM32Handler::CancelComposition(nsWindow* aWindow, bool aForce)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: CancelComposition, aForce=%s, aWindow=%p, hWnd=%08x, mComposingWindow=%p%s\n",
|
||||
aForce ? "TRUE" : "FALSE",
|
||||
aWindow, aWindow->GetWindowHandle(),
|
||||
@ -392,7 +392,7 @@ nsIMM32Handler::CancelComposition(nsWindow* aWindow, bool aForce)
|
||||
|
||||
nsIMEContext IMEContext(aWindow->GetWindowHandle());
|
||||
bool associated = IMEContext.AssociateDefaultContext();
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: CancelComposition, associated=%s\n",
|
||||
associated ? "YES" : "NO"));
|
||||
|
||||
@ -589,7 +589,7 @@ nsIMM32Handler::OnInputLangChange(nsWindow* aWindow,
|
||||
LPARAM lParam,
|
||||
MSGResult& aResult)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnInputLangChange, hWnd=%08x, wParam=%08x, lParam=%08x\n",
|
||||
aWindow->GetWindowHandle(), wParam, lParam));
|
||||
|
||||
@ -607,7 +607,7 @@ bool
|
||||
nsIMM32Handler::OnIMEStartComposition(nsWindow* aWindow,
|
||||
MSGResult& aResult)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMEStartComposition, hWnd=%08x, mIsComposing=%s\n",
|
||||
aWindow->GetWindowHandle(), mIsComposing ? "TRUE" : "FALSE"));
|
||||
aResult.mConsumed = ShouldDrawCompositionStringOurselves();
|
||||
@ -627,10 +627,10 @@ nsIMM32Handler::OnIMEComposition(nsWindow* aWindow,
|
||||
LPARAM lParam,
|
||||
MSGResult& aResult)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMEComposition, hWnd=%08x, lParam=%08x, mIsComposing=%s\n",
|
||||
aWindow->GetWindowHandle(), lParam, mIsComposing ? "TRUE" : "FALSE"));
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMEComposition, GCS_RESULTSTR=%s, GCS_COMPSTR=%s, GCS_COMPATTR=%s, GCS_COMPCLAUSE=%s, GCS_CURSORPOS=%s\n",
|
||||
lParam & GCS_RESULTSTR ? "YES" : "no",
|
||||
lParam & GCS_COMPSTR ? "YES" : "no",
|
||||
@ -650,7 +650,7 @@ bool
|
||||
nsIMM32Handler::OnIMEEndComposition(nsWindow* aWindow,
|
||||
MSGResult& aResult)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMEEndComposition, hWnd=%08x, mIsComposing=%s\n",
|
||||
aWindow->GetWindowHandle(), mIsComposing ? "TRUE" : "FALSE"));
|
||||
|
||||
@ -668,7 +668,7 @@ nsIMM32Handler::OnIMEEndComposition(nsWindow* aWindow,
|
||||
PM_NOREMOVE) &&
|
||||
compositionMsg.message == WM_IME_COMPOSITION &&
|
||||
IS_COMMITTING_LPARAM(compositionMsg.lParam)) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMEEndComposition, WM_IME_ENDCOMPOSITION is followed by "
|
||||
"WM_IME_COMPOSITION, ignoring the message..."));
|
||||
return true;
|
||||
@ -680,7 +680,7 @@ nsIMM32Handler::OnIMEEndComposition(nsWindow* aWindow,
|
||||
// event and a compositionend event.
|
||||
// XXX Shouldn't we dispatch the compositionchange event with actual or
|
||||
// latest composition string?
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMEEndComposition, mCompositionString=\"%s\"%s",
|
||||
NS_ConvertUTF16toUTF8(mCompositionString).get(),
|
||||
mCompositionString.IsEmpty() ? "" : ", but canceling it..."));
|
||||
@ -696,7 +696,7 @@ nsIMM32Handler::OnIMEChar(nsWindow* aWindow,
|
||||
LPARAM lParam,
|
||||
MSGResult& aResult)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMEChar, hWnd=%08x, char=%08x\n",
|
||||
aWindow->GetWindowHandle(), wParam));
|
||||
|
||||
@ -714,7 +714,7 @@ nsIMM32Handler::OnIMEChar(nsWindow* aWindow,
|
||||
nsIMM32Handler::OnIMECompositionFull(nsWindow* aWindow,
|
||||
MSGResult& aResult)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMECompositionFull, hWnd=%08x\n",
|
||||
aWindow->GetWindowHandle()));
|
||||
|
||||
@ -731,72 +731,72 @@ nsIMM32Handler::OnIMENotify(nsWindow* aWindow,
|
||||
{
|
||||
switch (wParam) {
|
||||
case IMN_CHANGECANDIDATE:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMENotify, hWnd=%08x, IMN_CHANGECANDIDATE, lParam=%08x\n",
|
||||
aWindow->GetWindowHandle(), lParam));
|
||||
break;
|
||||
case IMN_CLOSECANDIDATE:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMENotify, hWnd=%08x, IMN_CLOSECANDIDATE, lParam=%08x\n",
|
||||
aWindow->GetWindowHandle(), lParam));
|
||||
break;
|
||||
case IMN_CLOSESTATUSWINDOW:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMENotify, hWnd=%08x, IMN_CLOSESTATUSWINDOW\n",
|
||||
aWindow->GetWindowHandle()));
|
||||
break;
|
||||
case IMN_GUIDELINE:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMENotify, hWnd=%08x, IMN_GUIDELINE\n",
|
||||
aWindow->GetWindowHandle()));
|
||||
break;
|
||||
case IMN_OPENCANDIDATE:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMENotify, hWnd=%08x, IMN_OPENCANDIDATE, lParam=%08x\n",
|
||||
aWindow->GetWindowHandle(), lParam));
|
||||
break;
|
||||
case IMN_OPENSTATUSWINDOW:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMENotify, hWnd=%08x, IMN_OPENSTATUSWINDOW\n",
|
||||
aWindow->GetWindowHandle()));
|
||||
break;
|
||||
case IMN_SETCANDIDATEPOS:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMENotify, hWnd=%08x, IMN_SETCANDIDATEPOS, lParam=%08x\n",
|
||||
aWindow->GetWindowHandle(), lParam));
|
||||
break;
|
||||
case IMN_SETCOMPOSITIONFONT:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMENotify, hWnd=%08x, IMN_SETCOMPOSITIONFONT\n",
|
||||
aWindow->GetWindowHandle()));
|
||||
break;
|
||||
case IMN_SETCOMPOSITIONWINDOW:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMENotify, hWnd=%08x, IMN_SETCOMPOSITIONWINDOW\n",
|
||||
aWindow->GetWindowHandle()));
|
||||
break;
|
||||
case IMN_SETCONVERSIONMODE:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMENotify, hWnd=%08x, IMN_SETCONVERSIONMODE\n",
|
||||
aWindow->GetWindowHandle()));
|
||||
break;
|
||||
case IMN_SETOPENSTATUS:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMENotify, hWnd=%08x, IMN_SETOPENSTATUS\n",
|
||||
aWindow->GetWindowHandle()));
|
||||
break;
|
||||
case IMN_SETSENTENCEMODE:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMENotify, hWnd=%08x, IMN_SETSENTENCEMODE\n",
|
||||
aWindow->GetWindowHandle()));
|
||||
break;
|
||||
case IMN_SETSTATUSWINDOWPOS:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMENotify, hWnd=%08x, IMN_SETSTATUSWINDOWPOS\n",
|
||||
aWindow->GetWindowHandle()));
|
||||
break;
|
||||
case IMN_PRIVATE:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMENotify, hWnd=%08x, IMN_PRIVATE\n",
|
||||
aWindow->GetWindowHandle()));
|
||||
break;
|
||||
@ -815,26 +815,26 @@ nsIMM32Handler::OnIMERequest(nsWindow* aWindow,
|
||||
{
|
||||
switch (wParam) {
|
||||
case IMR_RECONVERTSTRING:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMERequest, hWnd=%08x, IMR_RECONVERTSTRING\n",
|
||||
aWindow->GetWindowHandle()));
|
||||
aResult.mConsumed = HandleReconvert(aWindow, lParam, &aResult.mResult);
|
||||
return true;
|
||||
case IMR_QUERYCHARPOSITION:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMERequest, hWnd=%08x, IMR_QUERYCHARPOSITION\n",
|
||||
aWindow->GetWindowHandle()));
|
||||
aResult.mConsumed =
|
||||
HandleQueryCharPosition(aWindow, lParam, &aResult.mResult);
|
||||
return true;
|
||||
case IMR_DOCUMENTFEED:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMERequest, hWnd=%08x, IMR_DOCUMENTFEED\n",
|
||||
aWindow->GetWindowHandle()));
|
||||
aResult.mConsumed = HandleDocumentFeed(aWindow, lParam, &aResult.mResult);
|
||||
return true;
|
||||
default:
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMERequest, hWnd=%08x, wParam=%08x\n",
|
||||
aWindow->GetWindowHandle(), wParam));
|
||||
aResult.mConsumed = false;
|
||||
@ -848,7 +848,7 @@ nsIMM32Handler::OnIMESelect(nsWindow* aWindow,
|
||||
LPARAM lParam,
|
||||
MSGResult& aResult)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMESelect, hWnd=%08x, wParam=%08x, lParam=%08x\n",
|
||||
aWindow->GetWindowHandle(), wParam, lParam));
|
||||
|
||||
@ -863,7 +863,7 @@ nsIMM32Handler::OnIMESetContext(nsWindow* aWindow,
|
||||
LPARAM lParam,
|
||||
MSGResult& aResult)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMESetContext, hWnd=%08x, %s, lParam=%08x\n",
|
||||
aWindow->GetWindowHandle(), wParam ? "Active" : "Deactive", lParam));
|
||||
|
||||
@ -877,7 +877,7 @@ nsIMM32Handler::OnIMESetContext(nsWindow* aWindow,
|
||||
// The top level window never becomes composing window, so, we can ignore
|
||||
// the WM_IME_SETCONTEXT on the top level window.
|
||||
if (IsTopLevelWindowOfComposition(aWindow)) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMESetContext, hWnd=%08x is top level window\n"));
|
||||
return true;
|
||||
}
|
||||
@ -892,7 +892,7 @@ nsIMM32Handler::OnIMESetContext(nsWindow* aWindow,
|
||||
|
||||
if (wParam && (lParam & ISC_SHOWUICOMPOSITIONWINDOW) &&
|
||||
ShouldDrawCompositionStringOurselves()) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMESetContext, ISC_SHOWUICOMPOSITIONWINDOW is removed\n"));
|
||||
lParam &= ~ISC_SHOWUICOMPOSITIONWINDOW;
|
||||
}
|
||||
@ -929,10 +929,10 @@ nsIMM32Handler::OnChar(nsWindow* aWindow,
|
||||
WPARAM recWParam;
|
||||
LPARAM recLParam;
|
||||
DequeueIMECharRecords(recWParam, recLParam);
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnChar, aWindow=%p, wParam=%08x, lParam=%08x,\n",
|
||||
aWindow->GetWindowHandle(), wParam, lParam));
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
(" recorded: wParam=%08x, lParam=%08x\n",
|
||||
recWParam, recLParam));
|
||||
// If an unexpected char message comes, we should reset the records,
|
||||
@ -958,7 +958,7 @@ nsIMM32Handler::OnIMEStartCompositionOnPlugin(nsWindow* aWindow,
|
||||
LPARAM lParam,
|
||||
MSGResult& aResult)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMEStartCompositionOnPlugin, hWnd=%08x, mIsComposingOnPlugin=%s\n",
|
||||
aWindow->GetWindowHandle(), mIsComposingOnPlugin ? "TRUE" : "FALSE"));
|
||||
mIsComposingOnPlugin = true;
|
||||
@ -980,11 +980,11 @@ nsIMM32Handler::OnIMECompositionOnPlugin(nsWindow* aWindow,
|
||||
LPARAM lParam,
|
||||
MSGResult& aResult)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMECompositionOnPlugin, hWnd=%08x, lParam=%08x, mIsComposingOnPlugin=%s\n",
|
||||
aWindow->GetWindowHandle(), lParam,
|
||||
mIsComposingOnPlugin ? "TRUE" : "FALSE"));
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMECompositionOnPlugin, GCS_RESULTSTR=%s, GCS_COMPSTR=%s, GCS_COMPATTR=%s, GCS_COMPCLAUSE=%s, GCS_CURSORPOS=%s\n",
|
||||
lParam & GCS_RESULTSTR ? "YES" : "no",
|
||||
lParam & GCS_COMPSTR ? "YES" : "no",
|
||||
@ -1014,7 +1014,7 @@ nsIMM32Handler::OnIMEEndCompositionOnPlugin(nsWindow* aWindow,
|
||||
LPARAM lParam,
|
||||
MSGResult& aResult)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMEEndCompositionOnPlugin, hWnd=%08x, mIsComposingOnPlugin=%s\n",
|
||||
aWindow->GetWindowHandle(), mIsComposingOnPlugin ? "TRUE" : "FALSE"));
|
||||
|
||||
@ -1038,7 +1038,7 @@ nsIMM32Handler::OnIMECharOnPlugin(nsWindow* aWindow,
|
||||
LPARAM lParam,
|
||||
MSGResult& aResult)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMECharOnPlugin, hWnd=%08x, char=%08x, scancode=%08x\n",
|
||||
aWindow->GetWindowHandle(), wParam, lParam));
|
||||
|
||||
@ -1059,7 +1059,7 @@ nsIMM32Handler::OnIMESetContextOnPlugin(nsWindow* aWindow,
|
||||
LPARAM lParam,
|
||||
MSGResult& aResult)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnIMESetContextOnPlugin, hWnd=%08x, %s, lParam=%08x\n",
|
||||
aWindow->GetWindowHandle(), wParam ? "Active" : "Deactive", lParam));
|
||||
|
||||
@ -1106,10 +1106,10 @@ nsIMM32Handler::OnCharOnPlugin(nsWindow* aWindow,
|
||||
WPARAM recWParam;
|
||||
LPARAM recLParam;
|
||||
DequeueIMECharRecords(recWParam, recLParam);
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnCharOnPlugin, aWindow=%p, wParam=%08x, lParam=%08x,\n",
|
||||
aWindow->GetWindowHandle(), wParam, lParam));
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
(" recorded: wParam=%08x, lParam=%08x\n",
|
||||
recWParam, recLParam));
|
||||
// If an unexpected char message comes, we should reset the records,
|
||||
@ -1139,7 +1139,7 @@ nsIMM32Handler::HandleStartComposition(nsWindow* aWindow,
|
||||
aWindow->InitEvent(selection, &point);
|
||||
aWindow->DispatchWindowEvent(&selection);
|
||||
if (!selection.mSucceeded) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleStartComposition, FAILED (NS_QUERY_SELECTED_TEXT)\n"));
|
||||
return;
|
||||
}
|
||||
@ -1155,7 +1155,7 @@ nsIMM32Handler::HandleStartComposition(nsWindow* aWindow,
|
||||
mIsComposing = true;
|
||||
mComposingWindow = aWindow;
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleStartComposition, START composition, mCompositionStart=%ld\n",
|
||||
mCompositionStart));
|
||||
}
|
||||
@ -1189,7 +1189,7 @@ nsIMM32Handler::HandleComposition(nsWindow* aWindow,
|
||||
WinUtils::PeekMessage(&msg2, wnd, WM_IME_ENDCOMPOSITION,
|
||||
WM_IME_COMPOSITION, PM_NOREMOVE) &&
|
||||
msg2.message == WM_IME_COMPOSITION) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleComposition, Ignores due to find a WM_IME_STARTCOMPOSITION\n"));
|
||||
return ShouldDrawCompositionStringOurselves();
|
||||
}
|
||||
@ -1207,7 +1207,7 @@ nsIMM32Handler::HandleComposition(nsWindow* aWindow,
|
||||
|
||||
GetCompositionString(aIMEContext, GCS_RESULTSTR, mCompositionString);
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleComposition, GCS_RESULTSTR\n"));
|
||||
|
||||
HandleEndComposition(aWindow, &mCompositionString);
|
||||
@ -1228,14 +1228,14 @@ nsIMM32Handler::HandleComposition(nsWindow* aWindow,
|
||||
//--------------------------------------------------------
|
||||
// 1. Get GCS_COMPSTR
|
||||
//--------------------------------------------------------
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleComposition, GCS_COMPSTR\n"));
|
||||
|
||||
nsAutoString previousCompositionString(mCompositionString);
|
||||
GetCompositionString(aIMEContext, GCS_COMPSTR, mCompositionString);
|
||||
|
||||
if (!IS_COMPOSING_LPARAM(lParam)) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleComposition, lParam doesn't indicate composing, "
|
||||
"mCompositionString=\"%s\", previousCompositionString=\"%s\"",
|
||||
NS_ConvertUTF16toUTF8(mCompositionString).get(),
|
||||
@ -1274,7 +1274,7 @@ nsIMM32Handler::HandleComposition(nsWindow* aWindow,
|
||||
// string is null (it indicates the composition transaction ended),
|
||||
// WM_IME_ENDCOMPOSITION may not be sent. If so, we cannot run
|
||||
// HandleEndComposition() in other place.
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleComposition, Aborting GCS_COMPSTR\n"));
|
||||
HandleEndComposition(aWindow);
|
||||
return IS_COMMITTING_LPARAM(lParam);
|
||||
@ -1297,7 +1297,7 @@ nsIMM32Handler::HandleComposition(nsWindow* aWindow,
|
||||
// API for it, however, we should not kill Unicode support on all IMEs.
|
||||
bool useA_API = !(sIMEProperty & IME_PROP_UNICODE);
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleComposition, GCS_COMPCLAUSE, useA_API=%s\n",
|
||||
useA_API ? "TRUE" : "FALSE"));
|
||||
|
||||
@ -1312,7 +1312,7 @@ nsIMM32Handler::HandleComposition(nsWindow* aWindow,
|
||||
clauseArrayLength2 /= sizeof(uint32_t);
|
||||
|
||||
if (clauseArrayLength != clauseArrayLength2) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleComposition, GCS_COMPCLAUSE, clauseArrayLength=%ld but clauseArrayLength2=%ld\n",
|
||||
clauseArrayLength, clauseArrayLength2));
|
||||
if (clauseArrayLength > clauseArrayLength2)
|
||||
@ -1341,7 +1341,7 @@ nsIMM32Handler::HandleComposition(nsWindow* aWindow,
|
||||
// may return an error code.
|
||||
mClauseArray.SetLength(std::max<long>(0, clauseArrayLength));
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleComposition, GCS_COMPCLAUSE, mClauseLength=%ld\n",
|
||||
mClauseArray.Length()));
|
||||
|
||||
@ -1367,7 +1367,7 @@ nsIMM32Handler::HandleComposition(nsWindow* aWindow,
|
||||
// error code.
|
||||
mAttributeArray.SetLength(std::max<long>(0, attrArrayLength));
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleComposition, GCS_COMPATTR, mAttributeLength=%ld\n",
|
||||
mAttributeArray.Length()));
|
||||
|
||||
@ -1388,7 +1388,7 @@ nsIMM32Handler::HandleComposition(nsWindow* aWindow,
|
||||
NS_ASSERTION(mCursorPosition <= (long)mCompositionString.Length(),
|
||||
"illegal pos");
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleComposition, GCS_CURSORPOS, mCursorPosition=%d\n",
|
||||
mCursorPosition));
|
||||
|
||||
@ -1409,7 +1409,7 @@ nsIMM32Handler::HandleEndComposition(nsWindow* aWindow,
|
||||
NS_PRECONDITION(!aWindow->PluginHasFocus(),
|
||||
"HandleComposition should not be called when a plug-in has focus");
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleEndComposition(aWindow=0x%p, aCommitString=0x%p (\"%s\"))",
|
||||
aWindow, aCommitString,
|
||||
aCommitString ? NS_ConvertUTF16toUTF8(*aCommitString).get() : ""));
|
||||
@ -1435,15 +1435,15 @@ nsIMM32Handler::HandleEndComposition(nsWindow* aWindow,
|
||||
static void
|
||||
DumpReconvertString(RECONVERTSTRING* aReconv)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
(" dwSize=%ld, dwVersion=%ld, dwStrLen=%ld, dwStrOffset=%ld\n",
|
||||
aReconv->dwSize, aReconv->dwVersion,
|
||||
aReconv->dwStrLen, aReconv->dwStrOffset));
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
(" dwCompStrLen=%ld, dwCompStrOffset=%ld, dwTargetStrLen=%ld, dwTargetStrOffset=%ld\n",
|
||||
aReconv->dwCompStrLen, aReconv->dwCompStrOffset,
|
||||
aReconv->dwTargetStrLen, aReconv->dwTargetStrOffset));
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
(" result str=\"%s\"\n",
|
||||
NS_ConvertUTF16toUTF8(
|
||||
nsAutoString((char16_t*)((char*)(aReconv) + aReconv->dwStrOffset),
|
||||
@ -1463,7 +1463,7 @@ nsIMM32Handler::HandleReconvert(nsWindow* aWindow,
|
||||
aWindow->InitEvent(selection, &point);
|
||||
aWindow->DispatchWindowEvent(&selection);
|
||||
if (!selection.mSucceeded) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleReconvert, FAILED (NS_QUERY_SELECTED_TEXT)\n"));
|
||||
return false;
|
||||
}
|
||||
@ -1474,19 +1474,19 @@ nsIMM32Handler::HandleReconvert(nsWindow* aWindow,
|
||||
if (!pReconv) {
|
||||
// Return need size to reconvert.
|
||||
if (len == 0) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleReconvert, There are not selected text\n"));
|
||||
return false;
|
||||
}
|
||||
*oResult = needSize;
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleReconvert, SUCCEEDED result=%ld\n",
|
||||
*oResult));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (pReconv->dwSize < needSize) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleReconvert, FAILED pReconv->dwSize=%ld, needSize=%ld\n",
|
||||
pReconv->dwSize, needSize));
|
||||
return false;
|
||||
@ -1506,7 +1506,7 @@ nsIMM32Handler::HandleReconvert(nsWindow* aWindow,
|
||||
::CopyMemory(reinterpret_cast<LPVOID>(lParam + sizeof(RECONVERTSTRING)),
|
||||
selection.mReply.mString.get(), len * sizeof(WCHAR));
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleReconvert, SUCCEEDED result=%ld\n",
|
||||
*oResult));
|
||||
DumpReconvertString(pReconv);
|
||||
@ -1523,24 +1523,24 @@ nsIMM32Handler::HandleQueryCharPosition(nsWindow* aWindow,
|
||||
*oResult = false;
|
||||
IMECHARPOSITION* pCharPosition = reinterpret_cast<IMECHARPOSITION*>(lParam);
|
||||
if (!pCharPosition) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleQueryCharPosition, FAILED (pCharPosition is null)\n"));
|
||||
return false;
|
||||
}
|
||||
if (pCharPosition->dwSize < sizeof(IMECHARPOSITION)) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleReconvert, FAILED, pCharPosition->dwSize=%ld, sizeof(IMECHARPOSITION)=%ld\n",
|
||||
pCharPosition->dwSize, sizeof(IMECHARPOSITION)));
|
||||
return false;
|
||||
}
|
||||
if (::GetFocus() != aWindow->GetWindowHandle()) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleReconvert, FAILED, ::GetFocus()=%08x, OurWindowHandle=%08x\n",
|
||||
::GetFocus(), aWindow->GetWindowHandle()));
|
||||
return false;
|
||||
}
|
||||
if (pCharPosition->dwCharPos > len) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleQueryCharPosition, FAILED, pCharPosition->dwCharPos=%ld, len=%ld\n",
|
||||
pCharPosition->dwCharPos, len));
|
||||
return false;
|
||||
@ -1589,7 +1589,7 @@ nsIMM32Handler::HandleQueryCharPosition(nsWindow* aWindow,
|
||||
|
||||
*oResult = TRUE;
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleQueryCharPosition, SUCCEEDED, pCharPosition={ pt={ x=%d, "
|
||||
"y=%d }, cLineHeight=%d, rcDocument={ left=%d, top=%d, right=%d, "
|
||||
"bottom=%d } }",
|
||||
@ -1618,7 +1618,7 @@ nsIMM32Handler::HandleDocumentFeed(nsWindow* aWindow,
|
||||
aWindow->InitEvent(selection, &point);
|
||||
aWindow->DispatchWindowEvent(&selection);
|
||||
if (!selection.mSucceeded) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleDocumentFeed, FAILED (NS_QUERY_SELECTED_TEXT)\n"));
|
||||
return false;
|
||||
}
|
||||
@ -1634,7 +1634,7 @@ nsIMM32Handler::HandleDocumentFeed(nsWindow* aWindow,
|
||||
// INT32_MAX.
|
||||
if (targetOffset < 0 || targetLength < 0 ||
|
||||
targetOffset + targetLength < 0) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleDocumentFeed, FAILED (The selection is out of range)\n"));
|
||||
return false;
|
||||
}
|
||||
@ -1645,14 +1645,14 @@ nsIMM32Handler::HandleDocumentFeed(nsWindow* aWindow,
|
||||
aWindow->InitEvent(textContent, &point);
|
||||
aWindow->DispatchWindowEvent(&textContent);
|
||||
if (!textContent.mSucceeded) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleDocumentFeed, FAILED (NS_QUERY_TEXT_CONTENT)\n"));
|
||||
return false;
|
||||
}
|
||||
|
||||
nsAutoString str(textContent.mReply.mString);
|
||||
if (targetOffset > int32_t(str.Length())) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleDocumentFeed, FAILED (The caret offset is invalid)\n"));
|
||||
return false;
|
||||
}
|
||||
@ -1673,14 +1673,14 @@ nsIMM32Handler::HandleDocumentFeed(nsWindow* aWindow,
|
||||
|
||||
if (!pReconv) {
|
||||
*oResult = needSize;
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleDocumentFeed, SUCCEEDED result=%ld\n",
|
||||
*oResult));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (pReconv->dwSize < needSize) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleDocumentFeed, FAILED pReconv->dwSize=%ld, needSize=%ld\n",
|
||||
pReconv->dwSize, needSize));
|
||||
return false;
|
||||
@ -1697,7 +1697,7 @@ nsIMM32Handler::HandleDocumentFeed(nsWindow* aWindow,
|
||||
// Set composition target clause information
|
||||
uint32_t offset, length;
|
||||
if (!GetTargetClauseRange(&offset, &length)) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleDocumentFeed, FAILED, by GetTargetClauseRange\n"));
|
||||
return false;
|
||||
}
|
||||
@ -1717,7 +1717,7 @@ nsIMM32Handler::HandleDocumentFeed(nsWindow* aWindow,
|
||||
::CopyMemory(reinterpret_cast<LPVOID>(lParam + sizeof(RECONVERTSTRING)),
|
||||
paragraph.BeginReading(), len * sizeof(WCHAR));
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: HandleDocumentFeed, SUCCEEDED result=%ld\n",
|
||||
*oResult));
|
||||
DumpReconvertString(pReconv);
|
||||
@ -1732,7 +1732,7 @@ nsIMM32Handler::CommitCompositionOnPreviousWindow(nsWindow* aWindow)
|
||||
return false;
|
||||
}
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: CommitCompositionOnPreviousWindow, mIsComposing=%s, mIsComposingOnPlugin=%s\n",
|
||||
mIsComposing ? "TRUE" : "FALSE", mIsComposingOnPlugin ? "TRUE" : "FALSE"));
|
||||
|
||||
@ -1795,7 +1795,7 @@ nsIMM32Handler::DispatchCompositionChangeEvent(nsWindow* aWindow,
|
||||
const nsIMEContext& aIMEContext)
|
||||
{
|
||||
NS_ASSERTION(mIsComposing, "conflict state");
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: DispatchCompositionChangeEvent"));
|
||||
|
||||
// If we don't need to draw composition string ourselves, we don't need to
|
||||
@ -1848,7 +1848,7 @@ nsIMM32Handler::CreateTextRangeArray()
|
||||
range.mRangeType = NS_TEXTRANGE_RAWINPUT;
|
||||
textRangeArray->AppendElement(range);
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: CreateTextRangeArray, mClauseLength=0\n"));
|
||||
} else {
|
||||
// iterate over the attributes
|
||||
@ -1856,7 +1856,7 @@ nsIMM32Handler::CreateTextRangeArray()
|
||||
for (uint32_t i = 0; i < mClauseArray.Length() - 1; i++) {
|
||||
uint32_t current = mClauseArray[i + 1];
|
||||
if (current > mCompositionString.Length()) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: CreateTextRangeArray, mClauseArray[%ld]=%lu. "
|
||||
"This is larger than mCompositionString.Length()=%lu\n",
|
||||
i + 1, current, mCompositionString.Length()));
|
||||
@ -1870,7 +1870,7 @@ nsIMM32Handler::CreateTextRangeArray()
|
||||
|
||||
lastOffset = current;
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: CreateTextRangeArray, index=%ld, rangeType=%s, range=[%lu-%lu]\n",
|
||||
i, GetRangeTypeName(range.mRangeType), range.mStartOffset,
|
||||
range.mEndOffset));
|
||||
@ -1878,14 +1878,14 @@ nsIMM32Handler::CreateTextRangeArray()
|
||||
}
|
||||
|
||||
if (mCursorPosition == NO_IME_CARET) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: CreateTextRangeArray, no caret\n"));
|
||||
return textRangeArray.forget();
|
||||
}
|
||||
|
||||
int32_t cursor = mCursorPosition;
|
||||
if (uint32_t(cursor) > mCompositionString.Length()) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: CreateTextRangeArray, mCursorPosition=%ld. "
|
||||
"This is larger than mCompositionString.Length()=%lu\n",
|
||||
mCursorPosition, mCompositionString.Length()));
|
||||
@ -1896,7 +1896,7 @@ nsIMM32Handler::CreateTextRangeArray()
|
||||
range.mRangeType = NS_TEXTRANGE_CARETPOSITION;
|
||||
textRangeArray->AppendElement(range);
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: CreateTextRangeArray, caret position=%ld\n",
|
||||
range.mStartOffset));
|
||||
|
||||
@ -1915,7 +1915,7 @@ nsIMM32Handler::GetCompositionString(const nsIMEContext &aIMEContext,
|
||||
if (lRtn < 0 ||
|
||||
!aCompositionString.SetLength((lRtn / sizeof(WCHAR)) + 1,
|
||||
mozilla::fallible)) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: GetCompositionString, FAILED by OOM\n"));
|
||||
return; // Error or out of memory.
|
||||
}
|
||||
@ -1926,7 +1926,7 @@ nsIMM32Handler::GetCompositionString(const nsIMEContext &aIMEContext,
|
||||
lRtn + sizeof(WCHAR));
|
||||
aCompositionString.SetLength(lRtn / sizeof(WCHAR));
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: GetCompositionString, SUCCEEDED aCompositionString=\"%s\"\n",
|
||||
NS_ConvertUTF16toUTF8(aCompositionString).get()));
|
||||
}
|
||||
@ -1982,7 +1982,7 @@ nsIMM32Handler::ConvertToANSIString(const nsAFlatString& aStr, UINT aCodePage,
|
||||
NS_ENSURE_TRUE(len >= 0, false);
|
||||
|
||||
if (!aANSIStr.SetLength(len, mozilla::fallible)) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: ConvertToANSIString, FAILED by OOM\n"));
|
||||
return false;
|
||||
}
|
||||
@ -2003,7 +2003,7 @@ nsIMM32Handler::GetCharacterRectOfSelectedTextAt(nsWindow* aWindow,
|
||||
aWindow->InitEvent(selection, &point);
|
||||
aWindow->DispatchWindowEvent(&selection);
|
||||
if (!selection.mSucceeded) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: GetCharacterRectOfSelectedTextAt, aOffset=%lu, FAILED (NS_QUERY_SELECTED_TEXT)\n",
|
||||
aOffset));
|
||||
return false;
|
||||
@ -2035,10 +2035,10 @@ nsIMM32Handler::GetCharacterRectOfSelectedTextAt(nsWindow* aWindow,
|
||||
if (aWritingMode) {
|
||||
*aWritingMode = charRect.GetWritingMode();
|
||||
}
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: GetCharacterRectOfSelectedTextAt, aOffset=%lu, SUCCEEDED\n",
|
||||
aOffset));
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: GetCharacterRectOfSelectedTextAt, "
|
||||
"aCharRect={ x: %ld, y: %ld, width: %ld, height: %ld }, "
|
||||
"charRect.GetWritingMode()=%s",
|
||||
@ -2062,7 +2062,7 @@ nsIMM32Handler::GetCaretRect(nsWindow* aWindow,
|
||||
aWindow->InitEvent(selection, &point);
|
||||
aWindow->DispatchWindowEvent(&selection);
|
||||
if (!selection.mSucceeded) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: GetCaretRect, FAILED (NS_QUERY_SELECTED_TEXT)\n"));
|
||||
return false;
|
||||
}
|
||||
@ -2074,7 +2074,7 @@ nsIMM32Handler::GetCaretRect(nsWindow* aWindow,
|
||||
aWindow->InitEvent(caretRect, &point);
|
||||
aWindow->DispatchWindowEvent(&caretRect);
|
||||
if (!caretRect.mSucceeded) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: GetCaretRect, FAILED (NS_QUERY_CARET_RECT)\n"));
|
||||
return false;
|
||||
}
|
||||
@ -2082,7 +2082,7 @@ nsIMM32Handler::GetCaretRect(nsWindow* aWindow,
|
||||
if (aWritingMode) {
|
||||
*aWritingMode = caretRect.GetWritingMode();
|
||||
}
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: GetCaretRect, SUCCEEDED, "
|
||||
"aCaretRect={ x: %ld, y: %ld, width: %ld, height: %ld }, "
|
||||
"caretRect.GetWritingMode()=%s",
|
||||
@ -2118,7 +2118,7 @@ nsIMM32Handler::SetIMERelatedWindowsPos(nsWindow* aWindow,
|
||||
if (!mNativeCaretIsCreated) {
|
||||
mNativeCaretIsCreated = ::CreateCaret(aWindow->GetWindowHandle(), nullptr,
|
||||
caretRect.width, caretRect.height);
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: SetIMERelatedWindowsPos, mNativeCaretIsCreated=%s, width=%ld height=%ld\n",
|
||||
mNativeCaretIsCreated ? "TRUE" : "FALSE",
|
||||
caretRect.width, caretRect.height));
|
||||
@ -2126,7 +2126,7 @@ nsIMM32Handler::SetIMERelatedWindowsPos(nsWindow* aWindow,
|
||||
::SetCaretPos(caretRect.x, caretRect.y);
|
||||
|
||||
if (ShouldDrawCompositionStringOurselves()) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: SetIMERelatedWindowsPos, Set candidate window\n"));
|
||||
|
||||
// Get a rect of first character in current target in composition string.
|
||||
@ -2136,7 +2136,7 @@ nsIMM32Handler::SetIMERelatedWindowsPos(nsWindow* aWindow,
|
||||
// rect instead.
|
||||
uint32_t offset, length;
|
||||
if (!GetTargetClauseRange(&offset, &length)) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: SetIMERelatedWindowsPos, FAILED, by GetTargetClauseRange\n"));
|
||||
return false;
|
||||
}
|
||||
@ -2208,7 +2208,7 @@ nsIMM32Handler::SetIMERelatedWindowsPos(nsWindow* aWindow,
|
||||
candForm.ptCurrentPos.x = targetClauseRect.x;
|
||||
candForm.ptCurrentPos.y = targetClauseRect.YMost();
|
||||
}
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: SetIMERelatedWindowsPos, Calling ImmSetCandidateWindow()... "
|
||||
"ptCurrentPos={ x=%d, y=%d }, "
|
||||
"rcArea={ left=%d, top=%d, right=%d, bottom=%d }, "
|
||||
@ -2219,7 +2219,7 @@ nsIMM32Handler::SetIMERelatedWindowsPos(nsWindow* aWindow,
|
||||
GetWritingModeName(writingMode).get()));
|
||||
::ImmSetCandidateWindow(aIMEContext.get(), &candForm);
|
||||
} else {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: SetIMERelatedWindowsPos, Set composition window\n"));
|
||||
|
||||
// Move the composition window to caret position (if selected some
|
||||
@ -2246,7 +2246,7 @@ nsIMM32Handler::SetIMERelatedWindowsPosOnPlugin(nsWindow* aWindow,
|
||||
aWindow->InitEvent(editorRectEvent);
|
||||
aWindow->DispatchWindowEvent(&editorRectEvent);
|
||||
if (!editorRectEvent.mSucceeded) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: SetIMERelatedWindowsPosOnPlugin, "
|
||||
"FAILED (NS_QUERY_EDITOR_RECT)"));
|
||||
return;
|
||||
@ -2293,7 +2293,7 @@ nsIMM32Handler::SetIMERelatedWindowsPosOnPlugin(nsWindow* aWindow,
|
||||
compForm.ptCurrentPos.x = clippedPluginRect.BottomLeft().x;
|
||||
compForm.ptCurrentPos.y = clippedPluginRect.BottomLeft().y;
|
||||
if (!::ImmSetCompositionWindow(aIMEContext.get(), &compForm)) {
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: SetIMERelatedWindowsPosOnPlugin, "
|
||||
"FAILED to set composition window"));
|
||||
return;
|
||||
@ -2397,7 +2397,7 @@ nsIMM32Handler::AdjustCompositionFont(const nsIMEContext& aIMEContext,
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: AdjustCompositionFont, sCompositionFont=\"%s\" is initialized",
|
||||
NS_ConvertUTF16toUTF8(sCompositionFont).get()));
|
||||
}
|
||||
@ -2523,7 +2523,7 @@ nsIMM32Handler::OnMouseButtonEvent(nsWindow* aWindow,
|
||||
offset++;
|
||||
}
|
||||
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnMouseButtonEvent, x,y=%ld,%ld, offset=%ld, positioning=%ld\n",
|
||||
cursorPos.x, cursorPos.y, offset, positioning));
|
||||
|
||||
@ -2542,7 +2542,7 @@ nsIMM32Handler::OnMouseButtonEvent(nsWindow* aWindow,
|
||||
nsIMM32Handler::OnKeyDownEvent(nsWindow* aWindow, WPARAM wParam, LPARAM lParam,
|
||||
MSGResult& aResult)
|
||||
{
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gIMM32Log, PR_LOG_INFO,
|
||||
("IMM32: OnKeyDownEvent, hWnd=%08x, wParam=%08x, lParam=%08x\n",
|
||||
aWindow->GetWindowHandle(), wParam, lParam));
|
||||
aResult.mConsumed = false;
|
||||
|
@ -167,7 +167,7 @@ NS_IMETHODIMP nsSound::OnStreamComplete(nsIStreamLoader *aLoader,
|
||||
if (uri) {
|
||||
nsAutoCString uriSpec;
|
||||
uri->GetSpec(uriSpec);
|
||||
MOZ_LOG(gWin32SoundLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWin32SoundLog, PR_LOG_INFO,
|
||||
("Failed to load %s\n", uriSpec.get()));
|
||||
}
|
||||
}
|
||||
@ -201,7 +201,7 @@ NS_IMETHODIMP nsSound::Play(nsIURL *aURL)
|
||||
#ifdef DEBUG_SOUND
|
||||
char *url;
|
||||
aURL->GetSpec(&url);
|
||||
MOZ_LOG(gWin32SoundLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWin32SoundLog, PR_LOG_INFO,
|
||||
("%s\n", url));
|
||||
#endif
|
||||
|
||||
|
@ -31,7 +31,7 @@ static const char* kPrefNameForceEnableTSF = "intl.tsf.force_enable";
|
||||
* TSF related code should log its behavior even on release build especially
|
||||
* in the interface methods.
|
||||
*
|
||||
* In interface methods, use PR_LOG_ALWAYS.
|
||||
* In interface methods, use PR_LOG_INFO.
|
||||
* In internal methods, use PR_LOG_DEBUG for logging normal behavior.
|
||||
* For logging error, use PR_LOG_ERROR.
|
||||
*
|
||||
@ -669,7 +669,7 @@ public:
|
||||
InputScopeImpl(const nsTArray<InputScope>& aList)
|
||||
: mInputScopes(aList)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p InputScopeImpl()", this));
|
||||
}
|
||||
|
||||
@ -912,7 +912,7 @@ TSFStaticSink::Init(ITfThreadMgr* aThreadMgr,
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p TSFStaticSink::Init(), "
|
||||
"mIPProfileCookie=0x%08X, mLangProfileCookie=0x%08X",
|
||||
this, mIPProfileCookie, mLangProfileCookie));
|
||||
@ -922,7 +922,7 @@ TSFStaticSink::Init(ITfThreadMgr* aThreadMgr,
|
||||
void
|
||||
TSFStaticSink::Destroy()
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p TSFStaticSink::Shutdown() "
|
||||
"mIPProfileCookie=0x%08X, mLangProfileCookie=0x%08X",
|
||||
this, mIPProfileCookie, mLangProfileCookie));
|
||||
@ -994,7 +994,7 @@ TSFStaticSink::OnActivated(REFCLSID clsid, REFGUID guidProfile,
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p TSFStaticSink::OnActivated(rclsid=%s, guidProfile=%s, "
|
||||
"fActivated=%s), mIsIMM_IME=%s, mActiveTIPDescription=\"%s\"",
|
||||
this, GetCLSIDNameStr(clsid).get(),
|
||||
@ -1024,7 +1024,7 @@ TSFStaticSink::OnActivated(DWORD dwProfileType,
|
||||
GetTIPDescription(rclsid, langid, guidProfile,
|
||||
mActiveTIPKeyboardDescription);
|
||||
}
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p TSFStaticSink::OnActivated(dwProfileType=%s (0x%08X), "
|
||||
"langid=0x%08X, rclsid=%s, catid=%s, guidProfile=%s, hkl=0x%08X, "
|
||||
"dwFlags=0x%08X (TF_IPSINK_FLAG_ACTIVE: %s)), mIsIMM_IME=%s, "
|
||||
@ -1063,7 +1063,7 @@ TSFStaticSink::EnsureInitActiveTIPKeyboard()
|
||||
TF_INPUTPROCESSORPROFILE profile;
|
||||
hr = profileMgr->GetActiveProfile(GUID_TFCAT_TIP_KEYBOARD, &profile);
|
||||
if (hr == S_FALSE) {
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p TSFStaticSink::EnsureInitActiveLanguageProfile(), FAILED "
|
||||
"to get active keyboard layout profile due to no active profile, "
|
||||
"hr=0x%08X", this, hr));
|
||||
@ -1078,7 +1078,7 @@ TSFStaticSink::EnsureInitActiveTIPKeyboard()
|
||||
return false;
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p TSFStaticSink::EnsureInitActiveLanguageProfile(), "
|
||||
"calling OnActivated() manually...", this));
|
||||
OnActivated(profile.dwProfileType, profile.langid, profile.clsid,
|
||||
@ -1112,7 +1112,7 @@ TSFStaticSink::EnsureInitActiveTIPKeyboard()
|
||||
if (!profile.fActive || profile.catid != GUID_TFCAT_TIP_KEYBOARD) {
|
||||
continue;
|
||||
}
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p TSFStaticSink::EnsureInitActiveLanguageProfile(), "
|
||||
"calling OnActivated() manually...", this));
|
||||
bool isTIP = profile.guidProfile != GUID_NULL;
|
||||
@ -1124,7 +1124,7 @@ TSFStaticSink::EnsureInitActiveTIPKeyboard()
|
||||
return true;
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p TSFStaticSink::EnsureInitActiveLanguageProfile(), "
|
||||
"calling OnActivated() without active TIP manually...", this));
|
||||
OnActivated(TF_PROFILETYPE_KEYBOARDLAYOUT,
|
||||
@ -1239,20 +1239,20 @@ nsTextStore::nsTextStore()
|
||||
// We hope that 5 or more actions don't occur at once.
|
||||
mPendingActions.SetCapacity(5);
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::nsTestStore() SUCCEEDED", this));
|
||||
}
|
||||
|
||||
nsTextStore::~nsTextStore()
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore instance is destroyed", this));
|
||||
}
|
||||
|
||||
bool
|
||||
nsTextStore::Init(nsWindowBase* aWidget)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::Init(aWidget=0x%p)",
|
||||
this, aWidget));
|
||||
|
||||
@ -1298,7 +1298,7 @@ nsTextStore::Init(nsWindowBase* aWidget)
|
||||
return false;
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::Init() succeeded: "
|
||||
"mDocumentMgr=0x%p, mContext=0x%p, mEditCookie=0x%08X",
|
||||
this, mDocumentMgr.get(), mContext.get(), mEditCookie));
|
||||
@ -1309,7 +1309,7 @@ nsTextStore::Init(nsWindowBase* aWidget)
|
||||
bool
|
||||
nsTextStore::Destroy()
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::Destroy(), mLock=%s, "
|
||||
"mComposition.IsComposing()=%s",
|
||||
this, GetLockFlagNameStr(mLock).get(),
|
||||
@ -1345,7 +1345,7 @@ nsTextStore::Destroy()
|
||||
mMouseTrackers.Clear();
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::Destroy() succeeded", this));
|
||||
return true;
|
||||
}
|
||||
@ -1378,7 +1378,7 @@ nsTextStore::AdviseSink(REFIID riid,
|
||||
IUnknown *punk,
|
||||
DWORD dwMask)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::AdviseSink(riid=%s, punk=0x%p, dwMask=%s), "
|
||||
"mSink=0x%p, mSinkMask=%s",
|
||||
this, GetRIIDNameStr(riid).get(), punk, GetSinkMaskNameStr(dwMask).get(),
|
||||
@ -1428,7 +1428,7 @@ nsTextStore::AdviseSink(REFIID riid,
|
||||
STDMETHODIMP
|
||||
nsTextStore::UnadviseSink(IUnknown *punk)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::UnadviseSink(punk=0x%p), mSink=0x%p",
|
||||
this, punk, mSink.get()));
|
||||
|
||||
@ -1464,7 +1464,7 @@ STDMETHODIMP
|
||||
nsTextStore::RequestLock(DWORD dwLockFlags,
|
||||
HRESULT *phrSession)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RequestLock(dwLockFlags=%s, phrSession=0x%p), "
|
||||
"mLock=%s", this, GetLockFlagNameStr(dwLockFlags).get(), phrSession,
|
||||
GetLockFlagNameStr(mLock).get()));
|
||||
@ -1485,7 +1485,7 @@ nsTextStore::RequestLock(DWORD dwLockFlags,
|
||||
if (!mLock) {
|
||||
// put on lock
|
||||
mLock = dwLockFlags & (~TS_LF_SYNC);
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p Locking (%s) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
|
||||
">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>",
|
||||
this, GetLockFlagNameStr(mLock).get()));
|
||||
@ -1493,7 +1493,7 @@ nsTextStore::RequestLock(DWORD dwLockFlags,
|
||||
// TSF but they don't grab us during this call.
|
||||
nsRefPtr<nsTextStore> kungFuDeathGrip(this);
|
||||
*phrSession = mSink->OnLockGranted(mLock);
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p Unlocked (%s) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
|
||||
"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<",
|
||||
this, GetLockFlagNameStr(mLock).get()));
|
||||
@ -1501,12 +1501,12 @@ nsTextStore::RequestLock(DWORD dwLockFlags,
|
||||
while (mLockQueued) {
|
||||
mLock = mLockQueued;
|
||||
mLockQueued = 0;
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p Locking for the request in the queue (%s) >>>>>>>>>>>>>>"
|
||||
">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>",
|
||||
this, GetLockFlagNameStr(mLock).get()));
|
||||
mSink->OnLockGranted(mLock);
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p Unlocked (%s) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
|
||||
"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<",
|
||||
this, GetLockFlagNameStr(mLock).get()));
|
||||
@ -1519,7 +1519,7 @@ nsTextStore::RequestLock(DWORD dwLockFlags,
|
||||
if (!mPendingDestroy && mPendingOnLayoutChange) {
|
||||
mPendingOnLayoutChange = false;
|
||||
if (mSink) {
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RequestLock(), "
|
||||
"calling ITextStoreACPSink::OnLayoutChange()...", this));
|
||||
mSink->OnLayoutChange(TS_LC_CHANGE, TEXTSTORE_DEFAULT_VIEW);
|
||||
@ -1531,7 +1531,7 @@ nsTextStore::RequestLock(DWORD dwLockFlags,
|
||||
mContext->QueryInterface(IID_ITfContextOwnerServices,
|
||||
getter_AddRefs(service));
|
||||
if (service) {
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RequestLock(), "
|
||||
"calling ITfContextOwnerServices::OnLayoutChange()...",
|
||||
this));
|
||||
@ -1543,7 +1543,7 @@ nsTextStore::RequestLock(DWORD dwLockFlags,
|
||||
if (!mPendingDestroy && mPendingOnSelectionChange) {
|
||||
mPendingOnSelectionChange = false;
|
||||
if (mSink) {
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RequestLock(), "
|
||||
"calling ITextStoreACPSink::OnSelectionChange()...", this));
|
||||
mSink->OnSelectionChange();
|
||||
@ -1554,7 +1554,7 @@ nsTextStore::RequestLock(DWORD dwLockFlags,
|
||||
Destroy();
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RequestLock() succeeded: *phrSession=%s",
|
||||
this, GetTextStoreReturnValueName(*phrSession)));
|
||||
return S_OK;
|
||||
@ -1567,14 +1567,14 @@ nsTextStore::RequestLock(DWORD dwLockFlags,
|
||||
*phrSession = TS_S_ASYNC;
|
||||
mLockQueued = dwLockFlags & (~TS_LF_SYNC);
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RequestLock() stores the request in the "
|
||||
"queue, *phrSession=TS_S_ASYNC", this));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// no more locks allowed
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RequestLock() didn't allow to lock, "
|
||||
"*phrSession=TS_E_SYNCHRONOUS", this));
|
||||
*phrSession = TS_E_SYNCHRONOUS;
|
||||
@ -1764,7 +1764,7 @@ nsTextStore::FlushPendingActions()
|
||||
continue;
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::FlushPendingActions(), "
|
||||
"qutting since the mWidget has gone", this));
|
||||
break;
|
||||
@ -1775,7 +1775,7 @@ nsTextStore::FlushPendingActions()
|
||||
STDMETHODIMP
|
||||
nsTextStore::GetStatus(TS_STATUS *pdcs)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetStatus(pdcs=0x%p)", this, pdcs));
|
||||
|
||||
if (!pdcs) {
|
||||
@ -1796,7 +1796,7 @@ nsTextStore::QueryInsert(LONG acpTestStart,
|
||||
LONG *pacpResultStart,
|
||||
LONG *pacpResultEnd)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::QueryInsert(acpTestStart=%ld, "
|
||||
"acpTestEnd=%ld, cch=%lu, pacpResultStart=0x%p, pacpResultEnd=0x%p)",
|
||||
this, acpTestStart, acpTestEnd, cch, acpTestStart, acpTestEnd));
|
||||
@ -1820,7 +1820,7 @@ nsTextStore::QueryInsert(LONG acpTestStart,
|
||||
*pacpResultStart = acpTestStart;
|
||||
*pacpResultEnd = acpTestStart + cch;
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::QueryInsert() succeeded: "
|
||||
"*pacpResultStart=%ld, *pacpResultEnd=%ld)",
|
||||
this, *pacpResultStart, *pacpResultEnd));
|
||||
@ -1833,7 +1833,7 @@ nsTextStore::GetSelection(ULONG ulIndex,
|
||||
TS_SELECTION_ACP *pSelection,
|
||||
ULONG *pcFetched)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetSelection(ulIndex=%lu, ulCount=%lu, "
|
||||
"pSelection=0x%p, pcFetched=0x%p)",
|
||||
this, ulIndex, ulCount, pSelection, pcFetched));
|
||||
@ -1870,7 +1870,7 @@ nsTextStore::GetSelection(ULONG ulIndex,
|
||||
}
|
||||
*pSelection = currentSel.ACP();
|
||||
*pcFetched = 1;
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetSelection() succeeded", this));
|
||||
return S_OK;
|
||||
}
|
||||
@ -2471,7 +2471,7 @@ nsTextStore::RecordCompositionUpdateAction()
|
||||
|
||||
action->mIncomplete = false;
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RecordCompositionUpdateAction() "
|
||||
"succeeded", this));
|
||||
|
||||
@ -2549,7 +2549,7 @@ STDMETHODIMP
|
||||
nsTextStore::SetSelection(ULONG ulCount,
|
||||
const TS_SELECTION_ACP *pSelection)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::SetSelection(ulCount=%lu, pSelection=%p { "
|
||||
"acpStart=%ld, acpEnd=%ld, style={ ase=%s, fInterimChar=%s } }), "
|
||||
"mComposition.IsComposing()=%s",
|
||||
@ -2585,7 +2585,7 @@ nsTextStore::SetSelection(ULONG ulCount,
|
||||
("TSF: 0x%p nsTextStore::SetSelection() FAILED due to "
|
||||
"SetSelectionInternal() failure", this));
|
||||
} else {
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::SetSelection() succeeded", this));
|
||||
}
|
||||
return hr;
|
||||
@ -2602,7 +2602,7 @@ nsTextStore::GetText(LONG acpStart,
|
||||
ULONG *pulRunInfoOut,
|
||||
LONG *pacpNext)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetText(acpStart=%ld, acpEnd=%ld, pchPlain=0x%p, "
|
||||
"cchPlainReq=%lu, pcchPlainOut=0x%p, prgRunInfo=0x%p, ulRunInfoReq=%lu, "
|
||||
"pulRunInfoOut=0x%p, pacpNext=0x%p), mComposition={ mStart=%ld, "
|
||||
@ -2686,7 +2686,7 @@ nsTextStore::GetText(LONG acpStart,
|
||||
if (pacpNext) *pacpNext = acpStart + length;
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetText() succeeded: pcchPlainOut=0x%p, "
|
||||
"*prgRunInfo={ uCount=%lu, type=%s }, *pulRunInfoOut=%lu, "
|
||||
"*pacpNext=%ld)",
|
||||
@ -2704,7 +2704,7 @@ nsTextStore::SetText(DWORD dwFlags,
|
||||
ULONG cch,
|
||||
TS_TEXTCHANGE *pChange)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::SetText(dwFlags=%s, acpStart=%ld, "
|
||||
"acpEnd=%ld, pchText=0x%p \"%s\", cch=%lu, pChange=0x%p), "
|
||||
"mComposition.IsComposing()=%s",
|
||||
@ -2747,7 +2747,7 @@ nsTextStore::SetText(DWORD dwFlags,
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::SetText() succeeded: pChange={ "
|
||||
"acpStart=%ld, acpOldEnd=%ld, acpNewEnd=%ld }",
|
||||
this, pChange ? pChange->acpStart : 0,
|
||||
@ -2760,7 +2760,7 @@ nsTextStore::GetFormattedText(LONG acpStart,
|
||||
LONG acpEnd,
|
||||
IDataObject **ppDataObject)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetFormattedText() called "
|
||||
"but not supported (E_NOTIMPL)", this));
|
||||
|
||||
@ -2774,7 +2774,7 @@ nsTextStore::GetEmbedded(LONG acpPos,
|
||||
REFIID riid,
|
||||
IUnknown **ppunk)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetEmbedded() called "
|
||||
"but not supported (E_NOTIMPL)", this));
|
||||
|
||||
@ -2787,7 +2787,7 @@ nsTextStore::QueryInsertEmbedded(const GUID *pguidService,
|
||||
const FORMATETC *pFormatEtc,
|
||||
BOOL *pfInsertable)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::QueryInsertEmbedded() called "
|
||||
"but not supported, *pfInsertable=FALSE (S_OK)", this));
|
||||
|
||||
@ -2803,7 +2803,7 @@ nsTextStore::InsertEmbedded(DWORD dwFlags,
|
||||
IDataObject *pDataObject,
|
||||
TS_TEXTCHANGE *pChange)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::InsertEmbedded() called "
|
||||
"but not supported (E_NOTIMPL)", this));
|
||||
|
||||
@ -2882,7 +2882,7 @@ nsTextStore::HandleRequestAttrs(DWORD aFlags,
|
||||
ULONG aFilterCount,
|
||||
const TS_ATTRID* aFilterAttrs)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::HandleRequestAttrs(aFlags=%s, "
|
||||
"aFilterCount=%u)",
|
||||
this, GetFindFlagName(aFlags).get(), aFilterCount));
|
||||
@ -2899,7 +2899,7 @@ nsTextStore::HandleRequestAttrs(DWORD aFlags,
|
||||
mRequestedAttrValues = !!(aFlags & TS_ATTR_FIND_WANT_VALUE);
|
||||
|
||||
for (uint32_t i = 0; i < aFilterCount; i++) {
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::HandleRequestAttrs(), "
|
||||
"requested attr=%s",
|
||||
this, GetGUIDNameStrWithTable(aFilterAttrs[i]).get()));
|
||||
@ -2916,7 +2916,7 @@ nsTextStore::RequestSupportedAttrs(DWORD dwFlags,
|
||||
ULONG cFilterAttrs,
|
||||
const TS_ATTRID *paFilterAttrs)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RequestSupportedAttrs(dwFlags=%s, "
|
||||
"cFilterAttrs=%lu)",
|
||||
this, GetFindFlagName(dwFlags).get(), cFilterAttrs));
|
||||
@ -2930,7 +2930,7 @@ nsTextStore::RequestAttrsAtPosition(LONG acpPos,
|
||||
const TS_ATTRID *paFilterAttrs,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RequestAttrsAtPosition(acpPos=%ld, "
|
||||
"cFilterAttrs=%lu, dwFlags=%s)",
|
||||
this, acpPos, cFilterAttrs, GetFindFlagName(dwFlags).get()));
|
||||
@ -2945,7 +2945,7 @@ nsTextStore::RequestAttrsTransitioningAtPosition(LONG acpPos,
|
||||
const TS_ATTRID *paFilterAttr,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RequestAttrsTransitioningAtPosition("
|
||||
"acpPos=%ld, cFilterAttrs=%lu, dwFlags=%s) called but not supported "
|
||||
"(S_OK)",
|
||||
@ -2972,7 +2972,7 @@ nsTextStore::FindNextAttrTransition(LONG acpStart,
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::FindNextAttrTransition() called "
|
||||
"but not supported (S_OK)", this));
|
||||
|
||||
@ -3008,7 +3008,7 @@ nsTextStore::RetrieveRequestedAttrs(ULONG ulCount,
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RetrieveRequestedAttrs() called "
|
||||
"ulCount=%d, mRequestedAttrValues=%s",
|
||||
this, ulCount, GetBoolName(mRequestedAttrValues)));
|
||||
@ -3022,7 +3022,7 @@ nsTextStore::RetrieveRequestedAttrs(ULONG ulCount,
|
||||
|
||||
TS_ATTRID attrID = GetAttrID(i);
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RetrieveRequestedAttrs() for %s",
|
||||
this, GetGUIDNameStrWithTable(attrID).get()));
|
||||
|
||||
@ -3069,7 +3069,7 @@ nsTextStore::RetrieveRequestedAttrs(ULONG ulCount,
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RetrieveRequestedAttrs() called "
|
||||
"for unknown TS_ATTRVAL, *pcFetched=0 (S_OK)", this));
|
||||
|
||||
@ -3082,7 +3082,7 @@ nsTextStore::RetrieveRequestedAttrs(ULONG ulCount,
|
||||
STDMETHODIMP
|
||||
nsTextStore::GetEndACP(LONG *pacp)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetEndACP(pacp=0x%p)", this, pacp));
|
||||
|
||||
if (!IsReadLocked()) {
|
||||
@ -3113,7 +3113,7 @@ nsTextStore::GetEndACP(LONG *pacp)
|
||||
STDMETHODIMP
|
||||
nsTextStore::GetActiveView(TsViewCookie *pvcView)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetActiveView(pvcView=0x%p)", this, pvcView));
|
||||
|
||||
if (!pvcView) {
|
||||
@ -3125,7 +3125,7 @@ nsTextStore::GetActiveView(TsViewCookie *pvcView)
|
||||
|
||||
*pvcView = TEXTSTORE_DEFAULT_VIEW;
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetActiveView() succeeded: *pvcView=%ld",
|
||||
this, *pvcView));
|
||||
return S_OK;
|
||||
@ -3137,7 +3137,7 @@ nsTextStore::GetACPFromPoint(TsViewCookie vcView,
|
||||
DWORD dwFlags,
|
||||
LONG *pacp)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetACPFromPoint(pvcView=%d, pt=%p (x=%d, "
|
||||
"y=%d), dwFlags=%s, pacp=%p",
|
||||
this, vcView, pt, pt ? pt->x : 0, pt ? pt->y : 0,
|
||||
@ -3275,7 +3275,7 @@ nsTextStore::GetACPFromPoint(TsViewCookie vcView,
|
||||
}
|
||||
|
||||
*pacp = static_cast<LONG>(offset);
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetACPFromPoint() succeeded: *pacp=%d",
|
||||
this, *pacp));
|
||||
return S_OK;
|
||||
@ -3288,7 +3288,7 @@ nsTextStore::GetTextExt(TsViewCookie vcView,
|
||||
RECT *prc,
|
||||
BOOL *pfClipped)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetTextExt(vcView=%ld, "
|
||||
"acpStart=%ld, acpEnd=%ld, prc=0x%p, pfClipped=0x%p)",
|
||||
this, vcView, acpStart, acpEnd, prc, pfClipped));
|
||||
@ -3452,7 +3452,7 @@ nsTextStore::GetTextExt(TsViewCookie vcView,
|
||||
CreateNativeCaret();
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetTextExt() succeeded: "
|
||||
"*prc={ left=%ld, top=%ld, right=%ld, bottom=%ld }, *pfClipped=%s",
|
||||
this, prc->left, prc->top, prc->right, prc->bottom,
|
||||
@ -3465,7 +3465,7 @@ STDMETHODIMP
|
||||
nsTextStore::GetScreenExt(TsViewCookie vcView,
|
||||
RECT *prc)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetScreenExt(vcView=%ld, prc=0x%p)",
|
||||
this, vcView, prc));
|
||||
|
||||
@ -3490,7 +3490,7 @@ nsTextStore::GetScreenExt(TsViewCookie vcView,
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetScreenExt() succeeded: "
|
||||
"*prc={ left=%ld, top=%ld, right=%ld, bottom=%ld }",
|
||||
this, prc->left, prc->top, prc->right, prc->bottom));
|
||||
@ -3558,7 +3558,7 @@ STDMETHODIMP
|
||||
nsTextStore::GetWnd(TsViewCookie vcView,
|
||||
HWND *phwnd)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetWnd(vcView=%ld, phwnd=0x%p), "
|
||||
"mWidget=0x%p",
|
||||
this, vcView, phwnd, mWidget.get()));
|
||||
@ -3579,7 +3579,7 @@ nsTextStore::GetWnd(TsViewCookie vcView,
|
||||
|
||||
*phwnd = mWidget->GetWindowHandle();
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::GetWnd() succeeded: *phwnd=0x%p",
|
||||
this, static_cast<void*>(*phwnd)));
|
||||
return S_OK;
|
||||
@ -3593,7 +3593,7 @@ nsTextStore::InsertTextAtSelection(DWORD dwFlags,
|
||||
LONG *pacpEnd,
|
||||
TS_TEXTCHANGE *pChange)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::InsertTextAtSelection(dwFlags=%s, "
|
||||
"pchText=0x%p \"%s\", cch=%lu, pacpStart=0x%p, pacpEnd=0x%p, "
|
||||
"pChange=0x%p), IsComposing()=%s",
|
||||
@ -3679,7 +3679,7 @@ nsTextStore::InsertTextAtSelection(DWORD dwFlags,
|
||||
*pacpEnd = pChange->acpNewEnd;
|
||||
}
|
||||
}
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::InsertTextAtSelection() succeeded: "
|
||||
"*pacpStart=%ld, *pacpEnd=%ld, "
|
||||
"*pChange={ acpStart=%ld, acpOldEnd=%ld, acpNewEnd=%ld })",
|
||||
@ -3748,7 +3748,7 @@ nsTextStore::InsertEmbeddedAtSelection(DWORD dwFlags,
|
||||
LONG *pacpEnd,
|
||||
TS_TEXTCHANGE *pChange)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::InsertEmbeddedAtSelection() called "
|
||||
"but not supported (E_NOTIMPL)", this));
|
||||
|
||||
@ -3829,7 +3829,7 @@ nsTextStore::RecordCompositionStartAction(ITfCompositionView* aComposition,
|
||||
|
||||
lockedContent.StartComposition(aComposition, *action, aPreserveSelection);
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RecordCompositionStartAction() succeeded: "
|
||||
"mComposition={ mStart=%ld, mString.Length()=%ld, "
|
||||
"mSelection={ acpStart=%ld, acpEnd=%ld, style.ase=%s, "
|
||||
@ -3866,7 +3866,7 @@ nsTextStore::RecordCompositionEndAction()
|
||||
}
|
||||
lockedContent.EndComposition(*action);
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::RecordCompositionEndAction(), succeeded",
|
||||
this));
|
||||
return S_OK;
|
||||
@ -3876,7 +3876,7 @@ STDMETHODIMP
|
||||
nsTextStore::OnStartComposition(ITfCompositionView* pComposition,
|
||||
BOOL* pfOk)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::OnStartComposition(pComposition=0x%p, "
|
||||
"pfOk=0x%p), mComposition.mView=0x%p",
|
||||
this, pComposition, pfOk, mComposition.mView.get()));
|
||||
@ -3910,7 +3910,7 @@ nsTextStore::OnStartComposition(ITfCompositionView* pComposition,
|
||||
}
|
||||
|
||||
*pfOk = TRUE;
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::OnStartComposition() succeeded", this));
|
||||
return S_OK;
|
||||
}
|
||||
@ -3919,7 +3919,7 @@ STDMETHODIMP
|
||||
nsTextStore::OnUpdateComposition(ITfCompositionView* pComposition,
|
||||
ITfRange* pRangeNew)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::OnUpdateComposition(pComposition=0x%p, "
|
||||
"pRangeNew=0x%p), mComposition.mView=0x%p",
|
||||
this, pComposition, pRangeNew, mComposition.mView.get()));
|
||||
@ -3949,7 +3949,7 @@ nsTextStore::OnUpdateComposition(ITfCompositionView* pComposition,
|
||||
if (!pRangeNew) {
|
||||
PendingAction* action = LastOrNewPendingCompositionUpdate();
|
||||
action->mIncomplete = true;
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::OnUpdateComposition() succeeded but "
|
||||
"not complete", this));
|
||||
return S_OK;
|
||||
@ -3971,7 +3971,7 @@ nsTextStore::OnUpdateComposition(ITfCompositionView* pComposition,
|
||||
return hr;
|
||||
}
|
||||
|
||||
if (MOZ_LOG_TEST(sTextStoreLog, PR_LOG_ALWAYS)) {
|
||||
if (MOZ_LOG_TEST(sTextStoreLog, PR_LOG_INFO)) {
|
||||
Selection& currentSel = CurrentSelection();
|
||||
if (currentSel.IsDirty()) {
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ERROR,
|
||||
@ -3979,7 +3979,7 @@ nsTextStore::OnUpdateComposition(ITfCompositionView* pComposition,
|
||||
"CurrentSelection() failure", this));
|
||||
return E_FAIL;
|
||||
}
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::OnUpdateComposition() succeeded: "
|
||||
"mComposition={ mStart=%ld, mString=\"%s\" }, "
|
||||
"CurrentSelection()={ acpStart=%ld, acpEnd=%ld, style.ase=%s }",
|
||||
@ -3994,7 +3994,7 @@ nsTextStore::OnUpdateComposition(ITfCompositionView* pComposition,
|
||||
STDMETHODIMP
|
||||
nsTextStore::OnEndComposition(ITfCompositionView* pComposition)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::OnEndComposition(pComposition=0x%p), "
|
||||
"mComposition={ mView=0x%p, mString=\"%s\" }",
|
||||
this, pComposition, mComposition.mView.get(),
|
||||
@ -4024,7 +4024,7 @@ nsTextStore::OnEndComposition(ITfCompositionView* pComposition)
|
||||
return hr;
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::OnEndComposition(), succeeded", this));
|
||||
return S_OK;
|
||||
}
|
||||
@ -4034,7 +4034,7 @@ nsTextStore::AdviseMouseSink(ITfRangeACP* range,
|
||||
ITfMouseSink* pSink,
|
||||
DWORD* pdwCookie)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::AdviseMouseSink(range=0x%p, pSink=0x%p, "
|
||||
"pdwCookie=0x%p)", this, range, pSink, pdwCookie));
|
||||
|
||||
@ -4088,7 +4088,7 @@ nsTextStore::AdviseMouseSink(ITfRangeACP* range,
|
||||
return hr;
|
||||
}
|
||||
*pdwCookie = tracker->Cookie();
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::AdviseMouseSink(), succeeded, "
|
||||
"*pdwCookie=%d", this, *pdwCookie));
|
||||
return S_OK;
|
||||
@ -4097,7 +4097,7 @@ nsTextStore::AdviseMouseSink(ITfRangeACP* range,
|
||||
STDMETHODIMP
|
||||
nsTextStore::UnadviseMouseSink(DWORD dwCookie)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::UnadviseMouseSink(dwCookie=%d)",
|
||||
this, dwCookie));
|
||||
if (dwCookie == MouseTracker::kInvalidCookie) {
|
||||
@ -4122,7 +4122,7 @@ nsTextStore::UnadviseMouseSink(DWORD dwCookie)
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
tracker.UnadviseSink();
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::UnadviseMouseSink(), succeeded", this));
|
||||
return S_OK;
|
||||
}
|
||||
@ -4307,7 +4307,7 @@ nsTextStore::OnTextChangeInternal(const IMENotification& aIMENotification)
|
||||
// Especially, some of them stop working for composition in our process.
|
||||
// For preventing it, let's commit the composition.
|
||||
if (mComposition.IsComposing()) {
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::OnTextChangeInternal(), "
|
||||
"committing the composition for avoiding making TIP confused...",
|
||||
this));
|
||||
@ -4323,7 +4323,7 @@ nsTextStore::OnTextChangeInternal(const IMENotification& aIMENotification)
|
||||
textChange.acpNewEnd =
|
||||
static_cast<LONG>(aIMENotification.mTextChangeData.mNewEndOffset);
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::OnTextChangeInternal(), calling "
|
||||
"mSink->OnTextChange(0, { acpStart=%ld, acpOldEnd=%ld, "
|
||||
"acpNewEnd=%ld })...", this, textChange.acpStart,
|
||||
@ -4358,7 +4358,7 @@ nsTextStore::OnSelectionChangeInternal(void)
|
||||
// Especially, some of them stop working for composition in our process.
|
||||
// For preventing it, let's commit the composition.
|
||||
if (mComposition.IsComposing()) {
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::OnSelectionChangeInternal(), "
|
||||
"committing the composition for avoiding making TIP confused...",
|
||||
this));
|
||||
@ -4367,12 +4367,12 @@ nsTextStore::OnSelectionChangeInternal(void)
|
||||
}
|
||||
|
||||
if (!mIsRecordingActionsWithoutLock) {
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::OnSelectionChangeInternal(), calling "
|
||||
"mSink->OnSelectionChange()...", this));
|
||||
mSink->OnSelectionChange();
|
||||
} else {
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::OnSelectionChangeInternal(), pending "
|
||||
"a call of mSink->OnSelectionChange()...", this));
|
||||
mPendingOnSelectionChange = true;
|
||||
@ -4386,7 +4386,7 @@ nsTextStore::OnLayoutChangeInternal()
|
||||
NS_ENSURE_TRUE(mContext, NS_ERROR_FAILURE);
|
||||
NS_ENSURE_TRUE(mSink, NS_ERROR_FAILURE);
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::OnLayoutChangeInternal(), calling "
|
||||
"mSink->OnLayoutChange()...", this));
|
||||
HRESULT hr = mSink->OnLayoutChange(TS_LC_CHANGE, TEXTSTORE_DEFAULT_VIEW);
|
||||
@ -4546,7 +4546,7 @@ nsTextStore::CommitCompositionInternal(bool aDiscard)
|
||||
textChange.acpStart = mComposition.mStart;
|
||||
textChange.acpOldEnd = endOffset;
|
||||
textChange.acpNewEnd = mComposition.mStart;
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: 0x%p nsTextStore::CommitCompositionInternal(), calling"
|
||||
"mSink->OnTextChange(0, { acpStart=%ld, acpOldEnd=%ld, "
|
||||
"acpNewEnd=%ld })...", this, textChange.acpStart,
|
||||
@ -4728,7 +4728,7 @@ nsTextStore::Initialize()
|
||||
sTextStoreLog = PR_NewLogModule("nsTextStoreWidgets");
|
||||
}
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: nsTextStore::Initialize() is called..."));
|
||||
|
||||
if (sThreadMgr) {
|
||||
@ -4741,7 +4741,7 @@ nsTextStore::Initialize()
|
||||
Preferences::GetBool(kPrefNameForceEnableTSF, false) ||
|
||||
(IsVistaOrLater() && Preferences::GetBool(kPrefNameEnableTSF, false) &&
|
||||
!BrowserTabsRemoteAutostart());
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: nsTextStore::Initialize(), TSF is %s",
|
||||
enableTsf ? "enabled" : "disabled"));
|
||||
if (!enableTsf) {
|
||||
@ -4849,7 +4849,7 @@ nsTextStore::Initialize()
|
||||
MarkContextAsKeyboardDisabled(disabledContext);
|
||||
MarkContextAsEmpty(disabledContext);
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: nsTextStore::Initialize() is creating "
|
||||
"a TSFStaticSink instance..."));
|
||||
TSFStaticSink* staticSink = TSFStaticSink::GetInstance();
|
||||
@ -4887,7 +4887,7 @@ nsTextStore::Initialize()
|
||||
"intl.tsf.hack.google_ja_input.do_not_return_no_layout_error_at_caret",
|
||||
true);
|
||||
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO,
|
||||
("TSF: nsTextStore::Initialize(), sThreadMgr=0x%p, "
|
||||
"sClientId=0x%08X, sDisplayAttrMgr=0x%p, "
|
||||
"sCategoryMgr=0x%p, sDisabledDocumentMgr=0x%p, sDisabledContext=%p, "
|
||||
@ -4909,7 +4909,7 @@ nsTextStore::Initialize()
|
||||
void
|
||||
nsTextStore::Terminate(void)
|
||||
{
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_ALWAYS, ("TSF: nsTextStore::Terminate()"));
|
||||
MOZ_LOG(sTextStoreLog, PR_LOG_INFO, ("TSF: nsTextStore::Terminate()"));
|
||||
|
||||
TSFStaticSink::Shutdown();
|
||||
|
||||
|
@ -455,7 +455,7 @@ nsWinGesture::ProcessPanMessage(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
#ifdef DBG_jimm
|
||||
int32_t deltaX = mPanIntermediate.x - coord.x;
|
||||
int32_t deltaY = mPanIntermediate.y - coord.y;
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("coordX=%d coordY=%d deltaX=%d deltaY=%d x:%d y:%d\n", coord.x,
|
||||
coord.y, deltaX, deltaY, mXAxisFeedback, mYAxisFeedback));
|
||||
#endif
|
||||
|
@ -1391,7 +1391,7 @@ NS_METHOD nsWindow::Move(double aX, double aY)
|
||||
::SystemParametersInfo(SPI_GETWORKAREA, 0, &workArea, 0);
|
||||
// no annoying assertions. just mention the issue.
|
||||
if (x < 0 || x >= workArea.right || y < 0 || y >= workArea.bottom) {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("window moved to offscreen position\n"));
|
||||
}
|
||||
}
|
||||
@ -1804,10 +1804,10 @@ NS_METHOD nsWindow::SetFocus(bool aRaise)
|
||||
if (mWnd) {
|
||||
#ifdef WINSTATE_DEBUG_OUTPUT
|
||||
if (mWnd == WinUtils::GetTopLevelHWND(mWnd)) {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("*** SetFocus: [ top] raise=%d\n", aRaise));
|
||||
} else {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("*** SetFocus: [child] raise=%d\n", aRaise));
|
||||
}
|
||||
#endif
|
||||
@ -2713,7 +2713,7 @@ void nsWindow::UpdateGlass()
|
||||
break;
|
||||
}
|
||||
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("glass margins: left:%d top:%d right:%d bottom:%d\n",
|
||||
margins.cxLeftWidth, margins.cyTopHeight,
|
||||
margins.cxRightWidth, margins.cyBottomHeight));
|
||||
@ -3046,7 +3046,7 @@ NS_METHOD nsWindow::SetIcon(const nsAString& aIconSpec)
|
||||
#ifdef DEBUG_SetIcon
|
||||
else {
|
||||
NS_LossyConvertUTF16toASCII cPath(iconPath);
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("\nIcon load error; icon=%s, rc=0x%08X\n\n",
|
||||
cPath.get(), ::GetLastError()));
|
||||
}
|
||||
@ -3060,7 +3060,7 @@ NS_METHOD nsWindow::SetIcon(const nsAString& aIconSpec)
|
||||
#ifdef DEBUG_SetIcon
|
||||
else {
|
||||
NS_LossyConvertUTF16toASCII cPath(iconPath);
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("\nSmall icon load error; icon=%s, rc=0x%08X\n\n",
|
||||
cPath.get(), ::GetLastError()));
|
||||
}
|
||||
@ -3901,7 +3901,7 @@ bool nsWindow::DispatchMouseEvent(uint32_t aEventType, WPARAM wParam,
|
||||
event.clickCount = sLastClickCount;
|
||||
|
||||
#ifdef NS_DEBUG_XX
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("Msg Time: %d Click Count: %d\n", curMsgTime, event.clickCount));
|
||||
#endif
|
||||
|
||||
@ -5881,30 +5881,30 @@ void nsWindow::OnWindowPosChanged(WINDOWPOS* wp)
|
||||
|
||||
#ifdef WINSTATE_DEBUG_OUTPUT
|
||||
if (mWnd == WinUtils::GetTopLevelHWND(mWnd)) {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, ("*** OnWindowPosChanged: [ top] "));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO, ("*** OnWindowPosChanged: [ top] "));
|
||||
} else {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, ("*** OnWindowPosChanged: [child] "));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO, ("*** OnWindowPosChanged: [child] "));
|
||||
}
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, ("WINDOWPOS flags:"));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO, ("WINDOWPOS flags:"));
|
||||
if (wp->flags & SWP_FRAMECHANGED) {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, ("SWP_FRAMECHANGED "));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO, ("SWP_FRAMECHANGED "));
|
||||
}
|
||||
if (wp->flags & SWP_SHOWWINDOW) {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, ("SWP_SHOWWINDOW "));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO, ("SWP_SHOWWINDOW "));
|
||||
}
|
||||
if (wp->flags & SWP_NOSIZE) {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, ("SWP_NOSIZE "));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO, ("SWP_NOSIZE "));
|
||||
}
|
||||
if (wp->flags & SWP_HIDEWINDOW) {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, ("SWP_HIDEWINDOW "));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO, ("SWP_HIDEWINDOW "));
|
||||
}
|
||||
if (wp->flags & SWP_NOZORDER) {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, ("SWP_NOZORDER "));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO, ("SWP_NOZORDER "));
|
||||
}
|
||||
if (wp->flags & SWP_NOACTIVATE) {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, ("SWP_NOACTIVATE "));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO, ("SWP_NOACTIVATE "));
|
||||
}
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, ("\n"));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO, ("\n"));
|
||||
#endif
|
||||
|
||||
// Handle window size mode changes
|
||||
@ -5948,19 +5948,19 @@ void nsWindow::OnWindowPosChanged(WINDOWPOS* wp)
|
||||
#ifdef WINSTATE_DEBUG_OUTPUT
|
||||
switch (mSizeMode) {
|
||||
case nsSizeMode_Normal:
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("*** mSizeMode: nsSizeMode_Normal\n"));
|
||||
break;
|
||||
case nsSizeMode_Minimized:
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("*** mSizeMode: nsSizeMode_Minimized\n"));
|
||||
break;
|
||||
case nsSizeMode_Maximized:
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("*** mSizeMode: nsSizeMode_Maximized\n"));
|
||||
break;
|
||||
default:
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, ("*** mSizeMode: ??????\n"));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO, ("*** mSizeMode: ??????\n"));
|
||||
break;
|
||||
};
|
||||
#endif
|
||||
@ -6044,7 +6044,7 @@ void nsWindow::OnWindowPosChanged(WINDOWPOS* wp)
|
||||
mLastSize.height = newHeight;
|
||||
|
||||
#ifdef WINSTATE_DEBUG_OUTPUT
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("*** Resize window: %d x %d x %d x %d\n", wp->x, wp->y,
|
||||
newWidth, newHeight));
|
||||
#endif
|
||||
@ -6730,7 +6730,7 @@ NS_IMETHODIMP
|
||||
nsWindow::GetToggledKeyState(uint32_t aKeyCode, bool* aLEDState)
|
||||
{
|
||||
#ifdef DEBUG_KBSTATE
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, ("GetToggledKeyState\n"));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO, ("GetToggledKeyState\n"));
|
||||
#endif
|
||||
NS_ENSURE_ARG_POINTER(aLEDState);
|
||||
*aLEDState = (::GetKeyState(aKeyCode) & 1) != 0;
|
||||
@ -6970,13 +6970,13 @@ LRESULT CALLBACK nsWindow::MozSpecialMsgFilter(int code, WPARAM wParam, LPARAM l
|
||||
if (code != gLastMsgCode) {
|
||||
if (gMSGFEvents[inx].mId == code) {
|
||||
#ifdef DEBUG
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("MozSpecialMessageProc - code: 0x%X - %s hw: %p\n",
|
||||
code, gMSGFEvents[inx].mStr, pMsg->hwnd));
|
||||
#endif
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("MozSpecialMessageProc - code: 0x%X - %d hw: %p\n",
|
||||
code, gMSGFEvents[inx].mId, pMsg->hwnd));
|
||||
#endif
|
||||
@ -7062,7 +7062,7 @@ void nsWindow::RegisterSpecialDropdownHooks()
|
||||
nullptr, GetCurrentThreadId());
|
||||
#ifdef POPUP_ROLLUP_DEBUG_OUTPUT
|
||||
if (!sMsgFilterHook) {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("***** SetWindowsHookEx is NOT installed for WH_MSGFILTER!\n"));
|
||||
}
|
||||
#endif
|
||||
@ -7075,7 +7075,7 @@ void nsWindow::RegisterSpecialDropdownHooks()
|
||||
nullptr, GetCurrentThreadId());
|
||||
#ifdef POPUP_ROLLUP_DEBUG_OUTPUT
|
||||
if (!sCallProcHook) {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("***** SetWindowsHookEx is NOT installed for WH_CALLWNDPROC!\n"));
|
||||
}
|
||||
#endif
|
||||
@ -7088,7 +7088,7 @@ void nsWindow::RegisterSpecialDropdownHooks()
|
||||
nullptr, GetCurrentThreadId());
|
||||
#ifdef POPUP_ROLLUP_DEBUG_OUTPUT
|
||||
if (!sCallMouseHook) {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("***** SetWindowsHookEx is NOT installed for WH_MOUSE!\n"));
|
||||
}
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@ void PrintEvent(UINT msg, bool aShowAllEvents, bool aShowMouseMoves)
|
||||
}
|
||||
if (aShowAllEvents || (!aShowAllEvents && gLastEventMsg != (long)msg)) {
|
||||
if (aShowMouseMoves || (!aShowMouseMoves && msg != 0x0020 && msg != 0x0200 && msg != 0x0084)) {
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO,
|
||||
("%6d - 0x%04X %s\n", gEventCounter++, msg,
|
||||
gAllEvents[inx].mStr ? gAllEvents[inx].mStr : "Unknown"));
|
||||
gLastEventMsg = msg;
|
||||
@ -59,7 +59,7 @@ bool is_vk_down(int vk)
|
||||
{
|
||||
SHORT st = GetKeyState(vk);
|
||||
#ifdef DEBUG
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, ("is_vk_down vk=%x st=%x\n",vk, st));
|
||||
MOZ_LOG(gWindowsLog, PR_LOG_INFO, ("is_vk_down vk=%x st=%x\n",vk, st));
|
||||
#endif
|
||||
return (st < 0);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ typedef struct {
|
||||
int mId;
|
||||
} MSGFEventMsgInfo;
|
||||
|
||||
#define DISPLAY_NMM_PRT(_arg) MOZ_LOG(gWindowsLog, PR_LOG_ALWAYS, ((_arg)));
|
||||
#define DISPLAY_NMM_PRT(_arg) MOZ_LOG(gWindowsLog, PR_LOG_INFO, ((_arg)));
|
||||
#else
|
||||
#define DISPLAY_NMM_PRT(_arg)
|
||||
#endif // defined(POPUP_ROLLUP_DEBUG_OUTPUT)
|
||||
|
@ -331,12 +331,12 @@ NS_DebugBreak(uint32_t aSeverity, const char* aStr, const char* aExpr,
|
||||
|
||||
case NS_DEBUG_BREAK:
|
||||
sevString = "###!!! BREAK";
|
||||
ll = PR_LOG_ALWAYS;
|
||||
ll = PR_LOG_ERROR;
|
||||
break;
|
||||
|
||||
case NS_DEBUG_ABORT:
|
||||
sevString = "###!!! ABORT";
|
||||
ll = PR_LOG_ALWAYS;
|
||||
ll = PR_LOG_ERROR;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user