Browse files

Merge mozilla-central into build-system

  • Loading branch information...
2 parents 376b718 + 5c09461 commit d955e53e1c72b19a3d6670983b06c706a37887d3 @Ms2ger Ms2ger committed Jan 3, 2013
Showing with 11,224 additions and 8,578 deletions.
  1. +0 −7 Makefile.in
  2. +7 −4 accessible/src/base/AccEvent.cpp
  3. +0 −1 accessible/src/base/NotificationController.cpp
  4. +3 −0 accessible/src/base/nsAccessibilityService.cpp
  5. +49 −12 accessible/src/generic/Accessible.cpp
  6. +13 −0 accessible/tests/mochitest/name.js
  7. +1 −0 accessible/tests/mochitest/name/Makefile.in
  8. +56 −0 accessible/tests/mochitest/name/test_svg.html
  9. +2 −10 accessible/tests/mochitest/test_descr.html
  10. +8 −8 b2g/components/UpdatePrompt.js
  11. +27 −2 browser/base/content/browser.js
  12. +3 −2 browser/components/downloads/content/allDownloadsViewOverlay.css
  13. +6 −1 browser/components/downloads/content/contentAreaDownloadsView.js
  14. +3 −2 browser/components/downloads/content/downloads.css
  15. +26 −19 browser/components/downloads/src/DownloadsUI.js
  16. +4 −3 browser/components/nsBrowserGlue.js
  17. +3 −3 browser/components/preferences/in-content/sync.js
  18. +3 −3 browser/components/preferences/sync.js
  19. +1 −0 ...mponents/privatebrowsing/test/browser/perwindow/browser_privatebrowsing_DownloadLastDirWithCPS.js
  20. +1 −1 ...r/components/privatebrowsing/test/browser/perwindow/browser_privatebrowsing_cookieacceptdialog.js
  21. +1 −1 browser/components/privatebrowsing/test/browser/perwindow/browser_privatebrowsing_crh.js
  22. +47 −44 browser/components/sessionstore/test/browser_819510_perwindowpb.js
  23. +3 −0 browser/config/mozconfigs/win32/debug
  24. +3 −0 browser/config/mozconfigs/win32/nightly
  25. +3 −0 browser/config/mozconfigs/win32/release
  26. +3 −0 browser/config/mozconfigs/win64/debug
  27. +3 −0 browser/config/mozconfigs/win64/nightly
  28. +5 −2 browser/themes/pinstripe/downloads/downloads.css
  29. +3 −2 build/automation.py.in
  30. +9 −2 build/unix/elfhack/elf.cpp
  31. +43 −11 build/unix/elfhack/elfhack.cpp
  32. +4 −0 build/unix/elfhack/elfxx.h
  33. +2 −2 configure.in
  34. +21 −0 content/base/crashtests/822691.html
  35. +1 −0 content/base/crashtests/crashtests.list
  36. +3 −1 content/base/public/nsIDocument.h
  37. +37 −37 content/base/public/nsINode.h
  38. +2 −1 content/base/src/nsDOMBlobBuilder.h
  39. +2 −3 content/base/src/nsDOMFile.cpp
  40. +12 −1 content/base/src/nsDocument.cpp
  41. +10 −0 content/base/src/nsGkAtomList.h
  42. +2 −0 content/base/src/nsINode.cpp
  43. +0 −2 content/base/src/nsImageLoadingContent.cpp
  44. +3 −2 content/canvas/src/Makefile.in
  45. +4 −4 content/canvas/src/WebGLContextReporter.cpp
  46. +2 −0 content/events/src/Makefile.in
  47. +155 −0 content/html/content/src/HTMLTitleElement.cpp
  48. +85 −0 content/html/content/src/HTMLTitleElement.h
  49. +4 −1 content/html/content/src/Makefile.in
  50. +0 −189 content/html/content/src/nsHTMLTitleElement.cpp
  51. +2 −0 content/html/document/src/Makefile.in
  52. +2 −0 content/mathml/content/src/Makefile.in
  53. +3 −1 content/media/Makefile.in
  54. +6 −0 content/media/MediaDecoder.h
  55. +2 −0 content/media/MediaSegment.h
  56. +3 −5 content/media/MediaStreamGraph.cpp
  57. +6 −0 content/media/MediaStreamGraph.h
  58. +3 −1 content/media/ogg/Makefile.in
  59. +3 −1 content/media/raw/Makefile.in
  60. +3 −1 content/media/webaudio/Makefile.in
  61. +4 −1 content/media/webaudio/compiledtest/Makefile.in
  62. +12 −2 content/media/webrtc/MediaEngine.h
  63. +6 −6 content/media/webrtc/MediaEngineDefault.cpp
  64. +12 −2 content/media/webrtc/MediaEngineDefault.h
  65. +14 −6 content/media/webrtc/MediaEngineWebRTC.h
  66. +71 −48 content/media/webrtc/MediaEngineWebRTCAudio.cpp
  67. +70 −46 content/media/webrtc/MediaEngineWebRTCVideo.cpp
  68. +0 −2 content/media/wmf/WMF.h
  69. +2 −0 content/smil/Makefile.in
  70. +2 −0 content/svg/content/src/Makefile.in
  71. +24 −6 dom/apps/src/Webapps.jsm
  72. +2 −0 dom/audiochannel/Makefile.in
  73. +3 −1 dom/base/Makefile.in
  74. +10 −18 dom/base/nsDOMClassInfo.cpp
  75. +0 −6 dom/base/nsGlobalWindow.cpp
  76. +2 −1 dom/base/nsGlobalWindow.h
  77. +60 −27 dom/base/nsJSEnvironment.cpp
  78. +2 −2 dom/base/nsWindowMemoryReporter.cpp
  79. +1 −0 dom/base/test/Makefile.in
  80. +36 −0 dom/base/test/test_window_constructor.html
  81. +11 −7 dom/bindings/BindingUtils.h
  82. +18 −1 dom/bindings/Bindings.conf
  83. +4 −4 dom/bindings/Codegen.py
  84. +8 −0 dom/bluetooth/linux/BluetoothDBusService.cpp
  85. +6 −0 dom/contacts/tests/marionette/manifest.ini
  86. +59 −0 dom/contacts/tests/marionette/test_sim_contacts.js
  87. +2 −0 dom/devicestorage/Makefile.in
  88. +3 −1 dom/file/Makefile.in
  89. +3 −1 dom/indexedDB/Makefile.in
  90. +10 −0 dom/ipc/ContentParent.cpp
  91. +1 −0 dom/ipc/ContentParent.h
  92. +3 −0 dom/ipc/Makefile.in
  93. +1 −0 dom/ipc/PContent.ipdl
  94. +2 −0 dom/media/Makefile.in
  95. +19 −10 dom/media/MediaManager.cpp
  96. +96 −105 dom/media/MediaManager.h
  97. +0 −10 dom/media/tests/mochitest/mediaStreamPlayback.js
  98. +2 −0 dom/network/src/Makefile.in
  99. +2 −0 dom/plugins/base/Makefile.in
  100. +3 −1 dom/plugins/ipc/Makefile.in
  101. +3 −1 dom/plugins/test/testplugin/Makefile.in
  102. +2 −0 dom/power/Makefile.in
  103. +2 −0 dom/sms/src/Makefile.in
  104. +6 −0 dom/src/geolocation/nsGeolocation.cpp
  105. +8 −1 dom/system/NetworkGeolocationProvider.js
  106. +6,754 −6,833 dom/system/gonk/ril_worker.js
  107. +19 −15 dom/system/gonk/tests/test_ril_worker_icc.js
  108. +2 −0 dom/tests/mochitest/chrome/Makefile.in
  109. +30 −0 dom/tests/mochitest/chrome/file_DOM_element_instanceof.xul
  110. +34 −0 dom/tests/mochitest/chrome/test_DOM_element_instanceof.xul
  111. +61 −0 dom/tests/unit/test_geolocation_timeout.js
  112. +9 −0 dom/tests/unit/test_geolocation_timeout_wrap.js
  113. +3 −0 dom/tests/unit/xpcshell.ini
  114. +2 −0 dom/time/Makefile.in
  115. +10 −1 dom/webidl/Document.webidl
  116. +13 −0 dom/webidl/HTMLTitleElement.webidl
  117. +1 −0 dom/webidl/WebIDL.mk
  118. +3 −1 dom/workers/Makefile.in
  119. +0 −6 dom/workers/RuntimeService.cpp
  120. +8 −4 dom/workers/WorkerPrivate.cpp
  121. +2 −0 dom/workers/test/Makefile.in
  122. +32 −0 dom/workers/test/test_resolveWorker-assignment.html
  123. +31 −0 dom/workers/test/test_resolveWorker.html
  124. +3 −1 editor/composer/src/Makefile.in
  125. +3 −1 editor/libeditor/base/Makefile.in
  126. +5 −1 editor/libeditor/html/nsHTMLEditorStyle.cpp
  127. +31 −96 embedding/components/printingui/src/mac/nsPrintProgress.cpp
  128. +2 −2 embedding/components/printingui/src/mac/nsPrintProgress.h
  129. +30 −95 embedding/components/printingui/src/os2/nsPrintProgress.cpp
  130. +2 −2 embedding/components/printingui/src/os2/nsPrintProgress.h
  131. +30 −94 embedding/components/printingui/src/unixshared/nsPrintProgress.cpp
  132. +2 −2 embedding/components/printingui/src/unixshared/nsPrintProgress.h
  133. +31 −96 embedding/components/printingui/src/win/nsPrintProgress.cpp
  134. +2 −2 embedding/components/printingui/src/win/nsPrintProgress.h
  135. +1 −1 extensions/spellcheck/hunspell/src/mozHunspell.cpp
  136. +2 −0 gfx/gl/Makefile.in
  137. +4 −0 gfx/layers/ipc/CompositorParent.cpp
  138. +2 −0 gfx/src/Makefile.in
  139. +1 −1 gfx/thebes/gfxAndroidPlatform.cpp
  140. +1 −1 gfx/thebes/gfxFont.cpp
  141. +1 −1 gfx/thebes/gfxPlatformFontList.cpp
  142. +2 −0 image/build/Makefile.in
  143. +2 −0 image/src/Makefile.in
  144. +1 −1 image/src/imgLoader.cpp
  145. +11 −8 ipc/chromium/src/base/histogram.cc
  146. +2 −0 ipc/chromium/src/base/histogram.h
  147. +1 −1 js/src/jsdbgapi.cpp
  148. +2 −1 js/src/jsdbgapi.h
  149. +3 −1 js/src/jsfriendapi.h
  150. +8 −6 js/src/methodjit/MethodJIT.cpp
  151. +1 −4 js/src/shell/js.cpp
  152. +3 −1 js/src/vm/SPSProfiler.cpp
  153. +2 −2 js/src/vm/SPSProfiler.h
  154. +0 −3 js/xpconnect/shell/xpcshell.cpp
  155. +1 −1 js/xpconnect/src/XPCComponents.cpp
  156. +4 −4 js/xpconnect/src/XPCJSRuntime.cpp
  157. +2 −0 layout/base/Makefile.in
  158. +9 −10 layout/base/nsCSSFrameConstructor.cpp
  159. +1 −2 layout/base/nsStyleSheetService.cpp
  160. +2 −0 layout/build/Makefile.in
  161. +2 −0 layout/forms/Makefile.in
  162. +2 −0 layout/generic/Makefile.in
  163. +4 −4 layout/generic/nsFrame.cpp
  164. +2 −2 layout/generic/nsGfxScrollFrame.cpp
  165. +2 −0 layout/ipc/Makefile.in
  166. +2 −0 layout/mathml/Makefile.in
  167. +2 −0 layout/printing/Makefile.in
  168. +61 −0 layout/printing/nsPrintData.cpp
  169. +2 −0 layout/reftests/bugs/816359-1-ref.html
  170. +5 −0 layout/reftests/bugs/816359-1.html
  171. +1 −0 layout/reftests/bugs/reftest.list
  172. +1 −2 layout/style/nsLayoutStylesheetCache.cpp
  173. +2 −2 layout/style/nsStyleStruct.cpp
  174. +6 −2 layout/style/nsStyleStruct.h
  175. +7 −1 layout/style/nsStyleStructInlines.h
  176. +2 −0 layout/svg/Makefile.in
  177. +2 −0 layout/tables/Makefile.in
  178. +3 −2 layout/tools/reftest/remotereftest.py
  179. +3 −2 layout/tools/reftest/runreftestb2g.py
  180. +2 −0 layout/xul/base/src/Makefile.in
  181. +80 −58 media/webrtc/signaling/src/media/VcmSIPCCBinding.cpp
  182. +10 −13 media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
  183. +5 −3 media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
  184. +5 −15 media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
  185. +0 −1 media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
  186. +8 −4 media/webrtc/signaling/src/sipcc/core/gsm/fsmdef.c
  187. +7 −0 media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
  188. +4 −2 media/webrtc/signaling/src/sipcc/core/gsm/h/gsm_sdp.h
  189. +7 −5 media/webrtc/signaling/src/sipcc/core/gsm/lsm.c
  190. +8 −8 media/webrtc/signaling/src/sipcc/include/vcm.h
  191. +73 −7 media/webrtc/signaling/test/signaling_unittests.cpp
  192. +6 −6 mfbt/Attributes.h
  193. +46 −0 mfbt/Char16.h
  194. +1 −0 mfbt/exported_headers.mk
  195. +37 −12 mobile/android/base/AboutHomeContent.java
  196. +11 −0 mobile/android/base/AboutHomeSection.java
  197. +0 −1 mobile/android/base/Makefile.in
  198. +1 −0 mobile/android/base/TabsPanel.java
  199. +1 −1 mobile/android/base/WebAppManifestFragment.xml.frag
  200. +1 −1 mobile/android/base/android-services-files.mk
  201. +4 −3 mobile/android/base/background/announcements/AnnouncementsFetchResourceDelegate.java
  202. +1 −0 mobile/android/base/db/BrowserDB.java
  203. +0 −12 mobile/android/base/resources/drawable/abouthome_divider.xml
  204. +11 −41 mobile/android/base/resources/layout/abouthome_addon_row.xml
  205. +0 −6 mobile/android/base/resources/layout/abouthome_last_tabs_row.xml
  206. +11 −25 mobile/android/base/resources/layout/abouthome_remote_tab_row.xml
  207. +1 −0 mobile/android/base/resources/values/dimens.xml
  208. +12 −0 mobile/android/base/resources/values/styles.xml
  209. +2 −2 mobile/android/base/sync/jpake/stage/DeleteChannel.java
  210. +2 −2 mobile/android/base/sync/jpake/stage/GetChannelStage.java
  211. +2 −2 mobile/android/base/sync/jpake/stage/GetRequestStage.java
  212. +2 −2 mobile/android/base/sync/jpake/stage/PutRequestStage.java
  213. +30 −0 mobile/android/base/sync/net/AuthHeaderProvider.java
  214. +59 −26 mobile/android/base/sync/net/BaseResource.java
  215. +44 −0 mobile/android/base/sync/net/BaseResourceDelegate.java
  216. +51 −0 mobile/android/base/sync/net/BasicAuthHeaderProvider.java
  217. +37 −0 mobile/android/base/sync/net/BrowserIDAuthHeaderProvider.java
  218. +257 −0 mobile/android/base/sync/net/HMACAuthHeaderProvider.java
  219. +1 −1 mobile/android/base/sync/net/ResourceDelegate.java
  220. +1 −1 mobile/android/base/sync/net/SyncStorageCollectionRequest.java
  221. +4 −29 mobile/android/base/sync/net/SyncStorageRecordRequest.java
  222. +10 −5 mobile/android/base/sync/net/SyncStorageRequest.java
  223. +4 −4 mobile/android/base/sync/setup/auth/AuthenticateAccountStage.java
  224. +2 −2 mobile/android/base/sync/setup/auth/EnsureUserExistenceStage.java
  225. +4 −4 mobile/android/base/sync/setup/auth/FetchUserNodeStage.java
  226. +2 −2 mobile/android/base/sync/stage/EnsureClusterURLStage.java
  227. +7 −3 mobile/android/base/tests/testHistoryTab.java.in
  228. +3 −3 mobile/android/chrome/content/WebAppRT.js
  229. +2 −2 mobile/android/chrome/content/browser.js
  230. +2 −1 mobile/android/config/mozconfigs/android-armv6/debug
  231. +2 −1 mobile/android/config/mozconfigs/android-armv6/l10n-nightly
  232. +2 −1 mobile/android/config/mozconfigs/android-armv6/l10n-release
  233. +2 −1 mobile/android/config/mozconfigs/android-armv6/nightly
  234. +2 −1 mobile/android/config/mozconfigs/android-armv6/release
  235. +2 −1 mobile/android/config/mozconfigs/android-noion/nightly
  236. +2 −1 mobile/android/config/mozconfigs/android/debug
  237. +2 −1 mobile/android/config/mozconfigs/android/l10n-nightly
  238. +2 −1 mobile/android/config/mozconfigs/android/l10n-release
  239. +2 −1 mobile/android/config/mozconfigs/android/nightly
  240. +2 −1 mobile/android/config/mozconfigs/android/release
  241. +5 −1 mobile/android/services/java-sources.mn
  242. +1 −1 modules/libjar/test/unit/xpcshell.ini
  243. +1 −1 modules/libpref/src/Preferences.cpp
  244. +1 −1 mozglue/linker/CustomElf.cpp
  245. +3 −1 netwerk/base/src/Makefile.in
  246. +12 −1 netwerk/base/src/nsPACMan.cpp
  247. +13 −7 netwerk/base/src/nsPACMan.h
  248. +3 −1 netwerk/build/Makefile.in
  249. +3 −1 netwerk/cache/Makefile.in
  250. +2 −2 netwerk/cache/nsCacheService.cpp
  251. +3 −1 netwerk/cookie/Makefile.in
  252. +1 −1 netwerk/dns/DNS.cpp
  253. +1 −1 netwerk/dns/DNS.h
  254. +3 −1 netwerk/dns/Makefile.in
  255. +1 −2 netwerk/dns/nsEffectiveTLDService.cpp
  256. +3 −5 netwerk/ipc/RemoteOpenFileChild.cpp
  257. +3 −1 netwerk/protocol/http/Makefile.in
  258. +3 −1 netwerk/protocol/res/Makefile.in
  259. +3 −1 netwerk/protocol/websocket/Makefile.in
  260. +3 −1 netwerk/protocol/wyciwyg/Makefile.in
  261. +3 −1 netwerk/streamconv/converters/Makefile.in
  262. +1 −1 python/mozboot/mozboot/bootstrap.py
  263. +59 −2 security/manager/ssl/src/SSLServerCertVerification.cpp
  264. +7 −1 services/common/rest.js
  265. +16 −0 services/common/tests/unit/test_restrequest.js
  266. +0 −2 services/sync/Makefile.in
  267. +0 −5 services/sync/modules/constants.js
  268. +8 −2 services/sync/modules/engines.js
  269. +5 −1 services/sync/modules/policies.js
  270. +14 −4 services/sync/modules/resource.js
  271. +4 −4 services/sync/modules/service.js
  272. +36 −22 services/sync/tests/unit/test_engine.js
  273. +63 −68 services/sync/tests/unit/test_resource_ua.js
  274. +13 −0 services/sync/tests/unit/test_service_set_serverURL.js
  275. +1 −0 services/sync/tests/unit/xpcshell.ini
  276. +1 −1 startupcache/StartupCache.cpp
  277. +8 −8 storage/src/mozStorageService.cpp
  278. +252 −0 testing/marionette/client/marionette/atoms/b2g_update_test.js
  279. +453 −0 testing/marionette/client/marionette/b2g_update_test.py
  280. +92 −0 testing/marionette/client/marionette/b2ginstance.py
  281. +7 −4 testing/marionette/client/marionette/client.py
  282. +30 −45 testing/marionette/client/marionette/emulator.py
  283. +4 −0 testing/marionette/client/marionette/errors.py
  284. +7 −2 testing/marionette/client/marionette/runtests.py
  285. +1 −0 testing/marionette/client/marionette/tests/unit-tests.ini
  286. +18 −0 testing/marionette/client/marionette/tests/update-tests.ini
  287. +53 −0 testing/marionette/client/marionette/venv_b2g_update_test.sh
  288. +17 −0 testing/marionette/update-smoketests/flash-template.sh
  289. +56 −0 testing/marionette/update-smoketests/run-smoketests.py
  290. +195 −0 testing/marionette/update-smoketests/smoketest.py
  291. +95 −0 testing/marionette/update-smoketests/stage-update.py
  292. +1 −8 testing/mochitest/tests/MochiKit-1.4.2/tests/Makefile.in
  293. +4 −1 testing/tps/tps/cli.py
  294. +18 −5 testing/tps/tps/testrunner.py
  295. +4 −0 toolkit/components/alerts/mac/nsMacAlertsService.mm
  296. +1 −0 toolkit/components/perf/Makefile.in
  297. +0 −1 toolkit/components/perf/PerfMeasurement.cpp
  298. +1 −2 toolkit/components/places/History.cpp
  299. +6 −5 toolkit/components/remote/nsXRemoteService.cpp
  300. +38 −0 toolkit/components/telemetry/Histograms.json
