Skip to content
Browse files

Merge m-c to m-i.

  • Loading branch information...
2 parents 5a88193 + a748f9f commit 221ac7062428708b024d203934381c9276559f94 @Ms2ger Ms2ger committed May 25, 2012
Showing with 4,801 additions and 2,756 deletions.
  1. +23 −22 accessible/src/base/nsAccessiblePivot.cpp
  2. +4 −4 accessible/src/base/nsAccessiblePivot.h
  3. +94 −74 accessible/src/jsat/UtteranceGenerator.jsm
  4. +21 −1 accessible/src/jsat/VirtualCursorController.jsm
  5. +10 −1 accessible/src/mac/mozAccessible.mm
  6. +4 −0 accessible/tests/mochitest/pivot/doc_virtualcursor.html
  7. +1 −1 accessible/tests/mochitest/pivot/test_virtualcursor.html
  8. +1 −0 allmakefiles.sh
  9. +8 −8 b2g/config/tooltool-manifests/releng.manifest
  10. +1 −1 browser/app/profile/firefox.js
  11. +0 −6 browser/components/places/tests/unit/head_bookmarks.js
  12. +0 −5 browser/components/places/tests/unit/xpcshell.ini
  13. +11 −2 browser/components/preferences/connection.js
  14. +3 −11 browser/components/preferences/connection.xul
  15. +1 −0 browser/components/preferences/in-content/tests/Makefile.in
  16. +128 −0 browser/components/preferences/in-content/tests/browser_connection.js
  17. +8 −14 browser/components/privatebrowsing/test/browser/browser_privatebrowsing_lastpbcontextexited.js
  18. +34 −0 build/virtualenv/Makefile.in
  19. +1 −0 chrome/src/nsChromeProtocolHandler.cpp
  20. +2 −0 config/autoconf.mk.in
  21. +1 −1 config/gcc-stl-wrapper.template.h
  22. +1 −0 config/system-headers
  23. +43 −7 configure.in
  24. +8 −0 content/base/src/nsContentSink.cpp
  25. +6 −1 content/base/src/nsGenericElement.cpp
  26. +12 −1 content/events/src/nsIMEStateManager.cpp
  27. +13 −6 content/events/test/test_bug607464.html
  28. +17 −19 content/html/content/src/nsHTMLInputElement.cpp
  29. +5 −1 content/html/content/src/nsHTMLMediaElement.cpp
  30. +17 −19 content/html/content/src/nsHTMLTextAreaElement.cpp
  31. +3 −10 content/html/content/src/nsTextEditorState.cpp
  32. +11 −0 content/media/MediaStreamGraph.cpp
  33. +5 −4 content/media/MediaStreamGraph.h
  34. +1 −3 content/xbl/src/nsXBLBinding.cpp
  35. +3 −2 content/xul/document/src/nsXULDocument.cpp
  36. +4 −0 docshell/base/nsDocShell.cpp
  37. +13 −1 docshell/test/browser/browser_bug92473.js
  38. +9 −0 dom/base/Webapps.js
  39. +5 −6 dom/base/nsDOMClassInfo.cpp
  40. +1 −1 dom/base/nsDOMWindowUtils.cpp
  41. +0 −523 dom/interfaces/base/nsIDOMWindow.idl.orig
  42. +9 −4 dom/locales/en-US/chrome/accessibility/AccessFu.properties
  43. +1 −1 dom/plugins/base/nsPluginStreamListenerPeer.cpp
  44. +490 −0 dom/system/gonk/AutoMounter.cpp
  45. +47 −0 dom/system/gonk/AutoMounter.h
  46. +150 −0 dom/system/gonk/AutoMounterSetting.cpp
  47. +29 −0 dom/system/gonk/AutoMounterSetting.h
  48. +5 −0 dom/system/gonk/Makefile.in
  49. +14 −0 dom/system/gonk/SystemWorkerManager.cpp
  50. +71 −0 dom/system/gonk/Volume.cpp
  51. +95 −0 dom/system/gonk/Volume.h
  52. +85 −0 dom/system/gonk/VolumeCommand.cpp
  53. +185 −0 dom/system/gonk/VolumeCommand.h
  54. +448 −0 dom/system/gonk/VolumeManager.cpp
  55. +183 −0 dom/system/gonk/VolumeManager.h
  56. +20 −0 dom/system/gonk/VolumeManagerLog.h
  57. +53 −11 dom/system/gonk/ril_worker.js
  58. +4 −4 dom/tests/mochitest/bugs/test_bug61098.html
  59. +25 −17 dom/tests/mochitest/webapps/jshelper.js
  60. +24 −5 editor/libeditor/base/nsEditorEventListener.cpp
  61. +1 −0 editor/libeditor/base/nsEditorEventListener.h
  62. +30 −12 extensions/universalchardet/tests/CharsetDetectionTests.js
  63. +1 −1 gfx/gl/GLContext.h
  64. +1 −1 gfx/layers/ipc/CompositorParent.cpp
  65. +2 −0 gfx/thebes/gfxDWriteFonts.h
  66. +6 −4 gfx/thebes/gfxFT2FontBase.cpp
  67. +8 −0 gfx/thebes/gfxFont.cpp
  68. +2 −0 gfx/thebes/gfxFont.h
  69. +1 −1 gfx/thebes/gfxFontUtils.cpp
  70. +8 −1 hal/Hal.cpp
  71. +1 −0 hal/HalTypes.h
  72. +1 −3 hal/gonk/GonkSensor.cpp
  73. +22 −4 hal/gonk/GonkSwitch.cpp
  74. +1 −0 intl/build/Makefile.in
  75. +13 −0 intl/build/nsI18nModule.cpp
  76. +4 −0 intl/locale/public/nsCharsetAlias.h
  77. +4 −0 intl/locale/src/Makefile.in
  78. +26 −6 intl/locale/src/nsCharsetAlias.cpp
  79. +1 −5 intl/uconv/idl/nsICharsetConverterManager.idl
  80. +75 −69 intl/uconv/src/nsCharsetConverterManager.cpp
  81. +7 −17 intl/uconv/src/nsCharsetConverterManager.h
  82. +3 −0 intl/uconv/src/nsConverterOutputStream.cpp
  83. +1 −1 intl/uconv/tests/unit/test_bug399284.js
  84. +2 −0 ipc/app/Makefile.in
  85. +11 −1 ipc/chromium/src/base/platform_thread_posix.cc
  86. +7 −7 js/src/builtin/MapObject.cpp
  87. +17 −3 js/src/builtin/MapObject.h
  88. +12 −12 js/src/builtin/RegExp.cpp
  89. +1 −0 js/src/config/system-headers
  90. +3 −2 js/src/configure.in
  91. +4 −4 js/src/frontend/BytecodeCompiler.cpp
  92. +12 −12 js/src/frontend/BytecodeEmitter.cpp
  93. +1 −1 js/src/frontend/BytecodeEmitter.h
  94. +5 −5 js/src/frontend/FoldConstants.cpp
  95. +17 −17 js/src/frontend/Parser.cpp
  96. +6 −6 js/src/frontend/TreeContext.h
  97. +70 −117 js/src/gc/Root.h
  98. +102 −101 js/src/jsapi.cpp
  99. +10 −4 js/src/jsapi.h
  100. +73 −73 js/src/jsarray.cpp
  101. +3 −3 js/src/jsbool.cpp
  102. +4 −4 js/src/jsclone.cpp
  103. +1 −1 js/src/jscntxt.cpp
  104. +1 −1 js/src/jscntxt.h
  105. +2 −4 js/src/jscntxtinlines.h
  106. +22 −14 js/src/jscompartment.cpp
  107. +1 −1 js/src/jscompartment.h
  108. +9 −9 js/src/jsdate.cpp
  109. +6 −6 js/src/jsdbgapi.cpp
  110. +25 −25 js/src/jsexn.cpp
  111. +18 −17 js/src/jsfriendapi.cpp
  112. +19 −19 js/src/jsfun.cpp
  113. +5 −5 js/src/jsfuninlines.h
  114. +118 −5 js/src/jsgc.cpp
  115. +13 −13 js/src/jsinfer.cpp
  116. +4 −2 js/src/jsinferinlines.h
  117. +63 −63 js/src/jsinterp.cpp
  118. +24 −32 js/src/jsinterpinlines.h
  119. +22 −24 js/src/jsiter.cpp
  120. +1 −1 js/src/jsiter.h
  121. +2 −2 js/src/jsmath.cpp
  122. +3 −3 js/src/jsnum.cpp
  123. +139 −139 js/src/jsobj.cpp
  124. +5 −5 js/src/jsobj.h
  125. +37 −37 js/src/jsobjinlines.h
  126. +19 −18 js/src/json.cpp
  127. +3 −3 js/src/jsonparser.cpp
  128. +4 −4 js/src/jsopcode.cpp
  129. +5 −5 js/src/jspropertytree.cpp
  130. +82 −93 js/src/jsproxy.cpp
  131. +7 −2 js/src/jsproxy.h
  132. +5 −11 js/src/jsprvtd.h
  133. +2 −2 js/src/jspubtd.h
  134. +9 −10 js/src/jsreflect.cpp
  135. +49 −63 js/src/jsscope.cpp
  136. +86 −27 js/src/jsscope.h
  137. +3 −3 js/src/jsscopeinlines.h
  138. +7 −7 js/src/jsscript.cpp
  139. +18 −7 js/src/jsscript.h
  140. +42 −42 js/src/jsstr.cpp
  141. +1 −1 js/src/jsstrinlines.h
  142. +70 −71 js/src/jstypedarray.cpp
  143. +1 −1 js/src/jstypedarrayinlines.h
  144. +3 −3 js/src/jswatchpoint.cpp
  145. +4 −4 js/src/jsweakmap.cpp
  146. +10 −17 js/src/jswrapper.cpp
  147. +0 −1 js/src/jswrapper.h
  148. +62 −62 js/src/jsxml.cpp
  149. +10 −10 js/src/methodjit/Compiler.cpp
  150. +1 −1 js/src/methodjit/Compiler.h
  151. +2 −2 js/src/methodjit/FastOps.cpp
  152. +2 −2 js/src/methodjit/InvokeHelpers.cpp
  153. +1 −1 js/src/methodjit/MonoIC.cpp
  154. +9 −9 js/src/methodjit/PolyIC.cpp
  155. +20 −20 js/src/methodjit/StubCalls.cpp
  156. +3 −3 js/src/perf/jsperf.cpp
  157. +29 −29 js/src/shell/js.cpp
  158. +9 −9 js/src/shell/jsheaptools.cpp
  159. +8 −0 js/src/tests/lib/results.py
  160. +15 −15 js/src/vm/ArgumentsObject.cpp
  161. +75 −75 js/src/vm/Debugger.cpp
  162. +13 −14 js/src/vm/GlobalObject.cpp
  163. +50 −60 js/src/vm/GlobalObject.h
  164. +17 −7 js/src/vm/ObjectImpl.h
  165. +10 −10 js/src/vm/RegExpObject.cpp
  166. +2 −2 js/src/vm/RegExpObject.h
  167. +16 −9 js/src/vm/RegExpStatics.h
  168. +1 −1 js/src/vm/ScopeObject-inl.h
  169. +32 −32 js/src/vm/ScopeObject.cpp
  170. +1 −1 js/src/vm/Stack.cpp
  171. +3 −3 js/src/vm/String-inl.h
  172. +3 −3 js/src/vm/StringObject-inl.h
  173. +3 −3 js/xpconnect/src/XPCComponents.cpp
  174. +2 −2 js/xpconnect/src/XPCQuickStubs.h
  175. +2 −2 js/xpconnect/src/XPCRuntimeService.cpp
  176. +2 −2 js/xpconnect/src/dombindings.cpp
  177. +2 −1 js/xpconnect/tests/chrome/test_cows.xul
  178. +1 −28 layout/forms/nsTextControlFrame.cpp
  179. +5 −5 layout/generic/nsFrame.cpp
  180. +13 −4 layout/generic/nsFrameSelection.h
  181. +11 −19 layout/generic/nsSelection.cpp
  182. +14 −22 layout/reftests/bugs/598726-1.html
  183. +2 −1 layout/reftests/css-placeholder/input/placeholder-focus-ref.html
  184. +1 −1 layout/reftests/css-placeholder/input/style.css
  185. +2 −1 layout/reftests/css-placeholder/textarea/placeholder-focus-ref.html
  186. +1 −1 layout/reftests/css-placeholder/textarea/style.css
  187. +0 −18 layout/reftests/forms/placeholder/placeholder-15.html
  188. +0 −22 layout/reftests/forms/placeholder/placeholder-16.html
  189. +0 −22 layout/reftests/forms/placeholder/placeholder-17.html
  190. +3 −2 layout/reftests/forms/placeholder/placeholder-20.html
  191. +1 −1 layout/reftests/forms/placeholder/placeholder-21.html
  192. +1 −1 layout/reftests/forms/placeholder/placeholder-22.html
  193. +1 −0 layout/reftests/forms/placeholder/placeholder-7.html
  194. +4 −3 layout/reftests/forms/placeholder/placeholder-8.html
  195. +2 −1 layout/reftests/forms/placeholder/placeholder-9.html
  196. +16 −0 layout/reftests/forms/placeholder/placeholder-blank-ref.html
  197. +2 −1 layout/reftests/forms/placeholder/placeholder-focus-ref.html
  198. +6 −0 layout/reftests/forms/placeholder/placeholder-style.css
  199. +2 −5 layout/reftests/forms/placeholder/reftest.list
  200. +1 −0 layout/reftests/svg/reftest.list
  201. +18 −0 layout/reftests/svg/textPath-03.svg
  202. +5 −0 layout/style/forms.css
  203. +2 −6 layout/svg/base/src/nsSVGTextPathFrame.cpp
  204. BIN mobile/android/app/android/drawable-hdpi/alertaddons.png
  205. BIN mobile/android/app/android/drawable-hdpi/alertdownloads.png
  206. BIN mobile/android/app/android/drawable/alertaddons.png
  207. BIN mobile/android/app/android/drawable/alertdownloads.png
  208. +0 −2 mobile/android/app/mobile.js
  209. +39 −5 mobile/android/base/BrowserToolbar.java
  210. +43 −10 mobile/android/base/GeckoApp.java
  211. +142 −2 mobile/android/base/Makefile.in
  212. +4 −0 mobile/android/base/Tab.java
  213. +4 −6 mobile/android/base/Tabs.java
  214. +2 −0 mobile/android/base/gfx/GeckoLayerClient.java
  215. +1 −3 mobile/android/base/gfx/Layer.java
  216. +1 −7 mobile/android/base/gfx/LayerRenderer.java
  217. +2 −2 mobile/android/base/gfx/PluginLayer.java
  218. +0 −4 mobile/android/base/json-simple/ItemList.java
  219. +0 −4 mobile/android/base/json-simple/JSONArray.java
  220. +0 −4 mobile/android/base/json-simple/JSONAware.java
  221. +0 −4 mobile/android/base/json-simple/JSONObject.java
  222. +0 −4 mobile/android/base/json-simple/JSONStreamAware.java
  223. +0 −4 mobile/android/base/json-simple/JSONValue.java
  224. +0 −4 mobile/android/base/json-simple/parser/ContainerFactory.java
  225. +0 −4 mobile/android/base/json-simple/parser/ContentHandler.java
  226. +0 −4 mobile/android/base/json-simple/parser/JSONParser.java
  227. +0 −4 mobile/android/base/json-simple/parser/ParseException.java
  228. +0 −4 mobile/android/base/json-simple/parser/Yylex.java
  229. +0 −4 mobile/android/base/json-simple/parser/Yytoken.java
  230. BIN mobile/android/base/resources/drawable-hdpi-v11/alert_addon.png
  231. BIN mobile/android/base/resources/drawable-hdpi-v11/alert_app.png
  232. BIN mobile/android/base/resources/drawable-hdpi-v11/alert_download.png
  233. BIN mobile/android/base/resources/drawable-hdpi-v11/ic_menu_back.png
  234. BIN mobile/android/base/resources/drawable-hdpi-v11/ic_menu_bookmark_add.png
  235. BIN mobile/android/base/resources/drawable-hdpi-v11/ic_menu_bookmark_remove.png
  236. BIN mobile/android/base/resources/drawable-hdpi-v11/ic_menu_forward.png
  237. BIN mobile/android/base/resources/drawable-hdpi-v11/ic_menu_reload.png
  238. BIN mobile/android/base/resources/drawable-hdpi-v11/menu.png
  239. BIN mobile/android/base/resources/drawable-hdpi/address_bar_pressed_texture_port.png
  240. BIN mobile/android/base/resources/drawable-hdpi/alert_addon.png
  241. BIN mobile/android/base/resources/drawable-hdpi/alert_app.png
  242. BIN mobile/android/base/resources/drawable-hdpi/alert_download.png
  243. BIN mobile/android/base/resources/drawable-land-hdpi-v14/address_bar_pressed_texture_land.png
  244. BIN mobile/android/base/resources/drawable-land-mdpi-v14/address_bar_pressed_texture_land.png
  245. +15 −0 mobile/android/base/resources/drawable-land-v14/address_bar_pressed_bg.xml
  246. BIN mobile/android/base/resources/drawable-land-xhdpi-v14/address_bar_pressed_texture_land.png
  247. BIN mobile/android/base/resources/drawable-mdpi-v11/alert_addon.png
  248. BIN mobile/android/base/resources/drawable-mdpi-v11/alert_app.png
  249. BIN mobile/android/base/resources/drawable-mdpi-v11/alert_download.png
  250. BIN mobile/android/base/resources/drawable-mdpi-v11/ic_menu_back.png
  251. BIN mobile/android/base/resources/drawable-mdpi-v11/ic_menu_bookmark_add.png
  252. BIN mobile/android/base/resources/drawable-mdpi-v11/ic_menu_bookmark_remove.png
  253. BIN mobile/android/base/resources/drawable-mdpi-v11/ic_menu_forward.png
  254. BIN mobile/android/base/resources/drawable-mdpi-v11/ic_menu_reload.png
  255. BIN mobile/android/base/resources/drawable-mdpi-v11/menu.png
  256. BIN mobile/android/base/resources/drawable-sw600dp-hdpi/address_bar_back_button_bg.png
  257. BIN mobile/android/base/resources/drawable-sw600dp-hdpi/address_bar_back_button_pressed_bg.png
  258. BIN mobile/android/base/resources/drawable-sw600dp-hdpi/address_bar_pressed_texture_tablet.png
  259. BIN mobile/android/base/resources/drawable-sw600dp-hdpi/address_bar_texture_tablet.png
  260. BIN mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png
  261. BIN mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_normal.png
  262. BIN mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_plus.png
  263. BIN mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_pressed.png
  264. BIN mobile/android/base/resources/drawable-sw600dp-hdpi/urlbar_stop.png
  265. BIN mobile/android/base/resources/drawable-sw600dp-mdpi/address_bar_back_button_bg.png
  266. BIN mobile/android/base/resources/drawable-sw600dp-mdpi/address_bar_back_button_pressed_bg.png
  267. +9 −0 mobile/android/base/resources/drawable-sw600dp-mdpi/address_bar_bg.xml
  268. BIN mobile/android/base/resources/drawable-sw600dp-mdpi/address_bar_pressed_texture_tablet.png
  269. BIN mobile/android/base/resources/drawable-sw600dp-mdpi/address_bar_texture_tablet.png
  270. BIN mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png
  271. BIN mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_normal.png
  272. BIN mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_plus.png
  273. BIN mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_pressed.png
  274. BIN mobile/android/base/resources/drawable-sw600dp-mdpi/urlbar_stop.png
  275. BIN mobile/android/base/resources/drawable-sw600dp-xhdpi/address_bar_back_button_bg.png
  276. BIN mobile/android/base/resources/drawable-sw600dp-xhdpi/address_bar_back_button_pressed_bg.png
  277. BIN mobile/android/base/resources/drawable-sw600dp-xhdpi/address_bar_pressed_texture_tablet.png
  278. BIN mobile/android/base/resources/drawable-sw600dp-xhdpi/address_bar_texture_tablet.png
  279. BIN mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png
  280. BIN mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_normal.png
  281. BIN mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_plus.png
  282. BIN mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_pressed.png
  283. BIN mobile/android/base/resources/drawable-sw600dp-xhdpi/urlbar_stop.png
  284. BIN mobile/android/base/resources/drawable-xhdpi-v11/address_bar_pressed_texture_port.png
  285. BIN mobile/android/base/resources/drawable-xhdpi-v11/alert_addon.png
  286. BIN mobile/android/base/resources/drawable-xhdpi-v11/alert_app.png
  287. BIN mobile/android/base/resources/drawable-xhdpi-v11/alert_download.png
  288. BIN mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_back.png
  289. BIN mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_bookmark_add.png
  290. BIN mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_bookmark_remove.png
  291. BIN mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_reload.png
  292. BIN mobile/android/base/resources/drawable-xhdpi-v11/menu.png
  293. BIN mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_back_button_bg.png
  294. BIN mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_back_button_pressed_bg.png
  295. BIN mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_pressed_texture_tablet.png
  296. BIN mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_texture_tablet.png
  297. BIN mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png
  298. BIN mobile/android/base/resources/drawable-xlarge-hdpi/tabs_normal.png
  299. BIN mobile/android/base/resources/drawable-xlarge-hdpi/tabs_plus.png
  300. BIN mobile/android/base/resources/drawable-xlarge-hdpi/tabs_pressed.png
