Permalink
Browse files

Merge inbound to m-c.

  • Loading branch information...
2 parents bd23018 + 8b1cada commit c0d1e3db40eb018e9a24a28dc84c5e90e6ff45a8 @rvandermeulen rvandermeulen committed Apr 1, 2013
Showing with 3,842 additions and 2,759 deletions.
  1. +1 −0 accessible/src/base/TextAttrs.cpp
  2. +1 −1 accessible/src/base/nsAccUtils.cpp
  3. +6 −19 accessible/src/base/nsAccUtils.h
  4. +73 −0 accessible/src/base/nsAccessibilityService.cpp
  5. +5 −2 accessible/src/generic/Accessible.cpp
  6. +108 −100 accessible/src/generic/HyperTextAccessible.cpp
  7. +6 −0 accessible/src/generic/HyperTextAccessible.h
  8. +32 −82 accessible/tests/mochitest/text/test_multiline.html
  9. +35 −103 accessible/tests/mochitest/text/test_singleline.html
  10. +46 −158 accessible/tests/mochitest/text/test_whitespaces.html
  11. +50 −0 browser/app/nsBrowserApp.cpp
  12. +3 −0 browser/app/profile/firefox.js
  13. +19 −42 browser/base/content/browser.js
  14. +10 −12 browser/base/content/tabbrowser.xml
  15. +40 −3 browser/base/content/test/browser_popupNotification.js
  16. +1 −1 browser/extensions/pdfjs/README.mozilla
  17. +3 −2 browser/extensions/pdfjs/components/PdfStreamConverter.js
  18. +1 −0 browser/extensions/pdfjs/content/PdfJs.jsm
  19. +90 −16 browser/extensions/pdfjs/content/build/pdf.js
  20. +207 −84 browser/extensions/pdfjs/content/web/viewer.js
  21. +1 −0 browser/locales/en-US/pdfviewer/viewer.properties
  22. +0 −32 browser/metro/base/tests/Makefile.in
  23. +0 −9 browser/metro/base/tests/addons/browser_install1_1/bootstrap.js
  24. +0 −24 browser/metro/base/tests/addons/browser_install1_1/install.rdf
  25. +0 −22 browser/metro/base/tests/addons/browser_install1_2/install.rdf
  26. +0 −23 browser/metro/base/tests/addons/browser_install1_3/install.rdf
  27. +0 −9 browser/metro/base/tests/addons/browser_locale1/boostrap.js
  28. +0 −4 browser/metro/base/tests/addons/browser_locale1/chrome.manifest
  29. +0 −24 browser/metro/base/tests/addons/browser_locale1/install.rdf
  30. +46 −0 browser/metro/base/tests/mochitest/Makefile.in
  31. 0 browser/metro/base/tests/{ → mochitest}/browser_canonizeURL.js
  32. 0 browser/metro/base/tests/{ → mochitest}/browser_context_menu_tests.js
  33. 0 browser/metro/base/tests/{ → mochitest}/browser_context_menu_tests_01.html
  34. 0 browser/metro/base/tests/{ → mochitest}/browser_context_menu_tests_02.html
  35. 0 browser/metro/base/tests/{ → mochitest}/browser_context_menu_tests_03.html
  36. 0 browser/metro/base/tests/{ → mochitest}/browser_context_ui.js
  37. 0 browser/metro/base/tests/{ → mochitest}/browser_downloads.js
  38. 0 browser/metro/base/tests/{ → mochitest}/browser_onscreen_keyboard.html
  39. 0 browser/metro/base/tests/{ → mochitest}/browser_onscreen_keyboard.js
  40. 0 browser/metro/base/tests/{ → mochitest}/browser_plugin_input.html
  41. 0 browser/metro/base/tests/{ → mochitest}/browser_plugin_input_keyboard.js
  42. 0 browser/metro/base/tests/{ → mochitest}/browser_plugin_input_mouse.js
  43. 0 browser/metro/base/tests/{ → mochitest}/browser_remotetabs.js
  44. 0 browser/metro/base/tests/{ → mochitest}/browser_sanitize_ui.js
  45. 0 browser/metro/base/tests/{ → mochitest}/browser_test.js
  46. 0 browser/metro/base/tests/{ → mochitest}/browser_tilegrid.xul
  47. 0 browser/metro/base/tests/{ → mochitest}/browser_tiles.js
  48. 0 browser/metro/base/tests/{ → mochitest}/browser_topsites.js
  49. 0 browser/metro/base/tests/{ → mochitest}/head.js
  50. +4 −0 browser/metro/base/tests/mochitest/moz.build
  51. BIN browser/metro/base/tests/{ → mochitest}/res/image01.png
  52. 0 browser/metro/base/tests/{ → mochitest}/text-block.html
  53. +1 −0 browser/metro/base/tests/moz.build
  54. +9 −0 browser/metro/shell/testing/metrotestharness.cpp
  55. +4 −1 content/base/public/nsIDOMDataChannel.idl
  56. +14 −0 content/base/src/nsDOMDataChannel.cpp
  57. +1 −1 content/base/test/chrome/test_csp_bug768029.html
  58. +2 −0 content/svg/content/src/SVGAnimationElement.h
  59. +2 −0 content/svg/content/src/SVGGradientElement.h
  60. +14 −0 content/svg/content/src/SVGTextContentElement.cpp
  61. +1 −0 content/svg/content/src/SVGTextContentElement.h
  62. +2 −0 content/svg/content/src/SVGTransformableElement.h
  63. +4 −0 content/svg/content/src/nsSVGFilters.h
  64. +7 −0 content/svg/content/test/selectSubString-helper.svg
  65. +72 −0 content/svg/content/test/test_selectSubString.xhtml
  66. +30 −5 dom/indexedDB/CheckPermissionsHelper.cpp
  67. +10 −7 dom/indexedDB/IDBObjectStore.cpp
  68. +1 −0 dom/indexedDB/Makefile.in
  69. +1 −1 dom/indexedDB/OpenDatabaseHelper.cpp
  70. +18 −3 dom/indexedDB/OpenDatabaseHelper.h
  71. +1 −0 dom/media/MediaManager.cpp
  72. +17 −7 dom/media/PeerConnection.js
  73. +4 −3 dom/media/bridge/IPeerConnection.idl
  74. +1 −1 dom/media/tests/mochitest/test_peerConnection_bug834153.html
  75. +3 −4 dom/mobilemessage/src/ril/MobileMessageDatabaseService.js
  76. +0 −1 dom/push/src/PushService.js
  77. +27 −18 dom/quota/CheckQuotaHelper.cpp
  78. +3 −0 dom/quota/CheckQuotaHelper.h
  79. +27 −10 dom/quota/QuotaManager.cpp
  80. +3 −3 dom/quota/QuotaManager.h
  81. +5 −5 dom/system/gonk/RILContentHelper.js
  82. +2 −1 dom/webidl/SVGTextContentElement.webidl
  83. +9 −0 gfx/thebes/gfxWindowsPlatform.h
  84. +2 −2 image/test/reftest/pngsuite-ancillary/reftest.list
  85. +28 −0 intl/hyphenation/src/README.mozilla
  86. +10 −3 intl/icu/source/aclocal.m4
  87. +217 −0 intl/icu/source/config/mh-msys-msvc
  88. +11 −4 intl/icu/source/configure
  89. +2 −2 intl/icu/source/configure.in
  90. +2 −1 intl/icu/source/data/Makefile.in
  91. +11 −0 intl/icu/source/runConfigureICU
  92. +11 −0 intl/update-icu.sh
  93. +41 −32 js/src/builtin/Profilers.cpp
  94. +1 −0 layout/base/nsPresArena.h
  95. +0 −5 layout/build/nsLayoutStatics.cpp
  96. +21 −25 layout/generic/nsAbsoluteContainingBlock.cpp
  97. +43 −44 layout/generic/nsAbsoluteContainingBlock.h
  98. +35 −29 layout/generic/nsBlockFrame.cpp
  99. +12 −3 layout/generic/nsBlockReflowState.cpp
  100. +3 −3 layout/generic/nsCanvasFrame.cpp
  101. +5 −3 layout/generic/nsColumnSetFrame.cpp
  102. +27 −35 layout/generic/nsContainerFrame.cpp
  103. +25 −16 layout/generic/nsContainerFrame.h
  104. +6 −6 layout/generic/nsFirstLetterFrame.cpp
  105. +28 −19 layout/generic/nsFrameList.cpp
  106. +51 −25 layout/generic/nsFrameList.h
  107. +23 −18 layout/generic/nsInlineFrame.cpp
  108. +3 −0 layout/reftests/svg/text/reftest.list
  109. +16 −0 layout/reftests/svg/text/selectSubString-2-ref.svg
  110. +13 −0 layout/reftests/svg/text/selectSubString-2.svg
  111. +16 −0 layout/reftests/svg/text/selectSubString-3-ref.svg
  112. +15 −0 layout/reftests/svg/text/selectSubString-3.svg
  113. +16 −0 layout/reftests/svg/text/selectSubString-ref.svg
  114. +13 −0 layout/reftests/svg/text/selectSubString.svg
  115. +41 −6 layout/svg/nsSVGTextFrame2.cpp
  116. +1 −0 layout/svg/nsSVGTextFrame2.h
  117. +5 −4 layout/tables/nsTableRowGroupFrame.cpp
  118. +2 −2 layout/xul/base/src/nsMenuFrame.cpp
  119. +4 −2 media/mtransport/test/sctp_unittest.cpp
  120. +33 −19 media/webrtc/signaling/src/media/VcmSIPCCBinding.cpp
  121. +42 −24 media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
  122. +5 −2 media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
  123. +7 −2 media/webrtc/signaling/src/sipcc/core/gsm/fsmdef.c
  124. +1 −10 media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
  125. +1 −1 media/webrtc/signaling/src/sipcc/core/gsm/h/lsm.h
  126. +19 −16 media/webrtc/signaling/src/sipcc/core/gsm/lsm.c
  127. +1 −0 media/webrtc/signaling/src/sipcc/include/cc_constants.h
  128. +3 −0 media/webrtc/signaling/src/sipcc/include/vcm.h
  129. +32 −18 mobile/android/base/gfx/GeckoLayerClient.java
  130. +11 −0 mobile/android/base/gfx/ImmutableViewportMetrics.java
  131. +5 −2 mobile/android/base/gfx/JavaPanZoomController.java
  132. +10 −4 modules/libpref/src/init/all.js
  133. +408 −438 netwerk/sctp/datachannel/DataChannel.cpp
  134. +71 −33 netwerk/sctp/datachannel/DataChannel.h
  135. +15 −23 netwerk/sctp/datachannel/DataChannelProtocol.h
  136. +1 −0 netwerk/sctp/sctp_update.log
  137. +12 −2 netwerk/sctp/src/netinet/sctp.h
  138. +13 −19 netwerk/sctp/src/netinet/sctp_asconf.c
  139. +46 −48 netwerk/sctp/src/netinet/sctp_bsd_addr.c
  140. +1 −2 netwerk/sctp/src/netinet/sctp_callout.c
  141. +1 −1 netwerk/sctp/src/netinet/sctp_crc32.c
  142. +7 −0 netwerk/sctp/src/netinet/sctp_header.h
  143. +26 −30 netwerk/sctp/src/netinet/sctp_indata.c
  144. +15 −9 netwerk/sctp/src/netinet/sctp_input.c
  145. +5 −3 netwerk/sctp/src/netinet/sctp_os_userspace.h
  146. +136 −161 netwerk/sctp/src/netinet/sctp_output.c
  147. +3 −7 netwerk/sctp/src/netinet/sctp_output.h
  148. +360 −321 netwerk/sctp/src/netinet/sctp_pcb.c
  149. +2 −1 netwerk/sctp/src/netinet/sctp_pcb.h
  150. +5 −12 netwerk/sctp/src/netinet/sctp_structs.h
  151. +42 −16 netwerk/sctp/src/netinet/sctp_sysctl.c
  152. +9 −7 netwerk/sctp/src/netinet/sctp_timer.c
  153. +8 −0 netwerk/sctp/src/netinet/sctp_userspace.c
  154. +182 −74 netwerk/sctp/src/netinet/sctp_usrreq.c
  155. +83 −72 netwerk/sctp/src/netinet/sctputil.c
  156. +1 −1 netwerk/sctp/src/netinet6/sctp6_usrreq.c
  157. +1 −1 netwerk/sctp/src/user_ip6_var.h
  158. +23 −45 netwerk/sctp/src/user_mbuf.c
  159. +1 −25 netwerk/sctp/src/user_mbuf.h
  160. +4 −4 netwerk/sctp/src/user_recv_thread.c
  161. +1 −1 netwerk/sctp/src/user_sctp_timer_iterate.c
  162. +68 −12 netwerk/sctp/src/user_socket.c
  163. +7 −6 netwerk/sctp/src/user_socketvar.h
  164. +1 −1 netwerk/sctp/src/usrsctp.h
  165. +0 −17 python/mozbuild/mozbuild/mach_commands.py
  166. +24 −30 toolkit/components/console/content/consoleBindings.xml
  167. +10 −4 toolkit/components/osfile/osfile_async_front.jsm
  168. +21 −17 toolkit/components/osfile/osfile_async_worker.js
  169. +33 −3 toolkit/components/osfile/tests/mochi/main_test_osfile_async.js
  170. +17 −0 toolkit/themes/windows/global/menulist-aero.css
  171. +0 −4 toolkit/themes/windows/global/menulist.css
  172. +7 −4 widget/windows/nsDragService.cpp
  173. +2 −12 widget/windows/nsIMM32Handler.cpp
  174. +2 −2 widget/windows/nsIMM32Handler.h
  175. +3 −2 widget/windows/nsLookAndFeel.cpp
  176. +16 −2 widget/windows/nsNativeThemeWin.cpp
  177. +10 −2 widget/windows/nsScreenManagerWin.cpp
  178. +3 −6 widget/windows/nsScreenWin.cpp
  179. +21 −25 widget/windows/nsWindow.cpp
  180. +3 −1 xpcom/glue/nsCOMArray.h
  181. +11 −11 xpcom/glue/nsTArray-inl.h
  182. +88 −12 xpcom/glue/nsTArray.h