Sorry, we could not display the entire diff because too many files (341) changed.
View
7 Makefile.in
@@ -151,13 +151,6 @@ SYMBOL_INDEX_NAME = \
buildsymbols:
ifdef MOZ_CRASHREPORTER
-ifdef USE_ELF_HACK
- ifeq (mobile,$(MOZ_BUILD_APP))
- $(MAKE) -C mobile/xul/installer elfhack
- else
- $(MAKE) -C $(MOZ_BUILD_APP)/installer elfhack
- endif
-endif
echo building symbol store
$(RM) -r $(DIST)/crashreporter-symbols
$(RM) "$(DIST)/$(SYMBOL_ARCHIVE_BASENAME).zip"
View
11 accessible/src/base/AccEvent.cpp
@@ -1,4 +1,5 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
/* 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/. */
@@ -117,10 +118,12 @@ AccReorderEvent::IsShowHideEventTarget(const Accessible* aTarget) const
{
uint32_t count = mDependentEvents.Length();
for (uint32_t index = count - 1; index < count; index--) {
- if (mDependentEvents[index]->mAccessible == aTarget &&
- mDependentEvents[index]->mEventType == nsIAccessibleEvent::EVENT_SHOW ||
- mDependentEvents[index]->mEventType == nsIAccessibleEvent::EVENT_HIDE) {
- return mDependentEvents[index]->mEventType;
+ if (mDependentEvents[index]->mAccessible == aTarget) {
+ uint32_t eventType = mDependentEvents[index]->mEventType;
+ if (eventType == nsIAccessibleEvent::EVENT_SHOW ||
+ eventType == nsIAccessibleEvent::EVENT_HIDE) {
+ return mDependentEvents[index]->mEventType;
+ }
}
}
View
1 accessible/src/base/NotificationController.cpp
@@ -641,7 +641,6 @@ NotificationController::CoalesceTextChangeEventsFor(AccShowEvent* aTailEvent,
void
NotificationController::CreateTextChangeEventFor(AccMutationEvent* aEvent)
{
- DocAccessible* document = aEvent->GetDocAccessible();
Accessible* container = aEvent->mAccessible->Parent();
if (!container)
return;
View
3 accessible/src/base/nsAccessibilityService.cpp
@@ -1460,6 +1460,9 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
case eTextLeafType:
newAcc = new TextLeafAccessibleWrap(aContent, document);
break;
+ default:
+ MOZ_ASSERT(false);
+ break;
}
return newAcc.forget();
View
61 accessible/src/generic/Accessible.cpp
@@ -264,6 +264,16 @@ Accessible::Name(nsString& aName)
aName.CompressWhitespace();
return eNameFromTooltip;
}
+ } else if (mContent->IsSVG()) {
+ // If user agents need to choose among multiple ‘desc’ or ‘title’ elements
+ // for processing, the user agent shall choose the first one.
+ for (nsIContent* childElm = mContent->GetFirstChild(); childElm;
+ childElm = childElm->GetNextSibling()) {
+ if (childElm->IsSVG(nsGkAtoms::title)) {
+ nsTextEquivUtils::AppendTextEquivFromContent(this, childElm, &aName);
+ return eNameFromTooltip;
+ }
+ }
}
if (nameFlag != eNoNameOnPurpose)
@@ -307,25 +317,40 @@ Accessible::Description(nsString& aDescription)
// Try XUL <description control="[id]">description text</description>
XULDescriptionIterator iter(Document(), mContent);
Accessible* descr = nullptr;
- while ((descr = iter.Next()))
+ while ((descr = iter.Next())) {
nsTextEquivUtils::AppendTextEquivFromContent(this, descr->GetContent(),
&aDescription);
}
+ }
- if (aDescription.IsEmpty()) {
- nsIAtom *descAtom = isXUL ? nsGkAtoms::tooltiptext :
- nsGkAtoms::title;
- if (mContent->GetAttr(kNameSpaceID_None, descAtom, aDescription)) {
- nsAutoString name;
- Name(name);
- if (name.IsEmpty() || aDescription == name)
- // Don't use tooltip for a description if this object
- // has no name or the tooltip is the same as the name
- aDescription.Truncate();
+ if (aDescription.IsEmpty()) {
+ // Keep the Name() method logic.
+ if (mContent->IsHTML()) {
+ mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::title, aDescription);
+ } else if (mContent->IsXUL()) {
+ mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::tooltiptext, aDescription);
+ } else if (mContent->IsSVG()) {
+ for (nsIContent* childElm = mContent->GetFirstChild(); childElm;
+ childElm = childElm->GetNextSibling()) {
+ if (childElm->IsSVG(nsGkAtoms::title)) {
+ nsTextEquivUtils::AppendTextEquivFromContent(this, childElm,
+ &aDescription);
+ break;
+ }
}
}
+
+ if (!aDescription.IsEmpty()) {
+ nsAutoString name;
+ ENameValueFlag nameFlag = Name(name);
+
+ // Don't use tooltip for a description if it was used for a name.
+ if (nameFlag == eNameFromTooltip)
+ aDescription.Truncate();
+ }
}
- aDescription.CompressWhitespace();
+ }
+ aDescription.CompressWhitespace();
}
NS_IMETHODIMP
@@ -2494,6 +2519,18 @@ Accessible::NativeName(nsString& aName)
if (mContent->IsXUL())
return GetXULName(aName);
+ if (mContent->IsSVG()) {
+ // If user agents need to choose among multiple ‘desc’ or ‘title’ elements
+ // for processing, the user agent shall choose the first one.
+ for (nsIContent* childElm = mContent->GetFirstChild(); childElm;
+ childElm = childElm->GetNextSibling()) {
+ if (childElm->IsSVG(nsGkAtoms::desc)) {
+ nsTextEquivUtils::AppendTextEquivFromContent(this, childElm, &aName);
+ return eNameOK;
+ }
+ }
+ }
+
return eNameOK;
}
View
13 accessible/tests/mochitest/name.js
@@ -17,3 +17,16 @@ function testName(aAccOrElmOrID, aName, aMsg)
}
return acc;
}
+
+/**
+ * Test accessible description for the given accessible.
+ */
+function testDescr(aAccOrElmOrID, aDescr)
+{
+ var acc = getAccessible(aAccOrElmOrID);
+ if (!acc)
+ return;
+
+ is(acc.description, aDescr,
+ "Wrong description for " + prettyName(aAccOrElmOrID));
+}
View
1 accessible/tests/mochitest/name/Makefile.in
@@ -21,6 +21,7 @@ MOCHITEST_A11Y_FILES =\
test_link.html \
test_list.html \
test_markup.html \
+ test_svg.html \
test_browserui.xul \
test_tree.xul \
markuprules.xml \
View
56 accessible/tests/mochitest/name/test_svg.html
@@ -0,0 +1,56 @@
+<html>
+
+<head>
+ <title>Accessible name and description for SVG elements</title>
+ <link rel="stylesheet" type="text/css"
+ href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+
+ <script type="application/javascript"
+ src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+
+ <script type="application/javascript"
+ src="../common.js"></script>
+ <script type="application/javascript"
+ src="../name.js"></script>
+
+ <script type="application/javascript">
+
+ function doTest()
+ {
+ testName("svg1", "A name");
+ testDescr("svg1", "A description");
+ testName("svg2", "A tooltip");
+ testDescr("svg2", "");
+
+ SimpleTest.finish();
+ }
+
+ SimpleTest.waitForExplicitFinish();
+ addA11yLoadEvent(doTest);
+ </script>
+
+</head>
+
+<body>
+
+ <a target="_blank"
+ href="https://bugzilla.mozilla.org/show_bug.cgi?id=459357"
+ title="Support accessible name computation for SVG">
+ Mozilla Bug 459357
+ </a>
+ <p id="display"></p>
+ <div id="content" style="display: none"></div>
+ <pre id="test">
+ </pre>
+
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg1">
+ <title>A description</title>
+ <desc>A name</desc>
+ </svg>
+
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg2">
+ <title>A tooltip</title>
+ </svg>
+
+</body>
+</html>
View
12 accessible/tests/mochitest/test_descr.html
@@ -8,18 +8,10 @@
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="common.js"></script>
+ <script type="application/javascript"
+ src="name.js"></script>
<script type="application/javascript">
- function testDescr(aAccOrElmOrID, aDescr)
- {
- var acc = getAccessible(aAccOrElmOrID);
- if (!acc)
- return;
-
- is(acc.description, aDescr,
- "Wrong description for " + prettyName(aAccOrElmOrID));
- }
-
function doTest()
{
// Description from aria-describedby attribute
View
16 b2g/components/UpdatePrompt.js
@@ -192,15 +192,15 @@ UpdatePrompt.prototype = {
this._applyPromptTimer = this.createTimer(this.applyPromptTimeout);
},
+ _copyProperties: ["appVersion", "buildID", "detailsURL", "displayVersion",
+ "errorCode", "isOSUpdate", "platformVersion",
+ "previousAppVersion", "state", "statusText"],
+
sendUpdateEvent: function UP_sendUpdateEvent(aType, aUpdate) {
- let detail = {
- displayVersion: aUpdate.displayVersion,
- detailsURL: aUpdate.detailsURL,
- statusText: aUpdate.statusText,
- state: aUpdate.state,
- errorCode: aUpdate.errorCode,
- isOSUpdate: aUpdate.isOSUpdate
- };
+ let detail = {};
+ for each (let property in this._copyProperties) {
+ detail[property] = aUpdate[property];
+ }
let patch = aUpdate.selectedPatch;
if (!patch && aUpdate.patchCount > 0) {
View
29 browser/base/content/browser.js
@@ -1750,7 +1750,6 @@ var nonBrowserWindowShutdown = gBrowserInit.nonBrowserWindowShutdown.bind(
function HandleAppCommandEvent(evt) {
- evt.stopPropagation();
switch (evt.command) {
case "Back":
BrowserBack();
@@ -1774,9 +1773,35 @@ function HandleAppCommandEvent(evt) {
case "Home":
BrowserHome();
break;
- default:
+ case "New":
+ BrowserOpenTab();
+ break;
+ case "Close":
+ BrowserCloseTabOrWindow();
+ break;
+ case "Find":
+ gFindBar.onFindCommand();
+ break;
+ case "Help":
+ openHelpLink('firefox-help');
+ break;
+ case "Open":
+ BrowserOpenFileWindow();
break;
+ case "Print":
+ PrintUtils.print();
+ break;
+ case "Save":
+ saveDocument(window.content.document);
+ break;
+ case "SendMail":
+ MailIntegration.sendLinkForWindow(window.content);
+ break;
+ default:
+ return;
}
+ evt.stopPropagation();
+ evt.preventDefault();
}
function gotoHistoryIndex(aEvent) {
View
5 browser/components/downloads/content/allDownloadsViewOverlay.css
@@ -21,9 +21,10 @@ richlistitem.download {
[state="9"]) /* Blocked (policy) */)
.downloadRemoveFromHistoryMenuItem,
.download-state:not(:-moz-any([state="-1"],/* Starting (initial) */
- [state="5"], /* Starting (queued) */
[state="0"], /* Downloading */
- [state="4"]) /* Paused */)
+ [state="1"], /* Finished */
+ [state="4"], /* Paused */
+ [state="5"]) /* Starting (queued) */)
.downloadShowMenuItem,
.download-state[state="7"] .downloadCommandsSeparator
View
7 browser/components/downloads/content/contentAreaDownloadsView.js
@@ -2,9 +2,14 @@
* 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/PrivateBrowsingUtils.jsm");
+
let ContentAreaDownloadsView = {
init: function CADV_init() {
let view = new DownloadsPlacesView(document.getElementById("downloadsRichListBox"));
- view.place = "place:transition=7&sort=4";
+ // Do not display the Places downloads in private windows
+ if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
+ view.place = "place:transition=7&sort=4";
+ }
}
};
View
5 browser/components/downloads/content/downloads.css
@@ -57,9 +57,10 @@ richlistitem[type="download"]:not([selected]) button {
.downloadRemoveFromHistoryMenuItem,
.download-state:not(:-moz-any([state="-1"],/* Starting (initial) */
- [state="5"], /* Starting (queued) */
[state="0"], /* Downloading */
- [state="4"]) /* Paused */)
+ [state="1"], /* Finished */
+ [state="4"], /* Paused */
+ [state="5"]) /* Starting (queued) */)
.downloadShowMenuItem,
.download-state[state="7"] .downloadCommandsSeparator
View
45 browser/components/downloads/src/DownloadsUI.js
@@ -32,6 +32,8 @@ XPCOMUtils.defineLazyServiceGetter(this, "gBrowserGlue",
"nsIBrowserGlue");
XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow",
"resource:///modules/RecentWindow.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
+ "resource://gre/modules/PrivateBrowsingUtils.jsm");
////////////////////////////////////////////////////////////////////////////////
//// DownloadsUI
@@ -112,28 +114,33 @@ DownloadsUI.prototype = {
_showDownloadManagerUI:
function DUI_showDownloadManagerUI(aWindowContext, aID, aReason)
{
- let organizer = Services.wm.getMostRecentWindow("Places:Organizer");
- if (!organizer) {
- let parentWindow = aWindowContext;
- // If we weren't given a window context, try to find a browser window
- // to use as our parent - and if that doesn't work, error out and give
- // up.
+ // If we weren't given a window context, try to find a browser window
+ // to use as our parent - and if that doesn't work, error out and give up.
+ let parentWindow = aWindowContext;
+ if (!parentWindow) {
+ parentWindow = RecentWindow.getMostRecentBrowserWindow();
if (!parentWindow) {
- parentWindow = RecentWindow.getMostRecentBrowserWindow();
- if (!parentWindow) {
- Components.utils
- .reportError("Couldn't find a browser window to open " +
- "the Places Downloads View from.");
- return;
- }
+ Components.utils.reportError(
+ "Couldn't find a browser window to open the Places Downloads View " +
+ "from.");
+ return;
}
- parentWindow.openDialog("chrome://browser/content/places/places.xul",
- "", "chrome,toolbar=yes,dialog=no,resizable",
- "Downloads");
}
- else {
- organizer.PlacesOrganizer.selectLeftPaneQuery("Downloads");
- organizer.focus();
+
+ // If window is private then show it in a tab.
+ if (PrivateBrowsingUtils.isWindowPrivate(parentWindow)) {
+ parentWindow.openUILinkIn("about:downloads", "tab");
+ return;
+ } else {
+ let organizer = Services.wm.getMostRecentWindow("Places:Organizer");
+ if (!organizer) {
+ parentWindow.openDialog("chrome://browser/content/places/places.xul",
+ "", "chrome,toolbar=yes,dialog=no,resizable",
+ "Downloads");
+ } else {
+ organizer.PlacesOrganizer.selectLeftPaneQuery("Downloads");
+ organizer.focus();
+ }
}
}
};
View
7 browser/components/nsBrowserGlue.js
@@ -910,13 +910,13 @@ BrowserGlue.prototype = {
*
* - The last accepted/refused policy (either by accepting the prompt or by
* manually flipping the telemetry preference) is already at version
- * TELEMETRY_DISPLAY_REV.
+ * TELEMETRY_DISPLAY_REV or higher (to avoid the prompt in tests).
*/
var telemetryDisplayed;
try {
telemetryDisplayed = Services.prefs.getIntPref(PREF_TELEMETRY_DISPLAYED);
} catch(e) {}
- if (telemetryDisplayed === TELEMETRY_DISPLAY_REV)
+ if (telemetryDisplayed >= TELEMETRY_DISPLAY_REV)
return;
#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
@@ -925,7 +925,8 @@ BrowserGlue.prototype = {
*
* - Telemetry is disabled
* - Telemetry was explicitly refused through the UI
- * - Opt-in telemetry was enabled and this is the first run with opt-out.
+ * - Opt-in telemetry was already enabled, don't notify the user until next
+ * policy update. (Do the check only at first run with opt-out builds)
*/
var telemetryEnabled = Services.prefs.getBoolPref(PREF_TELEMETRY_ENABLED);
View
6 browser/components/preferences/in-content/sync.js
@@ -117,7 +117,7 @@ let gSyncPane = {
* "reset" -- reset sync
*/
openSetup: function (wizardType) {
- var win = Services.wm.getMostRecentWindow("Weave:AccountSetup");
+ let win = Services.wm.getMostRecentWindow("Weave:AccountSetup");
if (win)
win.focus();
else {
@@ -150,6 +150,6 @@ let gSyncPane = {
resetSync: function () {
this.openSetup("reset");
- }
-}
+ },
+};
View
6 browser/components/preferences/sync.js
@@ -118,7 +118,7 @@ let gSyncPane = {
* "reset" -- reset sync
*/
openSetup: function (wizardType) {
- var win = Services.wm.getMostRecentWindow("Weave:AccountSetup");
+ let win = Services.wm.getMostRecentWindow("Weave:AccountSetup");
if (win)
win.focus();
else {
@@ -151,6 +151,6 @@ let gSyncPane = {
resetSync: function () {
this.openSetup("reset");
- }
-}
+ },
+};
View
1 .../privatebrowsing/test/browser/perwindow/browser_privatebrowsing_DownloadLastDirWithCPS.js
@@ -6,6 +6,7 @@
let gTests;
function test() {
waitForExplicitFinish();
+ requestLongerTimeout(2);
gTests = runTest();
moveAlong();
}
View
2 ...ents/privatebrowsing/test/browser/perwindow/browser_privatebrowsing_cookieacceptdialog.js
@@ -35,7 +35,7 @@ function test() {
"The checkbox should not be disabled");
win.close();
- callback();
+ executeSoon(callback);
});
}, false);
}
View
2 browser/components/privatebrowsing/test/browser/perwindow/browser_privatebrowsing_crh.js
@@ -18,7 +18,7 @@ function test() {
is(crhCommand.hasAttribute("disabled"), aPrivateMode,
"Clear Recent History command should be disabled according to the private browsing mode");
- aCallback();
+ executeSoon(aCallback);
});
};
View
91 browser/components/sessionstore/test/browser_819510_perwindowpb.js
@@ -8,7 +8,6 @@ function test() {
waitForExplicitFinish();
registerCleanupFunction(function() {
- Services.prefs.clearUserPref("browser.sessionstore.interval");
ss.setBrowserState(originalState);
});
@@ -34,8 +33,6 @@ function runNextTest() {
let currentTest = tests.shift();
waitForBrowserState(testState, currentTest);
} else {
- Services.prefs.clearUserPref("browser.sessionstore.interval");
- ss.setBrowserState(originalState);
finish();
}
}
@@ -105,33 +102,34 @@ function test_2() {
// Test opening default-normal-private-normal windows and closing a normal window
function test_3() {
testOnWindow(false, function(normalWindow) {
- let tab = normalWindow.gBrowser.addTab("http://www.example.com/1");
- whenBrowserLoaded(tab.linkedBrowser, function() {
+ waitForTabLoad(normalWindow, "http://www.example.com/", function() {
testOnWindow(true, function(aWindow) {
- aWindow.gBrowser.addTab("http://www.example.com/2");
- testOnWindow(false, function(aWindow) {
- aWindow.gBrowser.addTab("http://www.example.com/3");
-
- let curState = JSON.parse(ss.getBrowserState());
- is (curState.windows.length, 4, "Browser has opened 4 windows");
- is (curState.windows[2].isPrivate, true, "Window 2 is private");
- is (curState.selectedWindow, 4, "Last window opened is the one selected");
-
- waitForWindowClose(normalWindow, function() {
- forceWriteState(function(state) {
- is(state.windows.length, 2,
- "sessionstore state: 2 windows in data being writted to disk");
- is(state.selectedWindow, 2,
- "Selected window is updated to match one of the saved windows");
- state.windows.forEach(function(win) {
- is(!win.isPrivate, true, "Saved window is not private");
- });
- is(state._closedWindows.length, 1,
- "sessionstore state: 1 closed window in data being writted to disk");
- state._closedWindows.forEach(function(win) {
- is(!win.isPrivate, true, "Closed window is not private");
+ waitForTabLoad(aWindow, "http://www.example.com/", function() {
+ testOnWindow(false, function(aWindow) {
+ waitForTabLoad(aWindow, "http://www.example.com/", function() {
+
+ let curState = JSON.parse(ss.getBrowserState());
+ is(curState.windows.length, 4, "Browser has opened 4 windows");
+ is(curState.windows[2].isPrivate, true, "Window 2 is private");
+ is(curState.selectedWindow, 4, "Last window opened is the one selected");
+
+ waitForWindowClose(normalWindow, function() {
+ forceWriteState(function(state) {
+ is(state.windows.length, 2,
+ "sessionstore state: 2 windows in data being writted to disk");
+ is(state.selectedWindow, 2,
+ "Selected window is updated to match one of the saved windows");
+ state.windows.forEach(function(win) {
+ is(!win.isPrivate, true, "Saved window is not private");
+ });
+ is(state._closedWindows.length, 1,
+ "sessionstore state: 1 closed window in data being writted to disk");
+ state._closedWindows.forEach(function(win) {
+ is(!win.isPrivate, true, "Closed window is not private");
+ });
+ runNextTest();
+ });
});
- runNextTest();
});
});
});
@@ -141,30 +139,27 @@ function test_3() {
}
function waitForWindowClose(aWin, aCallback) {
- Services.obs.addObserver(function observe(aSubject, aTopic, aData) {
- if (aTopic == "domwindowclosed" && aWin == aSubject) {
- Services.obs.removeObserver(observe, aTopic);
- checkWindowIsClosed(aWin, aCallback);
+ let winCount = JSON.parse(ss.getBrowserState()).windows.length;
+ aWin.addEventListener("SSWindowClosing", function onWindowClosing() {
+ aWin.removeEventListener("SSWindowClosing", onWindowClosing, false);
+ function checkCount() {
+ let state = JSON.parse(ss.getBrowserState());
+ if (state.windows.length == (winCount - 1)) {
+ aCallback();
+ } else {
+ executeSoon(checkCount);
+ }
}
- }, "domwindowclosed", false);
+ executeSoon(checkCount);
+ }, false);
aWin.close();
}
-function checkWindowIsClosed(aWin, aCallback) {
- if (aWin.closed) {
- info("Window is closed");
- executeSoon(aCallback);
- } else {
- executeSoon(function() {
- checkWindowIsClosed(aWin, aCallback);
- });
- }
-}
-
function forceWriteState(aCallback) {
Services.obs.addObserver(function observe(aSubject, aTopic, aData) {
if (aTopic == "sessionstore-state-write") {
Services.obs.removeObserver(observe, aTopic);
+ Services.prefs.clearUserPref("browser.sessionstore.interval");
aSubject.QueryInterface(Ci.nsISupportsString);
aCallback(JSON.parse(aSubject.data));
}
@@ -179,3 +174,11 @@ function testOnWindow(aIsPrivate, aCallback) {
executeSoon(function() { aCallback(win); });
}, false);
}
+
+function waitForTabLoad(aWin, aURL, aCallback) {
+ aWin.gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
+ aWin.gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
+ aCallback();
+ }, true);
+ aWin.gBrowser.selectedBrowser.loadURI(aURL);
+}
View
3 browser/config/mozconfigs/win32/debug
@@ -18,6 +18,9 @@ else
. $topsrcdir/build/win32/mozconfig.vs2010
fi
+# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
+ac_add_options --enable-warnings-as-errors
+
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1
View
3 browser/config/mozconfigs/win32/nightly
@@ -27,6 +27,9 @@ else
. $topsrcdir/build/win32/mozconfig.vs2010
fi
+# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
+ac_add_options --enable-warnings-as-errors
+
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1
View
3 browser/config/mozconfigs/win32/release
@@ -24,6 +24,9 @@ else
. $topsrcdir/build/win32/mozconfig.vs2010
fi
+# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
+ac_add_options --enable-warnings-as-errors
+
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1
View
3 browser/config/mozconfigs/win64/debug
@@ -13,6 +13,9 @@ if test -z "${_PYMAKE}"; then
mk_add_options MOZ_MAKE_FLAGS=-j1
fi
+# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
+ac_add_options --enable-warnings-as-errors
+
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1
View
3 browser/config/mozconfigs/win64/nightly
@@ -22,6 +22,9 @@ if test -z "${_PYMAKE}"; then
mk_add_options MOZ_MAKE_FLAGS=-j1
fi
+# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
+ac_add_options --enable-warnings-as-errors
+
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1
View
7 browser/themes/pinstripe/downloads/downloads.css
@@ -18,10 +18,13 @@
display: none;
}
-#downloadsHistory {
- background: transparent;
+#downloadsFooter {
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
+}
+
+#downloadsHistory {
+ background: transparent;
color: hsl(210,100%,75%);
cursor: pointer;
}
View
5 build/automation.py.in
@@ -407,8 +407,9 @@ user_pref("app.update.enabled", false);
user_pref("app.update.staging.enabled", false);
user_pref("browser.panorama.experienced_first_run", true); // Assume experienced
user_pref("dom.w3c_touch_events.enabled", 1);
-#expand user_pref("toolkit.telemetry.prompted", __MOZ_TELEMETRY_DISPLAY_REV__);
-#expand user_pref("toolkit.telemetry.notifiedOptOut", __MOZ_TELEMETRY_DISPLAY_REV__);
+// Set a future policy version to avoid the telemetry prompt.
+user_pref("toolkit.telemetry.prompted", 999);
+user_pref("toolkit.telemetry.notifiedOptOut", 999);
// Existing tests assume there is no font size inflation.
user_pref("font.size.inflation.emPerLine", 0);
user_pref("font.size.inflation.minTwips", 0);
View
11 build/unix/elfhack/elf.cpp
@@ -585,7 +585,7 @@ void ElfSegment::removeSection(ElfSection *section)
unsigned int ElfSegment::getFileSize()
{
- if (type == PT_GNU_RELRO)
+ if (type == PT_GNU_RELRO || isElfHackFillerSegment())
return filesz;
if (sections.empty())
@@ -604,7 +604,7 @@ unsigned int ElfSegment::getFileSize()
unsigned int ElfSegment::getMemSize()
{
- if (type == PT_GNU_RELRO)
+ if (type == PT_GNU_RELRO || isElfHackFillerSegment())
return memsz;
if (sections.empty())
@@ -621,6 +621,10 @@ unsigned int ElfSegment::getOffset()
(sections.front()->getAddr() != vaddr))
throw std::runtime_error("PT_GNU_RELRO segment doesn't start on a section start");
+ // Neither bionic nor glibc linkers seem to like when the offset of that segment is 0
+ if (isElfHackFillerSegment())
+ return vaddr;
+
return sections.empty() ? 0 : sections.front()->getOffset();
}
@@ -630,6 +634,9 @@ unsigned int ElfSegment::getAddr()
(sections.front()->getAddr() != vaddr))
throw std::runtime_error("PT_GNU_RELRO segment doesn't start on a section start");
+ if (isElfHackFillerSegment())
+ return vaddr;
+
return sections.empty() ? 0 : sections.front()->getAddr();
}
View
54 build/unix/elfhack/elfhack.cpp
@@ -376,7 +376,7 @@ void set_relative_reloc(Elf_Rela *rel, Elf *elf, unsigned int value) {
rel->r_addend = value;
}
-void maybe_split_segment(Elf *elf, ElfSegment *segment)
+void maybe_split_segment(Elf *elf, ElfSegment *segment, bool fill)
{
std::list<ElfSection *>::iterator it = segment->begin();
for (ElfSection *last = *(it++); it != segment->end(); last = *(it++)) {
@@ -396,19 +396,40 @@ void maybe_split_segment(Elf *elf, ElfSegment *segment)
phdr.p_memsz = (unsigned int)-1;
ElfSegment *newSegment = new ElfSegment(&phdr);
elf->insertSegmentAfter(segment, newSegment);
+ ElfSection *section = *it;
for (; it != segment->end(); ++it) {
newSegment->addSection(*it);
}
for (it = newSegment->begin(); it != newSegment->end(); it++) {
segment->removeSection(*it);
}
+ // Fill the virtual address space gap left between the two PT_LOADs
+ // with a new PT_LOAD with no permissions. This avoids the linker
+ // (especially bionic's) filling the gap with anonymous memory,
+ // which breakpad doesn't like.
+ // /!\ running strip on a elfhacked binary will break this filler
+ // PT_LOAD.
+ if (!fill)
+ break;
+ ElfSection *previous = section->getPrevious();
+ phdr.p_vaddr = (previous->getAddr() + previous->getSize() + segment->getAlign() - 1) & ~(segment->getAlign() - 1);
+ phdr.p_paddr = phdr.p_vaddr + segment->getVPDiff();
+ phdr.p_flags = 0;
+ phdr.p_align = 0;
+ phdr.p_filesz = (section->getAddr() & ~(newSegment->getAlign() - 1)) - phdr.p_vaddr;
+ phdr.p_memsz = phdr.p_filesz;
+ if (phdr.p_filesz) {
+ newSegment = new ElfSegment(&phdr);
+ assert(newSegment->isElfHackFillerSegment());
+ elf->insertSegmentAfter(segment, newSegment);
+ }
break;
}
}
}
template <typename Rel_Type>
-int do_relocation_section(Elf *elf, unsigned int rel_type, unsigned int rel_type2, bool force)
+int do_relocation_section(Elf *elf, unsigned int rel_type, unsigned int rel_type2, bool force, bool fill)
{
ElfDynamic_Section *dyn = elf->getDynSection();
if (dyn ==NULL) {
@@ -568,7 +589,7 @@ int do_relocation_section(Elf *elf, unsigned int rel_type, unsigned int rel_type
// Adjust PT_LOAD segments
for (ElfSegment *segment = elf->getSegmentByType(PT_LOAD); segment;
segment = elf->getSegmentByType(PT_LOAD, segment)) {
- maybe_split_segment(elf, segment);
+ maybe_split_segment(elf, segment, fill);
}
// Ensure Elf sections will be at their final location.
@@ -599,7 +620,7 @@ static inline int backup_file(const char *name)
return rename(name, fname.c_str());
}
-void do_file(const char *name, bool backup = false, bool force = false)
+void do_file(const char *name, bool backup = false, bool force = false, bool fill = false)
{
std::ifstream file(name, std::ios::in|std::ios::binary);
Elf elf(file);
@@ -622,13 +643,13 @@ void do_file(const char *name, bool backup = false, bool force = false)
int exit = -1;
switch (elf.getMachine()) {
case EM_386:
- exit = do_relocation_section<Elf_Rel>(&elf, R_386_RELATIVE, R_386_32, force);
+ exit = do_relocation_section<Elf_Rel>(&elf, R_386_RELATIVE, R_386_32, force, fill);
break;
case EM_X86_64:
- exit = do_relocation_section<Elf_Rela>(&elf, R_X86_64_RELATIVE, R_X86_64_64, force);
+ exit = do_relocation_section<Elf_Rela>(&elf, R_X86_64_RELATIVE, R_X86_64_64, force, fill);
break;
case EM_ARM:
- exit = do_relocation_section<Elf_Rel>(&elf, R_ARM_RELATIVE, R_ARM_ABS32, force);
+ exit = do_relocation_section<Elf_Rel>(&elf, R_ARM_RELATIVE, R_ARM_ABS32, force, fill);
break;
}
if (exit == 0) {
@@ -677,8 +698,14 @@ void undo_file(const char *name, bool backup = false)
ElfSegment *first = elf.getSegmentByType(PT_LOAD);
ElfSegment *second = elf.getSegmentByType(PT_LOAD, first);
+ ElfSegment *filler = NULL;
+ // If the second PT_LOAD is a filler from elfhack --fill, check the third.
+ if (!second->isElfHackFillerSegment()) {
+ filler = second;
+ second = elf.getSegmentByType(PT_LOAD, filler);
+ }
if (second->getFlags() != first->getFlags()) {
- fprintf(stderr, "First two PT_LOAD segments don't have the same flags. Skipping\n");
+ fprintf(stderr, "Couldn't identify elfhacked PT_LOAD segments. Skipping\n");
return;
}
// Move sections from the second PT_LOAD to the first, and remove the
@@ -688,6 +715,8 @@ void undo_file(const char *name, bool backup = false)
first->addSection(*section);
elf.removeSegment(second);
+ if (filler)
+ elf.removeSegment(filler);
if (backup && backup_file(name) != 0) {
fprintf(stderr, "Couln't create backup file\n");
@@ -704,6 +733,7 @@ int main(int argc, char *argv[])
bool backup = false;
bool force = false;
bool revert = false;
+ bool fill = false;
char *lastSlash = rindex(argv[0], '/');
if (lastSlash != NULL)
rundir = strndup(argv[0], lastSlash - argv[0]);
@@ -714,10 +744,12 @@ int main(int argc, char *argv[])
backup = true;
else if (strcmp(argv[arg], "-r") == 0)
revert = true;
- else if (revert)
+ else if (strcmp(argv[arg], "--fill") == 0)
+ fill = true;
+ else if (revert) {
undo_file(argv[arg], backup);
- else
- do_file(argv[arg], backup, force);
+ } else
+ do_file(argv[arg], backup, force, fill);
}
free(rundir);
View
4 build/unix/elfhack/elfxx.h
@@ -460,6 +460,10 @@ class ElfSegment {
std::list<ElfSection *>::iterator end() { return sections.end(); }
void clear();
+
+ bool isElfHackFillerSegment() {
+ return type == PT_LOAD && flags == 0;
+ }
private:
unsigned int type;
int v_p_diff; // Difference between physical and virtual address
View
4 configure.in
@@ -3710,8 +3710,8 @@ if test -n "$MOZ_LINKER"; then
ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([[0-9]]*\).*/\1/p'`
dnl When building for < ARMv7, we need to ensure 16k alignment of ELF segments
if test -n "$ARM_ARCH" && test "$ARM_ARCH" -lt 7; then
- LDFLAGS="$LDFLAGS -Wl,-z,max-page-size=0x4000"
- _SUBDIR_LDFLAGS="$_SUBDIR_LDFLAGS -Wl,-z,max-page-size=0x4000"
+ LDFLAGS="$LDFLAGS -Wl,-z,max-page-size=0x4000 -Wl,-z,common-page-size=0x4000"
+ _SUBDIR_LDFLAGS="$_SUBDIR_LDFLAGS -Wl,-z,max-page-size=0x4000 -Wl,-z,common-page-size=0x4000"
fi
fi
fi
View
21 content/base/crashtests/822691.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function boom()
+{
+ var frameDoc = document.getElementById("f").contentDocument;
+
+ var confusedNode = frameDoc.createTextNode("y");
+ confusedNode.__proto__ = document.createTextNode("x");
+ confusedNode.setUserData("key", "data", null);
+ confusedNode.setUserData("key", "data", null);
+}
+
+</script>
+</head>
+<body onload="boom();">
+<iframe src="data:text/html,1" id="f"></iframe>
+</body>
+</html>
View
1 content/base/crashtests/crashtests.list
@@ -119,4 +119,5 @@ load xhr_empty_datauri.html
load 815477.html
load 815500.html
load 816253.html
+load 822691.html
load 822723.html
View
4 content/base/public/nsIDocument.h
@@ -1941,8 +1941,10 @@ class nsIDocument : public nsINode
int32_t aScreenX, int32_t aScreenY, int32_t aClientX,
int32_t aClientY, int32_t aRadiusX, int32_t aRadiusY,
float aRotationAngle, float aForce);
+ already_AddRefed<nsIDOMTouchList> CreateTouchList();
already_AddRefed<nsIDOMTouchList>
- CreateTouchList(nsIDOMTouch* aTouch);
+ CreateTouchList(nsIDOMTouch* aTouch,
+ const mozilla::dom::Sequence<nsRefPtr<nsIDOMTouch> >& aTouches);
already_AddRefed<nsIDOMTouchList>
CreateTouchList(const mozilla::dom::Sequence<nsRefPtr<nsIDOMTouch> >& aTouches);
View
74 content/base/public/nsINode.h
@@ -1874,86 +1874,86 @@ extern const nsIID kThisPtrOffsetsSID;
NS_DEFINE_STATIC_IID_ACCESSOR(nsINode, NS_INODE_IID)
-#define NS_FORWARD_NSIDOMNODE_TO_NSINODE_HELPER(_final) \
- NS_IMETHOD GetNodeName(nsAString& aNodeName) _final \
+#define NS_FORWARD_NSIDOMNODE_TO_NSINODE_HELPER(...) \
+ NS_IMETHOD GetNodeName(nsAString& aNodeName) __VA_ARGS__ \
{ \
nsINode::GetNodeName(aNodeName); \
return NS_OK; \
} \
- NS_IMETHOD GetNodeValue(nsAString& aNodeValue) _final \
+ NS_IMETHOD GetNodeValue(nsAString& aNodeValue) __VA_ARGS__ \
{ \
nsINode::GetNodeValue(aNodeValue); \
return NS_OK; \
} \
- NS_IMETHOD SetNodeValue(const nsAString& aNodeValue) _final \
+ NS_IMETHOD SetNodeValue(const nsAString& aNodeValue) __VA_ARGS__ \
{ \
mozilla::ErrorResult rv; \
nsINode::SetNodeValue(aNodeValue, rv); \
return rv.ErrorCode(); \
} \
- NS_IMETHOD GetNodeType(uint16_t* aNodeType) _final \
+ NS_IMETHOD GetNodeType(uint16_t* aNodeType) __VA_ARGS__ \
{ \
*aNodeType = nsINode::NodeType(); \
return NS_OK; \
} \
- NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode) _final \
+ NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode) __VA_ARGS__ \
{ \
return nsINode::GetParentNode(aParentNode); \
} \
- NS_IMETHOD GetParentElement(nsIDOMElement** aParentElement) _final \
+ NS_IMETHOD GetParentElement(nsIDOMElement** aParentElement) __VA_ARGS__ \
{ \
return nsINode::GetParentElement(aParentElement); \
} \
- NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes) _final \
+ NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes) __VA_ARGS__ \
{ \
return nsINode::GetChildNodes(aChildNodes); \
} \
- NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild) _final \
+ NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild) __VA_ARGS__ \
{ \
return nsINode::GetFirstChild(aFirstChild); \
} \
- NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild) _final \
+ NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild) __VA_ARGS__ \
{ \
return nsINode::GetLastChild(aLastChild); \
} \
- NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling) _final \
+ NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling) __VA_ARGS__ \
{ \
return nsINode::GetPreviousSibling(aPreviousSibling); \
} \
- NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling) _final \
+ NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling) __VA_ARGS__ \
{ \
return nsINode::GetNextSibling(aNextSibling); \
} \
- NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes) _final \
+ NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes) __VA_ARGS__ \
{ \
return nsINode::GetAttributes(aAttributes); \
} \
- NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) _final \
+ NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) __VA_ARGS__ \
{ \
return nsINode::GetOwnerDocument(aOwnerDocument); \
} \
- NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aResult) _final \
+ NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aResult) __VA_ARGS__ \
{ \
return ReplaceOrInsertBefore(false, aNewChild, aRefChild, aResult); \
} \
- NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aResult) _final \
+ NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aResult) __VA_ARGS__ \
{ \
return ReplaceOrInsertBefore(true, aNewChild, aOldChild, aResult); \
} \
- NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aResult) _final \
+ NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aResult) __VA_ARGS__ \
{ \
return nsINode::RemoveChild(aOldChild, aResult); \
} \
- NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aResult) _final \
+ NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aResult) __VA_ARGS__ \
{ \
return InsertBefore(aNewChild, nullptr, aResult); \
} \
- NS_IMETHOD HasChildNodes(bool* aResult) _final \
+ NS_IMETHOD HasChildNodes(bool* aResult) __VA_ARGS__ \
{ \
*aResult = nsINode::HasChildNodes(); \
return NS_OK; \
} \
- NS_IMETHOD CloneNode(bool aDeep, uint8_t aArgc, nsIDOMNode** aResult) _final \
+ NS_IMETHOD CloneNode(bool aDeep, uint8_t aArgc, nsIDOMNode** aResult) __VA_ARGS__ \
{ \
if (aArgc == 0) { \
aDeep = true; \
@@ -1966,86 +1966,86 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsINode, NS_INODE_IID)
*aResult = clone.forget().get()->AsDOMNode(); \
return NS_OK; \
} \
- NS_IMETHOD Normalize() _final \
+ NS_IMETHOD Normalize() __VA_ARGS__ \
{ \
nsINode::Normalize(); \
return NS_OK; \
} \
- NS_IMETHOD IsSupported(const nsAString& aFeature, const nsAString& aVersion, bool* aResult) _final \
+ NS_IMETHOD IsSupported(const nsAString& aFeature, const nsAString& aVersion, bool* aResult) __VA_ARGS__ \
{ \
*aResult = nsINode::IsSupported(aFeature, aVersion); \
return NS_OK; \
} \
- NS_IMETHOD GetNamespaceURI(nsAString& aNamespaceURI) _final \
+ NS_IMETHOD GetNamespaceURI(nsAString& aNamespaceURI) __VA_ARGS__ \
{ \
mozilla::ErrorResult rv; \
nsINode::GetNamespaceURI(aNamespaceURI, rv); \
return rv.ErrorCode(); \
} \
- NS_IMETHOD GetPrefix(nsAString& aPrefix) _final \
+ NS_IMETHOD GetPrefix(nsAString& aPrefix) __VA_ARGS__ \
{ \
nsINode::GetPrefix(aPrefix); \
return NS_OK; \
} \
- NS_IMETHOD GetLocalName(nsAString& aLocalName) _final \
+ NS_IMETHOD GetLocalName(nsAString& aLocalName) __VA_ARGS__ \
{ \
nsINode::GetLocalName(aLocalName); \
return NS_OK; \
} \
using nsINode::HasAttributes; \
- NS_IMETHOD HasAttributes(bool* aResult) _final \
+ NS_IMETHOD HasAttributes(bool* aResult) __VA_ARGS__ \
{ \
*aResult = nsINode::HasAttributes(); \
return NS_OK; \
} \
- NS_IMETHOD GetDOMBaseURI(nsAString& aBaseURI) _final \
+ NS_IMETHOD GetDOMBaseURI(nsAString& aBaseURI) __VA_ARGS__ \
{ \
nsINode::GetBaseURI(aBaseURI); \
return NS_OK; \
} \
- NS_IMETHOD CompareDocumentPosition(nsIDOMNode* aOther, uint16_t* aResult) _final \
+ NS_IMETHOD CompareDocumentPosition(nsIDOMNode* aOther, uint16_t* aResult) __VA_ARGS__ \
{ \
return nsINode::CompareDocumentPosition(aOther, aResult); \
} \
- NS_IMETHOD GetTextContent(nsAString& aTextContent) _final \
+ NS_IMETHOD GetTextContent(nsAString& aTextContent) __VA_ARGS__ \
{ \
nsINode::GetTextContent(aTextContent); \
return NS_OK; \
} \
- NS_IMETHOD SetTextContent(const nsAString& aTextContent) _final \
+ NS_IMETHOD SetTextContent(const nsAString& aTextContent) __VA_ARGS__ \
{ \
mozilla::ErrorResult rv; \
nsINode::SetTextContent(aTextContent, rv); \
return rv.ErrorCode(); \
} \
- NS_IMETHOD LookupPrefix(const nsAString& aNamespaceURI, nsAString& aResult) _final \
+ NS_IMETHOD LookupPrefix(const nsAString& aNamespaceURI, nsAString& aResult) __VA_ARGS__ \
{ \
nsINode::LookupPrefix(aNamespaceURI, aResult); \
return NS_OK; \
} \
- NS_IMETHOD IsDefaultNamespace(const nsAString& aNamespaceURI, bool* aResult) _final \
+ NS_IMETHOD IsDefaultNamespace(const nsAString& aNamespaceURI, bool* aResult) __VA_ARGS__ \
{ \
*aResult = nsINode::IsDefaultNamespace(aNamespaceURI); \
return NS_OK; \
} \
- NS_IMETHOD LookupNamespaceURI(const nsAString& aPrefix, nsAString& aResult) _final \
+ NS_IMETHOD LookupNamespaceURI(const nsAString& aPrefix, nsAString& aResult) __VA_ARGS__ \
{ \
nsINode::LookupNamespaceURI(aPrefix, aResult); \
return NS_OK; \
} \
- NS_IMETHOD IsEqualNode(nsIDOMNode* aArg, bool* aResult) _final \
+ NS_IMETHOD IsEqualNode(nsIDOMNode* aArg, bool* aResult) __VA_ARGS__ \
{ \
return nsINode::IsEqualNode(aArg, aResult); \
} \
- NS_IMETHOD SetUserData(const nsAString& aKey, nsIVariant* aData, nsIDOMUserDataHandler* aHandler, nsIVariant** aResult) _final \
+ NS_IMETHOD SetUserData(const nsAString& aKey, nsIVariant* aData, nsIDOMUserDataHandler* aHandler, nsIVariant** aResult) __VA_ARGS__ \
{ \
return nsINode::SetUserData(aKey, aData, aHandler, aResult); \
} \
- NS_IMETHOD GetUserData(const nsAString& aKey, nsIVariant** aResult) _final \
+ NS_IMETHOD GetUserData(const nsAString& aKey, nsIVariant** aResult) __VA_ARGS__ \
{ \
return nsINode::GetUserData(aKey, aResult); \
} \
- NS_IMETHOD Contains(nsIDOMNode* aOther, bool* aResult) _final \
+ NS_IMETHOD Contains(nsIDOMNode* aOther, bool* aResult) __VA_ARGS__ \
{ \
return nsINode::Contains(aOther, aResult); \
}
View
3 content/base/src/nsDOMBlobBuilder.h
@@ -125,7 +125,8 @@ class BlobSet {
}
// Start at 1 or we'll loop forever.
- CheckedUint32 bufferLen = NS_MAX<uint32_t>(mDataBufferLen, 1);
+ CheckedUint32 bufferLen =
+ NS_MAX<uint32_t>(static_cast<uint32_t>(mDataBufferLen), 1);
while (bufferLen.isValid() && bufferLen.value() < mDataLen + aSize)
bufferLen *= 2;
View
5 content/base/src/nsDOMFile.cpp
@@ -615,8 +615,7 @@ nsDOMMemoryFile::DataOwner::sDataOwners;
/* static */ bool
nsDOMMemoryFile::DataOwner::sMemoryReporterRegistered;
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(DOMMemoryFileDataOwnerSizeOf,
- "memory-file-data");
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(DOMMemoryFileDataOwnerMallocSizeOf)
class nsDOMMemoryFileDataOwnerMemoryReporter MOZ_FINAL
: public nsIMemoryMultiReporter
@@ -651,7 +650,7 @@ class nsDOMMemoryFileDataOwnerMemoryReporter MOZ_FINAL
for (DataOwner *owner = DataOwner::sDataOwners->getFirst();
owner; owner = owner->getNext()) {
- size_t size = DOMMemoryFileDataOwnerSizeOf(owner->mData);
+ size_t size = DOMMemoryFileDataOwnerMallocSizeOf(owner->mData);
if (size < LARGE_OBJECT_MIN_SIZE) {
smallObjectsTotal += size;
View
13 content/base/src/nsDocument.cpp
@@ -8676,10 +8676,21 @@ nsDocument::CreateTouchList(nsIVariant* aPoints,
}
already_AddRefed<nsIDOMTouchList>
-nsIDocument::CreateTouchList(nsIDOMTouch* aTouch)
+nsIDocument::CreateTouchList()
+{
+ nsRefPtr<nsDOMTouchList> retval = new nsDOMTouchList();
+ return retval.forget();
+}
+
+already_AddRefed<nsIDOMTouchList>
+nsIDocument::CreateTouchList(nsIDOMTouch* aTouch,
+ const Sequence<nsRefPtr<nsIDOMTouch> >& aTouches)
{
nsRefPtr<nsDOMTouchList> retval = new nsDOMTouchList();
retval->Append(aTouch);
+ for (uint32_t i = 0; i < aTouches.Length(); ++i) {
+ retval->Append(aTouches[i]);
+ }
return retval.forget();
}
View
10 content/base/src/nsGkAtomList.h
@@ -2014,6 +2014,16 @@ GK_ATOM(Clear, "Clear")
GK_ATOM(VolumeUp, "VolumeUp")
GK_ATOM(VolumeDown, "VolumeDown")
GK_ATOM(Menu, "Menu")
+GK_ATOM(New, "New")
+GK_ATOM(Open, "Open")
+GK_ATOM(Close, "Close")
+GK_ATOM(Save, "Save")
+GK_ATOM(Find, "Find")
+GK_ATOM(Help, "Help")
+GK_ATOM(Print, "Print")
+GK_ATOM(SendMail, "SendMail")
+GK_ATOM(ForwardMail, "ForwardMail")
+GK_ATOM(ReplyToMail, "ReplyToMail")
// Smooth scroll events origins
GK_ATOM(mouseWheel, "mouseWheel") // For discrete wheel events (e.g. not OSX magic mouse)
View
2 content/base/src/nsINode.cpp
@@ -698,6 +698,7 @@ nsINode::SetUserData(JSContext* aCx, const nsAString& aKey, JS::Value aData,
}
JS::Value result;
+ JSAutoCompartment ac(aCx, GetWrapper());
aError = nsContentUtils::XPConnect()->VariantToJS(aCx, GetWrapper(), oldData,
&result);
return result;
@@ -712,6 +713,7 @@ nsINode::GetUserData(JSContext* aCx, const nsAString& aKey, ErrorResult& aError)
}
JS::Value result;
+ JSAutoCompartment ac(aCx, GetWrapper());
aError = nsContentUtils::XPConnect()->VariantToJS(aCx, GetWrapper(), data,
&result);
return result;
View
2 content/base/src/nsImageLoadingContent.cpp
@@ -142,8 +142,6 @@ nsImageLoadingContent::Notify(imgIRequest* aRequest,
"Unknown request");
}
- NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_NOT_AVAILABLE);
-
LOOP_OVER_OBSERVERS(Notify(aRequest, aType, aData));
if (aType == imgINotificationObserver::SIZE_AVAILABLE) {
View
5 content/canvas/src/Makefile.in
@@ -8,13 +8,14 @@ topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
-FAIL_ON_WARNINGS = 1
-
include $(DEPTH)/config/autoconf.mk
MODULE = content
LIBRARY_NAME = gkconcvs_s
LIBXUL_LIBRARY = 1
+ifndef _MSC_VER
+FAIL_ON_WARNINGS = 1
+endif # !_MSC_VER