Sorry, we could not display the entire diff because too many files (591) changed.
View
45 accessible/src/base/nsAccessiblePivot.cpp
@@ -343,10 +343,10 @@ nsAccessiblePivot::MovePivotInternal(nsAccessible* aPosition)
nsAccessible*
nsAccessiblePivot::SearchBackward(nsAccessible* aAccessible,
nsIAccessibleTraversalRule* aRule,
- bool searchCurrent,
- nsresult* rv)
+ bool aSearchCurrent,
+ nsresult* aResult)
{
- *rv = NS_OK;
+ *aResult = NS_OK;
// Initial position could be unset, in that case return null.
if (!aAccessible)
@@ -357,9 +357,9 @@ nsAccessiblePivot::SearchBackward(nsAccessible* aAccessible,
PRUint16 filtered = nsIAccessibleTraversalRule::FILTER_IGNORE;
- if (searchCurrent) {
- *rv = cache.ApplyFilter(accessible, &filtered);
- NS_ENSURE_SUCCESS(*rv, nsnull);
+ if (aSearchCurrent) {
+ *aResult = cache.ApplyFilter(accessible, &filtered);
+ NS_ENSURE_SUCCESS(*aResult, nsnull);
if (filtered & nsIAccessibleTraversalRule::FILTER_MATCH)
return accessible;
}
@@ -371,16 +371,17 @@ nsAccessiblePivot::SearchBackward(nsAccessible* aAccessible,
if (!(accessible = parent->GetChildAt(--idxInParent)))
continue;
- *rv = cache.ApplyFilter(accessible, &filtered);
- NS_ENSURE_SUCCESS(*rv, nsnull);
+ *aResult = cache.ApplyFilter(accessible, &filtered);
+ NS_ENSURE_SUCCESS(*aResult, nsnull);
nsAccessible* lastChild;
while (!(filtered & nsIAccessibleTraversalRule::FILTER_IGNORE_SUBTREE) &&
(lastChild = accessible->LastChild())) {
parent = accessible;
accessible = lastChild;
- *rv = cache.ApplyFilter(accessible, &filtered);
- NS_ENSURE_SUCCESS(*rv, nsnull);
+ idxInParent = accessible->IndexInParent();
+ *aResult = cache.ApplyFilter(accessible, &filtered);
+ NS_ENSURE_SUCCESS(*aResult, nsnull);
}
if (filtered & nsIAccessibleTraversalRule::FILTER_MATCH)
@@ -390,8 +391,8 @@ nsAccessiblePivot::SearchBackward(nsAccessible* aAccessible,
if (!(accessible = parent))
break;
- *rv = cache.ApplyFilter(accessible, &filtered);
- NS_ENSURE_SUCCESS(*rv, nsnull);
+ *aResult = cache.ApplyFilter(accessible, &filtered);
+ NS_ENSURE_SUCCESS(*aResult, nsnull);
if (filtered & nsIAccessibleTraversalRule::FILTER_MATCH)
return accessible;
@@ -403,29 +404,29 @@ nsAccessiblePivot::SearchBackward(nsAccessible* aAccessible,
nsAccessible*
nsAccessiblePivot::SearchForward(nsAccessible* aAccessible,
nsIAccessibleTraversalRule* aRule,
- bool searchCurrent,
- nsresult* rv)
+ bool aSearchCurrent,
+ nsresult* aResult)
{
- *rv = NS_OK;
+ *aResult = NS_OK;
// Initial position could be not set, in that case begin search from root.
nsAccessible *accessible = (!aAccessible) ? mRoot.get() : aAccessible;
RuleCache cache(aRule);
PRUint16 filtered = nsIAccessibleTraversalRule::FILTER_IGNORE;
- *rv = cache.ApplyFilter(accessible, &filtered);
- NS_ENSURE_SUCCESS(*rv, nsnull);
- if (searchCurrent && (filtered & nsIAccessibleTraversalRule::FILTER_MATCH))
+ *aResult = cache.ApplyFilter(accessible, &filtered);
+ NS_ENSURE_SUCCESS(*aResult, nsnull);
+ if (aSearchCurrent && (filtered & nsIAccessibleTraversalRule::FILTER_MATCH))
return accessible;
while (true) {
nsAccessible* firstChild = nsnull;
while (!(filtered & nsIAccessibleTraversalRule::FILTER_IGNORE_SUBTREE) &&
(firstChild = accessible->FirstChild())) {
accessible = firstChild;
- *rv = cache.ApplyFilter(accessible, &filtered);
- NS_ENSURE_SUCCESS(*rv, nsnull);
+ *aResult = cache.ApplyFilter(accessible, &filtered);
+ NS_ENSURE_SUCCESS(*aResult, nsnull);
if (filtered & nsIAccessibleTraversalRule::FILTER_MATCH)
return accessible;
@@ -447,8 +448,8 @@ nsAccessiblePivot::SearchForward(nsAccessible* aAccessible,
break;
accessible = sibling;
- *rv = cache.ApplyFilter(accessible, &filtered);
- NS_ENSURE_SUCCESS(*rv, nsnull);
+ *aResult = cache.ApplyFilter(accessible, &filtered);
+ NS_ENSURE_SUCCESS(*aResult, nsnull);
if (filtered & nsIAccessibleTraversalRule::FILTER_MATCH)
return accessible;
View
8 accessible/src/base/nsAccessiblePivot.h
@@ -60,16 +60,16 @@ class nsAccessiblePivot: public nsIAccessiblePivot
*/
nsAccessible* SearchForward(nsAccessible* aAccessible,
nsIAccessibleTraversalRule* aRule,
- bool searchCurrent,
- nsresult* rv);
+ bool aSearchCurrent,
+ nsresult* aResult);
/*
* Reverse search in preorder for the first accessible to match the rule.
*/
nsAccessible* SearchBackward(nsAccessible* aAccessible,
nsIAccessibleTraversalRule* aRule,
- bool searchCurrent,
- nsresult* rv);
+ bool aSearchCurrent,
+ nsresult* aResult);
/*
* Update the pivot, and notify observers.
View
168 accessible/src/jsat/UtteranceGenerator.jsm
@@ -9,7 +9,7 @@ const Ci = Components.interfaces;
const Cu = Components.utils;
const Cr = Components.results;
-const INCLUDE_ROLE = 0x01;
+const INCLUDE_DESC = 0x01;
const INCLUDE_NAME = 0x02;
const INCLUDE_CUSTOM = 0x04;
@@ -79,7 +79,12 @@ var UtteranceGenerator = {
if (aForceName)
flags |= INCLUDE_NAME;
- return func.apply(this, [aAccessible, roleString, flags]);
+ let state = {};
+ let extState = {};
+ aAccessible.getState(state, extState);
+ let states = {base: state.value, ext: extState.value};
+
+ return func.apply(this, [aAccessible, roleString, states, flags]);
},
/**
@@ -122,93 +127,78 @@ var UtteranceGenerator = {
},
verbosityRoleMap: {
- 'menubar': INCLUDE_ROLE,
- 'scrollbar': INCLUDE_ROLE,
- 'grip': INCLUDE_ROLE,
- 'alert': INCLUDE_ROLE,
- 'menupopup': INCLUDE_ROLE,
- 'menuitem': INCLUDE_ROLE,
- 'tooltip': INCLUDE_ROLE,
+ 'menubar': INCLUDE_DESC,
+ 'scrollbar': INCLUDE_DESC,
+ 'grip': INCLUDE_DESC,
+ 'alert': INCLUDE_DESC,
+ 'menupopup': INCLUDE_DESC,
+ 'menuitem': INCLUDE_DESC,
+ 'tooltip': INCLUDE_DESC,
'application': INCLUDE_NAME,
'document': INCLUDE_NAME,
- 'toolbar': INCLUDE_ROLE,
- 'link': INCLUDE_ROLE,
- 'list': INCLUDE_ROLE,
- 'listitem': INCLUDE_ROLE,
- 'outline': INCLUDE_ROLE,
- 'outlineitem': INCLUDE_ROLE,
- 'pagetab': INCLUDE_ROLE,
- 'graphic': INCLUDE_ROLE | INCLUDE_NAME,
+ 'toolbar': INCLUDE_DESC,
+ 'link': INCLUDE_DESC,
+ 'list': INCLUDE_DESC,
+ 'listitem': INCLUDE_DESC,
+ 'outline': INCLUDE_DESC,
+ 'outlineitem': INCLUDE_DESC,
+ 'pagetab': INCLUDE_DESC,
+ 'graphic': INCLUDE_DESC | INCLUDE_NAME,
'statictext': INCLUDE_NAME,
'text leaf': INCLUDE_NAME,
- 'pushbutton': INCLUDE_ROLE,
- 'checkbutton': INCLUDE_ROLE | INCLUDE_NAME,
- 'radiobutton': INCLUDE_ROLE | INCLUDE_NAME,
- 'combobox': INCLUDE_ROLE,
- 'droplist': INCLUDE_ROLE,
- 'progressbar': INCLUDE_ROLE,
- 'slider': INCLUDE_ROLE,
- 'spinbutton': INCLUDE_ROLE,
- 'diagram': INCLUDE_ROLE,
- 'animation': INCLUDE_ROLE,
- 'equation': INCLUDE_ROLE,
- 'buttonmenu': INCLUDE_ROLE,
- 'pagetablist': INCLUDE_ROLE,
- 'canvas': INCLUDE_ROLE,
- 'check menu item': INCLUDE_ROLE,
- 'label': INCLUDE_ROLE,
- 'password text': INCLUDE_ROLE,
- 'popup menu': INCLUDE_ROLE,
- 'radio menu item': INCLUDE_ROLE,
- 'toggle button': INCLUDE_ROLE,
- 'header': INCLUDE_ROLE,
- 'footer': INCLUDE_ROLE,
- 'entry': INCLUDE_ROLE,
- 'caption': INCLUDE_ROLE,
- 'document frame': INCLUDE_ROLE,
- 'heading': INCLUDE_ROLE,
- 'calendar': INCLUDE_ROLE,
- 'combobox list': INCLUDE_ROLE,
- 'combobox option': INCLUDE_ROLE,
- 'image map': INCLUDE_ROLE,
- 'option': INCLUDE_ROLE,
- 'listbox': INCLUDE_ROLE},
+ 'pushbutton': INCLUDE_DESC,
+ 'checkbutton': INCLUDE_DESC | INCLUDE_NAME,
+ 'radiobutton': INCLUDE_DESC | INCLUDE_NAME,
+ 'combobox': INCLUDE_DESC,
+ 'droplist': INCLUDE_DESC,
+ 'progressbar': INCLUDE_DESC,
+ 'slider': INCLUDE_DESC,
+ 'spinbutton': INCLUDE_DESC,
+ 'diagram': INCLUDE_DESC,
+ 'animation': INCLUDE_DESC,
+ 'equation': INCLUDE_DESC,
+ 'buttonmenu': INCLUDE_DESC,
+ 'pagetablist': INCLUDE_DESC,
+ 'canvas': INCLUDE_DESC,
+ 'check menu item': INCLUDE_DESC,
+ 'label': INCLUDE_DESC,
+ 'password text': INCLUDE_DESC,
+ 'popup menu': INCLUDE_DESC,
+ 'radio menu item': INCLUDE_DESC,
+ 'toggle button': INCLUDE_DESC,
+ 'header': INCLUDE_DESC,
+ 'footer': INCLUDE_DESC,
+ 'entry': INCLUDE_DESC,
+ 'caption': INCLUDE_DESC,
+ 'document frame': INCLUDE_DESC,
+ 'heading': INCLUDE_DESC,
+ 'calendar': INCLUDE_DESC,
+ 'combobox list': INCLUDE_DESC,
+ 'combobox option': INCLUDE_DESC,
+ 'image map': INCLUDE_DESC,
+ 'option': INCLUDE_DESC,
+ 'listbox': INCLUDE_DESC},
objectUtteranceFunctions: {
- defaultFunc: function defaultFunc(aAccessible, aRoleStr, aFlags) {
- let name = (aFlags & INCLUDE_NAME) ? (aAccessible.name || '') : '';
- let desc = (aFlags & INCLUDE_ROLE) ?
- this._getLocalizedRole(aRoleStr) : '';
-
+ defaultFunc: function defaultFunc(aAccessible, aRoleStr, aStates, aFlags) {
let utterance = [];
- if (desc) {
- let state = {};
- let extState = {};
- aAccessible.getState(state, extState);
-
- if (state.value & Ci.nsIAccessibleStates.STATE_CHECKABLE) {
- let stateStr = (state.value & Ci.nsIAccessibleStates.STATE_CHECKED) ?
- 'objChecked' : 'objNotChecked';
- desc = gStringBundle.formatStringFromName(stateStr, [desc], 1);
- }
-
- if (extState.value & Ci.nsIAccessibleStates.EXT_STATE_EXPANDABLE) {
- let stateStr = (state.value & Ci.nsIAccessibleStates.STATE_EXPANDED) ?
- 'objExpanded' : 'objCollapsed';
- desc = gStringBundle.formatStringFromName(stateStr, [desc], 1);
- }
-
- utterance.push(desc);
+ if (aFlags & INCLUDE_DESC) {
+ let desc = this._getLocalizedStates(aStates);
+ let roleStr = this._getLocalizedRole(aRoleStr);
+ if (roleStr)
+ desc.push(roleStr);
+ utterance.push(desc.join(' '));
}
+ let name = (aFlags & INCLUDE_NAME) ? (aAccessible.name || '') : '';
if (name)
utterance.push(name);
return utterance;
},
- heading: function heading(aAccessible, aRoleStr, aFlags) {
+ heading: function heading(aAccessible, aRoleStr, aStates, aFlags) {
let name = (aFlags & INCLUDE_NAME) ? (aAccessible.name || '') : '';
let level = {};
aAccessible.groupPosition(level, {}, {});
@@ -221,7 +211,7 @@ var UtteranceGenerator = {
return utterance;
},
- listitem: function listitem(aAccessible, aRoleStr, aFlags) {
+ listitem: function listitem(aAccessible, aRoleStr, aStates, aFlags) {
let name = (aFlags & INCLUDE_NAME) ? (aAccessible.name || '') : '';
let localizedRole = this._getLocalizedRole(aRoleStr);
let itemno = {};
@@ -244,5 +234,35 @@ var UtteranceGenerator = {
} catch (x) {
return '';
}
+ },
+
+ _getLocalizedStates: function _getLocalizedStates(aStates) {
+ let stateUtterances = [];
+
+ if (aStates.base & Ci.nsIAccessibleStates.STATE_UNAVAILABLE) {
+ stateUtterances.push(gStringBundle.GetStringFromName('stateUnavailable'));
+ }
+
+ if (aStates.base & Ci.nsIAccessibleStates.STATE_CHECKABLE) {
+ let stateStr = (aStates.base & Ci.nsIAccessibleStates.STATE_CHECKED) ?
+ 'stateChecked' : 'stateNotChecked';
+ stateUtterances.push(gStringBundle.GetStringFromName(stateStr));
+ }
+
+ if (aStates.ext & Ci.nsIAccessibleStates.EXT_STATE_EXPANDABLE) {
+ let stateStr = (aStates.base & Ci.nsIAccessibleStates.STATE_EXPANDED) ?
+ 'stateExpanded' : 'stateCollapsed';
+ stateUtterances.push(gStringBundle.GetStringFromName(stateStr));
+ }
+
+ if (aStates.base & Ci.nsIAccessibleStates.STATE_REQUIRED) {
+ stateUtterances.push(gStringBundle.GetStringFromName('stateRequired'));
+ }
+
+ if (aStates.base & Ci.nsIAccessibleStates.STATE_TRAVERSED) {
+ stateUtterances.push(gStringBundle.GetStringFromName('stateTraversed'));
+ }
+
+ return stateUtterances;
}
};
View
22 accessible/src/jsat/VirtualCursorController.jsm
@@ -136,8 +136,28 @@ var VirtualCursorController = {
let virtualCursor = this.getVirtualCursor(document);
let acc = virtualCursor.position;
- if (acc.numActions > 0)
+ if (acc.numActions > 0) {
acc.doAction(0);
+ } else {
+ // XXX Some mobile widget sets do not expose actions properly
+ // (via ARIA roles, etc.), so we need to generate a click.
+ // Could possibly be made simpler in the future. Maybe core
+ // engine could expose nsCoreUtiles::DispatchMouseEvent()?
+ let docAcc = gAccRetrieval.getAccessibleFor(this.chromeWin.document);
+ let docX = {}, docY = {}, docW = {}, docH = {};
+ docAcc.getBounds(docX, docY, docW, docH);
+
+ let objX = {}, objY = {}, objW = {}, objH = {};
+ acc.getBounds(objX, objY, objW, objH);
+
+ let x = Math.round((objX.value - docX.value) + objW.value/2);
+ let y = Math.round((objY.value - docY.value) + objH.value/2);
+
+ let cwu = this.chromeWin.QueryInterface(Ci.nsIInterfaceRequestor).
+ getInterface(Ci.nsIDOMWindowUtils);
+ cwu.sendMouseEventToWindow('mousedown', x, y, 0, 1, 0, false);
+ cwu.sendMouseEventToWindow('mouseup', x, y, 0, 1, 0, false);
+ }
},
getVirtualCursor: function getVirtualCursor(document) {
View
11 accessible/src/mac/mozAccessible.mm
@@ -420,6 +420,9 @@ - (NSValue*)size
- (NSString*)role
{
+ if (mIsExpired)
+ return nil;
+
#ifdef DEBUG
NS_ASSERTION(nsAccUtils::IsTextInterfaceSupportCorrect(mGeckoAccessible),
"Does not support nsIAccessibleText when it should");
@@ -633,8 +636,14 @@ - (void)expire
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
[self invalidateChildren];
- mIsExpired = YES;
+ id parent = [self parent];
+
+ if ([parent isKindOfClass:[mozAccessible class]])
+ [parent invalidateChildren];
+ mIsExpired = YES;
+ mGeckoAccessible = nsnull;
+
NS_OBJC_END_TRY_ABORT_BLOCK;
}
View
4 accessible/tests/mochitest/pivot/doc_virtualcursor.html
@@ -23,5 +23,9 @@ <h2 id="heading-2-2">Second Section Title</h2>
<a href="http://mozilla.org" title="Link 2 title">Link 2</a>
<a href="http://mozilla.org" title="Link 3 title">Link 3</a>
</p>
+ <ul>
+ <li>Hello<span> </span></li>
+ <li>World</li>
+ </ul>
</body>
</html>
View
2 accessible/tests/mochitest/pivot/test_virtualcursor.html
@@ -61,7 +61,7 @@
'semper', ' nulla. ', 'Second Section Title',
'Sed accumsan luctus lacus, vitae mollis arcu tristique vulputate.',
'An ', 'embedded', ' document.', 'Hide me', 'Link 1', 'Link 2',
- 'Link 3']);
+ 'Link 3', 'Hello', 'World']);
// Just a random smoke test to see if our setTextRange works.
gQueue.push(
View
1 allmakefiles.sh
@@ -30,6 +30,7 @@ build/Makefile
build/pgo/Makefile
build/pgo/blueprint/Makefile
build/pgo/js-input/Makefile
+build/virtualenv/Makefile
config/Makefile
config/autoconf.mk
config/nspr/Makefile
View
16 b2g/config/tooltool-manifests/releng.manifest
@@ -1,14 +1,14 @@
[
{
-"size": 195,
-"digest": "ff960e3cb9e07865bde6fdb0d4127a11205d4cb70ee527e30ccc38f6370a9d750eb5da8993cb3c5de28b45836a3a20b8c25c4adcc68b1945a59dbe1c8b28cc23",
-"algorithm": "sha512",
+"size": 195,
+"digest": "da2edcb1ec9b169f6c685d02ebd0bd4ad53ace2df58598f15e1bde43dd74bcb816620601587c97e636bda3327045b43c8f5e973672ebd904e06036f70466908f",
+"algorithm": "sha512",
"filename": "setup.sh"
-},
+},
{
-"size": 121135598,
-"digest": "e182eb95105f186ec81546c373752c3af5b8fbc520fd14d37fcb1bb40efac76b96befe868b5a5a17f967bd04390122b7911d167dda1516225709cbd3a00e2c78",
-"algorithm": "sha512",
-"filename": "gonk-toolchain-1.tar.bz2"
+"size": 121166734,
+"digest": "10da1d28d49ff1aa9ad3d84e52235dc8ed7df6721530b896a53424480ec23a2e9f28cadd631f562342325611ecb72152be51f9b62616356f33005f6cc0fb82fe",
+"algorithm": "sha512",
+"filename": "gonk-toolchain-3.tar.bz2"
}
]
View
2 browser/app/profile/firefox.js
@@ -147,7 +147,7 @@ pref("app.update.silent", false);
// If set to true, the Update Service will apply updates in the background
// when it finishes downloading them.
-pref("app.update.stage.enabled", false);
+pref("app.update.stage.enabled", true);
// Update service URL:
pref("app.update.url", "https://aus3.mozilla.org/update/3/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
View
6 browser/components/places/tests/unit/head_bookmarks.js
@@ -61,12 +61,6 @@ let (XULAppInfo = {
XULAppInfoFactory);
}
-
-const FILENAME_BOOKMARKS_HTML = "bookmarks.html";
-let (backup_date = new Date().toLocaleFormat("%Y-%m-%d")) {
- const FILENAME_BOOKMARKS_JSON = "bookmarks-" + backup_date + ".json";
-}
-
// Smart bookmarks constants.
const SMART_BOOKMARKS_VERSION = 4;
const SMART_BOOKMARKS_ON_TOOLBAR = 1;
View
5 browser/components/places/tests/unit/xpcshell.ini
@@ -2,12 +2,7 @@
head = head_bookmarks.js
tail =
-[test_384370.js]
-[test_398914.js]
[test_421483.js]
-[test_457441-import-export-corrupt-bookmarks-html.js]
-[test_bookmarksRestoreNotification.js]
-[test_bookmarks_html.js]
[test_browserGlue_corrupt.js]
[test_browserGlue_corrupt_nobackup.js]
[test_browserGlue_corrupt_nobackup_default.js]
View
13 browser/components/preferences/connection.js
@@ -32,8 +32,7 @@ var gConnectionsDialog = {
}
}
- var noProxiesPref = document.getElementById("network.proxy.no_proxies_on");
- noProxiesPref.value = noProxiesPref.value.replace(/[;]/g,',');
+ this.sanitizeNoProxiesPref();
return true;
},
@@ -159,6 +158,16 @@ var gConnectionsDialog = {
autoURLPref.value = autoURL.value = URIFixup.createFixupURI(autoURL.value, 0).spec;
} catch(ex) {}
},
+
+ sanitizeNoProxiesPref: function()
+ {
+ var noProxiesPref = document.getElementById("network.proxy.no_proxies_on");
+ // replace substrings of ; and \n with commas if they're neither immediately
+ // preceded nor followed by a valid separator character
+ noProxiesPref.value = noProxiesPref.value.replace(/([^, \n;])[;\n]+(?![,\n;])/g, '$1,');
+ // replace any remaining ; and \n since some may follow commas, etc.
+ noProxiesPref.value = noProxiesPref.value.replace(/[;\n]/g, '');
+ },
readHTTPProxyServer: function ()
{
View
14 browser/components/preferences/connection.xul
@@ -139,17 +139,9 @@
<radio id="networkProxySOCKSVersion5" value="5" label="&socks5.label;" accesskey="&socks5.accesskey;" />
</radiogroup>
</row>
-
- <row align="center">
- <hbox align="center" pack="end">
- <label value="&noproxy.label;" accesskey="&noproxy.accesskey;" control="networkProxyNone"/>
- </hbox>
- <textbox id="networkProxyNone" preference="network.proxy.no_proxies_on"/>
- </row>
- <row>
- <spacer/>
- <label value="&noproxyExplain.label;" control="networkProxyNone"/>
- </row>
+ <label value="&noproxy.label;" accesskey="&noproxy.accesskey;" control="networkProxyNone"/>
+ <textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/>
+ <label value="&noproxyExplain.label;" control="networkProxyNone"/>
</rows>
</grid>
<radio value="2" label="&autoTypeRadio.label;" accesskey="&autoTypeRadio.accesskey;"/>
View
1 browser/components/preferences/in-content/tests/Makefile.in
@@ -16,6 +16,7 @@ _BROWSER_FILES = \
browser_bug410900.js \
browser_bug567487.js \
browser_bug731866.js \
+ browser_connection.js \
privacypane_tests.js \
browser_privacypane_1.js \
browser_privacypane_2.js \
View
128 browser/components/preferences/in-content/tests/browser_connection.js
@@ -0,0 +1,128 @@
+/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * 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/. */
+
+Components.utils.import("resource://gre/modules/Services.jsm");
+
+function test() {
+ waitForExplicitFinish();
+
+ // network.proxy.type needs to be backed up and restored because mochitest
+ // changes this setting from the default
+ let oldNetworkProxyType = Services.prefs.getIntPref("network.proxy.type");
+ registerCleanupFunction(function() {
+ Services.prefs.setIntPref("network.proxy.type", oldNetworkProxyType);
+ Services.prefs.clearUserPref("network.proxy.no_proxies_on");
+ Services.prefs.clearUserPref("browser.preferences.instantApply");
+ });
+
+ let connectionURI = "chrome://browser/content/preferences/connection.xul";
+ let windowWatcher = Cc["@mozilla.org/embedcomp/window-watcher;1"]
+ .getService(Components.interfaces.nsIWindowWatcher);
+
+ // instantApply must be true, otherwise connection dialog won't save
+ // when opened from in-content prefs
+ Services.prefs.setBoolPref("browser.preferences.instantApply", true);
+
+ // this observer is registered after the pref tab loads
+ let observer = {
+ observe: function(aSubject, aTopic, aData) {
+
+ if (aTopic == "domwindowopened") {
+ // when connection window loads, run tests and acceptDialog()
+ let win = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
+ win.addEventListener("load", function winLoadListener() {
+ win.removeEventListener("load", winLoadListener, false);
+ if (win.location.href == connectionURI) {
+ ok(true, "connection window opened");
+ runConnectionTests(win);
+ win.document.documentElement.acceptDialog();
+ }
+ }, false);
+ } else if (aTopic == "domwindowclosed") {
+ // finish up when connection window closes
+ let win = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
+ if (win.location.href == connectionURI) {
+ windowWatcher.unregisterNotification(observer);
+ ok(true, "connection window closed");
+ // runConnectionTests will have changed this pref - make sure it was
+ // sanitized correctly when the dialog was accepted
+ is(Services.prefs.getCharPref("network.proxy.no_proxies_on"),
+ ".a.com,.b.com,.c.com", "no_proxies_on pref has correct value");
+ gBrowser.removeCurrentTab();
+ finish();
+ }
+ }
+
+ }
+ }
+
+ /*
+ The connection dialog alone won't save onaccept since it uses type="child",
+ so it has to be opened as a sub dialog of the main pref tab.
+ Open the main tab here.
+ */
+ gBrowser.selectedTab = gBrowser.addTab("about:preferences");
+ let newTabBrowser = gBrowser.getBrowserForTab(gBrowser.selectedTab);
+ newTabBrowser.addEventListener("load", function tabLoadListener() {
+ newTabBrowser.removeEventListener("load", tabLoadListener, true);
+ is(gBrowser.currentURI.spec, "about:preferences", "about:preferences loaded");
+ windowWatcher.registerNotification(observer);
+ gBrowser.contentWindow.gAdvancedPane.showConnections();
+ }, true);
+
+}
+
+// run a bunch of tests on the window containing connection.xul
+function runConnectionTests(win) {
+ let doc = win.document;
+ let networkProxyNone = doc.getElementById("networkProxyNone");
+ let networkProxyNonePref = doc.getElementById("network.proxy.no_proxies_on");
+ let networkProxyTypePref = doc.getElementById("network.proxy.type");
+
+ // make sure the networkProxyNone textbox is formatted properly
+ is(networkProxyNone.getAttribute("multiline"), "true",
+ "networkProxyNone textbox is multiline");
+ is(networkProxyNone.getAttribute("rows"), "2",
+ "networkProxyNone textbox has two rows");
+
+ // check if sanitizing the given input for the no_proxies_on pref results in
+ // expected string
+ function testSanitize(input, expected, errorMessage) {
+ networkProxyNonePref.value = input;
+ win.gConnectionsDialog.sanitizeNoProxiesPref();
+ is(networkProxyNonePref.value, expected, errorMessage);
+ }
+
+ // change this pref so proxy exceptions are actually configurable
+ networkProxyTypePref.value = 1;
+ is(networkProxyNone.disabled, false, "networkProxyNone textbox is enabled");
+
+ testSanitize(".a.com", ".a.com",
+ "sanitize doesn't mess up single filter");
+ testSanitize(".a.com, .b.com, .c.com", ".a.com, .b.com, .c.com",
+ "sanitize doesn't mess up multiple comma/space sep filters");
+ testSanitize(".a.com\n.b.com", ".a.com,.b.com",
+ "sanitize turns line break into comma");
+ testSanitize(".a.com,\n.b.com", ".a.com,.b.com",
+ "sanitize doesn't add duplicate comma after comma");
+ testSanitize(".a.com\n,.b.com", ".a.com,.b.com",
+ "sanitize doesn't add duplicate comma before comma");
+ testSanitize(".a.com,\n,.b.com", ".a.com,,.b.com",
+ "sanitize doesn't add duplicate comma surrounded by commas");
+ testSanitize(".a.com, \n.b.com", ".a.com, .b.com",
+ "sanitize doesn't add comma after comma/space");
+ testSanitize(".a.com\n .b.com", ".a.com, .b.com",
+ "sanitize adds comma before space");
+ testSanitize(".a.com\n\n\n;;\n;\n.b.com", ".a.com,.b.com",
+ "sanitize only adds one comma per substring of bad chars");
+ testSanitize(".a.com,,.b.com", ".a.com,,.b.com",
+ "duplicate commas from user are untouched");
+ testSanitize(".a.com\n.b.com\n.c.com,\n.d.com,\n.e.com",
+ ".a.com,.b.com,.c.com,.d.com,.e.com",
+ "sanitize replaces things globally");
+
+ // will check that this was sanitized properly after window closes
+ networkProxyNonePref.value = ".a.com;.b.com\n.c.com";
+}
View
22 ...er/components/privatebrowsing/test/browser/browser_privatebrowsing_lastpbcontextexited.js
@@ -8,27 +8,21 @@ function test() {
let newWin = window.openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no");
waitForExplicitFinish();
SimpleTest.waitForFocus(function() {
- let notificationCount = 0;
+ let expected = false;
let observer = {
observe: function(aSubject, aTopic, aData) {
is(aTopic, "last-pb-context-exited", "Correct topic should be dispatched");
- ++notificationCount;
+ is(expected, true, "notification not expected yet");
+ Services.obs.removeObserver(observer, "last-pb-context-exited", false);
+ gPrefService.clearUserPref("browser.privatebrowsing.keep_current_session");
+ finish();
}
};
Services.obs.addObserver(observer, "last-pb-context-exited", false);
newWin.gPrivateBrowsingUI.privateWindow = true;
- SimpleTest.is(notificationCount, 0, "last-pb-context-exited should not be fired yet");
- newWin.gPrivateBrowsingUI.privateWindow = false;
- newWin.close();
+ expected = true;
+ newWin.close(); // this will cause the docshells to leave PB mode
newWin = null;
- window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindowUtils)
- .garbageCollect(); // Make sure that the docshell is destroyed
- SimpleTest.is(notificationCount, 1, "last-pb-context-exited should be fired once");
- Services.obs.removeObserver(observer, "last-pb-context-exited", false);
-
- // cleanup
- gPrefService.clearUserPref("browser.privatebrowsing.keep_current_session");
- finish();
+ SpecialPowers.forceGC();
}, newWin);
}
View
34 build/virtualenv/Makefile.in
@@ -0,0 +1,34 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# 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/.
+
+DEPTH = ../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+# Paths here are topsrcdir-relative, and
+# must be in dependency-order.
+setuptools_packages := \
+ other-licenses/simplejson-2.1.1 \
+ testing/mozbase/manifestdestiny \
+ testing/mozbase/mozinfo \
+ testing/mozbase/mozinstall \
+ testing/mozbase/mozlog \
+ testing/mozbase/mozprocess \
+ testing/mozbase/mozprofile \
+ testing/mozbase/mozrunner \
+ $(NULL)
+
+
+define install_setuptools_package
+cd $(topsrcdir)/$(1)/; $(PYTHON) setup.py develop
+
+endef
+
+default::
+ $(foreach package,$(setuptools_packages),$(call install_setuptools_package,$(package)))
+
+include $(topsrcdir)/config/rules.mk
View
1 chrome/src/nsChromeProtocolHandler.cpp
@@ -212,6 +212,7 @@ nsChromeProtocolHandler::NewChannel(nsIURI* aURI,
// and with startupcache not at all), but this is where we would start
// if we need to re-add.
// See bug 531886, bug 533038.
+ result->SetContentCharset(NS_LITERAL_CSTRING("UTF-8"));
*aResult = result;
NS_ADDREF(*aResult);
View
2 config/autoconf.mk.in
@@ -308,6 +308,8 @@ MOZ_PGO_OPTIMIZE_FLAGS = @MOZ_PGO_OPTIMIZE_FLAGS@
MOZ_OPTIMIZE_LDFLAGS = @MOZ_OPTIMIZE_LDFLAGS@
MOZ_OPTIMIZE_SIZE_TWEAK = @MOZ_OPTIMIZE_SIZE_TWEAK@
+MOZ_ALLOW_HEAP_EXECUTE_FLAGS = @MOZ_ALLOW_HEAP_EXECUTE_FLAGS@
+
MOZ_RTTI_FLAGS_ON = @_MOZ_RTTI_FLAGS_ON@
PROFILE_GEN_CFLAGS = @PROFILE_GEN_CFLAGS@
View
2 config/gcc-stl-wrapper.template.h
@@ -10,7 +10,7 @@
// For some reason, Apple's GCC refuses to honor -fno-exceptions when
// compiling ObjC.
-#if __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS)
+#if __EXCEPTIONS && !(__OBJC__ && __APPLE_CC__)
# error "STL code can only be used with -fno-exceptions"
#endif
View
1 config/system-headers
@@ -594,6 +594,7 @@ proto/exec.h
psap.h
Pt.h
pthread.h
+pthread_np.h
pwd.h
Python.h
QDOffscreen.h
View
50 configure.in
@@ -239,7 +239,7 @@ if test -n "$gonkdir" ; then
;;
esac
- CPPFLAGS="-DANDROID -isystem $gonkdir/bionic/libc/$ARCH_DIR/include -isystem $gonkdir/bionic/libc/include/ -isystem $gonkdir/bionic/libc/kernel/common -isystem $gonkdir/bionic/libc/kernel/$ARCH_DIR -isystem $gonkdir/bionic/libm/include -I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/hardware/libhardware/include -I$gonkdir/hardware/libhardware_legacy/include -I$gonkdir/system/core/include -isystem $gonkdir/bionic -I$gonkdir/frameworks/base/include -I$gonkdir/external/dbus $CPPFLAGS -I$gonkdir/frameworks/base/services/sensorservice"
+ CPPFLAGS="-DANDROID -isystem $gonkdir/bionic/libc/$ARCH_DIR/include -isystem $gonkdir/bionic/libc/include/ -isystem $gonkdir/bionic/libc/kernel/common -isystem $gonkdir/bionic/libc/kernel/$ARCH_DIR -isystem $gonkdir/bionic/libm/include -I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/hardware/libhardware/include -I$gonkdir/hardware/libhardware_legacy/include -I$gonkdir/system -I$gonkdir/system/core/include -isystem $gonkdir/bionic -I$gonkdir/frameworks/base/include -I$gonkdir/external/dbus $CPPFLAGS -I$gonkdir/frameworks/base/services/sensorservice"
CFLAGS="-mandroid -fno-short-enums -fno-exceptions $CFLAGS"
CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions $CXXFLAGS $STLPORT_CPPFLAGS"
LIBS="$LIBS $STLPORT_LIBS"
@@ -369,6 +369,7 @@ case "$target" in
CPPFLAGS="-isystem $android_platform/usr/include $CPPFLAGS"
CFLAGS="-mandroid -fno-short-enums -fno-exceptions $CFLAGS"
CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions $CXXFLAGS"
+ ASFLAGS="-isystem $android_platform/usr/include -DANDROID $ASFLAGS"
dnl Add -llog by default, since we use it all over the place.
dnl Add --allow-shlib-undefined, because libGLESv2 links to an
@@ -2267,6 +2268,22 @@ case "$target" in
LDFLAGS=$_SAVE_LDFLAGS
fi
+
+ dnl With newer linkers we need to pass -allow_heap_execute because of
+ dnl Microsoft Silverlight (5.1.10411.0 at least).
+ AC_MSG_CHECKING([for -allow_heap_execute option to ld])
+ _SAVE_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-allow_heap_execute"
+ AC_TRY_LINK(,[return 0;],_HAVE_ALLOW_HEAP_EXECUTE=1,
+ _HAVE_ALLOW_HEAP_EXECUTE=)
+ if test -n "$_HAVE_ALLOW_HEAP_EXECUTE" ; then
+ AC_MSG_RESULT([yes])
+ MOZ_ALLOW_HEAP_EXECUTE_FLAGS="-Wl,-allow_heap_execute"
+ else
+ AC_MSG_RESULT([no])
+ fi
+ LDFLAGS=$_SAVE_LDFLAGS
+
MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin'
;;
@@ -3182,11 +3199,11 @@ EOF
"$ac_cv_have_visibility_class_bug" = "no"; then
VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
WRAP_SYSTEM_INCLUDES=1
- STL_FLAGS='-I$(DIST)/stl_wrappers'
- WRAP_STL_INCLUDES=1
else
VISIBILITY_FLAGS='-fvisibility=hidden'
fi # have visibility pragma bug
+ STL_FLAGS='-I$(DIST)/stl_wrappers'
+ WRAP_STL_INCLUDES=1
fi # have visibility pragma
fi # have visibility(default) attribute
fi # have visibility(hidden) attribute
@@ -7014,6 +7031,7 @@ AC_SUBST(MOZ_OPTIMIZE)
AC_SUBST(MOZ_FRAMEPTR_FLAGS)
AC_SUBST(MOZ_OPTIMIZE_FLAGS)
AC_SUBST(MOZ_OPTIMIZE_LDFLAGS)
+AC_SUBST(MOZ_ALLOW_HEAP_EXECUTE_FLAGS)
AC_SUBST(MOZ_OPTIMIZE_SIZE_TWEAK)
AC_SUBST(MOZ_PGO_OPTIMIZE_FLAGS)
@@ -7920,10 +7938,9 @@ else
fi
AC_SUBST(CL_INCLUDES_PREFIX)
rm -f dummy-hello.c
- _topsrcdirwin=`cd \`dirname $0\`; pwd -W`
dnl cl.py provides dependency generation for MSVC
- CC_WRAPPER="$PYTHON -O $_topsrcdirwin/build/cl.py"
- CXX_WRAPPER="$PYTHON -O $_topsrcdirwin/build/cl.py"
+ CC_WRAPPER='$(PYTHON) -O $(topsrcdir)/build/cl.py'
+ CXX_WRAPPER='$(PYTHON) -O $(topsrcdir)/build/cl.py'
COMPILER_DEPEND=1
fi
fi
@@ -8565,7 +8582,6 @@ AC_SUBST(MOZ_MAPINFO)
AC_SUBST(MOZ_BROWSE_INFO)
AC_SUBST(MOZ_TOOLS_DIR)
AC_SUBST(WIN32_REDIST_DIR)
-AC_SUBST(PYTHON)
AC_SUBST(MAKENSISU)
dnl Echo the CFLAGS to remove extra whitespace.
@@ -8947,6 +8963,22 @@ AC_SUBST(MOZ_DEFINES)
rm -f confdefs.h
mv confdefs.h.save confdefs.h
+dnl Create a virtualenv where we can install local Python packages
+AC_MSG_RESULT([Creating Python virtualenv])
+rm -rf _virtualenv
+mkdir -p _virtualenv
+MACOSX_DEPLOYMENT_TARGET= PYTHONDONTWRITEBYTECODE= $PYTHON $_topsrcdir/other-licenses/virtualenv/virtualenv.py ./_virtualenv
+case "$host_os" in
+mingw*)
+ PYTHON=`pwd`/_virtualenv/Scripts/python.exe
+ ;;
+*)
+ PYTHON=`pwd`/_virtualenv/bin/python
+ ;;
+esac
+
+AC_SUBST(PYTHON)
+
dnl Load the list of Makefiles to generate.
dnl To add new Makefiles, edit allmakefiles.sh.
dnl allmakefiles.sh sets the variable, MAKEFILES.
@@ -8970,6 +9002,10 @@ mv -f config/autoconf.mk config/autoconf.mk.orig 2> /dev/null
AC_OUTPUT($MAKEFILES)
+# Populate the virtualenv
+AC_MSG_RESULT([Populating Python virtualenv])
+$MAKE -C build/virtualenv MACOSX_DEPLOYMENT_TARGET= || exit 1
+
# Generate a JSON config file for unittest harnesses etc to read
# build configuration details from in a standardized way.
OS_TARGET=${OS_TARGET} TARGET_CPU=${TARGET_CPU} MOZ_DEBUG=${MOZ_DEBUG} \
View
8 content/base/src/nsContentSink.cpp
@@ -18,6 +18,7 @@
#include "nsStyleLinkElement.h"
#include "nsINodeInfo.h"
#include "nsIDocShell.h"
+#include "nsILoadContext.h"
#include "nsIDocShellTreeItem.h"
#include "nsCPrefetchService.h"
#include "nsIURI.h"
@@ -1032,6 +1033,13 @@ nsContentSink::ProcessOfflineManifest(const nsAString& aManifestSpec)
return;
}
+ // If the docshell's in private browsing mode, we don't want to do any
+ // manifest processing.
+ nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(mDocShell);
+ if (loadContext->UsePrivateBrowsing()) {
+ return;
+ }
+
nsresult rv;
// Grab the application cache the document was loaded from, if any.
View
7 content/base/src/nsGenericElement.cpp
@@ -1478,7 +1478,12 @@ nsIContent::IMEState
nsIContent::GetDesiredIMEState()
{
if (!IsEditableInternal()) {
- return IMEState(IMEState::DISABLED);
+ // Check for the special case where we're dealing with elements which don't
+ // have the editable flag set, but are readwrite (such as text controls).
+ if (!IsElement() ||
+ !AsElement()->State().HasState(NS_EVENT_STATE_MOZ_READWRITE)) {
+ return IMEState(IMEState::DISABLED);
+ }
}
// NOTE: The content for independent editors (e.g., input[type=text],
// textarea) must override this method, so, we don't need to worry about
View
13 content/events/src/nsIMEStateManager.cpp
@@ -660,13 +660,24 @@ nsTextStateManager::ContentRemoved(nsIDocument* aDocument,
new TextChangeEvent(mWidget, offset, offset + childOffset, offset));
}
+static bool IsEditable(nsINode* node) {
+ if (node->IsEditable()) {
+ return true;
+ }
+ // |node| might be readwrite (for example, a text control)
+ if (node->IsElement() && node->AsElement()->State().HasState(NS_EVENT_STATE_MOZ_READWRITE)) {
+ return true;
+ }
+ return false;
+}
+
static nsINode* GetRootEditableNode(nsPresContext* aPresContext,
nsIContent* aContent)
{
if (aContent) {
nsINode* root = nsnull;
nsINode* node = aContent;
- while (node && node->IsEditable()) {
+ while (node && IsEditable(node)) {
root = node;
node = node->GetNodeParent();
}
View
19 content/events/test/test_bug607464.html
@@ -57,12 +57,19 @@
scrollDown15PxWithPixelScrolling(scrollbox);
- setTimeout(function checkThatScrollIsFinishedAlmostInstantly() {
- is(scrollbox.scrollTop, scrollTopBefore + 15, "Pixel scrolling should have finished after waiting for one 0-interval timer. We shouldn't be scrolling smoothly, even though the pref is set.")
- win.close();
- clearPrefs();
- SimpleTest.finish();
- }, 0);
+ // wait for the next refresh driver run
+ window.mozRequestAnimationFrame(function() {
+ // actually, wait for the next one before checking results, since
+ // scrolling might not be flushed until after this code has run
+ window.mozRequestAnimationFrame(function() {
+ is(scrollbox.scrollTop, scrollTopBefore + 15,
+ "Pixel scrolling should have finished after one refresh driver iteration. " +
+ "We shouldn't be scrolling smoothly, even though the pref is set.");
+ win.close();
+ clearPrefs();
+ SimpleTest.finish();
+ });
+ });
}, win);
}
View
36 content/html/content/src/nsHTMLInputElement.cpp
@@ -1285,22 +1285,22 @@ nsHTMLInputElement::AfterSetFiles(bool aSetValueChanged)
UpdateAllValidityStates(true);
}
-void
-nsHTMLInputElement::FireChangeEventIfNeeded()
-{
- nsString value;
- GetValueInternal(value);
-
- if (!IsSingleLineTextControl(false) || mFocusedValue.Equals(value)) {
- return;
- }
-
- // Dispatch the change event.
- mFocusedValue = value;
- nsContentUtils::DispatchTrustedEvent(OwnerDoc(),
- static_cast<nsIContent*>(this),
- NS_LITERAL_STRING("change"), true,
- false);
+void
+nsHTMLInputElement::FireChangeEventIfNeeded()
+{
+ nsString value;
+ GetValueInternal(value);
+
+ if (!IsSingleLineTextControl(false) || mFocusedValue.Equals(value)) {
+ return;
+ }
+
+ // Dispatch the change event.
+ mFocusedValue = value;
+ nsContentUtils::DispatchTrustedEvent(OwnerDoc(),
+ static_cast<nsIContent*>(this),
+ NS_LITERAL_STRING("change"), true,
+ false);
}
const nsCOMArray<nsIDOMFile>&
@@ -3203,7 +3203,6 @@ nsHTMLInputElement::IntrinsicState() const
}
if (PlaceholderApplies() && HasAttr(kNameSpaceID_None, nsGkAtoms::placeholder) &&
- !nsContentUtils::IsFocusedContent((nsIContent*)(this)) &&
IsValueEmpty()) {
state |= NS_EVENT_STATE_MOZ_PLACEHOLDER;
}
@@ -4075,8 +4074,7 @@ nsHTMLInputElement::OnValueChanged(bool aNotify)
// :-moz-placeholder pseudo-class may change when the value changes.
// However, we don't want to waste cycles if the state doesn't apply.
if (PlaceholderApplies() &&
- HasAttr(kNameSpaceID_None, nsGkAtoms::placeholder) &&
- !nsContentUtils::IsFocusedContent(this)) {
+ HasAttr(kNameSpaceID_None, nsGkAtoms::placeholder)) {
UpdateState(aNotify);
}
}
View
6 content/html/content/src/nsHTMLMediaElement.cpp
@@ -2645,7 +2645,11 @@ void nsHTMLMediaElement::ResourceLoaded()
mNetworkState = nsIDOMHTMLMediaElement::NETWORK_IDLE;
AddRemoveSelfReference();
if (mReadyState >= nsIDOMHTMLMediaElement::HAVE_METADATA) {
- ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_ENOUGH_DATA);
+ // MediaStream sources are put into HAVE_CURRENT_DATA state here on setup. If the
+ // stream is not blocked, we will receive a notification that will put it
+ // into HAVE_ENOUGH_DATA state.
+ ChangeReadyState(mStream ? nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA
+ : nsIDOMHTMLMediaElement::HAVE_ENOUGH_DATA);
}
// Ensure a progress event is dispatched at the end of download.
DispatchAsyncEvent(NS_LITERAL_STRING("progress"));
View
36 content/html/content/src/nsHTMLTextAreaElement.cpp
@@ -699,22 +699,22 @@ nsHTMLTextAreaElement::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
return nsGenericHTMLFormElement::PreHandleEvent(aVisitor);
}
-void
-nsHTMLTextAreaElement::FireChangeEventIfNeeded()
-{
- nsString value;
- GetValueInternal(value, true);
-
- if (mFocusedValue.Equals(value)) {
- return;
- }
-
- // Dispatch the change event.
- mFocusedValue = value;
- nsContentUtils::DispatchTrustedEvent(OwnerDoc(),
- static_cast<nsIContent*>(this),
- NS_LITERAL_STRING("change"), true,
- false);
+void
+nsHTMLTextAreaElement::FireChangeEventIfNeeded()
+{
+ nsString value;
+ GetValueInternal(value, true);
+
+ if (mFocusedValue.Equals(value)) {
+ return;
+ }
+
+ // Dispatch the change event.
+ mFocusedValue = value;
+ nsContentUtils::DispatchTrustedEvent(OwnerDoc(),
+ static_cast<nsIContent*>(this),
+ NS_LITERAL_STRING("change"), true,
+ false);
}
nsresult
@@ -1146,7 +1146,6 @@ nsHTMLTextAreaElement::IntrinsicState() const
}
if (HasAttr(kNameSpaceID_None, nsGkAtoms::placeholder) &&
- !nsContentUtils::IsFocusedContent((nsIContent*)(this)) &&
IsValueEmpty()) {
state |= NS_EVENT_STATE_MOZ_PLACEHOLDER;
}
@@ -1515,8 +1514,7 @@ nsHTMLTextAreaElement::OnValueChanged(bool aNotify)
UpdateValueMissingValidityState();
if (validBefore != IsValid() ||
- (HasAttr(kNameSpaceID_None, nsGkAtoms::placeholder)
- && !nsContentUtils::IsFocusedContent((nsIContent*)(this)))) {
+ HasAttr(kNameSpaceID_None, nsGkAtoms::placeholder)) {
UpdateState(aNotify);
}
}
View
13 content/html/content/src/nsTextEditorState.cpp
@@ -1934,16 +1934,9 @@ nsTextEditorState::ValueWasChanged(bool aNotify)
return;
}
- bool showPlaceholder = false;
- nsCOMPtr<nsIContent> content = do_QueryInterface(mTextCtrlElement);
- if (!nsContentUtils::IsFocusedContent(content)) {
- // If the content is focused, we don't care about the changes because
- // the placeholder is going to be hidden/shown on blur.
- nsAutoString valueString;
- GetValue(valueString, true);
- showPlaceholder = valueString.IsEmpty();
- }
- SetPlaceholderClass(showPlaceholder, aNotify);
+ nsAutoString valueString;
+ GetValue(valueString, true);
+ SetPlaceholderClass(valueString.IsEmpty(), aNotify);
}
void
View
11 content/media/MediaStreamGraph.cpp
@@ -1762,6 +1762,17 @@ MediaStream::ChangeExplicitBlockerCount(PRInt32 aDelta)
}
void
+MediaStream::AddListenerImpl(already_AddRefed<MediaStreamListener> aListener)
+{
+ MediaStreamListener* listener = *mListeners.AppendElement() = aListener;
+ listener->NotifyBlockingChanged(GraphImpl(),
+ mBlocked.GetAt(GraphImpl()->mCurrentTime) ? MediaStreamListener::BLOCKED : MediaStreamListener::UNBLOCKED);
+ if (mNotifiedFinished) {
+ listener->NotifyFinished(GraphImpl());
+ }
+}
+
+void
MediaStream::AddListener(MediaStreamListener* aListener)
{
class Message : public ControlMessage {
View
9 content/media/MediaStreamGraph.h
@@ -83,6 +83,10 @@ class MediaStreamGraph;
* reentry into media graph methods is possible, although very much discouraged!
* You should do something non-blocking and non-reentrant (e.g. dispatch an
* event to some thread) and return.
+ *
+ * When a listener is first attached, we guarantee to send a NotifyBlockingChanged
+ * callback to notify of the initial blocking state. Also, if a listener is
+ * attached to a stream that has already finished, we'll call NotifyFinished.
*/
class MediaStreamListener {
public:
@@ -263,10 +267,7 @@ class MediaStream {
{
mExplicitBlockerCount.SetAtAndAfter(aTime, mExplicitBlockerCount.GetAt(aTime) + aDelta);
}
- void AddListenerImpl(already_AddRefed<MediaStreamListener> aListener)
- {
- *mListeners.AppendElement() = aListener;
- }
+ void AddListenerImpl(already_AddRefed<MediaStreamListener> aListener);
void RemoveListenerImpl(MediaStreamListener* aListener)
{
mListeners.RemoveElement(aListener);
View
4 content/xbl/src/nsXBLBinding.cpp
@@ -1206,9 +1206,7 @@ nsXBLBinding::DoInitJSClass(JSContext *cx, JSObject *global, JSObject *obj,
jsval val;
JSObject* proto = NULL;
- if ((!::JS_LookupPropertyWithFlags(cx, global, className.get(),
- JSRESOLVE_CLASSNAME,
- &val)) ||
+ if ((!::JS_LookupPropertyWithFlags(cx, global, className.get(), 0, &val)) ||
JSVAL_IS_PRIMITIVE(val)) {
// We need to initialize the class.
View
5 content/xul/document/src/nsXULDocument.cpp
@@ -2374,9 +2374,10 @@ nsXULDocument::PrepareToWalk()
PRUint32 piInsertionPoint = 0;
if (mState != eState_Master) {
- piInsertionPoint = IndexOf(GetRootElement());
- NS_ASSERTION(piInsertionPoint >= 0,
+ PRInt32 indexOfRoot = IndexOf(GetRootElement());
+ NS_ASSERTION(indexOfRoot >= 0,
"No root content when preparing to walk overlay!");
+ piInsertionPoint = indexOfRoot;
}
const nsTArray<nsRefPtr<nsXULPrototypePI> >& processingInstructions =
View
4 docshell/base/nsDocShell.cpp
@@ -8794,6 +8794,10 @@ nsDocShell::GetInheritedPrincipal(bool aConsiderCurrentDocument)
bool
nsDocShell::ShouldCheckAppCache(nsIURI *aURI)
{
+ if (mInPrivateBrowsing) {
+ return false;
+ }
+
nsCOMPtr<nsIOfflineCacheUpdateService> offlineService =
do_GetService(NS_OFFLINECACHEUPDATESERVICE_CONTRACTID);
if (!offlineService) {
View
14 docshell/test/browser/browser_bug92473.js
@@ -1,3 +1,7 @@
+/* The test text as octets for reference
+ * %83%86%83%6a%83%52%81%5b%83%68%82%cd%81%41%82%b7%82%d7%82%c4%82%cc%95%b6%8e%9a%82%c9%8c%c5%97%4c%82%cc%94%d4%8d%86%82%f0%95%74%97%5e%82%b5%82%dc%82%b7
+ */
+
/* The test text decoded correctly as Shift_JIS */
const rightText="\u30E6\u30CB\u30B3\u30FC\u30C9\u306F\u3001\u3059\u3079\u3066\u306E\u6587\u5B57\u306B\u56FA\u6709\u306E\u756A\u53F7\u3092\u4ED8\u4E0E\u3057\u307E\u3059";
@@ -37,7 +41,15 @@ function afterChangeCharset() {
function test() {
waitForExplicitFinish();
- var rootDir = getRootDirectory(gTestPath);
+ // Get the local directory. This needs to be a file: URI because chrome: URIs
+ // are always UTF-8 (bug 617339) and we are testing decoding from other
+ // charsets.
+ var jar = getJar(getRootDirectory(gTestPath));
+ var dir = jar ?
+ extractJarToTmp(jar) :
+ getChromeDir(getResolvedURI(gTestPath));
+ var rootDir = Services.io.newFileURI(dir).spec;
+
gBrowser.selectedTab = gBrowser.addTab(rootDir + "test-form_sjis.html");
gBrowser.selectedBrowser.addEventListener("load", afterOpen, true);
}
View
9 dom/base/Webapps.js
@@ -201,6 +201,15 @@ WebappsApplication.prototype = {
_receipts: [],
_installOrigin: null,
_installTime: 0,
+ __exposedProps__: {
+ origin: 'r',
+ manifest: 'r',
+ manifestURL: 'r',
+ installOrigin: 'r',
+ installTime: 'r',
+ launch: 'r',
+ uninstall: 'r'
+ },
get origin() {
return this._origin;
View
11 dom/base/nsDOMClassInfo.cpp
@@ -5306,11 +5306,10 @@ nsWindowSH::GlobalScopePolluterNewResolve(JSContext *cx, JSHandleObject obj,
JSObject **objp)
{
if (flags & (JSRESOLVE_ASSIGNING | JSRESOLVE_DECLARING |
- JSRESOLVE_CLASSNAME | JSRESOLVE_QUALIFIED) ||
+ JSRESOLVE_QUALIFIED) ||
!JSID_IS_STRING(id)) {
// Nothing to do here if we're either assigning or declaring,
- // resolving a class name, doing a qualified resolve, or
- // resolving a number.
+ // doing a qualified resolve, or resolving a number.
return JS_TRUE;
}
@@ -6944,7 +6943,7 @@ static JSBool
LocationSetterUnwrapper(JSContext *cx, JSHandleObject obj_, JSHandleId id, JSBool strict,
jsval *vp)
{
- JS::RootedVarObject obj(cx, obj_);
+ JS::RootedObject obj(cx, obj_);
JSObject *wrapped = XPCWrapper::UnsafeUnwrapSecurityWrapper(obj);
if (wrapped) {
@@ -6959,8 +6958,8 @@ nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
JSObject *obj_, jsid id_, PRUint32 flags,
JSObject **objp, bool *_retval)
{
- JS::RootedVarObject obj(cx, obj_);
- JS::RootedVarId id(cx, id_);
+ JS::RootedObject obj(cx, obj_);
+ JS::RootedId id(cx, id_);
nsGlobalWindow *win = nsGlobalWindow::FromWrapper(wrapper);
View
2 dom/base/nsDOMWindowUtils.cpp
<
@@ -1822,7 +1822,7 @@ nsDOMWindowUtils::GetParent(const JS::Value& aObject,
// Outerize if necessary.
if (parent) {
if (JSObjectOp outerize = js::GetObjectClass(parent)->ext.outerObject) {
- *aParent = OBJECT_TO_JSVAL(outerize(aCx, JS::RootedVarObject(aCx, parent)));
+ *aParent = OBJECT_TO_JSVAL(outerize(aCx, JS::RootedObject(aCx, parent)));
}
}