Loading accessible/src/atk/nsHTMLImageAccessibleWrap.h→accessible/src/atk/ImageAccessibleWrap.h +10 −4 Original line number Diff line number Diff line Loading @@ -4,12 +4,18 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _NSHTMLIMAGEACCESSIBLEWRAP_H #define _NSHTMLIMAGEACCESSIBLEWRAP_H #ifndef mozilla_a11y_ImageAccessibleWrap_h__ #define mozilla_a11y_ImageAccessibleWrap_h__ #include "nsHTMLImageAccessible.h" #include "ImageAccessible.h" typedef class nsHTMLImageAccessible nsHTMLImageAccessibleWrap; namespace mozilla { namespace a11y { typedef class ImageAccessible ImageAccessibleWrap; } // namespace a11y } // namespace mozilla #endif accessible/src/atk/nsMaiInterfaceImage.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -7,9 +7,12 @@ #include "InterfaceInitFuncs.h" #include "AccessibleWrap.h" #include "nsHTMLImageAccessible.h" #include "ImageAccessible.h" #include "nsMai.h" using namespace mozilla; using namespace mozilla::a11y; extern "C" { const gchar* getDescriptionCB(AtkObject* aAtkObj); Loading @@ -21,7 +24,7 @@ getImagePositionCB(AtkImage* aImage, gint* aAccX, gint* aAccY, if (!accWrap || !accWrap->IsImage()) return; nsHTMLImageAccessible* image = accWrap->AsImage(); ImageAccessible* image = accWrap->AsImage(); PRUint32 geckoCoordType = (aCoordType == ATK_XY_WINDOW) ? nsIAccessibleCoordinateType::COORDTYPE_WINDOW_RELATIVE : nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE; Loading accessible/src/base/Logging.cpp +38 −6 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include "nsDocShellLoadTypes.h" #include "nsIChannel.h" #include "nsIInterfaceRequestorUtils.h" #include "nsISelectionPrivate.h" #include "nsTraceRefcntImpl.h" #include "nsIWebProgress.h" #include "prenv.h" Loading Loading @@ -44,10 +45,17 @@ EnableLogging(const char* aModulesStr) { "doccreate", logging::eDocCreate }, { "docdestroy", logging::eDocDestroy }, { "doclifecycle", logging::eDocLifeCycle }, { "events", logging::eEvents }, { "platforms", logging::ePlatforms }, { "stack", logging::eStack }, { "text", logging::eText }, { "tree", logging::eTree } { "tree", logging::eTree }, { "DOMEvents", logging::eDOMEvents }, { "focus", logging::eFocus }, { "selection", logging::eSelection }, { "notifications", logging::eNotifications } }; const char* token = aModulesStr; Loading Loading @@ -453,6 +461,27 @@ logging::OuterDocDestroy(OuterDocAccessible* aOuterDoc) MsgEnd(); } void logging::SelChange(nsISelection* aSelection, DocAccessible* aDocument) { nsCOMPtr<nsISelectionPrivate> privSel(do_QueryInterface(aSelection)); PRInt16 type = 0; privSel->GetType(&type); const char* strType = 0; if (type == nsISelectionController::SELECTION_NORMAL) strType = "normal"; else if (type == nsISelectionController::SELECTION_SPELLCHECK) strType = "spellcheck"; else strType = "unknown"; bool isIgnored = !aDocument || !aDocument->IsContentLoaded(); printf("\nSelection changed, selection type: %s, notification %s\n", strType, (isIgnored ? "ignored" : "pending")); } void logging::MsgBegin(const char* aTitle, const char* aMsgText, ...) { Loading Loading @@ -494,13 +523,16 @@ logging::Text(const char* aText) void logging::Address(const char* aDescr, Accessible* aAcc) { nsINode* node = aAcc->GetNode(); nsIDocument* docNode = aAcc->GetDocumentNode(); DocAccessible* doc = GetAccService()->GetDocAccessibleFromCache(docNode); if (!aAcc->IsDoc()) { printf(" %s accessible: %p, node: %p\n", aDescr, static_cast<void*>(aAcc), static_cast<void*>(node)); printf(" docacc for %s accessible: %p, node: %p\n", aDescr, static_cast<void*>(aAcc), static_cast<void*>(aAcc->GetNode())); } DocAccessible* doc = aAcc->Document(); nsIDocument* docNode = aAcc->GetDocumentNode(); printf(" document: %p, node: %p\n", static_cast<void*>(doc), static_cast<void*>(docNode)); printf(" "); LogDocURI(docNode); printf("\n"); Loading accessible/src/base/Logging.h +20 −7 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ class DocAccessible; class nsIDocument; class nsINode; class nsIRequest; class nsISelection; class nsIWebProgress; namespace mozilla { Loading @@ -31,10 +32,17 @@ enum EModules { eDocCreate = 1 << 1, eDocDestroy = 1 << 2, eDocLifeCycle = eDocLoad | eDocCreate | eDocDestroy, ePlatforms = 1 << 3, eStack = 1 << 4, eText = 1 << 5, eTree = 1 << 6 eEvents = 1 << 3, ePlatforms = 1 << 4, eStack = 1 << 5, eText = 1 << 6, eTree = 1 << 7, eDOMEvents = 1 << 8, eFocus = 1 << 9, eSelection = 1 << 10, eNotifications = eDOMEvents | eSelection | eFocus }; /** Loading Loading @@ -76,6 +84,11 @@ void DocDestroy(const char* aMsg, nsIDocument* aDocumentNode, */ void OuterDocDestroy(OuterDocAccessible* OuterDoc); /** * Log the selection change. */ void SelChange(nsISelection* aSelection, DocAccessible* aDocument); /** * Log the message ('title: text' format) on new line. Print the start and end * boundaries of the message body designated by '{' and '}' (2 spaces indent for Loading @@ -85,7 +98,7 @@ void MsgBegin(const char* aTitle, const char* aMsgText, ...); void MsgEnd(); /** * Log the entry into message body (4 spaces offset). * Log the entry into message body (4 spaces indent). */ void MsgEntry(const char* aEntryText, ...); Loading @@ -95,12 +108,12 @@ void MsgEntry(const char* aEntryText, ...); void Text(const char* aText); /** * Log the accesisble object address (4 spaces indent). * Log the accessible object address as message entry (4 spaces indent). */ void Address(const char* aDescr, Accessible* aAcc); /** * Log the DOM node info. * Log the DOM node info as message entry. */ void Node(const char* aDescr, nsINode* aNode); Loading accessible/src/base/NotificationController.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,14 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime) events.SwapElements(mEvents); PRUint32 eventCount = events.Length(); #ifdef DEBUG if (eventCount > 0 && logging::IsEnabled(logging::eEvents)) { logging::MsgBegin("EVENTS", "events processing"); logging::Address("document", mDocument); logging::MsgEnd(); } #endif for (PRUint32 idx = 0; idx < eventCount; idx++) { AccEvent* accEvent = events[idx]; if (accEvent->mEventRule != AccEvent::eDoNotEmit) { Loading Loading
accessible/src/atk/nsHTMLImageAccessibleWrap.h→accessible/src/atk/ImageAccessibleWrap.h +10 −4 Original line number Diff line number Diff line Loading @@ -4,12 +4,18 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _NSHTMLIMAGEACCESSIBLEWRAP_H #define _NSHTMLIMAGEACCESSIBLEWRAP_H #ifndef mozilla_a11y_ImageAccessibleWrap_h__ #define mozilla_a11y_ImageAccessibleWrap_h__ #include "nsHTMLImageAccessible.h" #include "ImageAccessible.h" typedef class nsHTMLImageAccessible nsHTMLImageAccessibleWrap; namespace mozilla { namespace a11y { typedef class ImageAccessible ImageAccessibleWrap; } // namespace a11y } // namespace mozilla #endif
accessible/src/atk/nsMaiInterfaceImage.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -7,9 +7,12 @@ #include "InterfaceInitFuncs.h" #include "AccessibleWrap.h" #include "nsHTMLImageAccessible.h" #include "ImageAccessible.h" #include "nsMai.h" using namespace mozilla; using namespace mozilla::a11y; extern "C" { const gchar* getDescriptionCB(AtkObject* aAtkObj); Loading @@ -21,7 +24,7 @@ getImagePositionCB(AtkImage* aImage, gint* aAccX, gint* aAccY, if (!accWrap || !accWrap->IsImage()) return; nsHTMLImageAccessible* image = accWrap->AsImage(); ImageAccessible* image = accWrap->AsImage(); PRUint32 geckoCoordType = (aCoordType == ATK_XY_WINDOW) ? nsIAccessibleCoordinateType::COORDTYPE_WINDOW_RELATIVE : nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE; Loading
accessible/src/base/Logging.cpp +38 −6 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include "nsDocShellLoadTypes.h" #include "nsIChannel.h" #include "nsIInterfaceRequestorUtils.h" #include "nsISelectionPrivate.h" #include "nsTraceRefcntImpl.h" #include "nsIWebProgress.h" #include "prenv.h" Loading Loading @@ -44,10 +45,17 @@ EnableLogging(const char* aModulesStr) { "doccreate", logging::eDocCreate }, { "docdestroy", logging::eDocDestroy }, { "doclifecycle", logging::eDocLifeCycle }, { "events", logging::eEvents }, { "platforms", logging::ePlatforms }, { "stack", logging::eStack }, { "text", logging::eText }, { "tree", logging::eTree } { "tree", logging::eTree }, { "DOMEvents", logging::eDOMEvents }, { "focus", logging::eFocus }, { "selection", logging::eSelection }, { "notifications", logging::eNotifications } }; const char* token = aModulesStr; Loading Loading @@ -453,6 +461,27 @@ logging::OuterDocDestroy(OuterDocAccessible* aOuterDoc) MsgEnd(); } void logging::SelChange(nsISelection* aSelection, DocAccessible* aDocument) { nsCOMPtr<nsISelectionPrivate> privSel(do_QueryInterface(aSelection)); PRInt16 type = 0; privSel->GetType(&type); const char* strType = 0; if (type == nsISelectionController::SELECTION_NORMAL) strType = "normal"; else if (type == nsISelectionController::SELECTION_SPELLCHECK) strType = "spellcheck"; else strType = "unknown"; bool isIgnored = !aDocument || !aDocument->IsContentLoaded(); printf("\nSelection changed, selection type: %s, notification %s\n", strType, (isIgnored ? "ignored" : "pending")); } void logging::MsgBegin(const char* aTitle, const char* aMsgText, ...) { Loading Loading @@ -494,13 +523,16 @@ logging::Text(const char* aText) void logging::Address(const char* aDescr, Accessible* aAcc) { nsINode* node = aAcc->GetNode(); nsIDocument* docNode = aAcc->GetDocumentNode(); DocAccessible* doc = GetAccService()->GetDocAccessibleFromCache(docNode); if (!aAcc->IsDoc()) { printf(" %s accessible: %p, node: %p\n", aDescr, static_cast<void*>(aAcc), static_cast<void*>(node)); printf(" docacc for %s accessible: %p, node: %p\n", aDescr, static_cast<void*>(aAcc), static_cast<void*>(aAcc->GetNode())); } DocAccessible* doc = aAcc->Document(); nsIDocument* docNode = aAcc->GetDocumentNode(); printf(" document: %p, node: %p\n", static_cast<void*>(doc), static_cast<void*>(docNode)); printf(" "); LogDocURI(docNode); printf("\n"); Loading
accessible/src/base/Logging.h +20 −7 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ class DocAccessible; class nsIDocument; class nsINode; class nsIRequest; class nsISelection; class nsIWebProgress; namespace mozilla { Loading @@ -31,10 +32,17 @@ enum EModules { eDocCreate = 1 << 1, eDocDestroy = 1 << 2, eDocLifeCycle = eDocLoad | eDocCreate | eDocDestroy, ePlatforms = 1 << 3, eStack = 1 << 4, eText = 1 << 5, eTree = 1 << 6 eEvents = 1 << 3, ePlatforms = 1 << 4, eStack = 1 << 5, eText = 1 << 6, eTree = 1 << 7, eDOMEvents = 1 << 8, eFocus = 1 << 9, eSelection = 1 << 10, eNotifications = eDOMEvents | eSelection | eFocus }; /** Loading Loading @@ -76,6 +84,11 @@ void DocDestroy(const char* aMsg, nsIDocument* aDocumentNode, */ void OuterDocDestroy(OuterDocAccessible* OuterDoc); /** * Log the selection change. */ void SelChange(nsISelection* aSelection, DocAccessible* aDocument); /** * Log the message ('title: text' format) on new line. Print the start and end * boundaries of the message body designated by '{' and '}' (2 spaces indent for Loading @@ -85,7 +98,7 @@ void MsgBegin(const char* aTitle, const char* aMsgText, ...); void MsgEnd(); /** * Log the entry into message body (4 spaces offset). * Log the entry into message body (4 spaces indent). */ void MsgEntry(const char* aEntryText, ...); Loading @@ -95,12 +108,12 @@ void MsgEntry(const char* aEntryText, ...); void Text(const char* aText); /** * Log the accesisble object address (4 spaces indent). * Log the accessible object address as message entry (4 spaces indent). */ void Address(const char* aDescr, Accessible* aAcc); /** * Log the DOM node info. * Log the DOM node info as message entry. */ void Node(const char* aDescr, nsINode* aNode); Loading
accessible/src/base/NotificationController.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,14 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime) events.SwapElements(mEvents); PRUint32 eventCount = events.Length(); #ifdef DEBUG if (eventCount > 0 && logging::IsEnabled(logging::eEvents)) { logging::MsgBegin("EVENTS", "events processing"); logging::Address("document", mDocument); logging::MsgEnd(); } #endif for (PRUint32 idx = 0; idx < eventCount; idx++) { AccEvent* accEvent = events[idx]; if (accEvent->mEventRule != AccEvent::eDoNotEmit) { Loading