@@ -5,6 +5,7 @@
#include "TextAttrs.h"
+#include "Accessible-inl.h"
#include "HyperTextAccessibleWrap.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
@@ -239,7 +239,7 @@ nsAccUtils::GetSelectableContainer(Accessible* aAccessible, uint64_t aState)
Accessible* parent = aAccessible;
while ((parent = parent->Parent()) && !parent->IsSelect()) {
- if (Role(parent) == nsIAccessibleRole::ROLE_PANE)
+ if (parent->Role() == roles::PANE)
return nullptr;
}
return parent;
@@ -6,8 +6,7 @@
#ifndef nsAccUtils_h_
#define nsAccUtils_h_
-#include "nsIAccessible.h"
-#include "nsIAccessibleRole.h"
+#include "mozilla/a11y/Accessible.h"
#include "nsIAccessibleText.h"
#include "nsAccessibilityService.h"
@@ -193,18 +192,6 @@ class nsAccUtils
static nsIntPoint GetScreenCoordsForParent(Accessible* aAccessible);
/**
- * Return the role of the given accessible.
- */
- static uint32_t Role(nsIAccessible *aAcc)
- {
- uint32_t role = nsIAccessibleRole::ROLE_NOTHING;
- if (aAcc)
- aAcc->GetRole(&role);
-
- return role;
- }
-
- /**
* Get the ARIA attribute characteristics for a given ARIA attribute.
*
* @param aAtom ARIA attribute
@@ -240,12 +227,12 @@ class nsAccUtils
/**
* Return true if the given accessible is embedded object.
*/
- static bool IsEmbeddedObject(nsIAccessible *aAcc)
+ static bool IsEmbeddedObject(Accessible* aAcc)
{
- uint32_t role = Role(aAcc);
- return role != nsIAccessibleRole::ROLE_TEXT_LEAF &&
- role != nsIAccessibleRole::ROLE_WHITESPACE &&
- role != nsIAccessibleRole::ROLE_STATICTEXT;
+ uint32_t role = aAcc->Role();
+ return role != roles::TEXT_LEAF &&
+ role != roles::WHITESPACE &&
+ role != roles::STATICTEXT;
}
/**
@@ -37,6 +37,7 @@
#endif
#ifdef XP_WIN
+#include "mozilla/a11y/Compatibility.h"
#include "HTMLWin32ObjectAccessible.h"
#endif
@@ -63,6 +64,7 @@
#include "mozilla/dom/Element.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
+#include "mozilla/StaticPtr.h"
#include "mozilla/Util.h"
#include "nsDeckFrame.h"
@@ -210,6 +212,45 @@ nsAccessibilityService::GetRootDocumentAccessible(nsIPresShell* aPresShell,
return nullptr;
}
+#ifdef XP_WIN
+static StaticAutoPtr<nsTArray<nsCOMPtr<nsIContent> > > sPendingPlugins;
+static StaticAutoPtr<nsTArray<nsCOMPtr<nsITimer> > > sPluginTimers;
+
+class PluginTimerCallBack MOZ_FINAL : public nsITimerCallback
+{
+public:
+ PluginTimerCallBack(nsIContent* aContent) : mContent(aContent) {}
+
+ NS_DECL_ISUPPORTS
+
+ NS_IMETHODIMP Notify(nsITimer* aTimer) MOZ_FINAL
+ {
+ nsIPresShell* ps = mContent->OwnerDoc()->GetShell();
+ if (ps) {
+ DocAccessible* doc = ps->GetDocAccessible();
+ if (doc) {
+ // Make sure that if we created an accessible for the plugin that wasn't
+ // a plugin accessible we remove it before creating the right accessible.
+ doc->RecreateAccessible(mContent);
+ sPluginTimers->RemoveElement(aTimer);
+ return NS_OK;
+ }
+ }
+
+ // We couldn't get a doc accessible so presumably the document went away.
+ // In this case don't leak our ref to the content or timer.
+ sPendingPlugins->RemoveElement(mContent);
+ sPluginTimers->RemoveElement(aTimer);
+ return NS_OK;
+ }
+
+private:
+ nsCOMPtr<nsIContent> mContent;
+};
+
+NS_IMPL_ISUPPORTS1(PluginTimerCallBack, nsITimerCallback)
+#endif
+
already_AddRefed<Accessible>
nsAccessibilityService::CreatePluginAccessible(nsObjectFrame* aFrame,
nsIContent* aContent,
@@ -225,6 +266,23 @@ nsAccessibilityService::CreatePluginAccessible(nsObjectFrame* aFrame,
if (NS_SUCCEEDED(aFrame->GetPluginInstance(getter_AddRefs(pluginInstance))) &&
pluginInstance) {
#ifdef XP_WIN
+ if (!sPendingPlugins->Contains(aContent) &&
+ (Preferences::GetBool("accessibility.delay_plugins") ||
+ Compatibility::IsJAWS() || Compatibility::IsWE())) {
+ nsCOMPtr<nsITimer> timer = do_CreateInstance(NS_TIMER_CONTRACTID);
+ nsRefPtr<PluginTimerCallBack> cb = new PluginTimerCallBack(aContent);
+ timer->InitWithCallback(cb, Preferences::GetUint("accessibility.delay_plugin_time"),
+ nsITimer::TYPE_ONE_SHOT);
+ sPluginTimers->AppendElement(timer);
+ sPendingPlugins->AppendElement(aContent);
+ return nullptr;
+ }
+
+ // We need to remove aContent from the pending plugins here to avoid
+ // reentrancy. When the timer fires it calls
+ // DocAccessible::ContentInserted() which does the work async.
+ sPendingPlugins->RemoveElement(aContent);
+
// Note: pluginPort will be null if windowless.
HWND pluginPort = nullptr;
aFrame->GetPluginPort(&pluginPort);
@@ -1004,6 +1062,11 @@ nsAccessibilityService::Init()
NS_LITERAL_CSTRING("Active"));
#endif
+#ifdef XP_WIN
+ sPendingPlugins = new nsTArray<nsCOMPtr<nsIContent> >;
+ sPluginTimers = new nsTArray<nsCOMPtr<nsITimer> >;
+#endif
+
gIsShutdown = false;
// Now its safe to start platform accessibility.
@@ -1030,6 +1093,16 @@ nsAccessibilityService::Shutdown()
SelectionManager::Shutdown();
+#ifdef XP_WIN
+ sPendingPlugins = nullptr;
+
+ uint32_t timerCount = sPluginTimers->Length();
+ for (uint32_t i = 0; i < timerCount; i++)
+ sPluginTimers->ElementAt(i)->Cancel();
+
+ sPluginTimers = nullptr;
+#endif
+
// Application is going to be closed, shutdown accessibility and mark
// accessibility service as shutdown to prevent calls of its methods.
// Don't null accessibility service static member at this point to be safe
@@ -14,6 +14,7 @@
#include "nsAccessibleRelation.h"
#include "nsAccessibilityService.h"
#include "nsIAccessibleRelation.h"
+#include "nsIAccessibleRole.h"
#include "nsEventShell.h"
#include "nsTextEquivUtils.h"
#include "Relation.h"
@@ -2654,7 +2655,8 @@ Accessible::InsertChildAt(uint32_t aIndex, Accessible* aChild)
return false;
for (uint32_t idx = aIndex + 1; idx < mChildren.Length(); idx++) {
- NS_ASSERTION(mChildren[idx]->mIndexInParent == idx - 1, "Accessible child index doesn't match");
+ NS_ASSERTION(static_cast<uint32_t>(mChildren[idx]->mIndexInParent) == idx - 1,
+ "Accessible child index doesn't match");
mChildren[idx]->mIndexInParent = idx;
}
@@ -2685,7 +2687,8 @@ Accessible::RemoveChild(Accessible* aChild)
}
for (uint32_t idx = index + 1; idx < mChildren.Length(); idx++) {
- NS_ASSERTION(mChildren[idx]->mIndexInParent == idx, "Accessible child index doesn't match");
+ NS_ASSERTION(static_cast<uint32_t>(mChildren[idx]->mIndexInParent) == idx,
+ "Accessible child index doesn't match");
mChildren[idx]->mIndexInParent = idx - 1;
}
Oops, something went wrong. Retry.

0 comments on commit c0d1e3d

Please sign in to comment.