Browse Source

sync build fixes more with wip and backports

Frank-Rainer Grahl 1 month ago
parent
commit
c364a81124
100 changed files with 7179 additions and 805 deletions
  1. 3 6
      mozilla-release/patches/1021926-67a1.patch
  2. 6 6
      mozilla-release/patches/1079662-3-64a1.patch
  3. 51 0
      mozilla-release/patches/1180498-68a1.patch
  4. 3 3
      mozilla-release/patches/1252556-66a1.patch
  5. 3 3
      mozilla-release/patches/1359905-65a1.patch
  6. 31 23
      mozilla-release/patches/1363897-2-57a1.patch
  7. 3 3
      mozilla-release/patches/1367092-1-67a1.patch
  8. 3 3
      mozilla-release/patches/1367092-5-67a1.patch
  9. 3 3
      mozilla-release/patches/1371065-2-sdk-removemisc-25316.patch
  10. 32 0
      mozilla-release/patches/1384638-60a1.patch
  11. 8 8
      mozilla-release/patches/1397263-2-64a1.patch
  12. 7 7
      mozilla-release/patches/1399870-64a1.patch
  13. 3 3
      mozilla-release/patches/1403005-1-60a1.patch
  14. 14 13
      mozilla-release/patches/1403027-63a1.patch
  15. 18 16
      mozilla-release/patches/1404823-59a1.patch
  16. 72 0
      mozilla-release/patches/1406827-59a1.patch
  17. 4 4
      mozilla-release/patches/1409739-3-64a1.patch
  18. 119 0
      mozilla-release/patches/1421678-59a1.patch
  19. 2 2
      mozilla-release/patches/1422234-1only-60a1.patch
  20. 105 0
      mozilla-release/patches/1422277-59a1.patch
  21. 4 4
      mozilla-release/patches/1423495-4no5-61a1.patch
  22. 44 44
      mozilla-release/patches/1425321-1-59a1.patch
  23. 2 2
      mozilla-release/patches/1425440-02-59a1.patch
  24. 3 3
      mozilla-release/patches/1425440-14-59a1.patch
  25. 523 0
      mozilla-release/patches/1426353-61a1.patch
  26. 3 3
      mozilla-release/patches/1426566-3-PARTIAL-59a1.patch
  27. 118 0
      mozilla-release/patches/1426989-59a1.patch
  28. 396 0
      mozilla-release/patches/1427023-59a1.patch
  29. 9 5
      mozilla-release/patches/1427155-59a1.patch
  30. 4 3
      mozilla-release/patches/1428049-1-59a1.patch
  31. 2 2
      mozilla-release/patches/1428713-67a1.patch
  32. 2 3
      mozilla-release/patches/1429973-2-60a1.patch
  33. 6 6
      mozilla-release/patches/1429973-3-60a1.patch
  34. 10 10
      mozilla-release/patches/1432490-1-60a1.patch
  35. 244 0
      mozilla-release/patches/1435138-1-60a1.patch
  36. 105 0
      mozilla-release/patches/1435138-2-60a1.patch
  37. 1616 0
      mozilla-release/patches/1435138-3-60a1.patch
  38. 326 0
      mozilla-release/patches/1435138-4-60a1.patch
  39. 2005 0
      mozilla-release/patches/1435477-60a1.patch
  40. 206 0
      mozilla-release/patches/1435568-60a1.patch
  41. 9 9
      mozilla-release/patches/1436251-3-PARTIAL-79a1.patch
  42. 2 2
      mozilla-release/patches/1436663-60a1.patch
  43. 7 6
      mozilla-release/patches/1436692-60a1.patch
  44. 5 4
      mozilla-release/patches/1436744-60a1.patch
  45. 8 8
      mozilla-release/patches/1444490-61a1.patch
  46. 3 3
      mozilla-release/patches/1446270-61a1.patch
  47. 16 16
      mozilla-release/patches/1446650-61a1.patch
  48. 8 8
      mozilla-release/patches/1447931-62a1.patch
  49. 29 29
      mozilla-release/patches/1448490-1-61a1.patch
  50. 3 3
      mozilla-release/patches/1449035-62a1.patch
  51. 21 20
      mozilla-release/patches/1456552-62a1.patch
  52. 3 11
      mozilla-release/patches/1458385-2-70a1.patch
  53. 9 9
      mozilla-release/patches/1460620-66a1.patch
  54. 7 6
      mozilla-release/patches/1460796-62a1.patch
  55. 4 4
      mozilla-release/patches/1462605-62a1.patch
  56. 5 5
      mozilla-release/patches/1463065-62a1.patch
  57. 523 83
      mozilla-release/patches/1465585-3-std-62a1.patch
  58. 3 3
      mozilla-release/patches/1465996-62a1.patch
  59. 3 4
      mozilla-release/patches/1467285-62a1.patch
  60. 3 3
      mozilla-release/patches/1471339-6-63a1.patch
  61. 10 8
      mozilla-release/patches/1471556-63a1.patch
  62. 6 8
      mozilla-release/patches/1471648-67a1.patch
  63. 6 6
      mozilla-release/patches/1472806-1-63a1.patch
  64. 8 5
      mozilla-release/patches/1473786-2-64a1.patch
  65. 4 4
      mozilla-release/patches/1474488-2only-64a1.patch
  66. 6 6
      mozilla-release/patches/1476333-2-63a1.patch
  67. 6 5
      mozilla-release/patches/1480004-63a1.patch
  68. 5 5
      mozilla-release/patches/1480005-3-86a1.patch
  69. 0 0
      mozilla-release/patches/1481555-63a1.patch
  70. 2 3
      mozilla-release/patches/1481721-64a1.patch
  71. 0 0
      mozilla-release/patches/1483228-2no3-67a1.patch
  72. 3 3
      mozilla-release/patches/1485216-2-66a1.patch
  73. 6 6
      mozilla-release/patches/1485454-2-63a1.patch
  74. 5 5
      mozilla-release/patches/1488307-64a1.patch
  75. 3 3
      mozilla-release/patches/1488463-64a1.patch
  76. 7 5
      mozilla-release/patches/1489698-5-65a1.patch
  77. 4 4
      mozilla-release/patches/1490463-2-64a1.patch
  78. 19 18
      mozilla-release/patches/1490738-64a1.patch
  79. 6 6
      mozilla-release/patches/1492037-64a1.patch
  80. 4 4
      mozilla-release/patches/1492149-66a1.patch
  81. 8 8
      mozilla-release/patches/1492268-64a1.patch
  82. 13 12
      mozilla-release/patches/1492526-64a1.patch
  83. 2 2
      mozilla-release/patches/1500447-64a1.patch
  84. 22 22
      mozilla-release/patches/1502159-2-65a1.patch
  85. 22 13
      mozilla-release/patches/1503537-65a1.patch
  86. 3 3
      mozilla-release/patches/1504938-65a1.patch
  87. 2 2
      mozilla-release/patches/1506027-2-65a1.patch
  88. 4 4
      mozilla-release/patches/1506665-67a1.patch
  89. 4 4
      mozilla-release/patches/1513009-2-66a1.patch
  90. 4 4
      mozilla-release/patches/1513134-1no2-66a1.patch
  91. 66 68
      mozilla-release/patches/1513134-3-66a1.patch
  92. 20 24
      mozilla-release/patches/1513798-09-66a1.patch
  93. 11 12
      mozilla-release/patches/1515257-8-66a1.patch
  94. 34 31
      mozilla-release/patches/1515579-2only-66a1.patch
  95. 24 24
      mozilla-release/patches/1515581-66a1.patch
  96. 8 8
      mozilla-release/patches/1515595-2-66a1.patch
  97. 4 6
      mozilla-release/patches/1515746-2-67a1.patch
  98. 3 3
      mozilla-release/patches/1515746-3-67a1.patch
  99. 11 11
      mozilla-release/patches/1515843-3-66a1.patch
  100. 15 16
      mozilla-release/patches/1515852-66a1.patch

+ 3 - 6
mozilla-release/patches/1021926-67a1.patch

@@ -2,7 +2,7 @@
 # User Nikki S <nikkisharpley@gmail.com>
 # Date 1552386072 0
 # Node ID f6705b8320496d0e67213299773e0c429f2b63ef
-# Parent  cb7e7c7da9a3d76520ecc944e320ffed8e2e1213
+# Parent  dfae25df1e698be1808cc2b0033d9cf18f26eca0
 mozlog: move the capture io class from web-platform/tests to mozlog (bug 1021926) r=jgraham
 
 The ability to capture the parent process' stdio is suggested to be a useful feature
@@ -116,17 +116,14 @@ new file mode 100644
 diff --git a/testing/mozbase/mozlog/tests/manifest.ini b/testing/mozbase/mozlog/tests/manifest.ini
 --- a/testing/mozbase/mozlog/tests/manifest.ini
 +++ b/testing/mozbase/mozlog/tests/manifest.ini
-@@ -2,8 +2,9 @@
+@@ -1,6 +1,7 @@
+ [DEFAULT]
  subsuite = mozbase, os == "linux"
  [test_logger.py]
- skip-if = python == 3
  [test_logtypes.py]
  [test_formatters.py]
- skip-if = python == 3
  [test_structured.py]
- skip-if = python == 3
 +[test_capture.py]
-\ No newline at end of file
 diff --git a/testing/mozbase/mozlog/tests/test_capture.py b/testing/mozbase/mozlog/tests/test_capture.py
 new file mode 100644
 --- /dev/null

+ 6 - 6
mozilla-release/patches/1079662-3-64a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1536208069 -32400
 # Node ID 3cbbfc5127e473345c8b0f040a0ed1b254d800ed
-# Parent  caec98017ee71acb38a62eb315f527c041a29850
+# Parent  a6336b1624c36d4b7d9e096b8d2af34c8b9220d3
 Bug 1079662 - Always enable PIE. r=froydnj
 
 Last attempt, a few years ago, blatantly failed because nautilus (the
@@ -180,7 +180,7 @@ diff --git a/browser/moz.configure b/browser/moz.configure
 diff --git a/build/autoconf/compiler-opts.m4 b/build/autoconf/compiler-opts.m4
 --- a/build/autoconf/compiler-opts.m4
 +++ b/build/autoconf/compiler-opts.m4
-@@ -203,39 +203,18 @@ if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -
+@@ -170,39 +170,18 @@ if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -
           if test "$GC_SECTIONS_BREAKS_DEBUG_RANGES" = no; then
               DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections"
           fi
@@ -225,7 +225,7 @@ diff --git a/build/autoconf/compiler-opts.m4 b/build/autoconf/compiler-opts.m4
 diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
 --- a/build/moz.configure/old.configure
 +++ b/build/moz.configure/old.configure
-@@ -196,17 +196,16 @@ def old_configure_options(*options):
+@@ -195,17 +195,16 @@ def old_configure_options(*options):
      '--enable-memory-sanitizer',
      '--enable-mobile-optimize',
      '--enable-necko-wifi',
@@ -246,7 +246,7 @@ diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configu
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -1553,17 +1553,16 @@ def security_hardening_cflags(hardening_
+@@ -1583,17 +1583,16 @@ def security_hardening_cflags(hardening_
      return namespace(
          flags=flags,
          js_flags=js_flags,
@@ -267,10 +267,10 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
 diff --git a/build/mozconfig.no-compile b/build/mozconfig.no-compile
 --- a/build/mozconfig.no-compile
 +++ b/build/mozconfig.no-compile
-@@ -21,10 +21,11 @@ unset MAKECAB
- unset TOOLCHAIN_PREFIX
+@@ -22,10 +22,11 @@ unset TOOLCHAIN_PREFIX
  unset BINDGEN_CFLAGS
  unset LLVM_CONFIG
+ unset LLVM_PROFDATA
  unset WIN64_LINK
  unset WIN64_LIB
  unset ENABLE_CLANG_PLUGIN

+ 51 - 0
mozilla-release/patches/1180498-68a1.patch

@@ -0,0 +1,51 @@
+# HG changeset patch
+# User Maya Rashish <maya@netbsd.org>
+# Date 1559605974 25200
+# Node ID 8bcc51aaa91e5aadd57bdf5484c200c3713baab8
+# Parent  b46eb2b0c656af4f2afd609012852ab269c9bb04
+Bug 1180498 - Tolerate a different major libGL.so on NetBSD as well r=jgilbert
+
+diff --git a/gfx/gl/GLContextProviderGLX.cpp b/gfx/gl/GLContextProviderGLX.cpp
+--- a/gfx/gl/GLContextProviderGLX.cpp
++++ b/gfx/gl/GLContextProviderGLX.cpp
+@@ -75,17 +75,17 @@ GLXLibrary::EnsureInitialized()
+ 
+     if (!mOGLLibrary) {
+         const char* libGLfilename = nullptr;
+         bool forceFeatureReport = false;
+ 
+         // see e.g. bug 608526: it is intrinsically interesting to know whether we have dynamically linked to libGL.so.1
+         // because at least the NVIDIA implementation requires an executable stack, which causes mprotect calls,
+         // which trigger glibc bug http://sourceware.org/bugzilla/show_bug.cgi?id=12225
+-#ifdef __OpenBSD__
++#if defined(__OpenBSD__) || defined(__NetBSD__)
+         libGLfilename = "libGL.so";
+ #else
+         libGLfilename = "libGL.so.1";
+ #endif
+ 
+         ScopedGfxFeatureReporter reporter(libGLfilename, forceFeatureReport);
+         mOGLLibrary = PR_LoadLibrary(libGLfilename);
+         if (!mOGLLibrary) {
+diff --git a/toolkit/xre/glxtest.cpp b/toolkit/xre/glxtest.cpp
+--- a/toolkit/xre/glxtest.cpp
++++ b/toolkit/xre/glxtest.cpp
+@@ -119,17 +119,17 @@ void glxtest()
+   for (int i = 1; i < fd; i++)
+     dup2(fd, i);
+   close(fd);
+ 
+   if (getenv("MOZ_AVOID_OPENGL_ALTOGETHER"))
+     fatal_error("The MOZ_AVOID_OPENGL_ALTOGETHER environment variable is defined");
+ 
+   ///// Open libGL and load needed symbols /////
+-#ifdef __OpenBSD__
++#if defined(__OpenBSD__) || defined(__NetBSD__)
+   #define LIBGL_FILENAME "libGL.so"
+ #else
+   #define LIBGL_FILENAME "libGL.so.1"
+ #endif
+   void *libgl = dlopen(LIBGL_FILENAME, RTLD_LAZY);
+   if (!libgl)
+     fatal_error("Unable to load " LIBGL_FILENAME);
+ 

+ 3 - 3
mozilla-release/patches/1252556-66a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1509580763 -32400
 # Node ID e4d5d46cf428071fa405c1986fb408d5a9c52657
-# Parent  547caab30de6bb3df64802ee074ee37186e05b7e
+# Parent  499291677fc61c46f3eece5425bdfe0f77943352
 Bug 1252556 - Make profileserver.py fail when running Firefox fails. r=chmanchester
 
 Currently, when Firefox crashes when running the PGO profile, the error
@@ -35,8 +35,8 @@ diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py
  from mozprofile import FirefoxProfile, Preferences
  from mozprofile.permissions import ServerLocations
  from mozrunner import FirefoxRunner, CLI
-@@ -74,23 +75,31 @@ if __name__ == '__main__':
-         env["MOZ_OBJDIR"] = build.topobjdir
+@@ -79,23 +80,31 @@ if __name__ == '__main__':
+                     break
  
          # Run Firefox a first time to initialize its profile
          runner = FirefoxRunner(profile=profile,

+ 3 - 3
mozilla-release/patches/1359905-65a1.patch

@@ -2,7 +2,7 @@
 # User Gian-Carlo Pascutto <gcp@mozilla.com>
 # Date 1544020387 0
 # Node ID cceb6f9235a1fc81f1fe2e72be3fb93cd4f5e05c
-# Parent  4b4a87e520a34a445e1220119f9f1cc2c96e334d
+# Parent  4f27723a732125bbfed177bf52f1fcea0debf98c
 Bug 1359905 - Enable fstack-protector-strong on js/. r=glandium
 
 Differential Revision: https://phabricator.services.mozilla.com/D13570
@@ -10,8 +10,8 @@ Differential Revision: https://phabricator.services.mozilla.com/D13570
 diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 --- a/js/src/old-configure.in
 +++ b/js/src/old-configure.in
-@@ -468,17 +468,17 @@ CXXFLAGS="$CXXFLAGS $MOZ_HARDENING_CFLAG
- LDFLAGS="$LDFLAGS $MOZ_HARDENING_LDFLAGS_JS"
+@@ -561,17 +561,17 @@ CPPFLAGS="$CPPFLAGS $MOZ_HARDENING_CFLAG
+ CXXFLAGS="$CXXFLAGS $MOZ_HARDENING_CFLAGS_JS"
  
  dnl ========================================================
  dnl System overrides of the defaults for target

+ 31 - 23
mozilla-release/patches/1363897-2-57a1.patch

@@ -2,7 +2,7 @@
 # User Andrei Obreja <aobreja@mozilla.com>
 # Date 1504163908 -10800
 # Node ID a2723b65046096e587b968a3b6b1cb056c914b78
-# Parent  d0696085e3e97983a567ce38e0422efa44ff9f0a
+# Parent  b1cb67f5d11349d17f23e3cae7fc034c8d5792af
 Bug 1363897 - enable MOZ_ALLOW_LEGACY_EXTENSIONS for devedition configs. r=glandium
 
 MozReview-Commit-ID: K1dl96sq13y
@@ -10,7 +10,7 @@ MozReview-Commit-ID: K1dl96sq13y
 diff --git a/browser/config/mozconfigs/linux32/devedition b/browser/config/mozconfigs/linux32/devedition
 --- a/browser/config/mozconfigs/linux32/devedition
 +++ b/browser/config/mozconfigs/linux32/devedition
-@@ -9,9 +9,12 @@ ac_add_options --enable-verify-mar
+@@ -11,11 +11,14 @@ ac_add_options --enable-verify-mar
  
  # This will overwrite the default of stripping everything and keep the symbol table.
  # This is useful for profiling and debugging and only increases the package size
@@ -22,27 +22,29 @@ diff --git a/browser/config/mozconfigs/linux32/devedition b/browser/config/mozco
 +# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
 +ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
 +
+ ac_add_options MOZ_PGO=1
+ 
  . "$topsrcdir/build/mozconfig.common.override"
 diff --git a/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition b/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition
 --- a/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition
 +++ b/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition
-@@ -9,10 +9,12 @@ if test `uname -m` = "x86_64"; then
-   ac_add_options --host=i686-pc-linux
- fi
+@@ -13,9 +13,12 @@ export MOZILLA_OFFICIAL=1
  
- export MOZILLA_OFFICIAL=1
+ # Enable Telemetry
+ export MOZ_TELEMETRY_REPORTING=1
  
  # Don't autoclobber l10n, as this can lead to missing binaries and broken builds
  # Bug 1283438
  mk_add_options AUTOCLOBBER=
+ 
 +# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
 +ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
- 
++
  . "$topsrcdir/build/mozconfig.common.override"
 diff --git a/browser/config/mozconfigs/linux64/devedition b/browser/config/mozconfigs/linux64/devedition
 --- a/browser/config/mozconfigs/linux64/devedition
 +++ b/browser/config/mozconfigs/linux64/devedition
-@@ -9,9 +9,12 @@ ac_add_options --enable-verify-mar
+@@ -11,11 +11,14 @@ ac_add_options --enable-verify-mar
  
  # This will overwrite the default of stripping everything and keep the symbol table.
  # This is useful for profiling and debugging and only increases the package size
@@ -54,14 +56,16 @@ diff --git a/browser/config/mozconfigs/linux64/devedition b/browser/config/mozco
 +# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
 +ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
 +
+ ac_add_options MOZ_PGO=1
+ 
  . "$topsrcdir/build/mozconfig.common.override"
 diff --git a/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition b/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition
 --- a/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition
 +++ b/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition
-@@ -5,9 +5,12 @@ ac_add_options --with-branding=browser/b
- . "$topsrcdir/build/mozconfig.no-compile"
+@@ -8,9 +8,12 @@ export MOZILLA_OFFICIAL=1
  
- export MOZILLA_OFFICIAL=1
+ # Enable Telemetry
+ export MOZ_TELEMETRY_REPORTING=1
  
  # Don't autoclobber l10n, as this can lead to missing binaries and broken builds
  # Bug 1283438
@@ -74,7 +78,7 @@ diff --git a/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition b/brows
 diff --git a/browser/config/mozconfigs/macosx64/devedition b/browser/config/mozconfigs/macosx64/devedition
 --- a/browser/config/mozconfigs/macosx64/devedition
 +++ b/browser/config/mozconfigs/macosx64/devedition
-@@ -14,9 +14,12 @@ if test `uname -s` != Linux; then
+@@ -18,9 +18,12 @@ if test `uname -s` != Linux; then
  fi
  
  if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
@@ -90,10 +94,10 @@ diff --git a/browser/config/mozconfigs/macosx64/devedition b/browser/config/mozc
 diff --git a/browser/config/mozconfigs/macosx64/l10n-mozconfig-devedition b/browser/config/mozconfigs/macosx64/l10n-mozconfig-devedition
 --- a/browser/config/mozconfigs/macosx64/l10n-mozconfig-devedition
 +++ b/browser/config/mozconfigs/macosx64/l10n-mozconfig-devedition
-@@ -18,9 +18,12 @@ ac_add_options --with-macbundlename-pref
- fi
+@@ -21,9 +21,12 @@ export MOZILLA_OFFICIAL=1
  
- export MOZILLA_OFFICIAL=1
+ # Enable Telemetry
+ export MOZ_TELEMETRY_REPORTING=1
  
  # Don't autoclobber l10n, as this can lead to missing binaries and broken builds
  # Bug 1283438
@@ -106,7 +110,7 @@ diff --git a/browser/config/mozconfigs/macosx64/l10n-mozconfig-devedition b/brow
 diff --git a/browser/config/mozconfigs/win32/devedition b/browser/config/mozconfigs/win32/devedition
 --- a/browser/config/mozconfigs/win32/devedition
 +++ b/browser/config/mozconfigs/win32/devedition
-@@ -5,9 +5,12 @@ export MOZ_PGO=1
+@@ -7,11 +7,14 @@ fi
  
  # Add-on signing is not required for DevEdition
  MOZ_REQUIRE_SIGNING=0
@@ -118,14 +122,16 @@ diff --git a/browser/config/mozconfigs/win32/devedition b/browser/config/mozconf
 +# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
 +ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
 +
+ ac_add_options MOZ_PGO=1
+ 
  . "$topsrcdir/build/mozconfig.common.override"
 diff --git a/browser/config/mozconfigs/win32/l10n-mozconfig-devedition b/browser/config/mozconfigs/win32/l10n-mozconfig-devedition
 --- a/browser/config/mozconfigs/win32/l10n-mozconfig-devedition
 +++ b/browser/config/mozconfigs/win32/l10n-mozconfig-devedition
-@@ -6,9 +6,12 @@ ac_add_options --with-l10n-base=../../l1
- ac_add_options --with-branding=browser/branding/aurora
+@@ -9,9 +9,12 @@ export MOZILLA_OFFICIAL=1
  
- export MOZILLA_OFFICIAL=1
+ # Enable Telemetry
+ export MOZ_TELEMETRY_REPORTING=1
  
  # Don't autoclobber l10n, as this can lead to missing binaries and broken builds
  # Bug 1283438
@@ -138,7 +144,7 @@ diff --git a/browser/config/mozconfigs/win32/l10n-mozconfig-devedition b/browser
 diff --git a/browser/config/mozconfigs/win64/devedition b/browser/config/mozconfigs/win64/devedition
 --- a/browser/config/mozconfigs/win64/devedition
 +++ b/browser/config/mozconfigs/win64/devedition
-@@ -6,9 +6,12 @@ export MOZ_PGO=1
+@@ -8,11 +8,14 @@ fi
  
  # Add-on signing is not required for DevEdition
  MOZ_REQUIRE_SIGNING=0
@@ -150,14 +156,16 @@ diff --git a/browser/config/mozconfigs/win64/devedition b/browser/config/mozconf
 +# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
 +ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
 +
+ ac_add_options MOZ_PGO=1
+ 
  . "$topsrcdir/build/mozconfig.common.override"
 diff --git a/browser/config/mozconfigs/win64/l10n-mozconfig-devedition b/browser/config/mozconfigs/win64/l10n-mozconfig-devedition
 --- a/browser/config/mozconfigs/win64/l10n-mozconfig-devedition
 +++ b/browser/config/mozconfigs/win64/l10n-mozconfig-devedition
-@@ -7,9 +7,12 @@ ac_add_options --with-l10n-base=../../l1
- ac_add_options --with-branding=browser/branding/aurora
+@@ -10,9 +10,12 @@ export MOZILLA_OFFICIAL=1
  
- export MOZILLA_OFFICIAL=1
+ # Enable Telemetry
+ export MOZ_TELEMETRY_REPORTING=1
  
  # Don't autoclobber l10n, as this can lead to missing binaries and broken builds
  # Bug 1283438

+ 3 - 3
mozilla-release/patches/1367092-1-67a1.patch

@@ -3,7 +3,7 @@
 # Date 1550846275 0
 #      Fri Feb 22 14:37:55 2019 +0000
 # Node ID ef9a57429d594ef1f75d070784764fc1b70d8595
-# Parent  4f5c4a1fadd22e96577a8d35956f3d6fd039d68d
+# Parent  c0df5cc5df6ba2bc78f5fd1911bca1f1abd49f25
 Bug 1367092 - [flake8] Use per-file-ignores to skip __init__.py files under testing/marionette and testing/firefox-ui, r=ato
 
 This allows us to only skip the "unused import" config in these files rather
@@ -16,13 +16,13 @@ diff --git a/.flake8 b/.flake8
 --- a/.flake8
 +++ b/.flake8
 @@ -11,18 +11,16 @@ exclude =
+     gfx/angle/,
+     gfx/harfbuzz,
      glx/skia/,
      intl/icu/,
      ipc/chromium/,
      js/*.configure,
      memory/moz.configure,
-     python/mozbuild/dumbmake,
-     python/mozbuild/mozbuild,
      security/nss/,
 -    testing/firefox-ui/**/__init__.py,
 -    testing/marionette/**/__init__.py,

+ 3 - 3
mozilla-release/patches/1367092-5-67a1.patch

@@ -3,7 +3,7 @@
 # Date 1550870750 0
 #      Fri Feb 22 21:25:50 2019 +0000
 # Node ID 4624c850f711417ae3cc95f3e69ce4cb6c07f70b
-# Parent  b1d9c78324fbf6fc071eae268787981b35eaffa8
+# Parent  8f24f1f26d987b2af921b0d9c49bee4547f89544
 Bug 1367092 - [flake8] Use a blacklist instead of a whitelist, r=egao
 
 This ensures that the default for new python files is to be linted by flake8.
@@ -17,6 +17,8 @@ diff --git a/.flake8 b/.flake8
 +++ b/.flake8
 @@ -1,32 +1,84 @@
  [flake8]
+ # See http://pep8.readthedocs.io/en/latest/intro.html#configuration
+ ignore = E121, E123, E126, E129, E133, E226, E241, E242, E704, W503, E402, E741
  max-line-length = 99
  exclude =
 +    # These paths should be triaged and either fixed or moved to the list below.
@@ -83,8 +85,6 @@ diff --git a/.flake8 b/.flake8
      ipc/chromium/,
      js/*.configure,
      memory/moz.configure,
-     python/mozbuild/dumbmake,
-     python/mozbuild/mozbuild,
      security/nss/,
      testing/marionette/harness/marionette_harness/runner/mixins,
      testing/marionette/harness/marionette_harness/tests,

+ 3 - 3
mozilla-release/patches/1371065-2-sdk-removemisc-25316.patch

@@ -1,7 +1,7 @@
 # HG changeset patch
 # User Frank-Rainer Grahl <frgrahl@gmx.net>
 # Date 1674512195 -3600
-# Parent  628f24880e3b557e8e5823fc68706426784de70f
+# Parent  04b6ab6c7ce2aded61639929163b492c1624f035
 Bug 1371065 - Rip out misc stuff from add-on sdk. r=me a=me
 
 SeaMonkey release branch version. Test removal and non packaged stuff only.
@@ -15194,7 +15194,7 @@ deleted file mode 100644
 diff --git a/build/mach_bootstrap.py b/build/mach_bootstrap.py
 --- a/build/mach_bootstrap.py
 +++ b/build/mach_bootstrap.py
-@@ -31,17 +31,16 @@ use and re-run mach. For this change to 
+@@ -32,17 +32,16 @@ use and re-run mach. For this change to 
  want to export this environment variable from your shell's init scripts.
  
  Press ENTER/RETURN to continue or CTRL+c to abort.
@@ -15209,6 +15209,6 @@ diff --git a/build/mach_bootstrap.py b/build/mach_bootstrap.py
      'dom/bindings/mach_commands.py',
      'js/src/devtools/rootAnalysis/mach_commands.py',
      'layout/tools/reftest/mach_commands.py',
-     'python/mach_commands.py',
      'python/mach/mach/commands/commandinfo.py',
      'python/mach/mach/commands/settings.py',
+     'python/mach_commands.py',

+ 32 - 0
mozilla-release/patches/1384638-60a1.patch

@@ -0,0 +1,32 @@
+# HG changeset patch
+# User Eric Rahm <erahm@mozilla.com>
+# Date 1518222761 28800
+# Node ID f4b1eccde367b86d34795e52f3a548666735b6e5
+# Parent  1354d17a426bcafeff3fb433036abec1b458f133
+Bug 1384638 - Remove another NS_ENSURE warning from ShouldEnableTracking. r=gcp
+
+diff --git a/netwerk/base/nsChannelClassifier.cpp b/netwerk/base/nsChannelClassifier.cpp
+--- a/netwerk/base/nsChannelClassifier.cpp
++++ b/netwerk/base/nsChannelClassifier.cpp
+@@ -336,17 +336,19 @@ nsChannelClassifier::ShouldEnableTrackin
+     nsCOMPtr<nsIHttpChannelInternal> chan = do_QueryInterface(aChannel, &rv);
+     if (NS_FAILED(rv) || !chan) {
+       LOG(("nsChannelClassifier[%p]: Not an HTTP channel", this));
+       return NS_OK;
+     }
+ 
+     nsCOMPtr<nsIURI> topWinURI;
+     rv = chan->GetTopWindowURI(getter_AddRefs(topWinURI));
+-    NS_ENSURE_SUCCESS(rv, rv);
++    if (NS_FAILED(rv)) {
++      return rv;
++    }
+ 
+     if (!topWinURI) {
+       LOG(("nsChannelClassifier[%p]: No window URI\n", this));
+     }
+ 
+     nsCOMPtr<nsIURI> chanURI;
+     rv = aChannel->GetURI(getter_AddRefs(chanURI));
+     NS_ENSURE_SUCCESS(rv, rv);
+

+ 8 - 8
mozilla-release/patches/1397263-2-64a1.patch

@@ -2,7 +2,7 @@
 # User Nathan Froyd <froydnj@mozilla.com>
 # Date 1538612969 14400
 # Node ID b4dec9b774a82ccbe834eeb9727186e793699e97
-# Parent  de41d55d7ae01b7dd914e179aead4ab3b568a9f2
+# Parent  9df4d4fea9bf7b72aa44a3cf20a4233bdc074c58
 Bug 1397263 - move AS checks to toolchain.configure; r=glandium
 
 This is a fairly straightforward port of the AS tool checks from old-configure
@@ -265,7 +265,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
  if test -n "$JS_STANDALONE"; then
    jsconfdefs=$_objdir/js/src/js-confdefs.h
  else
-@@ -390,20 +388,17 @@ AC_SUBST(MOZJS_MAJOR_VERSION)
+@@ -389,20 +387,17 @@ AC_SUBST(MOZJS_MAJOR_VERSION)
  AC_SUBST(MOZJS_MINOR_VERSION)
  AC_SUBST(MOZJS_PATCH_VERSION)
  AC_SUBST(MOZJS_ALPHA)
@@ -286,8 +286,8 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
  dnl ==============================================================
  MOZ_ARCH_OPTS
  
-@@ -664,19 +659,16 @@ case "$target" in
-         fi
+@@ -665,19 +660,16 @@ case "$target" in
+         MOZ_OPTIMIZE_FLAGS="-O2"
  
          WIN32_CONSOLE_EXE_LDFLAGS=-mconsole
          WIN32_GUI_EXE_LDFLAGS=-mwindows
@@ -306,7 +306,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
          *)
              AR='lib'
              AR_FLAGS='-NOLOGO -OUT:$@'
-@@ -1643,25 +1635,16 @@ AC_SUBST_LIST(EDITLINE_LIBS)
+@@ -1634,25 +1626,16 @@ AC_SUBST_LIST(EDITLINE_LIBS)
  
  dnl ========================================================
  dnl =
@@ -332,7 +332,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
  
  MOZ_ARG_WITH_STRING(qemu-exe,
  [  --with-qemu-exe=path   Use path as an arm emulator on host platforms],
-@@ -1676,20 +1659,18 @@ dnl ====================================
+@@ -1667,20 +1650,18 @@ dnl ====================================
  dnl =
  dnl = Maintainer debug option (no --enable equivalent)
  dnl =
@@ -396,7 +396,7 @@ diff --git a/old-configure.in b/old-configure.in
  
  dnl Configure platform-specific CPU architecture compiler options.
  dnl ==============================================================
-@@ -828,23 +823,16 @@ case "$target" in
+@@ -830,23 +825,16 @@ case "$target" in
              # function thunks need to be generated for cross-DLL calls.
              MOZ_FOLD_LIBS_FLAGS="-mnop-fun-dllimport"
          else
@@ -420,7 +420,7 @@ diff --git a/old-configure.in b/old-configure.in
          *)
              AR='lib'
              AR_FLAGS='-NOLOGO -OUT:$@'
-@@ -3762,20 +3750,18 @@ dnl ====================================
+@@ -3759,20 +3747,18 @@ dnl ====================================
  dnl =
  dnl = Maintainer debug option (no --enable equivalent)
  dnl =

+ 7 - 7
mozilla-release/patches/1399870-64a1.patch

@@ -2,7 +2,7 @@
 # User Ted Mielczarek <ted@mielczarek.org>
 # Date 1537300219 14400
 # Node ID 5b8dd6f38524a27b81bc39ed5f3224eebe3684ce
-# Parent  d74a66dfcf3b45e96520d8fdd92e566f92657680
+# Parent  67aba54e222739f7b503b8d305e490d838707548
 Bug 1399870 - make DEFFILE a Path instead of a string; r=gps
 
 All but one of the current uses of DEFFILE use `SRCDIR + '/file.def'` to
@@ -189,12 +189,12 @@ diff --git a/modules/pdfium/moz.build b/modules/pdfium/moz.build
 diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build
 --- a/mozglue/build/moz.build
 +++ b/mozglue/build/moz.build
-@@ -22,17 +22,17 @@ if CONFIG['MOZ_ASAN']:
+@@ -17,17 +17,17 @@ if CONFIG['OS_TARGET'] == 'Android':
      ]
  
- if CONFIG['MOZ_UBSAN']:
+ if CONFIG['MOZ_ASAN']:
      SOURCES += [
-         'UbsanOptions.cpp',
+         'AsanOptions.cpp',
      ]
  
  if CONFIG['OS_TARGET'] == 'WINNT':
@@ -211,7 +211,7 @@ diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build
 diff --git a/python/mozbuild/mozbuild/frontend/context.py b/python/mozbuild/mozbuild/frontend/context.py
 --- a/python/mozbuild/mozbuild/frontend/context.py
 +++ b/python/mozbuild/mozbuild/frontend/context.py
-@@ -1620,17 +1620,17 @@ VARIABLES = {
+@@ -1631,17 +1631,17 @@ VARIABLES = {
          """),
  
      'RCINCLUDE': (unicode, unicode,
@@ -233,7 +233,7 @@ diff --git a/python/mozbuild/mozbuild/frontend/context.py b/python/mozbuild/mozb
 diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py
 --- a/python/mozbuild/mozbuild/frontend/emitter.py
 +++ b/python/mozbuild/mozbuild/frontend/emitter.py
-@@ -1031,17 +1031,16 @@ class TreeMetadataEmitter(LoggingMixin):
+@@ -1040,17 +1040,16 @@ class TreeMetadataEmitter(LoggingMixin):
          # them. We should aim to keep this set small because it violates the
          # desired abstraction of the build definition away from makefiles.
          passthru = VariablePassthru(context)
@@ -251,7 +251,7 @@ diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozb
          for v in varlist:
              if v in context and context[v]:
                  passthru.variables[v] = context[v]
-@@ -1062,23 +1061,38 @@ class TreeMetadataEmitter(LoggingMixin):
+@@ -1071,23 +1070,38 @@ class TreeMetadataEmitter(LoggingMixin):
  
          for v in ['HOST_CXXFLAGS', 'HOST_CFLAGS']:
              if v in context and context[v]:

+ 3 - 3
mozilla-release/patches/1403005-1-60a1.patch

@@ -2,7 +2,7 @@
 # User Marco Castelluccio <mcastelluccio@mozilla.com>
 # Date 1516113940 -3600
 # Node ID 7879c7d16bb4b105a660dade09b83197bf47ade5
-# Parent  38f95ef0329c540ec3efdbe349b44980ee115d31
+# Parent  3d97a82e8ac833ca0ea893c27f95ea25c0e52477
 Bug 1403005 - Don't run memory/replace/logalloc/replay in coverage builds. r=glandium
 
 diff --git a/memory/replace/logalloc/replay/Makefile.in b/memory/replace/logalloc/replay/Makefile.in
@@ -29,9 +29,9 @@ diff --git a/memory/replace/logalloc/replay/Makefile.in b/memory/replace/logallo
  # Test with MALLOC_LOG as a file name
  	$(RM) test_output.log
  	MALLOC_LOG=test_output.log $(LOGALLOC) ./$(PROGRAM) < $<
- 	sed -n '/jemalloc_stats/,$$p' test_output.log | $(PYTHON3) $(srcdir)/logalloc_munge.py | diff -w - expected_output.log
+ 	sed -n '/jemalloc_stats/,$$p' test_output.log | $(PYTHON) $(srcdir)/logalloc_munge.py | diff -w - expected_output.log
  
- 	MALLOC_LOG=1 MALLOC_LOG_MINIMAL=1 $(LOGALLOC) ./$(PROGRAM) < $< | sed -n '/jemalloc_stats/,$$p' | $(PYTHON3) $(srcdir)/logalloc_munge.py | diff -w - $(srcdir)/expected_output_minimal.log
+ 	MALLOC_LOG=1 MALLOC_LOG_MINIMAL=1 $(LOGALLOC) ./$(PROGRAM) < $< | sed -n '/jemalloc_stats/,$$p' | $(PYTHON) $(srcdir)/logalloc_munge.py | diff -w - $(srcdir)/expected_output_minimal.log
  
  endif
 +endif

+ 14 - 13
mozilla-release/patches/1403027-63a1.patch

@@ -2,7 +2,7 @@
 # User Thomas Wisniewski <wisniewskit@gmail.com>
 # Date 1516845544 18000
 # Node ID f839685ceb8eebc50fa69c9273141a4bdc8ce1e2
-# Parent  675bb05931f792c4a00cc5c616f8eb98cc551061
+# Parent  3d2d93d2e7797cc7613549894781dd3850b0a765
 Bug 1403027 - Do not throw from PerformanceObserver.observe when none of the entryTypes are known (log a JS console warning instead); r=bz
 
 MozReview-Commit-ID: Lx2cjWDX8sh
@@ -41,12 +41,12 @@ diff --git a/dom/performance/PerformanceObserver.cpp b/dom/performance/Performan
  
  using namespace mozilla;
  using namespace mozilla::dom;
-@@ -138,36 +139,63 @@ PerformanceObserver::QueueEntry(Performa
- static const char16_t *const sValidTypeNames[4] = {
+@@ -137,36 +138,63 @@ PerformanceObserver::QueueEntry(Performa
+ 
+ static const char16_t *const sValidTypeNames[3] = {
    u"mark",
    u"measure",
    u"resource",
-   u"server"
  };
  
  void
@@ -127,11 +127,11 @@ diff --git a/dom/performance/PerformanceObserver.h b/dom/performance/Performance
  
    void Disconnect();
  
+   void TakeRecords(nsTArray<RefPtr<PerformanceEntry>>& aRetval);
+ 
    void Notify();
    void QueueEntry(PerformanceEntry* aEntry);
  
- private:
-   ~PerformanceObserver();
 diff --git a/dom/performance/tests/test_performance_observer.html b/dom/performance/tests/test_performance_observer.html
 --- a/dom/performance/tests/test_performance_observer.html
 +++ b/dom/performance/tests/test_performance_observer.html
@@ -356,18 +356,19 @@ diff --git a/dom/performance/tests/test_worker_observer.html b/dom/performance/t
 diff --git a/dom/webidl/PerformanceObserver.webidl b/dom/webidl/PerformanceObserver.webidl
 --- a/dom/webidl/PerformanceObserver.webidl
 +++ b/dom/webidl/PerformanceObserver.webidl
-@@ -13,12 +13,11 @@ dictionary PerformanceObserverInit {
- };
+@@ -14,13 +14,12 @@ dictionary PerformanceObserverInit {
  
- callback PerformanceObserverCallback = void (PerformanceObserverEntryList entries, PerformanceObserver observer);
+ callback PerformanceObserverCallback = void (PerformanceObserverEntryList entries,
+                                              PerformanceObserver observer);
  
- [Func="Performance::IsObserverEnabled",
+ [Func="mozilla::dom::DOMPrefs::PerformanceObserverEnabled",
   Constructor(PerformanceObserverCallback callback),
   Exposed=(Window,Worker)]
  interface PerformanceObserver {
 -  [Throws]
-   void observe(PerformanceObserverInit options);
-   void disconnect();
+     void                 observe(PerformanceObserverInit options);
+     void                 disconnect();
+     PerformanceEntryList takeRecords();
  };
 diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp
 --- a/dom/workers/WorkerPrivate.cpp
@@ -456,7 +457,7 @@ diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp
                              public nsITimerCallback,
                              public nsINamed
  {
-@@ -4877,22 +4886,31 @@ WorkerPrivate::ReportError(JSContext* aC
+@@ -4864,22 +4873,31 @@ WorkerPrivate::ReportError(JSContext* aC
  
    mErrorHandlerRecursionCount--;
  }

+ 18 - 16
mozilla-release/patches/1404823-59a1.patch

@@ -2,7 +2,7 @@
 # User Sylvestre Ledru <sledru@mozilla.com>
 # Date 1513887191 -7200
 # Node ID d461768da724e3e11585457728b02dc36ebb5c58
-# Parent  a716944bd67e9ca4607a280de6c8cd947dbb7ee9
+# Parent  89438b8da672db652dee14999e6b5074e7efcfb1
 Bug 1404823 - Now that nightly is called Firefox Nightly, with-macbundlename-prefix is not necessary r=rail
 
 MozReview-Commit-ID: K3lXdLXdxAO
@@ -10,15 +10,15 @@ MozReview-Commit-ID: K3lXdLXdxAO
 diff --git a/browser/config/mozconfigs/macosx64/debug b/browser/config/mozconfigs/macosx64/debug
 --- a/browser/config/mozconfigs/macosx64/debug
 +++ b/browser/config/mozconfigs/macosx64/debug
-@@ -2,18 +2,14 @@
- 
- ac_add_options --enable-debug
- ac_add_options --enable-dmd
+@@ -5,18 +5,14 @@ ac_add_options --enable-dmd
  ac_add_options --enable-verify-mar
  
  # Needed to enable breakpad in application.ini
  export MOZILLA_OFFICIAL=1
  
+ # Enable Telemetry
+ export MOZ_TELEMETRY_REPORTING=1
+ 
 -if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
 -ac_add_options --with-macbundlename-prefix=Firefox
 -fi
@@ -32,15 +32,15 @@ diff --git a/browser/config/mozconfigs/macosx64/debug b/browser/config/mozconfig
 diff --git a/browser/config/mozconfigs/macosx64/debug-asan b/browser/config/mozconfigs/macosx64/debug-asan
 --- a/browser/config/mozconfigs/macosx64/debug-asan
 +++ b/browser/config/mozconfigs/macosx64/debug-asan
-@@ -1,20 +1,16 @@
- # Use at least -O1 for optimization to avoid stack space
- # exhaustions caused by Clang function inlining.
- ac_add_options --enable-application=browser
+@@ -4,20 +4,16 @@ ac_add_options --enable-application=brow
  ac_add_options --enable-debug
  ac_add_options --enable-optimize="-O1"
  
  . $topsrcdir/build/unix/mozconfig.asan
  
+ # Enable Telemetry
+ export MOZ_TELEMETRY_REPORTING=1
+ 
 -if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
 -ac_add_options --with-macbundlename-prefix=Firefox
 -fi
@@ -56,7 +56,7 @@ diff --git a/browser/config/mozconfigs/macosx64/debug-asan b/browser/config/mozc
 diff --git a/browser/config/mozconfigs/macosx64/l10n-mozconfig b/browser/config/mozconfigs/macosx64/l10n-mozconfig
 --- a/browser/config/mozconfigs/macosx64/l10n-mozconfig
 +++ b/browser/config/mozconfigs/macosx64/l10n-mozconfig
-@@ -8,19 +8,15 @@ if test `uname -s` = "Linux"; then
+@@ -8,20 +8,16 @@ if test `uname -s` = "Linux"; then
    export DMG_TOOL=$topsrcdir/dmg/dmg
    export HFS_TOOL=$topsrcdir/dmg/hfsplus
  fi
@@ -71,11 +71,12 @@ diff --git a/browser/config/mozconfigs/macosx64/l10n-mozconfig b/browser/config/
 -
  export MOZILLA_OFFICIAL=1
  
+ # Enable Telemetry
+ export MOZ_TELEMETRY_REPORTING=1
+ 
  # Don't autoclobber l10n, as this can lead to missing binaries and broken builds
  # Bug 1283438
  mk_add_options AUTOCLOBBER=
- 
- . "$topsrcdir/build/mozconfig.common.override"
 diff --git a/browser/config/mozconfigs/macosx64/nightly b/browser/config/mozconfigs/macosx64/nightly
 --- a/browser/config/mozconfigs/macosx64/nightly
 +++ b/browser/config/mozconfigs/macosx64/nightly
@@ -98,14 +99,15 @@ diff --git a/browser/config/mozconfigs/macosx64/nightly b/browser/config/mozconf
 diff --git a/browser/config/mozconfigs/macosx64/nightly-asan b/browser/config/mozconfigs/macosx64/nightly-asan
 --- a/browser/config/mozconfigs/macosx64/nightly-asan
 +++ b/browser/config/mozconfigs/macosx64/nightly-asan
-@@ -1,19 +1,15 @@
- ac_add_options --enable-application=browser
- # We still need to build with debug symbols
+@@ -3,20 +3,16 @@ ac_add_options --enable-application=brow
  ac_add_options --disable-debug
  ac_add_options --enable-optimize="-O2"
  
  . $topsrcdir/build/unix/mozconfig.asan
  
+ # Enable Telemetry
+ export MOZ_TELEMETRY_REPORTING=1
+ 
 -if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
 -ac_add_options --with-macbundlename-prefix=Firefox
 -fi
@@ -138,7 +140,7 @@ diff --git a/browser/config/mozconfigs/whitelist b/browser/config/mozconfigs/whi
      'ac_add_options --enable-instruments',
      'ac_add_options --enable-dtrace',
      'if test `uname -s` != Linux; then',
-     'fi',
  ]
  
  whitelist['nightly']['win64'] += [
+     '. "$topsrcdir/browser/config/mozconfigs/win64/common-win64"',

+ 72 - 0
mozilla-release/patches/1406827-59a1.patch

@@ -0,0 +1,72 @@
+# HG changeset patch
+# User Aaron Klotz <aklotz@mozilla.com>
+# Date 1509749417 21600
+# Node ID 1faa238d9faf94d3b763730351171b86c2e5bc9f
+# Parent  12d7e455b355cc68131aaf9f28f88bfd6226b828
+Bug 1406827: Do not wrap an interface with a passthru proxy unless sandboxing is enabled and >= level 3; r=jimm
+
+MozReview-Commit-ID: Gi1ch0IQtPj
+
+diff --git a/ipc/mscom/PassthruProxy.h b/ipc/mscom/PassthruProxy.h
+--- a/ipc/mscom/PassthruProxy.h
++++ b/ipc/mscom/PassthruProxy.h
+@@ -6,16 +6,19 @@
+ 
+ #ifndef mozilla_mscom_PassthruProxy_h
+ #define mozilla_mscom_PassthruProxy_h
+ 
+ #include "mozilla/Atomics.h"
+ #include "mozilla/mscom/ProxyStream.h"
+ #include "mozilla/mscom/Ptr.h"
+ #include "mozilla/NotNull.h"
++#if defined(MOZ_CONTENT_SANDBOX)
++#include "mozilla/SandboxSettings.h"
++#endif // defined(MOZ_CONTENT_SANDBOX)
+ 
+ #include <objbase.h>
+ 
+ namespace mozilla {
+ namespace mscom {
+ namespace detail {
+ 
+ template <typename Iface>
+@@ -35,28 +38,38 @@ class PassthruProxy final : public IMars
+                           , public IClientSecurity
+ {
+ public:
+   template <typename Iface>
+   static RefPtr<Iface> Wrap(NotNull<Iface*> aIn)
+   {
+     static_assert(detail::VTableSizer<Iface>::Size >= 3, "VTable too small");
+ 
++#if defined(MOZ_CONTENT_SANDBOX)
++    if (mozilla::GetEffectiveContentSandboxLevel() < 3) {
++      // The sandbox isn't strong enough to be a problem; no wrapping required
++      return aIn.get();
++    }
++
+     typename detail::EnvironmentSelector<Iface>::Type env;
+ 
+     RefPtr<PassthruProxy> passthru(new PassthruProxy(&env, __uuidof(Iface),
+                                                      detail::VTableSizer<Iface>::Size,
+                                                      aIn));
+ 
+     RefPtr<Iface> result;
+     if (FAILED(passthru->QueryProxyInterface(getter_AddRefs(result)))) {
+       return nullptr;
+     }
+ 
+     return result;
++#else
++    // No wrapping required
++    return aIn.get();
++#endif // defined(MOZ_CONTENT_SANDBOX)
+   }
+ 
+   static HRESULT Register();
+ 
+   PassthruProxy();
+ 
+   // IUnknown
+   STDMETHODIMP QueryInterface(REFIID riid, void** ppv) override;
+

+ 4 - 4
mozilla-release/patches/1409739-3-64a1.patch

@@ -2,7 +2,7 @@
 # User Chris AtLee <catlee@mozilla.com>
 # Date 1508334300 14400
 # Node ID 568a3198520c34d9d73d3924a178528bf791946d
-# Parent  eecc6147ab526690ca781c624df68fb43e0b9f82
+# Parent  5b92ce2b1c7e7b88e1d3fd24fd31f14db5aea10a
 Bug 1409739 - Part 3: Enable DMD in nightly/CI builds r=glandium
 
 MozReview-Commit-ID: 12tmFzzvRvP
@@ -37,7 +37,7 @@ diff --git a/browser/config/mozconfigs/linux32/valgrind b/browser/config/mozconf
 diff --git a/browser/config/mozconfigs/linux64/code-coverage b/browser/config/mozconfigs/linux64/code-coverage
 --- a/browser/config/mozconfigs/linux64/code-coverage
 +++ b/browser/config/mozconfigs/linux64/code-coverage
-@@ -1,16 +1,17 @@
+@@ -3,16 +3,17 @@ MOZ_AUTOMATION_L10N_CHECK=0
  . "$topsrcdir/browser/config/mozconfigs/linux64/nightly"
  
  TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
@@ -53,7 +53,7 @@ diff --git a/browser/config/mozconfigs/linux64/code-coverage b/browser/config/mo
  
  export CFLAGS="--coverage"
  export CXXFLAGS="--coverage"
- export LDFLAGS="--coverage -L$topsrcdir/clang/lib/clang/7.0.1/lib/linux/"
+ export LDFLAGS="--coverage -L$topsrcdir/clang/lib/clang/7.0.0/lib/linux/"
  export LIBS="-lclang_rt.profile-x86_64"
 diff --git a/browser/config/mozconfigs/linux64/nightly b/browser/config/mozconfigs/linux64/nightly
 --- a/browser/config/mozconfigs/linux64/nightly
@@ -108,7 +108,7 @@ diff --git a/browser/config/mozconfigs/whitelist b/browser/config/mozconfigs/whi
      'nightly': {},
      }
  
- all_platforms = ['win64', 'win64-aarch64', 'win32', 'linux32', 'linux64', 'macosx64']
+ all_platforms = ['win64', 'win32', 'linux32', 'linux64', 'macosx64']
  
  for platform in all_platforms:
      whitelist['nightly'][platform] = [

+ 119 - 0
mozilla-release/patches/1421678-59a1.patch

@@ -0,0 +1,119 @@
+# HG changeset patch
+# User Andrea Marchesini <amarchesini@mozilla.com>
+# Date 1514984563 -3600
+# Node ID be95a1123de433980a10aedd531d884ab52fe2c5
+# Parent  e6e3487083570a5c8f31343d672e6f3bb84374e8
+Bug 1421678 - Get rid of nsFileInputStream::Tell warning message when nsFileInputStream is destroyed, r=qdot
+
+diff --git a/netwerk/base/nsFileStreams.cpp b/netwerk/base/nsFileStreams.cpp
+--- a/netwerk/base/nsFileStreams.cpp
++++ b/netwerk/base/nsFileStreams.cpp
+@@ -42,16 +42,19 @@ nsFileStreamBase::nsFileStreamBase()
+     , mBehaviorFlags(0)
+     , mState(eUnitialized)
+     , mErrorValue(NS_ERROR_FAILURE)
+ {
+ }
+ 
+ nsFileStreamBase::~nsFileStreamBase()
+ {
++    // We don't want to try to rewrind the stream when shutting down.
++    mBehaviorFlags &= ~nsIFileInputStream::REOPEN_ON_REWIND;
++
+     Close();
+ }
+ 
+ NS_IMPL_ISUPPORTS(nsFileStreamBase,
+                   nsISeekableStream,
+                   nsIFileMetadata)
+ 
+ NS_IMETHODIMP
+diff --git a/netwerk/base/nsFileStreams.h b/netwerk/base/nsFileStreams.h
+--- a/netwerk/base/nsFileStreams.h
++++ b/netwerk/base/nsFileStreams.h
+@@ -151,20 +151,17 @@ public:
+     nsFileInputStream()
+       : mLineBuffer(nullptr), mIOFlags(0), mPerm(0), mCachedPosition(0)
+     {}
+ 
+     static nsresult
+     Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
+ 
+ protected:
+-    virtual ~nsFileInputStream()
+-    {
+-        Close();
+-    }
++    virtual ~nsFileInputStream() = default;
+ 
+     nsresult SeekInternal(int32_t aWhence, int64_t aOffset, bool aClearBuf=true);
+ 
+     nsAutoPtr<nsLineBuffer<char> > mLineBuffer;
+ 
+     /**
+      * The file being opened.
+      */
+@@ -202,20 +199,17 @@ public:
+     NS_DECL_ISUPPORTS_INHERITED
+     NS_DECL_NSIFILEOUTPUTSTREAM
+     NS_FORWARD_NSIOUTPUTSTREAM(nsFileStreamBase::)
+ 
+     static nsresult
+     Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
+ 
+ protected:
+-    virtual ~nsFileOutputStream()
+-    {
+-        Close();
+-    }
++   virtual ~nsFileOutputStream() = default;
+ };
+ 
+ ////////////////////////////////////////////////////////////////////////////////
+ 
+ /**
+  * A safe file output stream that overwrites the destination file only
+  * once writing is complete. This protects against incomplete writes
+  * due to the process or the thread being interrupted or crashed.
+@@ -233,20 +227,17 @@ public:
+ 
+     virtual nsresult DoOpen() override;
+ 
+     NS_IMETHOD Close() override;
+     NS_IMETHOD Write(const char *buf, uint32_t count, uint32_t *result) override;
+     NS_IMETHOD Init(nsIFile* file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) override;
+ 
+ protected:
+-    virtual ~nsAtomicFileOutputStream()
+-    {
+-        Close();
+-    }
++    virtual ~nsAtomicFileOutputStream() = default;
+ 
+     nsCOMPtr<nsIFile>         mTargetFile;
+     nsCOMPtr<nsIFile>         mTempFile;
+ 
+     bool     mTargetFileExists;
+     nsresult mWriteResult; // Internally set in Write()
+ 
+ };
+@@ -296,17 +287,14 @@ public:
+     NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void* aClosure,
+                              uint32_t aCount, uint32_t* _retval) override
+     {
+         return nsFileStreamBase::WriteSegments(aReader, aClosure, aCount,
+                                                _retval);
+     }
+ 
+ protected:
+-    virtual ~nsFileStream()
+-    {
+-        Close();
+-    }
++    virtual ~nsFileStream() = default;
+ };
+ 
+ ////////////////////////////////////////////////////////////////////////////////
+ 
+ #endif // nsFileStreams_h__
+

+ 2 - 2
mozilla-release/patches/1422234-1only-60a1.patch

@@ -2,7 +2,7 @@
 # User Masayuki Nakano <masayuki@d-toybox.com>
 # Date 1516673677 -32400
 # Node ID 6c912e6d282aabec87a9e0a18caf5f43c66e5e5f
-# Parent  c0a8a6c816535e245adc0bbaab9ab4b83367bb76
+# Parent  2f76d8adb17ea5fac376d2335ed98c34e160a2e6
 Bug 1422234 - part 1: HTMLEditRules::ReturnInParagraph() should adjust split point if caret position is positioned at edge of anchor element r=m_kato
 
 When Enter key is pressed at start or end of <a href="foo"> element, we
@@ -76,7 +76,7 @@ diff --git a/editor/libeditor/EditorDOMPoint.h b/editor/libeditor/EditorDOMPoint
      mChild = nullptr;
      mOffset.reset();
 @@ -581,16 +602,33 @@ public:
-                            mParent->GetChildAt(mOffset.value()) == mChild,
+                            mParent->GetChildAt_Deprecated(mOffset.value()) == mChild,
          "If mOffset and mChild are mismatched");
        return false;
      }

+ 105 - 0
mozilla-release/patches/1422277-59a1.patch

@@ -0,0 +1,105 @@
+# HG changeset patch
+# User Valentin Gosu <valentin.gosu@gmail.com>
+# Date 1512130829 -3600
+# Node ID ab96653f9122bb2ac5b8af25893df7f800bd71e0
+# Parent  37b4ae2a4693c7363115e60c61d70d475261c651
+Bug 1422277 - Add an observer notification for when the captive portal detection is "done" r=bagder
+
+MozReview-Commit-ID: D9Qr0CuUJiQ
+
+diff --git a/netwerk/base/CaptivePortalService.cpp b/netwerk/base/CaptivePortalService.cpp
+--- a/netwerk/base/CaptivePortalService.cpp
++++ b/netwerk/base/CaptivePortalService.cpp
+@@ -330,16 +330,27 @@ CaptivePortalService::Observe(nsISupport
+   if (observerService) {
+     nsCOMPtr<nsICaptivePortalService> cps(this);
+     observerService->NotifyObservers(cps, NS_IPC_CAPTIVE_PORTAL_SET_STATE, nullptr);
+   }
+ 
+   return NS_OK;
+ }
+ 
++void
++CaptivePortalService::NotifyConnectivityAvailable(bool aCaptive)
++{
++  nsCOMPtr<nsIObserverService> observerService = services::GetObserverService();
++  if (observerService) {
++    nsCOMPtr<nsICaptivePortalService> cps(this);
++    observerService->NotifyObservers(cps, NS_CAPTIVE_PORTAL_CONNECTIVITY,
++                                     aCaptive ? u"captive" : u"clear");
++  }
++}
++
+ //-----------------------------------------------------------------------------
+ // CaptivePortalService::nsICaptivePortalCallback
+ //-----------------------------------------------------------------------------
+ NS_IMETHODIMP
+ CaptivePortalService::Prepare()
+ {
+   LOG(("CaptivePortalService::Prepare\n"));
+   MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
+@@ -359,18 +370,20 @@ CaptivePortalService::Complete(bool succ
+ 
+   // Note: this callback gets called when:
+   // 1. the request is completed, and content is valid (success == true)
+   // 2. when the request is aborted or times out (success == false)
+ 
+   if (success) {
+     if (mEverBeenCaptive) {
+       mState = UNLOCKED_PORTAL;
++      NotifyConnectivityAvailable(true);
+     } else {
+       mState = NOT_CAPTIVE;
++      NotifyConnectivityAvailable(false);
+     }
+   }
+ 
+   mRequestInProgress = false;
+   return NS_OK;
+ }
+ 
+ } // namespace net
+diff --git a/netwerk/base/CaptivePortalService.h b/netwerk/base/CaptivePortalService.h
+--- a/netwerk/base/CaptivePortalService.h
++++ b/netwerk/base/CaptivePortalService.h
+@@ -40,16 +40,17 @@ public:
+ 
+   // This method is only called in the content process, in order to mirror
+   // the captive portal state in the parent process.
+   void SetStateInChild(int32_t aState);
+ private:
+   virtual ~CaptivePortalService();
+   nsresult PerformCheck();
+   nsresult RearmTimer();
++  void NotifyConnectivityAvailable(bool aCaptive);
+ 
+   nsCOMPtr<nsICaptivePortalDetector>    mCaptivePortalDetector;
+   int32_t                               mState;
+ 
+   nsCOMPtr<nsITimer>                    mTimer;
+   bool                                  mStarted;
+   bool                                  mInitialized;
+   bool                                  mRequestInProgress;
+diff --git a/netwerk/base/nsICaptivePortalService.idl b/netwerk/base/nsICaptivePortalService.idl
+--- a/netwerk/base/nsICaptivePortalService.idl
++++ b/netwerk/base/nsICaptivePortalService.idl
+@@ -51,9 +51,18 @@ interface nsICaptivePortalService : nsIS
+ /**
+  * This observer notification will be emitted when the captive portal state
+  * changes. After receiving it, the ContentParent will send an IPC message
+  * to the ContentChild, which will set the state in the captive portal service
+  * in the child.
+  */
+ #define NS_IPC_CAPTIVE_PORTAL_SET_STATE "ipc:network:captive-portal-set-state"
+ 
++/**
++ * This notification will be emitted when the captive portal service has
++ * determined that we can connect to the internet.
++ * The service will pass either "captive" if there is an unlocked captive portal
++ * present, or "clear" if no captive portal was detected.
++ * Note: this notification only gets sent in the parent process.
++ */
++#define NS_CAPTIVE_PORTAL_CONNECTIVITY "network:captive-portal-connectivity"
++
+ %}
+

+ 4 - 4
mozilla-release/patches/1423495-4no5-61a1.patch

@@ -3,7 +3,7 @@
 # Date 1515723180 -3600
 #      Fri Jan 12 03:13:00 2018 +0100
 # Node ID 11804549931f5e8e2e71c5bcdd3221b41e8d54d8
-# Parent  5d9495a52eb69317db7add55a510f53b3a2de8fa
+# Parent  bc238a6b533f7e6a3cb3c59fe2c17190f2311224
 Bug 1423495 - Part4: Create doc entry form http channel if server timing headers are found for a document load r=baku
 
 Also credit to Valentin Gosu <valentin.gosu@gmail.com>
@@ -20,7 +20,7 @@ diff --git a/dom/performance/PerformanceMainThread.cpp b/dom/performance/Perform
        timing->SetPropertiesFromHttpChannel(httpChannel);
      }
  
-     mDocEntry = new PerformanceNavigationTiming(std::move(timing), this);
+     mDocEntry = new PerformanceNavigationTiming(Move(timing), this);
    }
  }
  
@@ -208,7 +208,7 @@ diff --git a/netwerk/protocol/http/HttpBaseChannel.h b/netwerk/protocol/http/Htt
 diff --git a/netwerk/protocol/http/HttpChannelChild.cpp b/netwerk/protocol/http/HttpChannelChild.cpp
 --- a/netwerk/protocol/http/HttpChannelChild.cpp
 +++ b/netwerk/protocol/http/HttpChannelChild.cpp
-@@ -1226,20 +1226,17 @@ void
+@@ -1224,20 +1224,17 @@ void
  HttpChannelChild::DoPreOnStopRequest(nsresult aStatus)
  {
    LOG(("HttpChannelChild::DoPreOnStopRequest [this=%p status=%" PRIx32 "]\n",
@@ -233,7 +233,7 @@ diff --git a/netwerk/protocol/http/HttpChannelChild.cpp b/netwerk/protocol/http/
 diff --git a/netwerk/protocol/http/InterceptedHttpChannel.cpp b/netwerk/protocol/http/InterceptedHttpChannel.cpp
 --- a/netwerk/protocol/http/InterceptedHttpChannel.cpp
 +++ b/netwerk/protocol/http/InterceptedHttpChannel.cpp
-@@ -1042,20 +1042,17 @@ InterceptedHttpChannel::OnStopRequest(ns
+@@ -1031,20 +1031,17 @@ InterceptedHttpChannel::OnStopRequest(ns
    // progress when OnStopRequest() is triggered.  Report any left over
    // progress immediately.  The extra runnable will then do nothing thanks
    // to the ReleaseListeners() call below.

+ 44 - 44
mozilla-release/patches/1425321-1-59a1.patch

@@ -2,7 +2,7 @@
 # User Andrea Marchesini <amarchesini@mozilla.com>
 # Date 1514984394 -3600
 # Node ID 9de67942469381c88c87f7422b6a7116b9f20a14
-# Parent  a077f9ae88453e73c9680a8415f0dca01eb5a63c
+# Parent  025bca36601473c2a66a06831b027236341992d2
 Bug 1425321 - Renaming nsINode::GetChildAt to GetChildAt_Deprecated, r=catalinb
 
 We want to deprecate nsINode::GetChildAt as the first step of removing DOM node
@@ -11,7 +11,7 @@ child array storage. See bug 651120.
 diff --git a/accessible/base/nsCoreUtils.cpp b/accessible/base/nsCoreUtils.cpp
 --- a/accessible/base/nsCoreUtils.cpp
 +++ b/accessible/base/nsCoreUtils.cpp
-@@ -220,17 +220,17 @@ nsCoreUtils::GetDOMNodeFromDOMPoint(nsIN
+@@ -221,17 +221,17 @@ nsCoreUtils::GetDOMNodeFromDOMPoint(nsIN
    if (aNode && aNode->IsElement()) {
      uint32_t childCount = aNode->GetChildCount();
      NS_ASSERTION(aOffset <= childCount, "Wrong offset of the DOM point!");
@@ -99,7 +99,7 @@ diff --git a/dom/base/Attr.h b/dom/base/Attr.h
 diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp
 --- a/dom/base/FragmentOrElement.cpp
 +++ b/dom/base/FragmentOrElement.cpp
-@@ -144,17 +144,17 @@ uint64_t nsMutationGuard::sGeneration = 
+@@ -141,17 +141,17 @@ uint64_t nsMutationGuard::sGeneration = 
  nsIContent*
  nsIContent::FindFirstNonChromeOnlyAccessContent() const
  {
@@ -118,7 +118,7 @@ diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp
  
  // https://dom.spec.whatwg.org/#dom-slotable-assignedslot
  HTMLSlotElement*
-@@ -543,17 +543,17 @@ nsAttrChildContentList::Item(uint32_t aI
+@@ -540,17 +540,17 @@ nsAttrChildContentList::Item(uint32_t aI
  
    return CallQueryInterface(node, aReturn);
  }
@@ -137,7 +137,7 @@ diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp
  int32_t
  nsAttrChildContentList::IndexOf(nsIContent* aContent)
  {
-@@ -1159,17 +1159,17 @@ FragmentOrElement::InsertChildAt(nsICont
+@@ -1157,17 +1157,17 @@ FragmentOrElement::InsertChildAt(nsICont
  
    return doInsertChildAt(aKid, aIndex, aNotify, mAttrsAndChildren);
  }
@@ -156,7 +156,7 @@ diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp
  
  void
  FragmentOrElement::GetTextContentInternal(nsAString& aTextContent,
-@@ -2118,17 +2118,17 @@ FragmentOrElement::AppendTextTo(nsAStrin
+@@ -2112,17 +2112,17 @@ FragmentOrElement::AppendTextTo(nsAStrin
  
  uint32_t
  FragmentOrElement::GetChildCount() const
@@ -500,7 +500,7 @@ diff --git a/dom/base/nsContentIterator.cpp b/dom/base/nsContentIterator.cpp
 diff --git a/dom/base/nsContentSink.cpp b/dom/base/nsContentSink.cpp
 --- a/dom/base/nsContentSink.cpp
 +++ b/dom/base/nsContentSink.cpp
-@@ -1290,17 +1290,17 @@ nsContentSink::NotifyAppend(nsIContent* 
+@@ -1289,17 +1289,17 @@ nsContentSink::NotifyAppend(nsIContent* 
    }
  
    mInNotification++;
@@ -522,7 +522,7 @@ diff --git a/dom/base/nsContentSink.cpp b/dom/base/nsContentSink.cpp
 diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp
 --- a/dom/base/nsContentUtils.cpp
 +++ b/dom/base/nsContentUtils.cpp
-@@ -5448,17 +5448,17 @@ nsContentUtils::SetNodeTextContent(nsICo
+@@ -5418,17 +5418,17 @@ nsContentUtils::SetNodeTextContent(nsICo
    nsAutoMutationBatch mb;
  
    uint32_t childCount = aContent->GetChildCount();
@@ -544,7 +544,7 @@ diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp
 diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp
 --- a/dom/base/nsDocument.cpp
 +++ b/dom/base/nsDocument.cpp
-@@ -4259,17 +4259,17 @@ nsDocument::GetRootElementInternal() con
+@@ -4264,17 +4264,17 @@ nsDocument::GetRootElementInternal() con
      }
    }
  
@@ -563,7 +563,7 @@ diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp
  nsDocument::IndexOf(const nsINode* aPossibleChild) const
  {
    return mChildren.IndexOfChild(aPossibleChild);
-@@ -4291,17 +4291,17 @@ nsDocument::InsertChildAt(nsIContent* aK
+@@ -4296,17 +4296,17 @@ nsDocument::InsertChildAt(nsIContent* aK
    }
  
    return doInsertChildAt(aKid, aIndex, aNotify, mChildren);
@@ -667,7 +667,7 @@ diff --git a/dom/base/nsDocumentEncoder.cpp b/dom/base/nsDocumentEncoder.cpp
 diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp
 --- a/dom/base/nsFocusManager.cpp
 +++ b/dom/base/nsFocusManager.cpp
-@@ -2494,27 +2494,27 @@ nsFocusManager::GetSelectionLocation(nsI
+@@ -2491,27 +2491,27 @@ nsFocusManager::GetSelectionLocation(nsI
        domRange->GetStartContainer(getter_AddRefs(startNode));
        domRange->GetEndContainer(getter_AddRefs(endNode));
        domRange->GetStartOffset(&startOffset);
@@ -697,7 +697,7 @@ diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp
    }
    else {
      rv = NS_ERROR_INVALID_ARG;
-@@ -3321,19 +3321,20 @@ nsFocusManager::GetNextTabbableMapArea(b
+@@ -3318,19 +3318,20 @@ nsFocusManager::GetNextTabbableMapArea(b
                        tabIndex != aCurrentTabIndex)) {
        // If aStartContent is in this map we must start iterating past it.
        // We skip the case where aStartContent has tabindex == aStartContent
@@ -819,7 +819,7 @@ diff --git a/dom/base/nsGenericDOMDataNode.h b/dom/base/nsGenericDOMDataNode.h
 diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp
 --- a/dom/base/nsINode.cpp
 +++ b/dom/base/nsINode.cpp
-@@ -1969,17 +1969,17 @@ void
+@@ -1961,17 +1961,17 @@ void
  nsINode::doRemoveChildAt(uint32_t aIndex, bool aNotify,
                           nsIContent* aKid, nsAttrAndChildArray& aChildArray)
  {
@@ -838,7 +838,7 @@ diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp
  
    nsIContent* previousSibling = aKid->GetPreviousSibling();
  
-@@ -2303,18 +2303,18 @@ nsINode::ReplaceOrInsertBefore(bool aRep
+@@ -2295,18 +2295,18 @@ nsINode::ReplaceOrInsertBefore(bool aRep
      // while kungFuDeathGrip is still alive.
      {
        mozAutoDocUpdate batch(newContent->GetComposedDoc(),
@@ -859,7 +859,7 @@ diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp
        // XBL destructors, yuck.
  
        // Verify that nodeToInsertBefore, if non-null, is still our child.  If
-@@ -2513,18 +2513,18 @@ nsINode::ReplaceOrInsertBefore(bool aRep
+@@ -2505,18 +2505,18 @@ nsINode::ReplaceOrInsertBefore(bool aRep
    nsINode* result = aReplace ? aRefChild : aNewChild;
    if (nodeType == nsIDOMNode::DOCUMENT_FRAGMENT_NODE) {
      if (!aReplace) {
@@ -880,7 +880,7 @@ diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp
      }
  
      bool appending =
-@@ -2571,18 +2571,18 @@ nsINode::ReplaceOrInsertBefore(bool aRep
+@@ -2563,18 +2563,18 @@ nsINode::ReplaceOrInsertBefore(bool aRep
  
      // FIXME https://bugzilla.mozilla.org/show_bug.cgi?id=544654
      //       We need to reparent here for nodes for which the parent of their
@@ -904,7 +904,7 @@ diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp
 diff --git a/dom/base/nsINode.h b/dom/base/nsINode.h
 --- a/dom/base/nsINode.h
 +++ b/dom/base/nsINode.h
-@@ -501,29 +501,32 @@ public:
+@@ -497,29 +497,32 @@ public:
  
    /**
     * Get the number of children
@@ -940,7 +940,7 @@ diff --git a/dom/base/nsINode.h b/dom/base/nsINode.h
     *
     * https://dom.spec.whatwg.org/#concept-node-document
     *
-@@ -1303,17 +1306,17 @@ public:
+@@ -1299,17 +1302,17 @@ public:
    nsIContent* GetSelectionRootContent(nsIPresShell* aPresShell);
  
    virtual nsINodeList* ChildNodes();
@@ -1064,7 +1064,7 @@ diff --git a/dom/events/ContentEventHandler.cpp b/dom/events/ContentEventHandler
 diff --git a/dom/events/IMEContentObserver.cpp b/dom/events/IMEContentObserver.cpp
 --- a/dom/events/IMEContentObserver.cpp
 +++ b/dom/events/IMEContentObserver.cpp
-@@ -1186,17 +1186,17 @@ IMEContentObserver::GetChildNode(nsINode
+@@ -1190,17 +1190,17 @@ IMEContentObserver::GetChildNode(nsINode
      return nullptr;
    }
    if (!aOffset) {
@@ -1253,7 +1253,7 @@ diff --git a/dom/xbl/XBLChildrenElement.cpp b/dom/xbl/XBLChildrenElement.cpp
 diff --git a/dom/xbl/nsXBLPrototypeBinding.cpp b/dom/xbl/nsXBLPrototypeBinding.cpp
 --- a/dom/xbl/nsXBLPrototypeBinding.cpp
 +++ b/dom/xbl/nsXBLPrototypeBinding.cpp
-@@ -486,17 +486,17 @@ nsXBLPrototypeBinding::LocateInstance(El
+@@ -478,17 +478,17 @@ nsXBLPrototypeBinding::LocateInstance(El
  
    nsIContent *copyParent =
      templParent == aTemplRoot ? aCopyRoot :
@@ -1272,7 +1272,7 @@ diff --git a/dom/xbl/nsXBLPrototypeBinding.cpp b/dom/xbl/nsXBLPrototypeBinding.c
  
  void
  nsXBLPrototypeBinding::SetInitialAttributes(
-@@ -1498,17 +1498,17 @@ nsXBLPrototypeBinding::WriteContentNode(
+@@ -1482,17 +1482,17 @@ nsXBLPrototypeBinding::WriteContentNode(
    NS_ENSURE_SUCCESS(rv, rv);
  
    // Finally, write out the child nodes.
@@ -1294,7 +1294,7 @@ diff --git a/dom/xbl/nsXBLPrototypeBinding.cpp b/dom/xbl/nsXBLPrototypeBinding.c
 diff --git a/dom/xslt/xslt/txMozillaXMLOutput.cpp b/dom/xslt/xslt/txMozillaXMLOutput.cpp
 --- a/dom/xslt/xslt/txMozillaXMLOutput.cpp
 +++ b/dom/xslt/xslt/txMozillaXMLOutput.cpp
-@@ -613,17 +613,17 @@ txMozillaXMLOutput::createTxWrapper()
+@@ -626,17 +626,17 @@ txMozillaXMLOutput::createTxWrapper()
  
      uint32_t i, j, childCount = mDocument->GetChildCount();
  #ifdef DEBUG
@@ -1425,7 +1425,7 @@ diff --git a/dom/xul/templates/nsXULContentBuilder.cpp b/dom/xul/templates/nsXUL
 diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp
 --- a/editor/libeditor/EditorBase.cpp
 +++ b/editor/libeditor/EditorBase.cpp
-@@ -2733,28 +2733,28 @@ EditorBase::FindBetterInsertionPoint(con
+@@ -2618,28 +2618,28 @@ EditorBase::FindBetterInsertionPoint(con
        return EditorRawDOMPoint(aPoint.GetContainer()->GetFirstChild(), 0);
      }
  
@@ -1456,7 +1456,7 @@ diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp
              }
              return EditorRawDOMPoint(child, child->Length());
            }
-@@ -4391,17 +4391,17 @@ EditorBase::JoinNodeDeep(nsIContent& aLe
+@@ -4274,17 +4274,17 @@ EditorBase::JoinNodeDeep(nsIContent& aLe
  
      if (parentNode->GetAsText()) {
        // We've joined all the way down to text nodes, we're done!
@@ -1478,7 +1478,7 @@ diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp
 diff --git a/editor/libeditor/EditorDOMPoint.h b/editor/libeditor/EditorDOMPoint.h
 --- a/editor/libeditor/EditorDOMPoint.h
 +++ b/editor/libeditor/EditorDOMPoint.h
-@@ -141,17 +141,17 @@ public:
+@@ -140,17 +140,17 @@ public:
      , mOffset(mozilla::Some(aOffset))
      , mIsChildInitialized(true)
    {
@@ -1497,7 +1497,7 @@ diff --git a/editor/libeditor/EditorDOMPoint.h b/editor/libeditor/EditorDOMPoint
      , mChild(aOther.mRef ? aOther.mRef->GetNextSibling() :
                             (aOther.mParent ? aOther.mParent->GetFirstChild() :
                                               nullptr))
-@@ -568,17 +568,17 @@ public:
+@@ -545,17 +545,17 @@ public:
      }
      if (mIsChildInitialized) {
        if (mParent->GetFirstChild() == mChild) {
@@ -1516,7 +1516,7 @@ diff --git a/editor/libeditor/EditorDOMPoint.h b/editor/libeditor/EditorDOMPoint
    }
  
    bool
-@@ -596,17 +596,17 @@ public:
+@@ -573,17 +573,17 @@ public:
      if (mIsChildInitialized) {
        if (!mChild) {
          NS_WARNING_ASSERTION(!mOffset.isSome() ||
@@ -1534,8 +1534,8 @@ diff --git a/editor/libeditor/EditorDOMPoint.h b/editor/libeditor/EditorDOMPoint
      return mOffset.value() == mParent->Length();
    }
  
-   bool
-@@ -738,17 +738,17 @@ public:
+   // Convenience methods for switching between the two types
+@@ -698,17 +698,17 @@ public:
        return RawRangeBoundary(mParent, mOffset.value());
      }
      if (mIsChildInitialized && mOffset.isSome()) {
@@ -1554,7 +1554,7 @@ diff --git a/editor/libeditor/EditorDOMPoint.h b/editor/libeditor/EditorDOMPoint
      }
      // Otherwise, we should create RangeBoundaryBase only with available
      // information.
-@@ -773,17 +773,17 @@ private:
+@@ -733,17 +733,17 @@ private:
        return;
      }
      MOZ_ASSERT(mOffset.isSome());
@@ -1620,7 +1620,7 @@ diff --git a/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp b/extensions/s
 diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp
 --- a/layout/base/nsCSSFrameConstructor.cpp
 +++ b/layout/base/nsCSSFrameConstructor.cpp
-@@ -7327,17 +7327,17 @@ nsCSSFrameConstructor::CreateNeededFrame
+@@ -7288,17 +7288,17 @@ nsCSSFrameConstructor::CreateNeededFrame
    // child lists).
  
    // Scan the children of aContent to see what operations (if any) we need to
@@ -1639,7 +1639,7 @@ diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConst
                     // fixed.
                     "NEEDS_FRAME set on a node that already has a frame?");
        if (!inRun) {
-@@ -7807,18 +7807,18 @@ nsCSSFrameConstructor::ContentAppended(n
+@@ -7749,18 +7749,18 @@ nsCSSFrameConstructor::ContentAppended(n
                                frameItems);
  
    for (nsIContent* child = aFirstNewContent;
@@ -1663,7 +1663,7 @@ diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConst
 diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp
 --- a/layout/base/nsPresContext.cpp
 +++ b/layout/base/nsPresContext.cpp
-@@ -1314,17 +1314,17 @@ void nsPresContext::SetImgAnimations(nsI
+@@ -1279,17 +1279,17 @@ void nsPresContext::SetImgAnimations(nsI
      nsCOMPtr<imgIRequest> imgReq;
      imgContent->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST,
                             getter_AddRefs(imgReq));
@@ -1733,7 +1733,7 @@ diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFra
 diff --git a/layout/generic/nsFrameSelection.cpp b/layout/generic/nsFrameSelection.cpp
 --- a/layout/generic/nsFrameSelection.cpp
 +++ b/layout/generic/nsFrameSelection.cpp
-@@ -1632,17 +1632,17 @@ nsFrameSelection::GetFrameForNodeOffset(
+@@ -1631,17 +1631,17 @@ nsFrameSelection::GetFrameForNodeOffset(
              childIndex = 0;
            }
          } else {
@@ -1752,7 +1752,7 @@ diff --git a/layout/generic/nsFrameSelection.cpp b/layout/generic/nsFrameSelecti
          theNode = childNode;
        }
  
-@@ -1673,17 +1673,17 @@ nsFrameSelection::GetFrameForNodeOffset(
+@@ -1672,17 +1672,17 @@ nsFrameSelection::GetFrameForNodeOffset(
                *aReturnOffset = 0;
              }
            } else {
@@ -1771,7 +1771,7 @@ diff --git a/layout/generic/nsFrameSelection.cpp b/layout/generic/nsFrameSelecti
                aOffset = aHint == CARET_ASSOCIATE_BEFORE ? aNode->GetChildCount() : 0;
                continue;
              } else {
-@@ -2130,17 +2130,17 @@ GetFirstSelectedContent(nsRange* aRange)
+@@ -2055,17 +2055,17 @@ GetFirstSelectedContent(nsRange* aRange)
    if (!aRange) {
      return nullptr;
    }
@@ -1790,7 +1790,7 @@ diff --git a/layout/generic/nsFrameSelection.cpp b/layout/generic/nsFrameSelecti
  nsFrameSelection::HandleTableSelection(nsINode* aParentContent,
                                         int32_t aContentOffset,
                                         int32_t aTarget,
-@@ -2153,17 +2153,17 @@ nsFrameSelection::HandleTableSelection(n
+@@ -2078,17 +2078,17 @@ nsFrameSelection::HandleTableSelection(n
    {
      // We were selecting cells and user drags mouse in table border or inbetween cells,
      //  just do nothing
@@ -1809,7 +1809,7 @@ diff --git a/layout/generic/nsFrameSelection.cpp b/layout/generic/nsFrameSelecti
    if (!mDomSelections[index])
      return NS_ERROR_NULL_POINTER;
  
-@@ -2415,17 +2415,17 @@ printf("HandleTableSelection: Unselectin
+@@ -2340,17 +2340,17 @@ printf("HandleTableSelection: Unselectin
  
            nsINode* container = range->GetStartContainer();
            if (!container) {
@@ -1828,7 +1828,7 @@ diff --git a/layout/generic/nsFrameSelection.cpp b/layout/generic/nsFrameSelecti
            if (!previousCellParent) break;
  
            if (previousCellParent == aParentContent && offset == aContentOffset)
-@@ -2767,17 +2767,17 @@ nsFrameSelection::GetFirstCellNodeInRang
+@@ -2692,17 +2692,17 @@ nsFrameSelection::GetFirstCellNodeInRang
  
    nsINode* startContainer = aRange->GetStartContainer();
    if (!startContainer) {
@@ -1850,7 +1850,7 @@ diff --git a/layout/generic/nsFrameSelection.cpp b/layout/generic/nsFrameSelecti
 diff --git a/layout/printing/nsPrintJob.cpp b/layout/printing/nsPrintJob.cpp
 --- a/layout/printing/nsPrintJob.cpp
 +++ b/layout/printing/nsPrintJob.cpp
-@@ -2535,17 +2535,17 @@ GetCorrespondingNodeInDocument(const nsI
+@@ -2537,17 +2537,17 @@ GetCorrespondingNodeInDocument(const nsI
      MOZ_ASSERT(index >= 0);
      indexArray.AppendElement(index);
      child = parent;
@@ -1872,7 +1872,7 @@ diff --git a/layout/printing/nsPrintJob.cpp b/layout/printing/nsPrintJob.cpp
 diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp
 --- a/layout/style/nsCSSRuleProcessor.cpp
 +++ b/layout/style/nsCSSRuleProcessor.cpp
-@@ -1537,17 +1537,17 @@ checkGenericEmptyMatches(Element* aEleme
+@@ -1542,17 +1542,17 @@ checkGenericEmptyMatches(Element* aEleme
  {
    nsIContent *child = nullptr;
    int32_t index = -1;
@@ -1891,7 +1891,7 @@ diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcess
  
  static const EventStates sPseudoClassStates[] = {
  #define CSS_PSEUDO_CLASS(_name, _value, _flags, _pref) \
-@@ -1811,17 +1811,17 @@ static bool SelectorMatches(Element* aEl
+@@ -1816,17 +1816,17 @@ static bool SelectorMatches(Element* aEl
          nsIContent *firstNode = nullptr;
          nsIContent *parent = aElement->GetParent();
          if (parent) {
@@ -1910,7 +1910,7 @@ diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcess
            return false;
          }
        }
-@@ -1838,17 +1838,17 @@ static bool SelectorMatches(Element* aEl
+@@ -1843,17 +1843,17 @@ static bool SelectorMatches(Element* aEl
          nsIContent *lastNode = nullptr;
          nsIContent *parent = aElement->GetParent();
          if (parent) {
@@ -1992,7 +1992,7 @@ diff --git a/layout/xul/nsListBoxBodyFrame.cpp b/layout/xul/nsListBoxBodyFrame.c
 diff --git a/layout/xul/nsXULTooltipListener.cpp b/layout/xul/nsXULTooltipListener.cpp
 --- a/layout/xul/nsXULTooltipListener.cpp
 +++ b/layout/xul/nsXULTooltipListener.cpp
-@@ -547,17 +547,17 @@ nsXULTooltipListener::HideTooltip()
+@@ -552,17 +552,17 @@ nsXULTooltipListener::HideTooltip()
  }
  
  static void

+ 2 - 2
mozilla-release/patches/1425440-02-59a1.patch

@@ -3,7 +3,7 @@
 # Date 1514993317 -3600
 #      Wed Jan 03 16:28:37 2018 +0100
 # Node ID 9f8bb5d303fa4cf92fd4a14cbcb72e2928762522
-# Parent  712a4aac2b79ca94c7aa6c47ccf6d8755e7b1e91
+# Parent  de3de60b6fca8959ec819c213a3bc4429e62f913
 Bug 1425440 - Get rid of GetChildAt_Deprecated in nsTreeContentView, r=catalinb
 
 diff --git a/layout/xul/tree/nsTreeContentView.cpp b/layout/xul/tree/nsTreeContentView.cpp
@@ -11,7 +11,7 @@ diff --git a/layout/xul/tree/nsTreeContentView.cpp b/layout/xul/tree/nsTreeConte
 +++ b/layout/xul/tree/nsTreeContentView.cpp
 @@ -1326,23 +1326,21 @@ nsTreeContentView::SerializeSeparator(El
    row->SetSeparator(true);
-   aRows.AppendElement(std::move(row));
+   aRows.AppendElement(Move(row));
  }
  
  void

+ 3 - 3
mozilla-release/patches/1425440-14-59a1.patch

@@ -3,7 +3,7 @@
 # Date 1515767593 -3600
 #      Fri Jan 12 15:33:13 2018 +0100
 # Node ID b3046ae63cbfbbd1ef6d0588e97f3c2a5321b0c2
-# Parent  d90bb4a1edda3f30d0297c25f7cbedcca6d1b3b3
+# Parent  4a931a811399b17df9d32f8a9a7a9b9a84a3f626
 Bug 1425440 - Get rid of GetChildAt_Deprecated in nsRange, r=catalinb
 
 diff --git a/dom/base/nsRange.cpp b/dom/base/nsRange.cpp
@@ -13,7 +13,7 @@ diff --git a/dom/base/nsRange.cpp b/dom/base/nsRange.cpp
      return false;
    }
    RefPtr<nsStyleContext> sc =
-     nsComputedDOMStyle::GetStyleContextNoFlush(aElement, nullptr);
+     nsComputedDOMStyle::GetStyleContextNoFlush(aElement, nullptr, nullptr);
    return sc && sc->StyleVisibility()->IsVisible();
  }
  
@@ -147,7 +147,7 @@ diff --git a/dom/base/nsRange.h b/dom/base/nsRange.h
 diff --git a/dom/html/nsGenericHTMLElement.cpp b/dom/html/nsGenericHTMLElement.cpp
 --- a/dom/html/nsGenericHTMLElement.cpp
 +++ b/dom/html/nsGenericHTMLElement.cpp
-@@ -3001,17 +3001,17 @@ nsGenericHTMLElement::GetInnerText(mozil
+@@ -3061,17 +3061,17 @@ nsGenericHTMLElement::GetInnerText(mozil
      // ensure the document is styled.
      if (!presShell || !presShell->DidInitialize() ||
          IsOrHasAncestorWithDisplayNone(this, presShell)) {

+ 523 - 0
mozilla-release/patches/1426353-61a1.patch

@@ -0,0 +1,523 @@
+# HG changeset patch
+# User Valentin Gosu <valentin.gosu@gmail.com>
+# Date 1520300691 -3600
+# Node ID 964191c031db7c9b50b6a4f5dad9da1eb63acb49
+# Parent  10bc967b5e6604585624333e781953cb8c64285b
+Bug 1426353 - Do not allow the parent process to consume alt-data generated in the content process. r=michal
+
+MozReview-Commit-ID: htQ28muaBI
+
+diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp
+--- a/netwerk/protocol/http/HttpBaseChannel.cpp
++++ b/netwerk/protocol/http/HttpBaseChannel.cpp
+@@ -212,16 +212,17 @@ HttpBaseChannel::HttpBaseChannel()
+   , mDecodedBodySize(0)
+   , mEncodedBodySize(0)
+   , mRequestContextID(0)
+   , mContentWindowId(0)
+   , mTopLevelOuterContentWindowId(0)
+   , mRequireCORSPreflight(false)
+   , mReportCollector(new ConsoleReportCollector())
+   , mAltDataLength(0)
++  , mAltDataForChild(false)
+   , mForceMainDocumentChannel(false)
+   , mIsTrackingResource(false)
+   , mLastRedirectFlags(0)
+   , mReqContentLength(0U)
+   , mReqContentLengthDetermined(false)
+ {
+   LOG(("Creating HttpBaseChannel @%p\n", this));
+ 
+@@ -3684,16 +3685,18 @@ HttpBaseChannel::SetupReplacementChannel
+ 
+     // Preserve Redirect mode flag.
+     rv = httpInternal->SetRedirectMode(mRedirectMode);
+     MOZ_ASSERT(NS_SUCCEEDED(rv));
+ 
+     // Preserve Integrity metadata.
+     rv = httpInternal->SetIntegrityMetadata(mIntegrityMetadata);
+     MOZ_ASSERT(NS_SUCCEEDED(rv));
++
++    httpInternal->SetAltDataForChild(mAltDataForChild);
+   }
+ 
+   // transfer application cache information
+   nsCOMPtr<nsIApplicationCacheChannel> appCacheChannel =
+     do_QueryInterface(newChannel);
+   if (appCacheChannel) {
+     appCacheChannel->SetApplicationCache(mApplicationCache);
+     appCacheChannel->SetInheritApplicationCache(mInheritApplicationCache);
+@@ -4433,16 +4436,22 @@ void
+ HttpBaseChannel::SetCorsPreflightParameters(const nsTArray<nsCString>& aUnsafeHeaders)
+ {
+   MOZ_RELEASE_ASSERT(!mRequestObserversCalled);
+ 
+   mRequireCORSPreflight = true;
+   mUnsafeHeaders = aUnsafeHeaders;
+ }
+ 
++void
++HttpBaseChannel::SetAltDataForChild(bool aIsForChild)
++{
++  mAltDataForChild = aIsForChild;
++}
++
+ NS_IMETHODIMP
+ HttpBaseChannel::GetBlockAuthPrompt(bool* aValue)
+ {
+   if (!aValue) {
+     return NS_ERROR_FAILURE;
+   }
+ 
+   *aValue = mBlockAuthPrompt;
+diff --git a/netwerk/protocol/http/HttpBaseChannel.h b/netwerk/protocol/http/HttpBaseChannel.h
+--- a/netwerk/protocol/http/HttpBaseChannel.h
++++ b/netwerk/protocol/http/HttpBaseChannel.h
+@@ -258,16 +258,17 @@ public:
+   NS_IMETHOD GetRedirectMode(uint32_t* aRedirectMode) override;
+   NS_IMETHOD SetRedirectMode(uint32_t aRedirectMode) override;
+   NS_IMETHOD GetFetchCacheMode(uint32_t* aFetchCacheMode) override;
+   NS_IMETHOD SetFetchCacheMode(uint32_t aFetchCacheMode) override;
+   NS_IMETHOD GetTopWindowURI(nsIURI **aTopWindowURI) override;
+   NS_IMETHOD SetTopWindowURIIfUnknown(nsIURI *aTopWindowURI) override;
+   NS_IMETHOD GetProxyURI(nsIURI **proxyURI) override;
+   virtual void SetCorsPreflightParameters(const nsTArray<nsCString>& unsafeHeaders) override;
++  virtual void SetAltDataForChild(bool aIsForChild) override;
+   NS_IMETHOD GetConnectionInfoHashKey(nsACString& aConnectionInfoHashKey) override;
+   NS_IMETHOD GetIntegrityMetadata(nsAString& aIntegrityMetadata) override;
+   NS_IMETHOD SetIntegrityMetadata(const nsAString& aIntegrityMetadata) override;
+   NS_IMETHOD GetLastRedirectFlags(uint32_t *aValue) override;
+   NS_IMETHOD SetLastRedirectFlags(uint32_t aValue) override;
+ 
+   inline void CleanRedirectCacheChainIfNecessary()
+   {
+@@ -699,16 +700,19 @@ protected:
+ 
+   nsCOMPtr<nsIConsoleReportCollector> mReportCollector;
+ 
+   // Holds the name of the preferred alt-data type.
+   nsCString mPreferredCachedAltDataType;
+   // Holds the name of the alternative data type the channel returned.
+   nsCString mAvailableCachedAltDataType;
+   int64_t   mAltDataLength;
++  // This flag will be true if the consumer is requesting alt-data AND the
++  // consumer is in the child process.
++  bool mAltDataForChild;
+ 
+   bool mForceMainDocumentChannel;
+   Atomic<bool, ReleaseAcquire> mIsTrackingResource;
+ 
+   uint64_t mChannelId;
+ 
+   // If this channel was created as the result of a redirect, then this value
+   // will reflect the redirect flags passed to the SetupReplacementChannel()
+diff --git a/netwerk/protocol/http/HttpChannelParent.cpp b/netwerk/protocol/http/HttpChannelParent.cpp
+--- a/netwerk/protocol/http/HttpChannelParent.cpp
++++ b/netwerk/protocol/http/HttpChannelParent.cpp
+@@ -694,18 +694,24 @@ HttpChannelParent::DoAsyncOpen(  const U
+ 
+   nsCOMPtr<nsICacheInfoChannel> cacheChannel =
+     do_QueryInterface(static_cast<nsIChannel*>(httpChannel.get()));
+   if (cacheChannel) {
+     cacheChannel->SetCacheKey(cacheKey);
+     cacheChannel->PreferAlternativeDataType(aPreferredAlternativeType);
+ 
+     cacheChannel->SetAllowStaleCacheContent(aAllowStaleCacheContent);
++
++    // This is to mark that the results are going to the content process.
++    if (httpChannelImpl) {
++      httpChannelImpl->SetAltDataForChild(true);
++    }
+   }
+ 
++
+   httpChannel->SetContentType(aContentTypeHint);
+ 
+   if (priority != nsISupportsPriority::PRIORITY_NORMAL) {
+     httpChannel->SetPriority(priority);
+   }
+   if (classOfService) {
+     httpChannel->SetClassFlags(classOfService);
+   }
+@@ -2271,17 +2277,21 @@ HttpChannelParent::NotifyDiversionFailed
+ nsresult
+ HttpChannelParent::OpenAlternativeOutputStream(const nsACString & type, nsIOutputStream * *_retval)
+ {
+   // We need to make sure the child does not call SendDocumentChannelCleanup()
+   // before opening the altOutputStream, because that clears mCacheEntry.
+   if (!mCacheEntry) {
+     return NS_ERROR_NOT_AVAILABLE;
+   }
+-  return mCacheEntry->OpenAlternativeOutputStream(type, _retval);
++  nsresult rv = mCacheEntry->OpenAlternativeOutputStream(type, _retval);
++  if (NS_SUCCEEDED(rv)) {
++    mCacheEntry->SetMetaDataElement("alt-data-from-child", "1");
++  }
++  return rv;
+ }
+ 
+ NS_IMETHODIMP
+ HttpChannelParent::GetAuthPrompt(uint32_t aPromptReason, const nsIID& iid,
+                                  void** aResult)
+ {
+   nsCOMPtr<nsIAuthPrompt2> prompt =
+     new NeckoParent::NestedFrameAuthPrompt(Manager(), mNestedFrameId);
+diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp
+--- a/netwerk/protocol/http/nsHttpChannel.cpp
++++ b/netwerk/protocol/http/nsHttpChannel.cpp
+@@ -4783,17 +4783,26 @@ nsHttpChannel::OpenCacheInputStream(nsIC
+     }
+ 
+     // Open an input stream for the entity, so that the call to OpenInputStream
+     // happens off the main thread.
+     nsCOMPtr<nsIInputStream> stream;
+ 
+     // If an alternate representation was requested, try to open the alt
+     // input stream.
+-    if (!mPreferredCachedAltDataType.IsEmpty()) {
++    // If the entry has a "is-from-child" metadata, then only open the altdata stream if the consumer is also from child.
++    bool altDataFromChild = false;
++    {
++        nsCString value;
++        rv = cacheEntry->GetMetaDataElement("alt-data-from-child",
++                                            getter_Copies(value));
++        altDataFromChild = !value.IsEmpty();
++    }
++
++    if (!mPreferredCachedAltDataType.IsEmpty() && (altDataFromChild == mAltDataForChild)) {
+         rv = cacheEntry->OpenAlternativeInputStream(mPreferredCachedAltDataType,
+                                                     getter_AddRefs(stream));
+         if (NS_SUCCEEDED(rv)) {
+             // We have succeeded.
+             mAvailableCachedAltDataType = mPreferredCachedAltDataType;
+             // Set the correct data size on the channel.
+             int64_t altDataSize;
+             if (NS_SUCCEEDED(cacheEntry->GetAltDataSize(&altDataSize))) {
+@@ -7869,17 +7878,23 @@ NS_IMETHODIMP
+ nsHttpChannel::OpenAlternativeOutputStream(const nsACString & type, nsIOutputStream * *_retval)
+ {
+     // OnStopRequest will clear mCacheEntry, but we may use mAltDataCacheEntry
+     // if the consumer called PreferAlternativeDataType()
+     nsCOMPtr<nsICacheEntry> cacheEntry = mCacheEntry ? mCacheEntry : mAltDataCacheEntry;
+     if (!cacheEntry) {
+         return NS_ERROR_NOT_AVAILABLE;
+     }
+-    return cacheEntry->OpenAlternativeOutputStream(type, _retval);
++    nsresult rv = cacheEntry->OpenAlternativeOutputStream(type, _retval);
++    if (NS_SUCCEEDED(rv)) {
++        // Clear this metadata flag in case it exists.
++        // The caller of this method may set it again.
++        cacheEntry->SetMetaDataElement("alt-data-from-child", nullptr);
++    }
++    return rv;
+ }
+ 
+ //-----------------------------------------------------------------------------
+ // nsHttpChannel::nsICachingChannel
+ //-----------------------------------------------------------------------------
+ 
+ NS_IMETHODIMP
+ nsHttpChannel::GetCacheToken(nsISupports **token)
+diff --git a/netwerk/protocol/http/nsIHttpChannelInternal.idl b/netwerk/protocol/http/nsIHttpChannelInternal.idl
+--- a/netwerk/protocol/http/nsIHttpChannelInternal.idl
++++ b/netwerk/protocol/http/nsIHttpChannelInternal.idl
+@@ -297,16 +297,19 @@ interface nsIHttpChannelInternal : nsISu
+ 
+     /**
+      * Make cross-origin CORS loads happen with a CORS preflight, and specify
+      * the CORS preflight parameters.
+      */
+     [noscript, notxpcom, nostdcall]
+     void setCorsPreflightParameters(in StringArrayRef unsafeHeaders);
+ 
++    [noscript, notxpcom, nostdcall]
++    void setAltDataForChild(in boolean aIsForChild);
++
+     /**
+      * When set to true, the channel will not pop any authentication prompts up
+      * to the user.  When provided or cached credentials lead to an
+      * authentication failure, that failure will be propagated to the channel
+      * listener.  Must be called before opening the channel, otherwise throws.
+      */
+     [infallible]
+     attribute boolean blockAuthPrompt;
+diff --git a/netwerk/protocol/viewsource/nsViewSourceChannel.cpp b/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
+--- a/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
++++ b/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
+@@ -1114,16 +1114,22 @@ nsViewSourceChannel::SetIsMainDocumentCh
+ 
+ // Have to manually forward SetCorsPreflightParameters since it's [notxpcom]
+ void
+ nsViewSourceChannel::SetCorsPreflightParameters(const nsTArray<nsCString>& aUnsafeHeaders)
+ {
+   mHttpChannelInternal->SetCorsPreflightParameters(aUnsafeHeaders);
+ }
+ 
++void
++nsViewSourceChannel::SetAltDataForChild(bool aIsForChild)
++{
++    mHttpChannelInternal->SetAltDataForChild(aIsForChild);
++}
++
+ NS_IMETHODIMP
+ nsViewSourceChannel::LogBlockedCORSRequest(const nsAString& aMessage)
+ {
+   if (!mHttpChannel) {
+     NS_WARNING("nsViewSourceChannel::LogBlockedCORSRequest mHttpChannel is null");
+     return NS_ERROR_UNEXPECTED;
+   }
+   return mHttpChannel->LogBlockedCORSRequest(aMessage);
+diff --git a/netwerk/test/unit/test_alt-data_simple.js b/netwerk/test/unit/test_alt-data_cross_process.js
+copy from netwerk/test/unit/test_alt-data_simple.js
+copy to netwerk/test/unit/test_alt-data_cross_process.js
+--- a/netwerk/test/unit/test_alt-data_simple.js
++++ b/netwerk/test/unit/test_alt-data_cross_process.js
+@@ -67,28 +67,22 @@ function check_has_alt_data_in_index(aHa
+   }
+   var hasAltData = {};
+   cache_storage.getCacheIndexEntryAttrs(createURI(URL), "", hasAltData, {});
+   Assert.equal(hasAltData.value, aHasAltData);
+ }
+ 
+ function run_test()
+ {
+-  do_get_profile();
+   httpServer = new HttpServer();
+   httpServer.registerPathHandler("/content", contentHandler);
+   httpServer.start(-1);
+   do_test_pending();
+ 
+-  if (!inChildProcess()) {
+-    cache_storage = getCacheStorage("disk") ;
+-    wait_for_cache_index(asyncOpen);
+-  } else {
+-    asyncOpen();
+-  }
++  asyncOpen();
+ }
+ 
+ function asyncOpen()
+ {
+   var chan = make_channel(URL);
+ 
+   var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
+   cc.preferAlternativeDataType(altContentType);
+@@ -108,34 +102,24 @@ function readServerContent(request, buff
+     var os = cc.openAlternativeOutputStream(altContentType);
+     os.write(altContent, altContent.length);
+     os.close();
+ 
+     executeSoon(flushAndOpenAltChannel);
+   });
+ }
+ 
+-// needs to be rooted
+-var cacheFlushObserver = cacheFlushObserver = { observe: function() {
+-  cacheFlushObserver = null;
+-  openAltChannel();
+-}};
+-
+ function flushAndOpenAltChannel()
+ {
+   // We need to do a GC pass to ensure the cache entry has been freed.
+   gc();
+-  if (!inChildProcess()) {
+-    Services.cache2.QueryInterface(Ci.nsICacheTesting).flush(cacheFlushObserver);
+-  } else {
+-    do_send_remote_message('flush');
+-    do_await_remote_message('flushed').then(() => {
+-      openAltChannel();
+-    });
+-  }
++  do_send_remote_message('flush');
++  do_await_remote_message('flushed').then(() => {
++    openAltChannel();
++  });
+ }
+ 
+ function openAltChannel() {
+   var chan = make_channel(URL);
+   var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
+   cc.preferAlternativeDataType(altContentType);
+ 
+   chan.asyncOpen2(new ChannelListener(readAltContent, null));
+@@ -143,33 +127,15 @@ function openAltChannel() {
+ 
+ function readAltContent(request, buffer)
+ {
+   var cc = request.QueryInterface(Ci.nsICacheInfoChannel);
+ 
+   Assert.equal(servedNotModified, true);
+   Assert.equal(cc.alternativeDataType, altContentType);
+   Assert.equal(buffer, altContent);
+-  check_has_alt_data_in_index(true);
+ 
+-  requestAgain();
+-}
+-
+-function requestAgain()
+-{
+-  shouldPassRevalidation = false;
+-  var chan = make_channel(URL);
+-  var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
+-  cc.preferAlternativeDataType(altContentType);
+-  chan.asyncOpen2(new ChannelListener(readEmptyAltContent, null));
++  // FINISH
++  do_send_remote_message('done');
++  do_await_remote_message('finish').then(() => {
++    httpServer.stop(do_test_finished);
++  });
+ }
+-
+-function readEmptyAltContent(request, buffer)
+-{
+-  var cc = request.QueryInterface(Ci.nsICacheInfoChannel);
+-
+-  // the cache is overwrite and the alt-data is reset
+-  Assert.equal(cc.alternativeDataType, "");
+-  Assert.equal(buffer, responseContent2);
+-  check_has_alt_data_in_index(false);
+-
+-  httpServer.stop(do_test_finished);
+-}
+diff --git a/netwerk/test/unit/xpcshell.ini b/netwerk/test/unit/xpcshell.ini
+--- a/netwerk/test/unit/xpcshell.ini
++++ b/netwerk/test/unit/xpcshell.ini
+@@ -15,16 +15,17 @@ support-files =
+   data/test_readline6.txt
+   data/test_readline7.txt
+   data/test_readline8.txt
+   data/signed_win.exe
+   socks_client_subprocess.js
+   test_link.desktop
+   test_link.url
+   ../../dns/effective_tld_names.dat
++  test_alt-data_cross_process.js
+ 
+ [test_network_activity.js]
+ [test_nsIBufferedOutputStream_writeFrom_block.js]
+ [test_cache2-00-service-get.js]
+ [test_cache2-01-basic.js]
+ [test_cache2-01a-basic-readonly.js]
+ [test_cache2-01b-basic-datasize.js]
+ [test_cache2-01c-basic-hasmeta-only.js]
+diff --git a/netwerk/test/unit_ipc/test_alt-data_simple_wrap.js b/netwerk/test/unit_ipc/test_alt-data_cross_process_wrap.js
+copy from netwerk/test/unit_ipc/test_alt-data_simple_wrap.js
+copy to netwerk/test/unit_ipc/test_alt-data_cross_process_wrap.js
+--- a/netwerk/test/unit_ipc/test_alt-data_simple_wrap.js
++++ b/netwerk/test/unit_ipc/test_alt-data_cross_process_wrap.js
+@@ -1,15 +1,81 @@
+ ChromeUtils.import("resource://gre/modules/Services.jsm");
++ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
+ 
+ // needs to be rooted
+ var cacheFlushObserver = { observe: function() {
+   cacheFlushObserver = null;
+   do_send_remote_message('flushed');
+ }};
+ 
++// We get this from the child a bit later
++var URL = null;
++
++// needs to be rooted
++var cacheFlushObserver2 = { observe: function() {
++  cacheFlushObserver2 = null;
++  openAltChannel();
++}};
++
+ function run_test() {
+   do_get_profile();
+   do_await_remote_message('flush').then(() => {
+     Services.cache2.QueryInterface(Ci.nsICacheTesting).flush(cacheFlushObserver);
+   });
+-  run_test_in_child("../unit/test_alt-data_simple.js");
++
++  do_await_remote_message('done').then(() => { sendCommand("URL;", load_channel); });
++
++  run_test_in_child("../unit/test_alt-data_cross_process.js");
++}
++
++function load_channel(url) {
++  ok(url);
++  URL = url; // save this to open the alt data channel later
++  var chan = make_channel(url);
++  var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
++  cc.preferAlternativeDataType("text/binary");
++  chan.asyncOpen2(new ChannelListener(readTextData, null));
++}
++
++function make_channel(url, callback, ctx) {
++  return NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true});
+ }
++
++function readTextData(request, buffer)
++{
++  var cc = request.QueryInterface(Ci.nsICacheInfoChannel);
++  // Since we are in a different process from what that generated the alt-data,
++  // we should receive the original data, not processed content.
++  Assert.equal(cc.alternativeDataType, "");
++  Assert.equal(buffer, "response body");
++
++  // Now let's generate some alt-data in the parent, and make sure we can get it
++  var altContent = "altContentParentGenerated";
++  executeSoon(() => {
++    var os = cc.openAlternativeOutputStream("text/parent-binary");
++    os.write(altContent, altContent.length);
++    os.close();
++
++    executeSoon(() => {
++      Services.cache2.QueryInterface(Ci.nsICacheTesting).flush(cacheFlushObserver2);
++    });
++  });
++}
++
++function openAltChannel() {
++  var chan = make_channel(URL);
++  var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
++  cc.preferAlternativeDataType("text/parent-binary");
++  chan.asyncOpen2(new ChannelListener(readAltData, null));
++}
++
++function readAltData(request, buffer)
++{
++  var cc = request.QueryInterface(Ci.nsICacheInfoChannel);
++
++  // This was generated in the parent, so it's OK to get it.
++  Assert.equal(buffer, "altContentParentGenerated");
++  Assert.equal(cc.alternativeDataType, "text/parent-binary");
++
++  // FINISH
++  do_send_remote_message('finish');
++}
+diff --git a/netwerk/test/unit_ipc/xpcshell.ini b/netwerk/test/unit_ipc/xpcshell.ini
+--- a/netwerk/test/unit_ipc/xpcshell.ini
++++ b/netwerk/test/unit_ipc/xpcshell.ini
+@@ -54,16 +54,17 @@ support-files =
+   !/netwerk/test/unit/data/test_readline7.txt
+   !/netwerk/test/unit/data/test_readline8.txt
+   !/netwerk/test/unit/data/signed_win.exe
+   !/netwerk/test/unit/test_alt-data_simple.js
+   !/netwerk/test/unit/test_alt-data_stream.js
+   !/netwerk/test/unit/test_channel_priority.js
+   !/netwerk/test/unit/test_multipart_streamconv.js
+   !/netwerk/test/unit/test_original_sent_received_head.js
++  !/netwerk/test/unit/test_alt-data_cross_process.js
+ 
+ [test_bug528292_wrap.js]
+ [test_bug248970_cookie_wrap.js]
+ [test_cacheflags_wrap.js]
+ [test_cache-entry-id_wrap.js]
+ [test_cache_jar_wrap.js]
+ [test_channel_close_wrap.js]
+ [test_cookie_header_wrap.js]
+@@ -101,8 +102,9 @@ skip-if = true
+ [test_alt-data_simple_wrap.js]
+ [test_alt-data_stream_wrap.js]
+ [test_original_sent_received_head_wrap.js]
+ [test_channel_id.js]
+ [test_trackingProtection_annotateChannels_wrap1.js]
+ [test_trackingProtection_annotateChannels_wrap2.js]
+ [test_channel_priority_wrap.js]
+ [test_multipart_streamconv_wrap.js]
++[test_alt-data_cross_process_wrap.js]
+

+ 3 - 3
mozilla-release/patches/1426566-3-PARTIAL-59a1.patch

@@ -2,7 +2,7 @@
 # User Gregory Szorc <gps@mozilla.com>
 # Date 1515526964 28800
 # Node ID 9e220db2bf10f0e3b4e3343f8cbced57c98e8a43
-# Parent  0e238912ee4569b05184cdc6f6248505a15e1b28
+# Parent  c2aea2aa5b371433de73908bb34bdf32e14340e1
 Bug 1426566 - Remove --enable-profiling from nightly mozconfigs; r=froydnj
 
 moz.configure automatically enables profiling if the milestone is
@@ -62,7 +62,7 @@ diff --git a/browser/config/mozconfigs/whitelist b/browser/config/mozconfigs/whi
      'nightly': {},
      }
  
- all_platforms = ['win64', 'win64-aarch64', 'win32', 'linux32', 'linux64', 'macosx64']
+ all_platforms = ['win64', 'win32', 'linux32', 'linux64', 'macosx64']
  
  for platform in all_platforms:
      whitelist['nightly'][platform] = [
@@ -75,7 +75,7 @@ diff --git a/browser/config/mozconfigs/whitelist b/browser/config/mozconfigs/whi
      'ac_add_options --enable-instruments',
      'ac_add_options --enable-dtrace',
      'if test `uname -s` != Linux; then',
-     'fi',
+ ]
 diff --git a/browser/config/mozconfigs/win32/nightly b/browser/config/mozconfigs/win32/nightly
 --- a/browser/config/mozconfigs/win32/nightly
 +++ b/browser/config/mozconfigs/win32/nightly

+ 118 - 0
mozilla-release/patches/1426989-59a1.patch

@@ -0,0 +1,118 @@
+# HG changeset patch
+# User Masatoshi Kimura <VYV03354@nifty.ne.jp>
+# Date 1514101164 -32400
+# Node ID 06d4983f64feb093c676943db31584b3febb4fc6
+# Parent  786c0c3f6975d73397a7a596939ddc92046a057f
+Bug 1426989 - Fix NS_strncmp. r=erahm
+
+diff --git a/xpcom/base/nsCRTGlue.cpp b/xpcom/base/nsCRTGlue.cpp
+--- a/xpcom/base/nsCRTGlue.cpp
++++ b/xpcom/base/nsCRTGlue.cpp
+@@ -112,17 +112,17 @@ NS_strncmp(const char16_t* aStrA, const 
+       return r;
+     }
+ 
+     ++aStrA;
+     ++aStrB;
+     --aLen;
+   }
+ 
+-  return aLen ? *aStrA != '\0' : *aStrA - *aStrB;
++  return aLen ? *aStrA != '\0' : 0;
+ }
+ 
+ char16_t*
+ NS_strdup(const char16_t* aString)
+ {
+   uint32_t len = NS_strlen(aString);
+   return NS_strndup(aString, len);
+ }
+diff --git a/xpcom/tests/gtest/TestCRT.cpp b/xpcom/tests/gtest/TestCRT.cpp
+--- a/xpcom/tests/gtest/TestCRT.cpp
++++ b/xpcom/tests/gtest/TestCRT.cpp
+@@ -25,41 +25,55 @@ int sign(int val) {
+     }
+   }
+ }
+ 
+ 
+ // Verify that nsCRT versions of string comparison routines get the
+ // same answers as the native non-unicode versions. We only pass in
+ // iso-latin-1 strings, so the comparison must be valid.
+-static void Check(const char* s1, const char* s2, int n)
++static void Check(const char* s1, const char* s2, size_t n)
+ {
++  bool longerThanN = strlen(s1) > n || strlen(s2) > n;
++
+   int clib = PL_strcmp(s1, s2);
++  int clib_n = PL_strncmp(s1, s2, n);
+ 
+-  int clib_n = PL_strncmp(s1, s2, n);
++  if (!longerThanN) {
++    EXPECT_EQ(sign(clib), sign(clib_n));
++  }
+ 
+   nsAutoString t1,t2;
+   CopyASCIItoUTF16(s1, t1);
+   CopyASCIItoUTF16(s2, t2);
+   const char16_t* us1 = t1.get();
+   const char16_t* us2 = t2.get();
+ 
+-  int u2 = nsCRT::strcmp(us1, us2);
++  int u2, u2_n;
++  // nsCRT::strncmp will cause buffer overrun
++  // if the string buffer is shorter than |n|.
++  if (!longerThanN) {
++    u2 = nsCRT::strcmp(us1, us2);
++    u2_n = nsCRT::strncmp(us1, us2, n);
+ 
+-  int u2_n = nsCRT::strncmp(us1, us2, n);
++    EXPECT_EQ(sign(clib), sign(u2));
++    EXPECT_EQ(sign(clib_n), sign(u2_n));
++  }
++
++  u2 = NS_strcmp(us1, us2);
++  u2_n = NS_strncmp(us1, us2, n);
+ 
+   EXPECT_EQ(sign(clib), sign(u2));
+-  EXPECT_EQ(sign(clib), sign(u2_n));
+-  EXPECT_EQ(sign(clib), sign(clib_n));
++  EXPECT_EQ(sign(clib_n), sign(u2_n));
+ }
+ 
+ struct Test {
+   const char* s1;
+   const char* s2;
+-  int n;
++  size_t n;
+ };
+ 
+ static Test tests[] = {
+   { "foo", "foo", 3 },
+   { "foo", "fo", 3 },
+ 
+   { "foo", "bar", 3 },
+   { "foo", "ba", 3 },
+@@ -67,16 +81,21 @@ static Test tests[] = {
+   { "foo", "zap", 3 },
+   { "foo", "za", 3 },
+ 
+   { "bar", "foo", 3 },
+   { "bar", "fo", 3 },
+ 
+   { "bar", "foo", 3 },
+   { "bar", "fo", 3 },
++
++  { "foo", "foobar", 3 },
++  { "foobar", "foo", 3 },
++  { "foobar", "foozap", 3 },
++  { "foozap", "foobar", 3 },
+ };
+ #define NUM_TESTS int((sizeof(tests) / sizeof(tests[0])))
+ 
+ TEST(CRT, main)
+ {
+   TestCRT::Test* tp = tests;
+   for (int i = 0; i < NUM_TESTS; i++, tp++) {
+     Check(tp->s1, tp->s2, tp->n);
+

+ 396 - 0
mozilla-release/patches/1427023-59a1.patch

@@ -0,0 +1,396 @@
+# HG changeset patch
+# User Masatoshi Kimura <VYV03354@nifty.ne.jp>
+# Date 1515509377 -32400
+# Node ID 077e64a34f6b99495167267619e53e60c403e4b1
+# Parent  96bf3e9c91bf32b54cc6b5378eddbad521bc9e17
+Bug 1427023 - Remove nsCRT::strncmp. r=erahm
+
+diff --git a/dom/base/nsPlainTextSerializer.cpp b/dom/base/nsPlainTextSerializer.cpp
+--- a/dom/base/nsPlainTextSerializer.cpp
++++ b/dom/base/nsPlainTextSerializer.cpp
+@@ -1248,17 +1248,17 @@ nsPlainTextSerializer::Output(nsString& 
+   }
+   mOutputString->Append(aString);
+ }
+ 
+ static bool
+ IsSpaceStuffable(const char16_t *s)
+ {
+   if (s[0] == '>' || s[0] == ' ' || s[0] == kNBSP ||
+-      nsCRT::strncmp(s, u"From ", 5) == 0)
++      NS_strncmp(s, u"From ", 5) == 0)
+     return true;
+   else
+     return false;
+ }
+ 
+ /**
+  * This function adds a piece of text to the current stored line. If we are
+  * wrapping text and the stored line will become too long, a suitable
+diff --git a/image/imgLoader.cpp b/image/imgLoader.cpp
+--- a/image/imgLoader.cpp
++++ b/image/imgLoader.cpp
+@@ -2715,18 +2715,18 @@ imgLoader::GetMIMETypeFromContent(nsIReq
+ 
+ /* static */
+ nsresult
+ imgLoader::GetMimeTypeFromContent(const char* aContents,
+                                   uint32_t aLength,
+                                   nsACString& aContentType)
+ {
+   /* Is it a GIF? */
+-  if (aLength >= 6 && (!nsCRT::strncmp(aContents, "GIF87a", 6) ||
+-                       !nsCRT::strncmp(aContents, "GIF89a", 6))) {
++  if (aLength >= 6 && (!strncmp(aContents, "GIF87a", 6) ||
++                       !strncmp(aContents, "GIF89a", 6))) {
+     aContentType.AssignLiteral(IMAGE_GIF);
+ 
+   /* or a PNG? */
+   } else if (aLength >= 8 && ((unsigned char)aContents[0]==0x89 &&
+                               (unsigned char)aContents[1]==0x50 &&
+                               (unsigned char)aContents[2]==0x4E &&
+                               (unsigned char)aContents[3]==0x47 &&
+                               (unsigned char)aContents[4]==0x0D &&
+@@ -2753,17 +2753,17 @@ imgLoader::GetMimeTypeFromContent(const 
+    * Minor version offset 3. Offset 4 must be nullptr.
+    */
+   } else if (aLength >= 5 &&
+              ((unsigned char) aContents[0])==0x4a &&
+              ((unsigned char) aContents[1])==0x47 &&
+              ((unsigned char) aContents[4])==0x00 ) {
+     aContentType.AssignLiteral(IMAGE_ART);
+ 
+-  } else if (aLength >= 2 && !nsCRT::strncmp(aContents, "BM", 2)) {
++  } else if (aLength >= 2 && !strncmp(aContents, "BM", 2)) {
+     aContentType.AssignLiteral(IMAGE_BMP);
+ 
+   // ICOs always begin with a 2-byte 0 followed by a 2-byte 1.
+   // CURs begin with 2-byte 0 followed by 2-byte 2.
+   } else if (aLength >= 4 && (!memcmp(aContents, "\000\000\001\000", 4) ||
+                               !memcmp(aContents, "\000\000\002\000", 4))) {
+     aContentType.AssignLiteral(IMAGE_ICO);
+ 
+diff --git a/layout/style/nsStyleUtil.h b/layout/style/nsStyleUtil.h
+--- a/layout/style/nsStyleUtil.h
++++ b/layout/style/nsStyleUtil.h
+@@ -211,17 +211,17 @@ public:
+                                    uint32_t aLineNumber,
+                                    const nsAString& aStyleText,
+                                    nsresult* aRv);
+ 
+   template<size_t N>
+   static bool MatchesLanguagePrefix(const char16_t* aLang, size_t aLen,
+                                     const char16_t (&aPrefix)[N])
+   {
+-    return !nsCRT::strncmp(aLang, aPrefix, N - 1) &&
++    return !NS_strncmp(aLang, aPrefix, N - 1) &&
+            (aLen == N - 1 || aLang[N - 1] == '-');
+   }
+ 
+   template<size_t N>
+   static bool MatchesLanguagePrefix(const nsIAtom* aLang,
+                                     const char16_t (&aPrefix)[N])
+   {
+     MOZ_ASSERT(aLang);
+diff --git a/netwerk/base/nsStandardURL.cpp b/netwerk/base/nsStandardURL.cpp
+--- a/netwerk/base/nsStandardURL.cpp
++++ b/netwerk/base/nsStandardURL.cpp
+@@ -2517,18 +2517,17 @@ nsStandardURL::Resolve(const nsACString 
+                                         | NET_COALESCE_DOUBLE_SLASH_IS_ROOT);
+ 
+         }
+         // this URL appears to be absolute
+         // but try to find out more
+         if (SegmentIs(mScheme, relpath, scheme, true)) {
+             // mScheme and Scheme are the same
+             // but this can still be relative
+-            if (nsCRT::strncmp(relpath + scheme.mPos + scheme.mLen,
+-                               "://",3) == 0) {
++            if (strncmp(relpath + scheme.mPos + scheme.mLen, "://", 3) == 0) {
+                 // now this is really absolute
+                 // because a :// follows the scheme
+                 result = NS_strdup(relpath);
+             } else {
+                 // This is a deprecated form of relative urls like
+                 // http:file or http:/path/file
+                 // we will support it for now ...
+                 relative = true;
+diff --git a/netwerk/base/nsURLHelper.cpp b/netwerk/base/nsURLHelper.cpp
+--- a/netwerk/base/nsURLHelper.cpp
++++ b/netwerk/base/nsURLHelper.cpp
+@@ -249,17 +249,17 @@ net_CoalesceDirs(netCoalesceFlags flags,
+     if (flags & NET_COALESCE_DOUBLE_SLASH_IS_ROOT)
+     {
+        /* some schemes (for example ftp) have the speciality that
+           the path can begin // or /%2F to mark the root of the
+           servers filesystem, a simple / only marks the root relative
+           to the user loging in. We remember the length of the marker */
+         if (nsCRT::strncasecmp(path,"/%2F",4) == 0)
+             special_ftp_len = 4;
+-        else if (nsCRT::strncmp(path,"//",2) == 0 )
++        else if (strncmp(path, "//", 2) == 0 )
+             special_ftp_len = 2;
+     }
+ 
+     /* find the last slash before # or ? */
+     for(; (*fwdPtr != '\0') &&
+             (*fwdPtr != '?') &&
+             (*fwdPtr != '#'); ++fwdPtr)
+     {
+diff --git a/netwerk/cache/nsMemoryCacheDevice.cpp b/netwerk/cache/nsMemoryCacheDevice.cpp
+--- a/netwerk/cache/nsMemoryCacheDevice.cpp
++++ b/netwerk/cache/nsMemoryCacheDevice.cpp
+@@ -456,17 +456,17 @@ struct ClientIDArgs {
+ };
+ 
+ static bool
+ EntryMatchesClientID(nsCacheEntry* entry, void* args)
+ {
+     const char * clientID = static_cast<ClientIDArgs*>(args)->clientID;
+     uint32_t prefixLength = static_cast<ClientIDArgs*>(args)->prefixLength;
+     const char * key = entry->Key()->get();
+-    return !clientID || nsCRT::strncmp(clientID, key, prefixLength) == 0;
++    return !clientID || strncmp(clientID, key, prefixLength) == 0;
+ }
+ 
+ nsresult
+ nsMemoryCacheDevice::DoEvictEntries(bool (*matchFn)(nsCacheEntry* entry, void* args), void* args)
+ {
+     nsCacheEntry * entry;
+ 
+     for (int i = kQueueCount - 1; i >= 0; --i) {
+diff --git a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
+--- a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
++++ b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
+@@ -111,32 +111,32 @@ mozTXTToHTMLConv::UnescapeStr(const char
+ {
+   const char16_t * subString = nullptr;
+   for (uint32_t i = aStartPos; int32_t(i) - aStartPos < aLength;)
+   {
+     int32_t remainingChars = i - aStartPos;
+     if (aInString[i] == '&')
+     {
+       subString = &aInString[i];
+-      if (!nsCRT::strncmp(subString, u"&lt;", std::min(4, aLength - remainingChars)))
++      if (!NS_strncmp(subString, u"&lt;", std::min(4, aLength - remainingChars)))
+       {
+         aOutString.Append(char16_t('<'));
+         i += 4;
+       }
+-      else if (!nsCRT::strncmp(subString, u"&gt;", std::min(4, aLength - remainingChars)))
++      else if (!NS_strncmp(subString, u"&gt;", std::min(4, aLength - remainingChars)))
+       {
+         aOutString.Append(char16_t('>'));
+         i += 4;
+       }
+-      else if (!nsCRT::strncmp(subString, u"&amp;", std::min(5, aLength - remainingChars)))
++      else if (!NS_strncmp(subString, u"&amp;", std::min(5, aLength - remainingChars)))
+       {
+         aOutString.Append(char16_t('&'));
+         i += 5;
+       }
+-      else if (!nsCRT::strncmp(subString, u"&quot;", std::min(6, aLength - remainingChars)))
++      else if (!NS_strncmp(subString, u"&quot;", std::min(6, aLength - remainingChars)))
+       {
+         aOutString.Append(char16_t('"'));
+         i += 6;
+       }
+       else
+       {
+         aOutString += aInString[i];
+         i++;
+@@ -189,17 +189,17 @@ bool
+ mozTXTToHTMLConv::FindURLStart(const char16_t * aInString, int32_t aInLength,
+                                const uint32_t pos, const modetype check,
+                                uint32_t& start)
+ {
+   switch(check)
+   { // no breaks, because end of blocks is never reached
+   case RFC1738:
+   {
+-    if (!nsCRT::strncmp(&aInString[std::max(int32_t(pos - 4), 0)], u"<URL:", 5))
++    if (!NS_strncmp(&aInString[std::max(int32_t(pos - 4), 0)], u"<URL:", 5))
+     {
+       start = pos + 1;
+       return true;
+     }
+     else
+       return false;
+   }
+   case RFC2396E:
+diff --git a/xpcom/ds/nsCRT.cpp b/xpcom/ds/nsCRT.cpp
+--- a/xpcom/ds/nsCRT.cpp
++++ b/xpcom/ds/nsCRT.cpp
+@@ -106,45 +106,16 @@ nsCRT::strcmp(const char16_t* aStr1, con
+     }
+     if (aStr2) {  // aStr1 must have been null
+       return 1;
+     }
+   }
+   return 0;
+ }
+ 
+-/**
+- * Compare unichar string ptrs, stopping at the 1st null or nth char.
+- * NOTE: If either is null, we return 0.
+- * NOTE: We DO NOT terminate the search upon encountering nullptr's before N
+- *
+- * @update  gess 11/10/99
+- * @param   s1 and s2 both point to unichar strings
+- * @return  0 if they match, -1 if s1<s2; 1 if s1>s2
+- */
+-int32_t
+-nsCRT::strncmp(const char16_t* aStr1, const char16_t* aStr2, uint32_t aNum)
+-{
+-  if (aStr1 && aStr2) {
+-    if (aNum != 0) {
+-      do {
+-        char16_t c1 = *aStr1++;
+-        char16_t c2 = *aStr2++;
+-        if (c1 != c2) {
+-          if (c1 < c2) {
+-            return -1;
+-          }
+-          return 1;
+-        }
+-      } while (--aNum != 0);
+-    }
+-  }
+-  return 0;
+-}
+-
+ const char*
+ nsCRT::memmem(const char* aHaystack, uint32_t aHaystackLen,
+               const char* aNeedle, uint32_t aNeedleLen)
+ {
+   // Sanity checking
+   if (!(aHaystack && aNeedle && aHaystackLen && aNeedleLen &&
+         aNeedleLen <= aHaystackLen)) {
+     return nullptr;
+diff --git a/xpcom/ds/nsCRT.h b/xpcom/ds/nsCRT.h
+--- a/xpcom/ds/nsCRT.h
++++ b/xpcom/ds/nsCRT.h
+@@ -37,22 +37,16 @@ public:
+   };
+ 
+   /// String comparison.
+   static int32_t strcmp(const char* aStr1, const char* aStr2)
+   {
+     return int32_t(PL_strcmp(aStr1, aStr2));
+   }
+ 
+-  static int32_t strncmp(const char* aStr1, const char* aStr2,
+-                         uint32_t aMaxLen)
+-  {
+-    return int32_t(PL_strncmp(aStr1, aStr2, aMaxLen));
+-  }
+-
+   /// Case-insensitive string comparison.
+   static int32_t strcasecmp(const char* aStr1, const char* aStr2)
+   {
+     return int32_t(PL_strcasecmp(aStr1, aStr2));
+   }
+ 
+   /// Case-insensitive string comparison with length
+   static int32_t strncasecmp(const char* aStr1, const char* aStr2,
+@@ -62,27 +56,16 @@ public:
+     //Egads. PL_strncasecmp is returning *very* negative numbers.
+     //Some folks expect -1,0,1, so let's temper its enthusiasm.
+     if (result < 0) {
+       result = -1;
+     }
+     return result;
+   }
+ 
+-  static int32_t strncmp(const char* aStr1, const char* aStr2, int32_t aMaxLen)
+-  {
+-    // inline the first test (assumes strings are not null):
+-    int32_t diff =
+-      ((const unsigned char*)aStr1)[0] - ((const unsigned char*)aStr2)[0];
+-    if (diff != 0) {
+-      return diff;
+-    }
+-    return int32_t(PL_strncmp(aStr1, aStr2, unsigned(aMaxLen)));
+-  }
+-
+   /**
+ 
+     How to use this fancy (thread-safe) version of strtok:
+ 
+     void main(void) {
+       printf("%s\n\nTokens:\n", string);
+       // Establish string and get the first token:
+       char* newStr;
+@@ -96,19 +79,16 @@ public:
+     }
+     * WARNING - STRTOK WHACKS str THE FIRST TIME IT IS CALLED *
+     * MAKE A COPY OF str IF YOU NEED TO USE IT AFTER strtok() *
+   */
+   static char* strtok(char* aStr, const char* aDelims, char** aNewStr);
+ 
+   /// Like strcmp except for ucs2 strings
+   static int32_t strcmp(const char16_t* aStr1, const char16_t* aStr2);
+-  /// Like strcmp except for ucs2 strings
+-  static int32_t strncmp(const char16_t* aStr1, const char16_t* aStr2,
+-                         uint32_t aMaxLen);
+ 
+   // The GNU libc has memmem, which is strstr except for binary data
+   // This is our own implementation that uses memmem on platforms
+   // where it's available.
+   static const char* memmem(const char* aHaystack, uint32_t aHaystackLen,
+                             const char* aNeedle, uint32_t aNeedleLen);
+ 
+   // String to longlong
+diff --git a/xpcom/io/nsPipe3.cpp b/xpcom/io/nsPipe3.cpp
+--- a/xpcom/io/nsPipe3.cpp
++++ b/xpcom/io/nsPipe3.cpp
+@@ -1547,17 +1547,17 @@ nsPipeInputStream::SetEOF()
+   NS_NOTREACHED("nsPipeInputStream::SetEOF");
+   return NS_ERROR_NOT_IMPLEMENTED;
+ }
+ 
+ static bool strings_equal(bool aIgnoreCase,
+                           const char* aS1, const char* aS2, uint32_t aLen)
+ {
+   return aIgnoreCase
+-    ? !nsCRT::strncasecmp(aS1, aS2, aLen) : !nsCRT::strncmp(aS1, aS2, aLen);
++    ? !nsCRT::strncasecmp(aS1, aS2, aLen) : !strncmp(aS1, aS2, aLen);
+ }
+ 
+ NS_IMETHODIMP
+ nsPipeInputStream::Search(const char* aForString,
+                           bool aIgnoreCase,
+                           bool* aFound,
+                           uint32_t* aOffsetSearchedTo)
+ {
+diff --git a/xpcom/tests/gtest/TestCRT.cpp b/xpcom/tests/gtest/TestCRT.cpp
+--- a/xpcom/tests/gtest/TestCRT.cpp
++++ b/xpcom/tests/gtest/TestCRT.cpp
+@@ -43,25 +43,19 @@ static void Check(const char* s1, const 
+ 
+   nsAutoString t1,t2;
+   CopyASCIItoUTF16(s1, t1);
+   CopyASCIItoUTF16(s2, t2);
+   const char16_t* us1 = t1.get();
+   const char16_t* us2 = t2.get();
+ 
+   int u2, u2_n;
+-  // nsCRT::strncmp will cause buffer overrun
+-  // if the string buffer is shorter than |n|.
+-  if (!longerThanN) {
+-    u2 = nsCRT::strcmp(us1, us2);
+-    u2_n = nsCRT::strncmp(us1, us2, n);
++  u2 = nsCRT::strcmp(us1, us2);
+ 
+-    EXPECT_EQ(sign(clib), sign(u2));
+-    EXPECT_EQ(sign(clib_n), sign(u2_n));
+-  }
++  EXPECT_EQ(sign(clib), sign(u2));
+ 
+   u2 = NS_strcmp(us1, us2);
+   u2_n = NS_strncmp(us1, us2, n);
+ 
+   EXPECT_EQ(sign(clib), sign(u2));
+   EXPECT_EQ(sign(clib_n), sign(u2_n));
+ }
+ 

+ 9 - 5
mozilla-release/patches/1427155-59a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1514357052 -32400
 # Node ID bb6003aa6966827c609172fa311a2a15879cb41b
-# Parent  4363d4c9ff57781ada0ddbe2f514085a0d8f7fe3
+# Parent  4d4739a1cbbaf30df12737355746a7a1501d37ff
 Bug 1427155 - Don't set STRIP_FLAGS from in-tree mozconfigs. r=gps
 
 The reason it was set from mozconfigs is that profiling require it. But
@@ -13,7 +13,7 @@ tied together.
 diff --git a/browser/config/mozconfigs/linux32/devedition b/browser/config/mozconfigs/linux32/devedition
 --- a/browser/config/mozconfigs/linux32/devedition
 +++ b/browser/config/mozconfigs/linux32/devedition
-@@ -2,19 +2,14 @@ export MOZ_PGO=1
+@@ -4,21 +4,16 @@ fi
  
  . "$topsrcdir/browser/config/mozconfigs/linux32/common-opt"
  
@@ -32,6 +32,8 @@ diff --git a/browser/config/mozconfigs/linux32/devedition b/browser/config/mozco
  # Enable MOZ_ALLOW_LEGACY_EXTENSIONS
  ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
  
+ ac_add_options MOZ_PGO=1
+ 
  . "$topsrcdir/build/mozconfig.common.override"
 diff --git a/browser/config/mozconfigs/linux32/nightly b/browser/config/mozconfigs/linux32/nightly
 --- a/browser/config/mozconfigs/linux32/nightly
@@ -53,7 +55,7 @@ diff --git a/browser/config/mozconfigs/linux32/nightly b/browser/config/mozconfi
 diff --git a/browser/config/mozconfigs/linux64/devedition b/browser/config/mozconfigs/linux64/devedition
 --- a/browser/config/mozconfigs/linux64/devedition
 +++ b/browser/config/mozconfigs/linux64/devedition
-@@ -2,19 +2,14 @@ export MOZ_PGO=1
+@@ -4,21 +4,16 @@ fi
  
  . "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
  
@@ -72,6 +74,8 @@ diff --git a/browser/config/mozconfigs/linux64/devedition b/browser/config/mozco
  # Enable MOZ_ALLOW_LEGACY_EXTENSIONS
  ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
  
+ ac_add_options MOZ_PGO=1
+ 
  . "$topsrcdir/build/mozconfig.common.override"
 diff --git a/browser/config/mozconfigs/linux64/nightly b/browser/config/mozconfigs/linux64/nightly
 --- a/browser/config/mozconfigs/linux64/nightly
@@ -94,7 +98,7 @@ diff --git a/browser/config/mozconfigs/whitelist b/browser/config/mozconfigs/whi
 --- a/browser/config/mozconfigs/whitelist
 +++ b/browser/config/mozconfigs/whitelist
 @@ -8,24 +8,16 @@ whitelist = {
- all_platforms = ['win64', 'win64-aarch64', 'win32', 'linux32', 'linux64', 'macosx64']
+ all_platforms = ['win64', 'win32', 'linux32', 'linux64', 'macosx64']
  
  for platform in all_platforms:
      whitelist['nightly'][platform] = [
@@ -115,6 +119,6 @@ diff --git a/browser/config/mozconfigs/whitelist b/browser/config/mozconfigs/whi
      'ac_add_options --enable-instruments',
      'ac_add_options --enable-dtrace',
      'if test `uname -s` != Linux; then',
-     'fi',
  ]
  
+ whitelist['nightly']['win64'] += [

+ 4 - 3
mozilla-release/patches/1428049-1-59a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1515077925 18000
 # Node ID c2de67592fbdb1bf09eb122af18aa61b2e3203d2
-# Parent  5bb42e5eb641d494497cbe9b96a5f3a9312c775b
+# Parent  64218b59689a085a18f8b026e8b7f32af88bf899
 Bug 1428049 - [talos] Create a separate mozbase_source_requirements.txt when installing packages from the source dir, r=igoldan
 
 This fixes a regression to |mach talos-test| around a missing 'mozterm'
@@ -13,17 +13,18 @@ MozReview-Commit-ID: GcfoA4U1fqg
 diff --git a/testing/config/mozbase_requirements.txt b/testing/config/mozbase_requirements.txt
 --- a/testing/config/mozbase_requirements.txt
 +++ b/testing/config/mozbase_requirements.txt
-@@ -1,18 +1,18 @@
+@@ -1,8 +1,10 @@
 +../tools/mozterm
 +
  ../mozbase/manifestparser
  ../mozbase/mozcrash
  ../mozbase/mozdebug
+ ../mozbase/mozdevice
  ../mozbase/mozfile
  ../mozbase/mozhttpd
  ../mozbase/mozinfo
  ../mozbase/mozinstall
- ../mozbase/mozleak
+@@ -10,10 +12,8 @@
  ../mozbase/mozlog
  ../mozbase/moznetwork
  ../mozbase/mozprocess

+ 2 - 2
mozilla-release/patches/1428713-67a1.patch

@@ -2,7 +2,7 @@
 # User AndreiH <ahutusoru@mozilla.com>
 # Date 1549444424 0
 # Node ID 46ccb19887128bb67b48f1474a05803c09e61025
-# Parent  a3968a1483dc344b8517c4404850b754630e6d35
+# Parent  3a8a96a8e1e0fed8871cd5cae4c325bf2248f4ef
 Bug 1428713 [mozprocess] Add support for Python 3 r=ahal
 
 Differential Revision: https://phabricator.services.mozilla.com/D18048
@@ -1113,7 +1113,7 @@ diff --git a/testing/mozbase/mozrunner/setup.py b/testing/mozbase/mozrunner/setu
      'mozdevice>=1.1.6',
      'mozfile>=1.2',
      'mozinfo>=0.7,<2',
-     'mozlog==3.*',
+     'mozlog~=4.0',
 -    'mozprocess>=0.23,<1',
 +    'mozprocess>=0.23,<2',
      'mozprofile~=2.1',

+ 2 - 3
mozilla-release/patches/1429973-2-60a1.patch

@@ -3,7 +3,7 @@
 # Date 1518718297 28800
 #      Thu Feb 15 10:11:37 2018 -0800
 # Node ID 4bc56ae6d0fe2fac78b8d89e7bb7cdce26c61a67
-# Parent  4848373ed2ad3283e0ad67e6847c672e8fd2e565
+# Parent  344727ca187fa87205a2208062fbad478adeecb3
 Bug 1429973 part 2 - Move server-timing tests into http/2. r=bagder
 
 MozReview-Commit-ID: JuQUUAOnW4g
@@ -133,7 +133,7 @@ diff --git a/netwerk/test/unit/test_header_Server_Timing.js b/netwerk/test/unit/
 diff --git a/netwerk/test/unit/xpcshell.ini b/netwerk/test/unit/xpcshell.ini
 --- a/netwerk/test/unit/xpcshell.ini
 +++ b/netwerk/test/unit/xpcshell.ini
-@@ -404,9 +404,12 @@ skip-if = os == "android"
+@@ -404,8 +404,11 @@ skip-if = os == "android"
  [test_bug1312782_http1.js]
  [test_bug1355539_http1.js]
  [test_bug1378385_http1.js]
@@ -145,7 +145,6 @@ diff --git a/netwerk/test/unit/xpcshell.ini b/netwerk/test/unit/xpcshell.ini
 +# Test requires http/2, and http/2 server doesn't run on android.
 +skip-if = os == "android"
 +run-sequentially = node server exceptions dont replay well
- [test_substituting_protocol_handler.js]
 diff --git a/testing/xpcshell/moz-http2/moz-http2.js b/testing/xpcshell/moz-http2/moz-http2.js
 --- a/testing/xpcshell/moz-http2/moz-http2.js
 +++ b/testing/xpcshell/moz-http2/moz-http2.js

+ 6 - 6
mozilla-release/patches/1429973-3-60a1.patch

@@ -3,7 +3,7 @@
 # Date 1518719444 28800
 #      Thu Feb 15 10:30:44 2018 -0800
 # Node ID 69c3b8eeba6383653db47a78ff7a35a685099e42
-# Parent  ba62bb691755487a8072b9f8073ebb5ab2e03755
+# Parent  b35fee3ea918e6c2d1844e9a43db5d26dfb655b9
 Bug 1429973 part 3 - Remove hidden pref to allow plaintext server-timing. r=bagder
 
 MozReview-Commit-ID: 2MfcvRXq7We
@@ -34,7 +34,7 @@ diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/H
 diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp
 --- a/netwerk/protocol/http/nsHttpHandler.cpp
 +++ b/netwerk/protocol/http/nsHttpHandler.cpp
-@@ -280,17 +280,16 @@ nsHttpHandler::nsHttpHandler()
+@@ -279,17 +279,16 @@ nsHttpHandler::nsHttpHandler()
      , mUseFastOpen(true)
      , mFastOpenConsecutiveFailureLimit(5)
      , mFastOpenConsecutiveFailureCounter(0)
@@ -52,7 +52,7 @@ diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsH
      mUserAgentOverride.SetIsVoid(true);
  
      MOZ_ASSERT(!gHttpHandler, "HTTP handler already created!");
-@@ -462,17 +461,16 @@ nsHttpHandler::Init()
+@@ -454,17 +453,16 @@ nsHttpHandler::Init()
          prefBranch->AddObserver(HTTP_PREF("tcp_keepalive.long_lived_connections"), this, true);
          prefBranch->AddObserver(SAFE_HINT_HEADER_VALUE, this, true);
          prefBranch->AddObserver(SECURITY_PREFIX, this, true);
@@ -67,10 +67,10 @@ diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsH
  
      nsHttpChannelAuthProvider::InitializePrefs();
  
-     mMisc.AssignLiteral("rv:91.0");
+     mMisc.AssignLiteral("rv:" MOZILLA_UAVERSION);
  
-     mCompatFirefox.AssignLiteral("Firefox/91.0");
-@@ -1750,20 +1748,16 @@ nsHttpHandler::PrefsChanged(nsIPrefBranc
+     mCompatFirefox.AssignLiteral("Firefox/" MOZILLA_UAVERSION);
+@@ -1742,20 +1740,16 @@ nsHttpHandler::PrefsChanged(nsIPrefBranc
              if (ratio > 0 && ratio < 1) {
                  mFocusedWindowTransactionRatio = ratio;
              } else {

+ 10 - 10
mozilla-release/patches/1432490-1-60a1.patch

@@ -2,7 +2,7 @@
 # User Emilio Cobos Alvarez <emilio@crisal.io>
 # Date 1516718940 -3600
 # Node ID 01dbdfc733d262f13a10b205d9b725b071737abc
-# Parent  98863cf1c0ddb6d4eb3d6c23cbfaa74f175a99b2
+# Parent  f2ce86b66a58e033b55719f41fd52d86a58445f2
 Bug 1432490: Make nsComputedDOMStyle::GetStyleContext / GetStyleContextNoFlush not take a presShell. r=bz
 
 Everyone calls them with the shell of the current composed document, and this
@@ -72,7 +72,7 @@ diff --git a/accessible/base/StyleInfo.h b/accessible/base/StyleInfo.h
 diff --git a/accessible/generic/Accessible.cpp b/accessible/generic/Accessible.cpp
 --- a/accessible/generic/Accessible.cpp
 +++ b/accessible/generic/Accessible.cpp
-@@ -1083,17 +1083,17 @@ Accessible::NativeAttributes()
+@@ -1085,17 +1085,17 @@ Accessible::NativeAttributes()
  
    // Don't calculate CSS-based object attributes when no frame (i.e.
    // the accessible is unattached from the tree).
@@ -306,7 +306,7 @@ diff --git a/dom/base/nsPlainTextSerializer.cpp b/dom/base/nsPlainTextSerializer
 diff --git a/dom/base/nsRange.cpp b/dom/base/nsRange.cpp
 --- a/dom/base/nsRange.cpp
 +++ b/dom/base/nsRange.cpp
-@@ -3748,17 +3748,17 @@ IsVisibleAndNotInReplacedElement(nsIFram
+@@ -3749,17 +3749,17 @@ IsVisibleAndNotInReplacedElement(nsIFram
  
  static bool
  ElementIsVisibleNoFlush(Element* aElement)
@@ -321,10 +321,10 @@ diff --git a/dom/base/nsRange.cpp b/dom/base/nsRange.cpp
  }
  
  static void
- AppendTransformedText(InnerTextAccumulator& aResult,
-                       nsGenericDOMDataNode* aTextNode,
-                       uint32_t aStart, uint32_t aEnd)
+ AppendTransformedText(InnerTextAccumulator& aResult, nsIContent* aContainer)
  {
+   auto textNode = static_cast<nsGenericDOMDataNode*>(aContainer);
+ 
 diff --git a/dom/base/nsXHTMLContentSerializer.cpp b/dom/base/nsXHTMLContentSerializer.cpp
 --- a/dom/base/nsXHTMLContentSerializer.cpp
 +++ b/dom/base/nsXHTMLContentSerializer.cpp
@@ -543,7 +543,7 @@ diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderin
 diff --git a/dom/html/nsGenericHTMLElement.cpp b/dom/html/nsGenericHTMLElement.cpp
 --- a/dom/html/nsGenericHTMLElement.cpp
 +++ b/dom/html/nsGenericHTMLElement.cpp
-@@ -2937,16 +2937,21 @@ nsGenericHTMLElement::NewURIFromString(c
+@@ -2940,16 +2940,21 @@ nsGenericHTMLElement::NewURIFromString(c
    }
  
    return NS_OK;
@@ -565,7 +565,7 @@ diff --git a/dom/html/nsGenericHTMLElement.cpp b/dom/html/nsGenericHTMLElement.c
        // e definitely isn't display:none and doesn't have a display:none
        // ancestor.
        break;
-@@ -2967,18 +2972,17 @@ IsOrHasAncestorWithDisplayNone(Element* 
+@@ -2970,18 +2975,17 @@ IsOrHasAncestorWithDisplayNone(Element* 
                                         LazyComputeBehavior::Assert);
        } else {
          // Call ResolveStyleLazily to protect against stale element data in
@@ -801,7 +801,7 @@ diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp
 diff --git a/layout/inspector/inDOMUtils.cpp b/layout/inspector/inDOMUtils.cpp
 --- a/layout/inspector/inDOMUtils.cpp
 +++ b/layout/inspector/inDOMUtils.cpp
-@@ -1227,17 +1227,17 @@ inDOMUtils::GetCleanStyleContextForEleme
+@@ -1230,17 +1230,17 @@ inDOMUtils::GetCleanStyleContextForEleme
    nsPresContext *presContext = presShell->GetPresContext();
    if (!presContext) {
      return nullptr;
@@ -823,7 +823,7 @@ diff --git a/layout/inspector/inDOMUtils.cpp b/layout/inspector/inDOMUtils.cpp
 diff --git a/layout/style/StyleAnimationValue.cpp b/layout/style/StyleAnimationValue.cpp
 --- a/layout/style/StyleAnimationValue.cpp
 +++ b/layout/style/StyleAnimationValue.cpp
-@@ -5535,37 +5535,32 @@ AnimationValue::FromString(nsCSSProperty
+@@ -5536,37 +5536,32 @@ AnimationValue::FromString(nsCSSProperty
    nsCOMPtr<nsIPresShell> shell = doc->GetShell();
    if (!shell) {
      return result;

+ 244 - 0
mozilla-release/patches/1435138-1-60a1.patch

@@ -0,0 +1,244 @@
+# HG changeset patch
+# User Boris Zbarsky <bzbarsky@mit.edu>
+# Date 1517577692 18000
+#      Fri Feb 02 08:21:32 2018 -0500
+# Node ID 921cff65ae1a3045673241f1a5e6329401c6cd1c
+# Parent  965c5adb6982c9b9d233c2f110493462ed11c77f
+Bug 1435138 part 1.  Remove unused nsIDOMSVGLength bits.  r=qdot
+
+MozReview-Commit-ID: ADZly4KLD0x
+
+diff --git a/dom/interfaces/svg/nsIDOMSVGLength.idl b/dom/interfaces/svg/nsIDOMSVGLength.idl
+--- a/dom/interfaces/svg/nsIDOMSVGLength.idl
++++ b/dom/interfaces/svg/nsIDOMSVGLength.idl
+@@ -16,23 +16,15 @@ interface nsIDOMSVGLength : nsISupports
+   const unsigned short SVG_LENGTHTYPE_EXS        = 4;
+   const unsigned short SVG_LENGTHTYPE_PX         = 5;
+   const unsigned short SVG_LENGTHTYPE_CM         = 6;
+   const unsigned short SVG_LENGTHTYPE_MM         = 7;
+   const unsigned short SVG_LENGTHTYPE_IN         = 8;
+   const unsigned short SVG_LENGTHTYPE_PT         = 9;
+   const unsigned short SVG_LENGTHTYPE_PC         = 10;
+ 
+-  readonly attribute unsigned short unitType;
+-  attribute float          value;
+-  // raises DOMException on setting
+-  attribute float          valueInSpecifiedUnits;
+-  // raises DOMException on setting
+   attribute DOMString      valueAsString;
+   // raises DOMException on setting
+-  
+-  void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits);
+-  void convertToSpecifiedUnits(in unsigned short unitType);
+ };
+ 
+ 
+ 
+ 
+diff --git a/dom/svg/DOMSVGLength.cpp b/dom/svg/DOMSVGLength.cpp
+--- a/dom/svg/DOMSVGLength.cpp
++++ b/dom/svg/DOMSVGLength.cpp
+@@ -187,17 +187,17 @@ DOMSVGLength::Copy()
+   if (mVal) {
+     unit = mVal->mSpecifiedUnitType;
+     value = mIsAnimValItem ? mVal->mAnimVal : mVal->mBaseVal;
+   } else {
+     SVGLength &length = InternalItem();
+     unit = length.GetUnit();
+     value = length.GetValueInCurrentUnits();
+   }
+-  copy->NewValueSpecifiedUnits(unit, value);
++  copy->NewValueSpecifiedUnits(unit, value, IgnoreErrors());
+   return copy;
+ }
+ 
+ uint16_t
+ DOMSVGLength::UnitType()
+ {
+   if (mVal) {
+     if (mIsAnimValItem) {
+@@ -207,23 +207,16 @@ DOMSVGLength::UnitType()
+   }
+ 
+   if (mIsAnimValItem && HasOwner()) {
+     Element()->FlushAnimations(); // May make HasOwner() == false
+   }
+   return HasOwner() ? InternalItem().GetUnit() : mUnit;
+ }
+ 
+-NS_IMETHODIMP
+-DOMSVGLength::GetUnitType(uint16_t* aUnit)
+-{
+-  *aUnit = UnitType();
+-  return NS_OK;
+-}
+-
+ float
+ DOMSVGLength::GetValue(ErrorResult& aRv)
+ {
+   if (mVal) {
+     if (mIsAnimValItem) {
+       mSVGElement->FlushAnimations();
+       return mVal->GetAnimValue(mSVGElement);
+     }
+@@ -244,24 +237,16 @@ DOMSVGLength::GetValue(ErrorResult& aRv)
+     return mValue;
+   }
+   // else [SVGWG issue] Can't convert this length's value to user units
+   // ReportToConsole
+   aRv.Throw(NS_ERROR_FAILURE);
+   return 0.0f;
+ }
+ 
+-NS_IMETHODIMP
+-DOMSVGLength::GetValue(float* aValue)
+-{
+-  ErrorResult rv;
+-  *aValue = GetValue(rv);
+-  return rv.StealNSResult();
+-}
+-
+ void
+ DOMSVGLength::SetValue(float aUserUnitValue, ErrorResult& aRv)
+ {
+   if (mIsAnimValItem) {
+     aRv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
+     return;
+   }
+ 
+@@ -294,28 +279,16 @@ DOMSVGLength::SetValue(float aUserUnitVa
+     mValue = aUserUnitValue;
+     return;
+   }
+   // else [SVGWG issue] Can't convert user unit value to this length's unit
+   // ReportToConsole
+   aRv.Throw(NS_ERROR_FAILURE);
+ }
+ 
+-NS_IMETHODIMP
+-DOMSVGLength::SetValue(float aUserUnitValue)
+-{
+-  if (!IsFinite(aUserUnitValue)) {
+-    return NS_ERROR_ILLEGAL_VALUE;
+-  }
+-
+-  ErrorResult rv;
+-  SetValue(aUserUnitValue, rv);
+-  return rv.StealNSResult();
+-}
+-
+ float
+ DOMSVGLength::ValueInSpecifiedUnits()
+ {
+   if (mVal) {
+     if (mIsAnimValItem) {
+       mSVGElement->FlushAnimations();
+       return mVal->mAnimVal;
+     }
+@@ -323,23 +296,16 @@ DOMSVGLength::ValueInSpecifiedUnits()
+   }
+ 
+   if (mIsAnimValItem && HasOwner()) {
+     Element()->FlushAnimations(); // May make HasOwner() == false
+   }
+   return HasOwner() ? InternalItem().GetValueInCurrentUnits() : mValue;
+ }
+ 
+-NS_IMETHODIMP
+-DOMSVGLength::GetValueInSpecifiedUnits(float* aValue)
+-{
+-  *aValue = ValueInSpecifiedUnits();
+-  return NS_OK;
+-}
+-
+ void
+ DOMSVGLength::SetValueInSpecifiedUnits(float aValue, ErrorResult& aRv)
+ {
+   if (mIsAnimValItem) {
+     aRv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
+     return;
+   }
+ 
+@@ -354,28 +320,16 @@ DOMSVGLength::SetValueInSpecifiedUnits(f
+     }
+     AutoChangeLengthNotifier notifier(this);
+     InternalItem().SetValueInCurrentUnits(aValue);
+     return;
+   }
+   mValue = aValue;
+ }
+ 
+-NS_IMETHODIMP
+-DOMSVGLength::SetValueInSpecifiedUnits(float aValue)
+-{
+-  if (!IsFinite(aValue)) {
+-    return NS_ERROR_ILLEGAL_VALUE;
+-  }
+-
+-  ErrorResult rv;
+-  SetValueInSpecifiedUnits(aValue, rv);
+-  return rv.StealNSResult();
+-}
+-
+ void
+ DOMSVGLength::SetValueAsString(const nsAString& aValue, ErrorResult& aRv)
+ {
+   if (mIsAnimValItem) {
+     aRv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
+     return;
+   }
+ 
+@@ -459,28 +413,16 @@ DOMSVGLength::NewValueSpecifiedUnits(uin
+     AutoChangeLengthNotifier notifier(this);
+     InternalItem().SetValueAndUnit(aValue, uint8_t(aUnit));
+     return;
+   }
+   mUnit = uint8_t(aUnit);
+   mValue = aValue;
+ }
+ 
+-NS_IMETHODIMP
+-DOMSVGLength::NewValueSpecifiedUnits(uint16_t aUnit, float aValue)
+-{
+-  if (!IsFinite(aValue)) {
+-    return NS_ERROR_ILLEGAL_VALUE;
+-  }
+-
+-  ErrorResult rv;
+-  NewValueSpecifiedUnits(aUnit, aValue, rv);
+-  return rv.StealNSResult();
+-}
+-
+ void
+ DOMSVGLength::ConvertToSpecifiedUnits(uint16_t aUnit, ErrorResult& aRv)
+ {
+   if (mIsAnimValItem) {
+     aRv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
+     return;
+   }
+ 
+@@ -513,24 +455,16 @@ DOMSVGLength::ConvertToSpecifiedUnits(ui
+       return;
+     }
+   }
+   // else [SVGWG issue] Can't convert unit
+   // ReportToConsole
+   aRv.Throw(NS_ERROR_FAILURE);
+ }
+ 
+-NS_IMETHODIMP
+-DOMSVGLength::ConvertToSpecifiedUnits(uint16_t aUnit)
+-{
+-  ErrorResult rv;
+-  ConvertToSpecifiedUnits(aUnit, rv);
+-  return rv.StealNSResult();
+-}
+-
+ JSObject*
+ DOMSVGLength::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return dom::SVGLengthBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ void
+ DOMSVGLength::InsertingIntoList(DOMSVGLengthList *aList,

+ 105 - 0
mozilla-release/patches/1435138-2-60a1.patch

@@ -0,0 +1,105 @@
+# HG changeset patch
+# User Boris Zbarsky <bzbarsky@mit.edu>
+# Date 1517577692 18000
+#      Fri Feb 02 08:21:32 2018 -0500
+# Node ID 37a6fcdd1dea7e1d835edbcee5a67d8588053566
+# Parent  921cff65ae1a3045673241f1a5e6329401c6cd1c
+Bug 1435138 part 2.  Remove nsIDOMSVGLength's valueAsString attribute.  r=qdot
+
+MozReview-Commit-ID: DLIIV93REFx
+
+diff --git a/dom/interfaces/svg/nsIDOMSVGLength.idl b/dom/interfaces/svg/nsIDOMSVGLength.idl
+--- a/dom/interfaces/svg/nsIDOMSVGLength.idl
++++ b/dom/interfaces/svg/nsIDOMSVGLength.idl
+@@ -15,16 +15,13 @@ interface nsIDOMSVGLength : nsISupports
+   const unsigned short SVG_LENGTHTYPE_EMS        = 3;
+   const unsigned short SVG_LENGTHTYPE_EXS        = 4;
+   const unsigned short SVG_LENGTHTYPE_PX         = 5;
+   const unsigned short SVG_LENGTHTYPE_CM         = 6;
+   const unsigned short SVG_LENGTHTYPE_MM         = 7;
+   const unsigned short SVG_LENGTHTYPE_IN         = 8;
+   const unsigned short SVG_LENGTHTYPE_PT         = 9;
+   const unsigned short SVG_LENGTHTYPE_PC         = 10;
+-
+-  attribute DOMString      valueAsString;
+-  // raises DOMException on setting
+ };
+ 
+ 
+ 
+ 
+diff --git a/dom/svg/DOMSVGLength.cpp b/dom/svg/DOMSVGLength.cpp
+--- a/dom/svg/DOMSVGLength.cpp
++++ b/dom/svg/DOMSVGLength.cpp
+@@ -350,46 +350,37 @@ DOMSVGLength::SetValueAsString(const nsA
+     AutoChangeLengthNotifier notifier(this);
+     InternalItem() = value;
+     return;
+   }
+   mValue = value.GetValueInCurrentUnits();
+   mUnit = value.GetUnit();
+ }
+ 
+-NS_IMETHODIMP
+-DOMSVGLength::SetValueAsString(const nsAString& aValue)
+-{
+-  ErrorResult rv;
+-  SetValueAsString(aValue, rv);
+-  return rv.StealNSResult();
+-}
+-
+-NS_IMETHODIMP
++void
+ DOMSVGLength::GetValueAsString(nsAString& aValue)
+ {
+   if (mVal) {
+     if (mIsAnimValItem) {
+       mSVGElement->FlushAnimations();
+       mVal->GetAnimValueString(aValue);
+     } else {
+       mVal->GetBaseValueString(aValue);
+     }
+-    return NS_OK;
++    return;
+   }
+ 
+   if (mIsAnimValItem && HasOwner()) {
+     Element()->FlushAnimations(); // May make HasOwner() == false
+   }
+   if (HasOwner()) {
+     InternalItem().GetValueAsString(aValue);
+-    return NS_OK;
++    return;
+   }
+   SVGLength(mValue, mUnit).GetValueAsString(aValue);
+-  return NS_OK;
+ }
+ 
+ void
+ DOMSVGLength::NewValueSpecifiedUnits(uint16_t aUnit, float aValue,
+                                      ErrorResult& aRv)
+ {
+   if (mIsAnimValItem) {
+     aRv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
+diff --git a/dom/svg/DOMSVGLength.h b/dom/svg/DOMSVGLength.h
+--- a/dom/svg/DOMSVGLength.h
++++ b/dom/svg/DOMSVGLength.h
+@@ -172,17 +172,17 @@ public:
+   SVGLength ToSVGLength();
+ 
+   // WebIDL
+   uint16_t UnitType();
+   float GetValue(ErrorResult& aRv);
+   void SetValue(float aValue, ErrorResult& aRv);
+   float ValueInSpecifiedUnits();
+   void SetValueInSpecifiedUnits(float aValue, ErrorResult& aRv);
+-  // The XPCOM GetValueAsString is good
++  void GetValueAsString(nsAString& aValue);
+   void SetValueAsString(const nsAString& aValue, ErrorResult& aRv);
+   void NewValueSpecifiedUnits(uint16_t aUnit, float aValue,
+                               ErrorResult& aRv);
+   void ConvertToSpecifiedUnits(uint16_t aUnit, ErrorResult& aRv);
+ 
+   nsISupports* GetParentObject() const {
+     auto svgElement = mList ? Element() : mSVGElement.get();
+     return static_cast<nsIDOMSVGElement*> (svgElement);

+ 1616 - 0
mozilla-release/patches/1435138-3-60a1.patch

@@ -0,0 +1,1616 @@
+# HG changeset patch
+# User Boris Zbarsky <bzbarsky@mit.edu>
+# Date 1517577693 18000
+#      Fri Feb 02 08:21:33 2018 -0500
+# Node ID 5ebff8611e8e1d35e8e7fd98d412f1cf2beeb315
+# Parent  15a01be4e73ab2567e208d15900b51bcadc3b2a0
+Bug 1435138 part 3.  Remove nsIDOMSVGLength's SVG_LENGTHTYPE_* constants.  r=qdot
+
+MozReview-Commit-ID: GvzWbe6cr5r
+
+diff --git a/dom/interfaces/svg/nsIDOMSVGLength.idl b/dom/interfaces/svg/nsIDOMSVGLength.idl
+--- a/dom/interfaces/svg/nsIDOMSVGLength.idl
++++ b/dom/interfaces/svg/nsIDOMSVGLength.idl
+@@ -3,25 +3,13 @@
+  * 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/. */
+ 
+ #include "domstubs.idl"
+ 
+ [uuid(2596325c-aed0-487e-96a1-0a6d589b9c6b)]
+ interface nsIDOMSVGLength : nsISupports
+ { 
+-  // Length Unit Types
+-  const unsigned short SVG_LENGTHTYPE_UNKNOWN    = 0;
+-  const unsigned short SVG_LENGTHTYPE_NUMBER     = 1;
+-  const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2;
+-  const unsigned short SVG_LENGTHTYPE_EMS        = 3;
+-  const unsigned short SVG_LENGTHTYPE_EXS        = 4;
+-  const unsigned short SVG_LENGTHTYPE_PX         = 5;
+-  const unsigned short SVG_LENGTHTYPE_CM         = 6;
+-  const unsigned short SVG_LENGTHTYPE_MM         = 7;
+-  const unsigned short SVG_LENGTHTYPE_IN         = 8;
+-  const unsigned short SVG_LENGTHTYPE_PT         = 9;
+-  const unsigned short SVG_LENGTHTYPE_PC         = 10;
+ };
+ 
+ 
+ 
+ 
+diff --git a/dom/svg/DOMSVGLength.cpp b/dom/svg/DOMSVGLength.cpp
+--- a/dom/svg/DOMSVGLength.cpp
++++ b/dom/svg/DOMSVGLength.cpp
+@@ -17,16 +17,18 @@
+ #include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/FloatingPoint.h"
+ #include "nsSVGAttrTearoffTable.h"
+ 
+ // See the architecture comment in DOMSVGAnimatedLengthList.h.
+ 
+ namespace mozilla {
+ 
++using namespace dom;
++
+ static nsSVGAttrTearoffTable<nsSVGLength2, DOMSVGLength>
+   sBaseSVGLengthTearOffTable,
+   sAnimSVGLengthTearOffTable;
+ 
+ // We could use NS_IMPL_CYCLE_COLLECTION(, except that in Unlink() we need to
+ // clear our list's weak ref to us to be safe. (The other option would be to
+ // not unlink and rely on the breaking of the other edges in the cycle, as
+ // NS_SVG_VAL_IMPL_CYCLE_COLLECTION does.)
+@@ -95,17 +97,17 @@ private:
+ DOMSVGLength::DOMSVGLength(DOMSVGLengthList *aList,
+                            uint8_t aAttrEnum,
+                            uint32_t aListIndex,
+                            bool aIsAnimValItem)
+   : mList(aList)
+   , mListIndex(aListIndex)
+   , mAttrEnum(aAttrEnum)
+   , mIsAnimValItem(aIsAnimValItem)
+-  , mUnit(nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER)
++  , mUnit(SVGLengthBinding::SVG_LENGTHTYPE_NUMBER)
+   , mValue(0.0f)
+   , mVal(nullptr)
+ {
+   // These shifts are in sync with the members in the header.
+   MOZ_ASSERT(aList &&
+              aAttrEnum < (1 << 4) &&
+              aListIndex <= MaxListIndex(),
+              "bad arg");
+@@ -113,29 +115,29 @@ DOMSVGLength::DOMSVGLength(DOMSVGLengthL
+   MOZ_ASSERT(IndexIsValid(), "Bad index for DOMSVGNumber!");
+ }
+ 
+ DOMSVGLength::DOMSVGLength()
+   : mList(nullptr)
+   , mListIndex(0)
+   , mAttrEnum(0)
+   , mIsAnimValItem(false)
+-  , mUnit(nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER)
++  , mUnit(SVGLengthBinding::SVG_LENGTHTYPE_NUMBER)
+   , mValue(0.0f)
+   , mVal(nullptr)
+ {
+ }
+ 
+ DOMSVGLength::DOMSVGLength(nsSVGLength2* aVal, nsSVGElement* aSVGElement,
+                            bool aAnimVal)
+   : mList(nullptr)
+   , mListIndex(0)
+   , mAttrEnum(0)
+   , mIsAnimValItem(aAnimVal)
+-  , mUnit(nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER)
++  , mUnit(SVGLengthBinding::SVG_LENGTHTYPE_NUMBER)
+   , mValue(0.0f)
+   , mVal(aVal)
+   , mSVGElement(aSVGElement)
+ {
+ }
+ 
+ void
+ DOMSVGLength::CleanupWeakRefs()
+@@ -227,18 +229,18 @@ DOMSVGLength::GetValue(ErrorResult& aRv)
+     Element()->FlushAnimations(); // May make HasOwner() == false
+   }
+   if (HasOwner()) {
+     float value = InternalItem().GetValueInUserUnits(Element(), Axis());
+     if (!IsFinite(value)) {
+       aRv.Throw(NS_ERROR_FAILURE);
+     }
+     return value;
+-  } else if (mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER ||
+-             mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_PX) {
++  } else if (mUnit == SVGLengthBinding::SVG_LENGTHTYPE_NUMBER ||
++             mUnit == SVGLengthBinding::SVG_LENGTHTYPE_PX) {
+     return mValue;
+   }
+   // else [SVGWG issue] Can't convert this length's value to user units
+   // ReportToConsole
+   aRv.Throw(NS_ERROR_FAILURE);
+   return 0.0f;
+ }
+ 
+@@ -269,18 +271,18 @@ DOMSVGLength::SetValue(float aUserUnitVa
+     if (uuPerUnit > 0) {
+       float newValue = aUserUnitValue / uuPerUnit;
+       if (IsFinite(newValue)) {
+         AutoChangeLengthNotifier notifier(this);
+         InternalItem().SetValueAndUnit(newValue, InternalItem().GetUnit());
+         return;
+       }
+     }
+-  } else if (mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER ||
+-             mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_PX) {
++  } else if (mUnit == SVGLengthBinding::SVG_LENGTHTYPE_NUMBER ||
++             mUnit == SVGLengthBinding::SVG_LENGTHTYPE_PX) {
+     mValue = aUserUnitValue;
+     return;
+   }
+   // else [SVGWG issue] Can't convert user unit value to this length's unit
+   // ReportToConsole
+   aRv.Throw(NS_ERROR_FAILURE);
+ }
+ 
+@@ -449,17 +451,17 @@ DOMSVGLength::ConvertToSpecifiedUnits(ui
+   // else [SVGWG issue] Can't convert unit
+   // ReportToConsole
+   aRv.Throw(NS_ERROR_FAILURE);
+ }
+ 
+ JSObject*
+ DOMSVGLength::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+-  return dom::SVGLengthBinding::Wrap(aCx, this, aGivenProto);
++  return SVGLengthBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ void
+ DOMSVGLength::InsertingIntoList(DOMSVGLengthList *aList,
+                                 uint8_t aAttrEnum,
+                                 uint32_t aListIndex,
+                                 bool aIsAnimValItem)
+ {
+diff --git a/dom/svg/SVGAnimatedLengthList.cpp b/dom/svg/SVGAnimatedLengthList.cpp
+--- a/dom/svg/SVGAnimatedLengthList.cpp
++++ b/dom/svg/SVGAnimatedLengthList.cpp
+@@ -7,19 +7,22 @@
+ #include "SVGAnimatedLengthList.h"
+ 
+ #include "DOMSVGAnimatedLengthList.h"
+ #include "mozilla/Move.h"
+ #include "nsSVGElement.h"
+ #include "nsSVGAttrTearoffTable.h"
+ #include "nsSMILValue.h"
+ #include "SVGLengthListSMILType.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ 
+ namespace mozilla {
+ 
++using namespace dom;
++
+ nsresult
+ SVGAnimatedLengthList::SetBaseValueString(const nsAString& aValue)
+ {
+   SVGLengthList newBaseValue;
+   nsresult rv = newBaseValue.SetValueFromString(aValue);
+   if (NS_FAILED(rv)) {
+     return rv;
+   }
+@@ -155,19 +158,19 @@ SVGAnimatedLengthList::
+     // recalculate the result of the sandwich if the context changes, so we
+     // take the (substantial) performance hit of preventing caching of the
+     // sandwich layer, causing the animation sandwich to be recalculated every
+     // single sample.
+ 
+     aPreventCachingOfSandwich = false;
+     for (uint32_t i = 0; i < llai->Length(); ++i) {
+       uint8_t unit = (*llai)[i].GetUnit();
+-      if (unit == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE ||
+-          unit == nsIDOMSVGLength::SVG_LENGTHTYPE_EMS ||
+-          unit == nsIDOMSVGLength::SVG_LENGTHTYPE_EXS) {
++      if (unit == SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE ||
++          unit == SVGLengthBinding::SVG_LENGTHTYPE_EMS ||
++          unit == SVGLengthBinding::SVG_LENGTHTYPE_EXS) {
+         aPreventCachingOfSandwich = true;
+         break;
+       }
+     }
+   }
+   return rv;
+ }
+ 
+diff --git a/dom/svg/SVGCircleElement.cpp b/dom/svg/SVGCircleElement.cpp
+--- a/dom/svg/SVGCircleElement.cpp
++++ b/dom/svg/SVGCircleElement.cpp
+@@ -3,35 +3,36 @@
+ /* 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/. */
+ 
+ #include "mozilla/dom/SVGCircleElement.h"
+ #include "mozilla/gfx/2D.h"
+ #include "nsGkAtoms.h"
+ #include "mozilla/dom/SVGCircleElementBinding.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Circle)
+ 
+ using namespace mozilla::gfx;
+ 
+ namespace mozilla {
+ namespace dom {
+ 
+ JSObject*
+ SVGCircleElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGCircleElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::LengthInfo SVGCircleElement::sLengthInfo[3] =
+ {
+-  { &nsGkAtoms::cx, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::cy, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+-  { &nsGkAtoms::r, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY }
++  { &nsGkAtoms::cx, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::cy, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::r, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY }
+ };
+ 
+ //----------------------------------------------------------------------
+ // Implementation
+ 
+ SVGCircleElement::SVGCircleElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
+   : SVGCircleElementBase(aNodeInfo)
+ {
+diff --git a/dom/svg/SVGEllipseElement.cpp b/dom/svg/SVGEllipseElement.cpp
+--- a/dom/svg/SVGEllipseElement.cpp
++++ b/dom/svg/SVGEllipseElement.cpp
+@@ -1,16 +1,17 @@
+ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /* vim: set ts=8 sts=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/. */
+ 
+ #include "mozilla/dom/SVGEllipseElement.h"
+ #include "mozilla/dom/SVGEllipseElementBinding.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/gfx/2D.h"
+ #include "mozilla/gfx/PathHelpers.h"
+ #include "mozilla/RefPtr.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Ellipse)
+ 
+ using namespace mozilla::gfx;
+ 
+@@ -20,20 +21,20 @@ namespace dom {
+ JSObject*
+ SVGEllipseElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGEllipseElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::LengthInfo SVGEllipseElement::sLengthInfo[4] =
+ {
+-  { &nsGkAtoms::cx, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::cy, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+-  { &nsGkAtoms::rx, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::ry, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::cx, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::cy, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::rx, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::ry, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+ };
+ 
+ //----------------------------------------------------------------------
+ // Implementation
+ 
+ SVGEllipseElement::SVGEllipseElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
+   : SVGEllipseElementBase(aNodeInfo)
+ {
+diff --git a/dom/svg/SVGFilterElement.cpp b/dom/svg/SVGFilterElement.cpp
+--- a/dom/svg/SVGFilterElement.cpp
++++ b/dom/svg/SVGFilterElement.cpp
+@@ -5,35 +5,36 @@
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #include "mozilla/ArrayUtils.h"
+ 
+ #include "nsGkAtoms.h"
+ #include "nsCOMPtr.h"
+ #include "mozilla/dom/SVGFilterElement.h"
+ #include "mozilla/dom/SVGFilterElementBinding.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "nsSVGUtils.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Filter)
+ 
+ namespace mozilla {
+ namespace dom {
+ 
+ JSObject*
+ SVGFilterElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGFilterElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::LengthInfo SVGFilterElement::sLengthInfo[4] =
+ {
+-  { &nsGkAtoms::x, -10, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
+-  { &nsGkAtoms::y, -10, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
+-  { &nsGkAtoms::width, 120, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
+-  { &nsGkAtoms::height, 120, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
++  { &nsGkAtoms::x, -10, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
++  { &nsGkAtoms::y, -10, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
++  { &nsGkAtoms::width, 120, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
++  { &nsGkAtoms::height, 120, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
+ };
+ 
+ nsSVGElement::EnumInfo SVGFilterElement::sEnumInfo[2] =
+ {
+   { &nsGkAtoms::filterUnits,
+     sSVGUnitTypesMap,
+     SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
+   },
+diff --git a/dom/svg/SVGForeignObjectElement.cpp b/dom/svg/SVGForeignObjectElement.cpp
+--- a/dom/svg/SVGForeignObjectElement.cpp
++++ b/dom/svg/SVGForeignObjectElement.cpp
+@@ -5,34 +5,35 @@
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #include "mozilla/ArrayUtils.h"
+ 
+ #include "nsCOMPtr.h"
+ #include "mozilla/dom/SVGDocument.h"
+ #include "mozilla/dom/SVGForeignObjectElement.h"
+ #include "mozilla/dom/SVGForeignObjectElementBinding.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(ForeignObject)
+ 
+ namespace mozilla {
+ namespace dom {
+ 
+ JSObject*
+ SVGForeignObjectElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGForeignObjectElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::LengthInfo SVGForeignObjectElement::sLengthInfo[4] =
+ {
+-  { &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+-  { &nsGkAtoms::width, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::height, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::x, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::y, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::width, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::height, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+ };
+ 
+ //----------------------------------------------------------------------
+ // Implementation
+ 
+ SVGForeignObjectElement::SVGForeignObjectElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
+   : SVGGraphicsElement(aNodeInfo)
+ {
+diff --git a/dom/svg/SVGGeometryElement.cpp b/dom/svg/SVGGeometryElement.cpp
+--- a/dom/svg/SVGGeometryElement.cpp
++++ b/dom/svg/SVGGeometryElement.cpp
+@@ -4,23 +4,25 @@
+  * 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/. */
+ 
+ #include "SVGGeometryElement.h"
+ 
+ #include "DOMSVGPoint.h"
+ #include "gfxPlatform.h"
+ #include "mozilla/gfx/2D.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "nsComputedDOMStyle.h"
+ #include "nsSVGUtils.h"
+ #include "nsSVGLength2.h"
+ #include "SVGContentUtils.h"
+ 
+ using namespace mozilla;
+ using namespace mozilla::gfx;
++using namespace mozilla::dom;
+ 
+ nsSVGElement::NumberInfo SVGGeometryElement::sNumberInfo =
+ { &nsGkAtoms::pathLength, 0, false };
+ 
+ //----------------------------------------------------------------------
+ // Implementation
+ 
+ SVGGeometryElement::SVGGeometryElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
+@@ -71,17 +73,18 @@ SVGGeometryElement::AttributeDefinesGeom
+ }
+ 
+ bool
+ SVGGeometryElement::GeometryDependsOnCoordCtx()
+ {
+   // Check the nsSVGLength2 attribute
+   LengthAttributesInfo info = const_cast<SVGGeometryElement*>(this)->GetLengthInfo();
+   for (uint32_t i = 0; i < info.mLengthCount; i++) {
+-    if (info.mLengths[i].GetSpecifiedUnitType() == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE) {
++    if (info.mLengths[i].GetSpecifiedUnitType() ==
++          SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE) {
+       return true;
+     }
+   }
+   return false;
+ }
+ 
+ bool
+ SVGGeometryElement::IsMarkable()
+diff --git a/dom/svg/SVGGradientElement.cpp b/dom/svg/SVGGradientElement.cpp
+--- a/dom/svg/SVGGradientElement.cpp
++++ b/dom/svg/SVGGradientElement.cpp
+@@ -4,16 +4,17 @@
+  * 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/. */
+ 
+ #include "mozilla/dom/SVGGradientElement.h"
+ 
+ #include "mozilla/ArrayUtils.h"
+ #include "mozilla/dom/SVGAnimatedTransformList.h"
+ #include "mozilla/dom/SVGRadialGradientElementBinding.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGLinearGradientElementBinding.h"
+ #include "nsCOMPtr.h"
+ #include "nsGkAtoms.h"
+ #include "nsSVGElement.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(LinearGradient)
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(RadialGradient)
+ 
+@@ -121,20 +122,20 @@ SVGGradientElement::IsAttributeMapped(co
+ JSObject*
+ SVGLinearGradientElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGLinearGradientElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::LengthInfo SVGLinearGradientElement::sLengthInfo[4] =
+ {
+-  { &nsGkAtoms::x1, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
+-  { &nsGkAtoms::y1, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
+-  { &nsGkAtoms::x2, 100, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
+-  { &nsGkAtoms::y2, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
++  { &nsGkAtoms::x1, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
++  { &nsGkAtoms::y1, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
++  { &nsGkAtoms::x2, 100, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
++  { &nsGkAtoms::y2, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
+ };
+ 
+ //----------------------------------------------------------------------
+ // Implementation
+ 
+ SVGLinearGradientElement::SVGLinearGradientElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
+   : SVGLinearGradientElementBase(aNodeInfo)
+ {
+@@ -195,22 +196,22 @@ SVGLinearGradientElement::GetLengthInfo(
+ JSObject*
+ SVGRadialGradientElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGRadialGradientElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::LengthInfo SVGRadialGradientElement::sLengthInfo[6] =
+ {
+-  { &nsGkAtoms::cx, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
+-  { &nsGkAtoms::cy, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
+-  { &nsGkAtoms::r, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::XY },
+-  { &nsGkAtoms::fx, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
+-  { &nsGkAtoms::fy, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
+-  { &nsGkAtoms::fr, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::XY },
++  { &nsGkAtoms::cx, 50, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
++  { &nsGkAtoms::cy, 50, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
++  { &nsGkAtoms::r, 50, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::XY },
++  { &nsGkAtoms::fx, 50, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
++  { &nsGkAtoms::fy, 50, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
++  { &nsGkAtoms::fr, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::XY },
+ };
+ 
+ //----------------------------------------------------------------------
+ // Implementation
+ 
+ SVGRadialGradientElement::SVGRadialGradientElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
+   : SVGRadialGradientElementBase(aNodeInfo)
+ {
+diff --git a/dom/svg/SVGImageElement.cpp b/dom/svg/SVGImageElement.cpp
+--- a/dom/svg/SVGImageElement.cpp
++++ b/dom/svg/SVGImageElement.cpp
+@@ -10,16 +10,17 @@
+ 
+ #include "mozilla/dom/SVGImageElement.h"
+ #include "mozilla/gfx/2D.h"
+ #include "nsCOMPtr.h"
+ #include "nsIURI.h"
+ #include "nsNetUtil.h"
+ #include "imgINotificationObserver.h"
+ #include "mozilla/dom/SVGImageElementBinding.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "nsContentUtils.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Image)
+ 
+ using namespace mozilla::gfx;
+ 
+ namespace mozilla {
+ namespace dom {
+@@ -27,20 +28,20 @@ namespace dom {
+ JSObject*
+ SVGImageElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGImageElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::LengthInfo SVGImageElement::sLengthInfo[4] =
+ {
+-  { &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+-  { &nsGkAtoms::width, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::height, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::x, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::y, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::width, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::height, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+ };
+ 
+ nsSVGElement::StringInfo SVGImageElement::sStringInfo[2] =
+ {
+   { &nsGkAtoms::href, kNameSpaceID_None, true },
+   { &nsGkAtoms::href, kNameSpaceID_XLink, true }
+ };
+ 
+diff --git a/dom/svg/SVGLength.cpp b/dom/svg/SVGLength.cpp
+--- a/dom/svg/SVGLength.cpp
++++ b/dom/svg/SVGLength.cpp
+@@ -11,16 +11,18 @@
+ #include "mozilla/dom/SVGSVGElement.h"
+ #include "nsTextFormatter.h"
+ #include "SVGContentUtils.h"
+ #include <limits>
+ #include <algorithm>
+ 
+ namespace mozilla {
+ 
++using namespace mozilla;
++
+ // Declare some helpers defined below:
+ static void GetUnitString(nsAString& unit, uint16_t unitType);
+ static uint16_t GetUnitTypeForString(const nsAString& unitStr);
+ 
+ void
+ SVGLength::GetValueAsString(nsAString &aValue) const
+ {
+   nsTextFormatter::ssprintf(aValue, u"%g", (double)mValue);
+@@ -52,30 +54,30 @@ SVGLength::SetValueFromString(const nsAS
+   mValue = value;
+   mUnit = uint8_t(unitType);
+   return true;
+ }
+ 
+ inline static bool
+ IsAbsoluteUnit(uint8_t aUnit)
+ {
+-  return aUnit >= nsIDOMSVGLength::SVG_LENGTHTYPE_CM &&
+-         aUnit <= nsIDOMSVGLength::SVG_LENGTHTYPE_PC;
++  return aUnit >= SVGLengthBinding::SVG_LENGTHTYPE_CM &&
++         aUnit <= SVGLengthBinding::SVG_LENGTHTYPE_PC;
+ }
+ 
+ /**
+  * Helper to convert between different CSS absolute units without the need for
+  * an element, which provides more flexibility at the DOM level (and without
+  * the need for an intermediary conversion to user units, which avoids
+  * unnecessary overhead and rounding error).
+  *
+  * Example usage: to find out how many centimeters there are per inch:
+  *
+- *   GetAbsUnitsPerAbsUnit(nsIDOMSVGLength::SVG_LENGTHTYPE_CM,
+- *                         nsIDOMSVGLength::SVG_LENGTHTYPE_IN)
++ *   GetAbsUnitsPerAbsUnit(SVGLengthBinding::SVG_LENGTHTYPE_CM,
++ *                         SVGLengthBinding::SVG_LENGTHTYPE_IN)
+  */
+ inline static float GetAbsUnitsPerAbsUnit(uint8_t aUnits, uint8_t aPerUnit)
+ {
+   MOZ_ASSERT(IsAbsoluteUnit(aUnits), "Not a CSS absolute unit");
+   MOZ_ASSERT(IsAbsoluteUnit(aPerUnit), "Not a CSS absolute unit");
+ 
+   float CSSAbsoluteUnitConversionFactors[5][5] = { // columns: cm, mm, in, pt, pc
+     // cm per...:
+@@ -97,20 +99,20 @@ inline static float GetAbsUnitsPerAbsUni
+ float
+ SVGLength::GetValueInSpecifiedUnit(uint8_t aUnit,
+                                    const nsSVGElement *aElement,
+                                    uint8_t aAxis) const
+ {
+   if (aUnit == mUnit) {
+     return mValue;
+   }
+-  if ((aUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER &&
+-       mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_PX) ||
+-      (aUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_PX &&
+-       mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER)) {
++  if ((aUnit == SVGLengthBinding::SVG_LENGTHTYPE_NUMBER &&
++       mUnit == SVGLengthBinding::SVG_LENGTHTYPE_PX) ||
++      (aUnit == SVGLengthBinding::SVG_LENGTHTYPE_PX &&
++       mUnit == SVGLengthBinding::SVG_LENGTHTYPE_NUMBER)) {
+     return mValue;
+   }
+   if (IsAbsoluteUnit(aUnit) && IsAbsoluteUnit(mUnit)) {
+     return mValue * GetAbsUnitsPerAbsUnit(aUnit, mUnit);
+   }
+ 
+   // Otherwise we do a two step convertion via user units. This can only
+   // succeed if aElement is non-null (although that's not sufficent to
+@@ -139,34 +141,34 @@ SVGLength::GetValueInSpecifiedUnit(uint8
+ 
+ #define INCHES_PER_MM_FLOAT float(0.0393700787)
+ #define INCHES_PER_CM_FLOAT float(0.393700787)
+ 
+ float
+ SVGLength::GetUserUnitsPerUnit(const nsSVGElement *aElement, uint8_t aAxis) const
+ {
+   switch (mUnit) {
+-    case nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER:
+-    case nsIDOMSVGLength::SVG_LENGTHTYPE_PX:
++    case SVGLengthBinding::SVG_LENGTHTYPE_NUMBER:
++    case SVGLengthBinding::SVG_LENGTHTYPE_PX:
+       return 1.0f;
+-    case nsIDOMSVGLength::SVG_LENGTHTYPE_MM:
++    case SVGLengthBinding::SVG_LENGTHTYPE_MM:
+       return INCHES_PER_MM_FLOAT * GetUserUnitsPerInch();
+-    case nsIDOMSVGLength::SVG_LENGTHTYPE_CM:
++    case SVGLengthBinding::SVG_LENGTHTYPE_CM:
+       return INCHES_PER_CM_FLOAT * GetUserUnitsPerInch();
+-    case nsIDOMSVGLength::SVG_LENGTHTYPE_IN:
++    case SVGLengthBinding::SVG_LENGTHTYPE_IN:
+       return GetUserUnitsPerInch();
+-    case nsIDOMSVGLength::SVG_LENGTHTYPE_PT:
++    case SVGLengthBinding::SVG_LENGTHTYPE_PT:
+       return (1.0f/POINTS_PER_INCH_FLOAT) * GetUserUnitsPerInch();
+-    case nsIDOMSVGLength::SVG_LENGTHTYPE_PC:
++    case SVGLengthBinding::SVG_LENGTHTYPE_PC:
+       return (12.0f/POINTS_PER_INCH_FLOAT) * GetUserUnitsPerInch();
+-    case nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE:
++    case SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE:
+       return GetUserUnitsPerPercent(aElement, aAxis);
+-    case nsIDOMSVGLength::SVG_LENGTHTYPE_EMS:
++    case SVGLengthBinding::SVG_LENGTHTYPE_EMS:
+       return SVGContentUtils::GetFontSize(const_cast<nsSVGElement*>(aElement));
+-    case nsIDOMSVGLength::SVG_LENGTHTYPE_EXS:
++    case SVGLengthBinding::SVG_LENGTHTYPE_EXS:
+       return SVGContentUtils::GetFontXHeight(const_cast<nsSVGElement*>(aElement));
+     default:
+       NS_NOTREACHED("Unknown unit type");
+       return std::numeric_limits<float>::quiet_NaN();
+   }
+ }
+ 
+ /* static */ float
+@@ -178,17 +180,17 @@ SVGLength::GetUserUnitsPerPercent(const 
+       return std::max(viewportElement->GetLength(aAxis) / 100.0f, 0.0f);
+     }
+   }
+   return std::numeric_limits<float>::quiet_NaN();
+ }
+ 
+ // Helpers:
+ 
+-// These items must be at the same index as the nsIDOMSVGLength constants!
++// These items must be at the same index as the SVGLength constants!
+ static nsIAtom** const unitMap[] =
+ {
+   nullptr, /* SVG_LENGTHTYPE_UNKNOWN */
+   nullptr, /* SVG_LENGTHTYPE_NUMBER */
+   &nsGkAtoms::percentage,
+   &nsGkAtoms::em,
+   &nsGkAtoms::ex,
+   &nsGkAtoms::px,
+@@ -210,23 +212,23 @@ GetUnitString(nsAString& unit, uint16_t 
+   }
+   NS_NOTREACHED("Unknown unit type"); // Someone's using an SVGLength with an invalid unit?
+ }
+ 
+ static uint16_t
+ GetUnitTypeForString(const nsAString& unitStr)
+ {
+   if (unitStr.IsEmpty())
+-    return nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER;
++    return SVGLengthBinding::SVG_LENGTHTYPE_NUMBER;
+ 
+   nsIAtom* unitAtom = NS_GetStaticAtom(unitStr);
+ 
+   if (unitAtom) {
+     for (uint32_t i = 1 ; i < ArrayLength(unitMap) ; i++) {
+       if (unitMap[i] && *unitMap[i] == unitAtom) {
+         return i;
+       }
+     }
+   }
+-  return nsIDOMSVGLength::SVG_LENGTHTYPE_UNKNOWN;
++  return SVGLengthBinding::SVG_LENGTHTYPE_UNKNOWN;
+ }
+ 
+ } // namespace mozilla
+diff --git a/dom/svg/SVGLength.h b/dom/svg/SVGLength.h
+--- a/dom/svg/SVGLength.h
++++ b/dom/svg/SVGLength.h
+@@ -6,16 +6,17 @@
+ 
+ #ifndef MOZILLA_SVGLENGTH_H__
+ #define MOZILLA_SVGLENGTH_H__
+ 
+ #include "nsDebug.h"
+ #include "nsIDOMSVGLength.h"
+ #include "nsMathUtils.h"
+ #include "mozilla/FloatingPoint.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ 
+ class nsSVGElement;
+ 
+ namespace mozilla {
+ 
+ /**
+  * This SVGLength class is currently used for SVGLength *list* attributes only.
+  * The class that is currently used for <length> attributes is nsSVGLength2.
+@@ -30,17 +31,17 @@ namespace mozilla {
+  */
+ class SVGLength
+ {
+ public:
+ 
+   SVGLength()
+ #ifdef DEBUG
+     : mValue(0.0f)
+-    , mUnit(nsIDOMSVGLength::SVG_LENGTHTYPE_UNKNOWN) // caught by IsValid()
++    , mUnit(dom::SVGLengthBinding::SVG_LENGTHTYPE_UNKNOWN) // caught by IsValid()
+ #endif
+   {}
+ 
+   SVGLength(float aValue, uint8_t aUnit)
+     : mValue(aValue)
+     , mUnit(aUnit)
+   {
+     NS_ASSERTION(IsValid(), "Constructed an invalid length");
+@@ -115,22 +116,22 @@ public:
+    * This method returns numeric_limits<float>::quiet_NaN() if it is not
+    * possible to convert the value to the specified unit.
+    */
+   float GetValueInSpecifiedUnit(uint8_t aUnit,
+                                 const nsSVGElement *aElement,
+                                 uint8_t aAxis) const;
+ 
+   bool IsPercentage() const {
+-    return mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE;
++    return mUnit == dom::SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE;
+   }
+ 
+   static bool IsValidUnitType(uint16_t unit) {
+-    return unit > nsIDOMSVGLength::SVG_LENGTHTYPE_UNKNOWN &&
+-           unit <= nsIDOMSVGLength::SVG_LENGTHTYPE_PC;
++    return unit > dom::SVGLengthBinding::SVG_LENGTHTYPE_UNKNOWN &&
++           unit <= dom::SVGLengthBinding::SVG_LENGTHTYPE_PC;
+   }
+ 
+   /**
+    * Returns the number of user units per current unit.
+    *
+    * This method returns numeric_limits<float>::quiet_NaN() if the conversion
+    * factor between the length's current unit and user units is undefined (see
+    * the comments for GetUserUnitsPerInch and GetUserUnitsPerPercent).
+diff --git a/dom/svg/SVGLengthList.h b/dom/svg/SVGLengthList.h
+--- a/dom/svg/SVGLengthList.h
++++ b/dom/svg/SVGLengthList.h
+@@ -10,16 +10,17 @@
+ #include "nsCOMPtr.h"
+ #include "nsDebug.h"
+ #include "nsIContent.h"
+ #include "nsINode.h"
+ #include "nsIWeakReferenceUtils.h"
+ #include "nsSVGElement.h"
+ #include "nsTArray.h"
+ #include "SVGLength.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ 
+ namespace mozilla {
+ 
+ /**
+  * ATTENTION! WARNING! WATCH OUT!!
+  *
+  * Consumers that modify objects of this type absolutely MUST keep the DOM
+  * wrappers for those lists (if any) in sync!! That's why this class is so
+@@ -332,17 +333,17 @@ public:
+ 
+   /// This may return a non-finite value
+   float operator[](uint32_t aIndex) const {
+     return (*mList)[aIndex].GetValueInUserUnits(mElement, mAxis);
+   }
+ 
+   bool HasPercentageValueAt(uint32_t aIndex) const {
+     const SVGLength& length = (*mList)[aIndex];
+-    return length.GetUnit() == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE;
++    return length.GetUnit() == dom::SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE;
+   }
+ 
+ private:
+   const SVGLengthList *mList;
+   nsSVGElement *mElement;
+   uint8_t mAxis;
+ };
+ 
+diff --git a/dom/svg/SVGLineElement.cpp b/dom/svg/SVGLineElement.cpp
+--- a/dom/svg/SVGLineElement.cpp
++++ b/dom/svg/SVGLineElement.cpp
+@@ -1,15 +1,16 @@
+ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /* vim: set ts=8 sts=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/. */
+ 
+ #include "mozilla/dom/SVGLineElement.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGLineElementBinding.h"
+ #include "mozilla/gfx/2D.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Line)
+ 
+ using namespace mozilla::gfx;
+ 
+ namespace mozilla {
+@@ -18,20 +19,20 @@ namespace dom {
+ JSObject*
+ SVGLineElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGLineElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::LengthInfo SVGLineElement::sLengthInfo[4] =
+ {
+-  { &nsGkAtoms::x1, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::y1, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+-  { &nsGkAtoms::x2, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::y2, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::x1, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::y1, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::x2, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::y2, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+ };
+ 
+ //----------------------------------------------------------------------
+ // Implementation
+ 
+ SVGLineElement::SVGLineElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
+   : SVGLineElementBase(aNodeInfo)
+ {
+diff --git a/dom/svg/SVGMarkerElement.cpp b/dom/svg/SVGMarkerElement.cpp
+--- a/dom/svg/SVGMarkerElement.cpp
++++ b/dom/svg/SVGMarkerElement.cpp
+@@ -6,16 +6,17 @@
+ 
+ #include "mozilla/ArrayUtils.h"
+ 
+ #include "nsGkAtoms.h"
+ #include "nsCOMPtr.h"
+ #include "SVGAnimatedPreserveAspectRatio.h"
+ #include "nsError.h"
+ #include "mozilla/dom/SVGAngle.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGMarkerElement.h"
+ #include "mozilla/dom/SVGMarkerElementBinding.h"
+ #include "mozilla/Preferences.h"
+ #include "mozilla/gfx/Matrix.h"
+ #include "mozilla/FloatingPoint.h"
+ #include "SVGContentUtils.h"
+ 
+ using namespace mozilla::gfx;
+@@ -28,20 +29,20 @@ namespace dom {
+ JSObject*
+ SVGMarkerElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGMarkerElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::LengthInfo SVGMarkerElement::sLengthInfo[4] =
+ {
+-  { &nsGkAtoms::refX, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::refY, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+-  { &nsGkAtoms::markerWidth, 3, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::markerHeight, 3, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::refX, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::refY, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::markerWidth, 3, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::markerHeight, 3, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+ };
+ 
+ nsSVGEnumMapping SVGMarkerElement::sUnitsMap[] = {
+   {&nsGkAtoms::strokeWidth, SVG_MARKERUNITS_STROKEWIDTH},
+   {&nsGkAtoms::userSpaceOnUse, SVG_MARKERUNITS_USERSPACEONUSE},
+   {nullptr, 0}
+ };
+ 
+diff --git a/dom/svg/SVGMaskElement.cpp b/dom/svg/SVGMaskElement.cpp
+--- a/dom/svg/SVGMaskElement.cpp
++++ b/dom/svg/SVGMaskElement.cpp
+@@ -3,16 +3,17 @@
+ /* 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/. */
+ 
+ #include "mozilla/ArrayUtils.h"
+ 
+ #include "nsCOMPtr.h"
+ #include "nsGkAtoms.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGMaskElement.h"
+ #include "mozilla/dom/SVGMaskElementBinding.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Mask)
+ 
+ namespace mozilla {
+ namespace dom {
+ 
+@@ -21,20 +22,20 @@ SVGMaskElement::WrapNode(JSContext *aCx,
+ {
+   return SVGMaskElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ //--------------------- Masks ------------------------
+ 
+ nsSVGElement::LengthInfo SVGMaskElement::sLengthInfo[4] =
+ {
+-  { &nsGkAtoms::x, -10, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
+-  { &nsGkAtoms::y, -10, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
+-  { &nsGkAtoms::width, 120, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
+-  { &nsGkAtoms::height, 120, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
++  { &nsGkAtoms::x, -10, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
++  { &nsGkAtoms::y, -10, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
++  { &nsGkAtoms::width, 120, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
++  { &nsGkAtoms::height, 120, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
+ };
+ 
+ nsSVGElement::EnumInfo SVGMaskElement::sEnumInfo[2] =
+ {
+   { &nsGkAtoms::maskUnits,
+     sSVGUnitTypesMap,
+     SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
+   },
+diff --git a/dom/svg/SVGPatternElement.cpp b/dom/svg/SVGPatternElement.cpp
+--- a/dom/svg/SVGPatternElement.cpp
++++ b/dom/svg/SVGPatternElement.cpp
+@@ -4,16 +4,17 @@
+  * 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/. */
+ 
+ #include "mozilla/ArrayUtils.h"
+ 
+ #include "nsCOMPtr.h"
+ #include "nsGkAtoms.h"
+ #include "mozilla/dom/SVGAnimatedTransformList.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGPatternElement.h"
+ #include "mozilla/dom/SVGPatternElementBinding.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Pattern)
+ 
+ namespace mozilla {
+ namespace dom {
+ 
+@@ -22,20 +23,20 @@ SVGPatternElement::WrapNode(JSContext *a
+ {
+   return SVGPatternElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ //--------------------- Patterns ------------------------
+ 
+ nsSVGElement::LengthInfo SVGPatternElement::sLengthInfo[4] =
+ {
+-  { &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
+-  { &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
+-  { &nsGkAtoms::width, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
+-  { &nsGkAtoms::height, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
++  { &nsGkAtoms::x, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
++  { &nsGkAtoms::y, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
++  { &nsGkAtoms::width, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
++  { &nsGkAtoms::height, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
+ };
+ 
+ nsSVGElement::EnumInfo SVGPatternElement::sEnumInfo[2] =
+ {
+   { &nsGkAtoms::patternUnits,
+     sSVGUnitTypesMap,
+     SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
+   },
+diff --git a/dom/svg/SVGRectElement.cpp b/dom/svg/SVGRectElement.cpp
+--- a/dom/svg/SVGRectElement.cpp
++++ b/dom/svg/SVGRectElement.cpp
+@@ -1,16 +1,17 @@
+ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /* vim: set ts=8 sts=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/. */
+ 
+ #include "mozilla/dom/SVGRectElement.h"
+ #include "nsGkAtoms.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGRectElementBinding.h"
+ #include "mozilla/gfx/2D.h"
+ #include "mozilla/gfx/Matrix.h"
+ #include "mozilla/gfx/Rect.h"
+ #include "mozilla/gfx/PathHelpers.h"
+ #include <algorithm>
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Rect)
+@@ -25,22 +26,22 @@ class SVGAnimatedLength;
+ JSObject*
+ SVGRectElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGRectElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::LengthInfo SVGRectElement::sLengthInfo[6] =
+ {
+-  { &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+-  { &nsGkAtoms::width, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::height, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+-  { &nsGkAtoms::rx, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::ry, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y }
++  { &nsGkAtoms::x, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::y, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::width, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::height, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::rx, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::ry, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y }
+ };
+ 
+ //----------------------------------------------------------------------
+ // Implementation
+ 
+ SVGRectElement::SVGRectElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
+   : SVGRectElementBase(aNodeInfo)
+ {
+diff --git a/dom/svg/SVGTextContentElement.cpp b/dom/svg/SVGTextContentElement.cpp
+--- a/dom/svg/SVGTextContentElement.cpp
++++ b/dom/svg/SVGTextContentElement.cpp
+@@ -1,16 +1,17 @@
+ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /* vim: set ts=8 sts=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/. */
+ 
+ #include "mozilla/dom/SVGTextContentElement.h"
+ 
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGIRect.h"
+ #include "nsBidiUtils.h"
+ #include "nsISVGPoint.h"
+ #include "nsTextFragment.h"
+ #include "nsTextFrameUtils.h"
+ #include "nsTextNode.h"
+ #include "SVGTextFrame.h"
+ 
+@@ -25,17 +26,17 @@ nsSVGEnumMapping SVGTextContentElement::
+ 
+ nsSVGElement::EnumInfo SVGTextContentElement::sEnumInfo[1] =
+ {
+   { &nsGkAtoms::lengthAdjust, sLengthAdjustMap, SVG_LENGTHADJUST_SPACING }
+ };
+ 
+ nsSVGElement::LengthInfo SVGTextContentElement::sLengthInfo[1] =
+ {
+-  { &nsGkAtoms::textLength, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY }
++  { &nsGkAtoms::textLength, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY }
+ };
+ 
+ SVGTextFrame*
+ SVGTextContentElement::GetSVGTextFrame()
+ {
+   nsIFrame* frame = GetPrimaryFrame(FlushType::Layout);
+   nsIFrame* textFrame =
+     nsLayoutUtils::GetClosestFrameOfType(frame, LayoutFrameType::SVGText);
+diff --git a/dom/svg/SVGTextPathElement.cpp b/dom/svg/SVGTextPathElement.cpp
+--- a/dom/svg/SVGTextPathElement.cpp
++++ b/dom/svg/SVGTextPathElement.cpp
+@@ -1,15 +1,16 @@
+ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /* vim: set ts=8 sts=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/. */
+ 
+ #include "mozilla/dom/SVGTextPathElement.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGTextPathElementBinding.h"
+ #include "nsSVGElement.h"
+ #include "nsGkAtoms.h"
+ #include "nsError.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(TextPath)
+ 
+ namespace mozilla {
+@@ -21,19 +22,19 @@ JSObject*
+ SVGTextPathElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGTextPathElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::LengthInfo SVGTextPathElement::sLengthInfo[2] =
+ {
+   // from SVGTextContentElement:
+-  { &nsGkAtoms::textLength, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY },
++  { &nsGkAtoms::textLength, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY },
+   // from SVGTextPathElement:
+-  { &nsGkAtoms::startOffset, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X }
++  { &nsGkAtoms::startOffset, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X }
+ };
+ 
+ nsSVGEnumMapping SVGTextPathElement::sMethodMap[] = {
+   {&nsGkAtoms::align, TEXTPATH_METHODTYPE_ALIGN},
+   {&nsGkAtoms::stretch, TEXTPATH_METHODTYPE_STRETCH},
+   {nullptr, 0}
+ };
+ 
+diff --git a/dom/svg/SVGUseElement.cpp b/dom/svg/SVGUseElement.cpp
+--- a/dom/svg/SVGUseElement.cpp
++++ b/dom/svg/SVGUseElement.cpp
+@@ -3,16 +3,17 @@
+ /* 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/. */
+ 
+ #include "mozilla/ArrayUtils.h"
+ #include "mozilla/ErrorResult.h"
+ 
+ #include "mozilla/dom/SVGUseElement.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGUseElementBinding.h"
+ #include "nsGkAtoms.h"
+ #include "mozilla/dom/SVGSVGElement.h"
+ #include "nsIDocument.h"
+ #include "nsIPresShell.h"
+ #include "mozilla/dom/Element.h"
+ #include "nsContentUtils.h"
+ #include "nsIURI.h"
+@@ -31,20 +32,20 @@ SVGUseElement::WrapNode(JSContext *aCx, 
+   return SVGUseElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ ////////////////////////////////////////////////////////////////////////
+ // implementation
+ 
+ nsSVGElement::LengthInfo SVGUseElement::sLengthInfo[4] =
+ {
+-  { &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+-  { &nsGkAtoms::width, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::height, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::x, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::y, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::width, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::height, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+ };
+ 
+ nsSVGElement::StringInfo SVGUseElement::sStringInfo[2] =
+ {
+   { &nsGkAtoms::href, kNameSpaceID_None, true },
+   { &nsGkAtoms::href, kNameSpaceID_XLink, true }
+ };
+ 
+@@ -345,17 +346,17 @@ SVGUseElement::SyncWidthOrHeight(nsIAtom
+       // content that's being cloned.
+       TriggerReclone();
+       return;
+     }
+     // Our width/height attribute is now no longer explicitly set, so we
+     // need to set the value to 100%
+     nsSVGLength2 length;
+     length.Init(SVGContentUtils::XY, 0xff,
+-                100, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE);
++                100, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE);
+     target->SetLength(aName, length);
+     return;
+   }
+ }
+ 
+ void
+ SVGUseElement::LookupHref()
+ {
+diff --git a/dom/svg/SVGViewportElement.cpp b/dom/svg/SVGViewportElement.cpp
+--- a/dom/svg/SVGViewportElement.cpp
++++ b/dom/svg/SVGViewportElement.cpp
+@@ -4,16 +4,17 @@
+  * 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/. */
+ 
+ #include <stdint.h>
+ #include "mozilla/ArrayUtils.h"
+ #include "mozilla/ContentEvents.h"
+ #include "mozilla/EventDispatcher.h"
+ #include "mozilla/Likely.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGMatrix.h"
+ #include "mozilla/dom/SVGViewportElement.h"
+ #include "mozilla/dom/SVGViewElement.h"
+ 
+ #include "DOMSVGLength.h"
+ #include "DOMSVGPoint.h"
+ #include "nsCOMPtr.h"
+ #include "nsContentUtils.h"
+@@ -34,20 +35,20 @@
+ 
+ using namespace mozilla::gfx;
+ 
+ namespace mozilla {
+ namespace dom {
+ 
+ nsSVGElement::LengthInfo SVGViewportElement::sLengthInfo[4] =
+ {
+-  { &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
+-  { &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
+-  { &nsGkAtoms::width, 100, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
+-  { &nsGkAtoms::height, 100, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
++  { &nsGkAtoms::x, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
++  { &nsGkAtoms::y, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
++  { &nsGkAtoms::width, 100, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
++  { &nsGkAtoms::height, 100, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
+ };
+ 
+ //----------------------------------------------------------------------
+ // Implementation
+ 
+ SVGViewportElement::SVGViewportElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
+   : SVGGraphicsElement(aNodeInfo),
+     mViewportWidth(0),
+diff --git a/dom/svg/nsSVGElement.cpp b/dom/svg/nsSVGElement.cpp
+--- a/dom/svg/nsSVGElement.cpp
++++ b/dom/svg/nsSVGElement.cpp
+@@ -5,16 +5,17 @@
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #include "mozilla/ArrayUtils.h"
+ #include "mozilla/DebugOnly.h"
+ #include "mozilla/Unused.h"
+ 
+ #include "nsSVGElement.h"
+ 
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGSVGElement.h"
+ #include "mozilla/dom/SVGTests.h"
+ #include "nsContentUtils.h"
+ #include "nsICSSDeclaration.h"
+ #include "nsIContentInlines.h"
+ #include "nsIDocument.h"
+ #include "nsIDOMMutationEvent.h"
+ #include "mozilla/InternalMutationEvent.h"
+@@ -1694,22 +1695,22 @@ nsSVGElement::GetAnimatedLengthValues(fl
+   uint32_t i = 0;
+ 
+   va_list args;
+   va_start(args, aFirst);
+ 
+   while (f && i < info.mLengthCount) {
+     uint8_t type = info.mLengths[i].GetSpecifiedUnitType();
+     if (!ctx) {
+-      if (type != nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER &&
+-          type != nsIDOMSVGLength::SVG_LENGTHTYPE_PX)
++      if (type != SVGLengthBinding::SVG_LENGTHTYPE_NUMBER &&
++          type != SVGLengthBinding::SVG_LENGTHTYPE_PX)
+         ctx = GetCtx();
+     }
+-    if (type == nsIDOMSVGLength::SVG_LENGTHTYPE_EMS ||
+-        type == nsIDOMSVGLength::SVG_LENGTHTYPE_EXS)
++    if (type == SVGLengthBinding::SVG_LENGTHTYPE_EMS ||
++        type == SVGLengthBinding::SVG_LENGTHTYPE_EXS)
+       *f = info.mLengths[i++].GetAnimValue(this);
+     else
+       *f = info.mLengths[i++].GetAnimValue(ctx);
+     f = va_arg(args, float*);
+   }
+ 
+   va_end(args);
+ }
+diff --git a/dom/svg/nsSVGFilters.cpp b/dom/svg/nsSVGFilters.cpp
+--- a/dom/svg/nsSVGFilters.cpp
++++ b/dom/svg/nsSVGFilters.cpp
+@@ -33,34 +33,35 @@
+ #include "mozilla/dom/SVGComponentTransferFunctionElement.h"
+ #include "mozilla/dom/SVGFEDistantLightElement.h"
+ #include "mozilla/dom/SVGFEFuncAElementBinding.h"
+ #include "mozilla/dom/SVGFEFuncBElementBinding.h"
+ #include "mozilla/dom/SVGFEFuncGElementBinding.h"
+ #include "mozilla/dom/SVGFEFuncRElementBinding.h"
+ #include "mozilla/dom/SVGFEPointLightElement.h"
+ #include "mozilla/dom/SVGFESpotLightElement.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ 
+ #if defined(XP_WIN)
+ // Prevent Windows redefining LoadImage
+ #undef LoadImage
+ #endif
+ 
+ using namespace mozilla;
+ using namespace mozilla::dom;
+ using namespace mozilla::gfx;
+ 
+ //--------------------Filter Element Base Class-----------------------
+ 
+ nsSVGElement::LengthInfo nsSVGFE::sLengthInfo[4] =
+ {
+-  { &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
+-  { &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
+-  { &nsGkAtoms::width, 100, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
+-  { &nsGkAtoms::height, 100, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y }
++  { &nsGkAtoms::x, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
++  { &nsGkAtoms::y, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
++  { &nsGkAtoms::width, 100, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
++  { &nsGkAtoms::height, 100, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y }
+ };
+ 
+ //----------------------------------------------------------------------
+ // nsISupports methods
+ 
+ NS_IMPL_ADDREF_INHERITED(nsSVGFE,nsSVGFEBase)
+ NS_IMPL_RELEASE_INHERITED(nsSVGFE,nsSVGFEBase)
+ 
+diff --git a/dom/svg/nsSVGLength2.cpp b/dom/svg/nsSVGLength2.cpp
+--- a/dom/svg/nsSVGLength2.cpp
++++ b/dom/svg/nsSVGLength2.cpp
+@@ -40,18 +40,18 @@ static nsIAtom** const unitMap[] =
+ static nsSVGAttrTearoffTable<nsSVGLength2, SVGAnimatedLength>
+   sSVGAnimatedLengthTearoffTable;
+ 
+ /* Helper functions */
+ 
+ static bool
+ IsValidUnitType(uint16_t unit)
+ {
+-  if (unit > nsIDOMSVGLength::SVG_LENGTHTYPE_UNKNOWN &&
+-      unit <= nsIDOMSVGLength::SVG_LENGTHTYPE_PC)
++  if (unit > SVGLengthBinding::SVG_LENGTHTYPE_UNKNOWN &&
++      unit <= SVGLengthBinding::SVG_LENGTHTYPE_PC)
+     return true;
+ 
+   return false;
+ }
+ 
+ static void
+ GetUnitString(nsAString& unit, uint16_t unitType)
+ {
+@@ -64,28 +64,28 @@ GetUnitString(nsAString& unit, uint16_t 
+ 
+   NS_NOTREACHED("Unknown unit type");
+ }
+ 
+ static uint16_t
+ GetUnitTypeForString(const nsAString& unitStr)
+ {
+   if (unitStr.IsEmpty())
+-    return nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER;
++    return SVGLengthBinding::SVG_LENGTHTYPE_NUMBER;
+ 
+   nsIAtom *unitAtom = NS_GetStaticAtom(unitStr);
+   if (unitAtom) {
+     for (uint32_t i = 0 ; i < ArrayLength(unitMap) ; i++) {
+       if (unitMap[i] && *unitMap[i] == unitAtom) {
+         return i;
+       }
+     }
+   }
+ 
+-  return nsIDOMSVGLength::SVG_LENGTHTYPE_UNKNOWN;
++  return SVGLengthBinding::SVG_LENGTHTYPE_UNKNOWN;
+ }
+ 
+ static void
+ GetValueString(nsAString &aValueAsString, float aValue, uint16_t aUnitType)
+ {
+   nsTextFormatter::ssprintf(aValueAsString, u"%g", (double)aValue);
+ 
+   nsAutoString unitString;
+@@ -238,34 +238,34 @@ nsSVGLength2::GetPixelsPerUnit(nsIFrame*
+ // See https://www.w3.org/TR/css-values-3/#absolute-lengths
+ static const float DPI = 96.0f;
+ 
+ float
+ nsSVGLength2::GetPixelsPerUnit(const UserSpaceMetrics& aMetrics,
+                                uint8_t aUnitType) const
+ {
+   switch (aUnitType) {
+-  case nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER:
+-  case nsIDOMSVGLength::SVG_LENGTHTYPE_PX:
++  case SVGLengthBinding::SVG_LENGTHTYPE_NUMBER:
++  case SVGLengthBinding::SVG_LENGTHTYPE_PX:
+     return 1;
+-  case nsIDOMSVGLength::SVG_LENGTHTYPE_MM:
++  case SVGLengthBinding::SVG_LENGTHTYPE_MM:
+     return DPI / MM_PER_INCH_FLOAT;
+-  case nsIDOMSVGLength::SVG_LENGTHTYPE_CM:
++  case SVGLengthBinding::SVG_LENGTHTYPE_CM:
+     return 10.0f * DPI / MM_PER_INCH_FLOAT;
+-  case nsIDOMSVGLength::SVG_LENGTHTYPE_IN:
++  case SVGLengthBinding::SVG_LENGTHTYPE_IN:
+     return DPI;
+-  case nsIDOMSVGLength::SVG_LENGTHTYPE_PT:
++  case SVGLengthBinding::SVG_LENGTHTYPE_PT:
+     return DPI / POINTS_PER_INCH_FLOAT;
+-  case nsIDOMSVGLength::SVG_LENGTHTYPE_PC:
++  case SVGLengthBinding::SVG_LENGTHTYPE_PC:
+     return 12.0f * DPI / POINTS_PER_INCH_FLOAT;
+-  case nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE:
++  case SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE:
+     return aMetrics.GetAxisLength(mCtxType) / 100.0f;
+-  case nsIDOMSVGLength::SVG_LENGTHTYPE_EMS:
++  case SVGLengthBinding::SVG_LENGTHTYPE_EMS:
+     return aMetrics.GetEmLength();
+-  case nsIDOMSVGLength::SVG_LENGTHTYPE_EXS:
++  case SVGLengthBinding::SVG_LENGTHTYPE_EXS:
+     return aMetrics.GetExLength();
+   default:
+     NS_NOTREACHED("Unknown unit type");
+     return 0;
+   }
+ }
+ 
+ void
+@@ -513,19 +513,19 @@ nsSVGLength2::SMILLength::ValueFromStrin
+   if (!GetValueFromString(aStr, value, &unitType)) {
+     return NS_ERROR_DOM_SYNTAX_ERR;
+   }
+ 
+   nsSMILValue val(nsSMILFloatType::Singleton());
+   val.mU.mDouble = value * mVal->GetPixelsPerUnit(mSVGElement, unitType);
+   aValue = val;
+   aPreventCachingOfSandwich =
+-              (unitType == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE ||
+-               unitType == nsIDOMSVGLength::SVG_LENGTHTYPE_EMS ||
+-               unitType == nsIDOMSVGLength::SVG_LENGTHTYPE_EXS);
++              (unitType == SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE ||
++               unitType == SVGLengthBinding::SVG_LENGTHTYPE_EMS ||
++               unitType == SVGLengthBinding::SVG_LENGTHTYPE_EXS);
+ 
+   return NS_OK;
+ }
+ 
+ nsSMILValue
+ nsSVGLength2::SMILLength::GetBaseValue() const
+ {
+   nsSMILValue val(nsSMILFloatType::Singleton());
+diff --git a/dom/svg/nsSVGLength2.h b/dom/svg/nsSVGLength2.h
+--- a/dom/svg/nsSVGLength2.h
++++ b/dom/svg/nsSVGLength2.h
+@@ -4,16 +4,17 @@
+  * License, v. 2.0. If a copy of the MPL was not distributed with this
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #ifndef __NS_SVGLENGTH2_H__
+ #define __NS_SVGLENGTH2_H__
+ 
+ #include "mozilla/Attributes.h"
+ #include "mozilla/UniquePtr.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "nsCoord.h"
+ #include "nsCycleCollectionParticipant.h"
+ #include "nsError.h"
+ #include "nsIDOMSVGLength.h"
+ #include "nsISMILAttr.h"
+ #include "nsMathUtils.h"
+ #include "nsSVGElement.h"
+ #include "SVGContentUtils.h"
+@@ -92,17 +93,18 @@ class nsSVGLength2
+   friend class mozilla::DOMSVGLength;
+   typedef mozilla::dom::UserSpaceMetrics UserSpaceMetrics;
+   typedef mozilla::dom::SVGViewportElement SVGViewportElement;
+ 
+ public:
+   void Init(uint8_t aCtxType = SVGContentUtils::XY,
+             uint8_t aAttrEnum = 0xff,
+             float aValue = 0,
+-            uint8_t aUnitType = nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER) {
++            uint8_t aUnitType =
++              mozilla::dom::SVGLengthBinding::SVG_LENGTHTYPE_NUMBER) {
+     mAnimVal = mBaseVal = aValue;
+     mSpecifiedUnitType = aUnitType;
+     mAttrEnum = aAttrEnum;
+     mCtxType = aCtxType;
+     mIsAnimated = false;
+     mIsBaseSet = false;
+   }
+ 
+@@ -131,17 +133,18 @@ public:
+   float GetAnimValue(SVGViewportElement* aCtx) const
+     { return mAnimVal * GetPixelsPerUnit(aCtx, mSpecifiedUnitType); }
+   float GetAnimValue(const UserSpaceMetrics& aMetrics) const
+     { return mAnimVal * GetPixelsPerUnit(aMetrics, mSpecifiedUnitType); }
+ 
+   uint8_t GetCtxType() const { return mCtxType; }
+   uint8_t GetSpecifiedUnitType() const { return mSpecifiedUnitType; }
+   bool IsPercentage() const
+-    { return mSpecifiedUnitType == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE; }
++    { return mSpecifiedUnitType ==
++        mozilla::dom::SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE; }
+   float GetAnimValInSpecifiedUnits() const { return mAnimVal; }
+   float GetBaseValInSpecifiedUnits() const { return mBaseVal; }
+ 
+   float GetBaseValue(SVGViewportElement* aCtx) const
+     { return mBaseVal * GetPixelsPerUnit(aCtx, mSpecifiedUnitType); }
+ 
+   bool HasBaseVal() const {
+     return mIsBaseSet;
+diff --git a/layout/svg/nsSVGFilterInstance.cpp b/layout/svg/nsSVGFilterInstance.cpp
+--- a/layout/svg/nsSVGFilterInstance.cpp
++++ b/layout/svg/nsSVGFilterInstance.cpp
+@@ -8,16 +8,17 @@
+ #include "nsSVGFilterInstance.h"
+ 
+ // Keep others in (case-insensitive) order:
+ #include "gfxPlatform.h"
+ #include "gfxUtils.h"
+ #include "nsSVGDisplayableFrame.h"
+ #include "mozilla/dom/HTMLCanvasElement.h"
+ #include "mozilla/dom/IDTracker.h"
++#include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGFilterElement.h"
+ #include "SVGObserverUtils.h"
+ #include "nsSVGFilterFrame.h"
+ #include "nsSVGUtils.h"
+ #include "SVGContentUtils.h"
+ #include "FilterSupport.h"
+ #include "gfx2DGlue.h"
+ 
+@@ -156,17 +157,17 @@ nsSVGFilterInstance::GetFilterFrame(nsIF
+   return static_cast<nsSVGFilterFrame*>(frame);
+ }
+ 
+ float
+ nsSVGFilterInstance::GetPrimitiveNumber(uint8_t aCtxType, float aValue) const
+ {
+   nsSVGLength2 val;
+   val.Init(aCtxType, 0xff, aValue,
+-           nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER);
++           SVGLengthBinding::SVG_LENGTHTYPE_NUMBER);
+ 
+   float value;
+   if (mPrimitiveUnits == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
+     value = nsSVGUtils::ObjectSpace(mTargetBBox, &val);
+   } else {
+     value = nsSVGUtils::UserSpace(mMetrics, &val);
+   }
+ 
+@@ -183,24 +184,24 @@ nsSVGFilterInstance::GetPrimitiveNumber(
+   }
+ }
+ 
+ Point3D
+ nsSVGFilterInstance::ConvertLocation(const Point3D& aPoint) const
+ {
+   nsSVGLength2 val[4];
+   val[0].Init(SVGContentUtils::X, 0xff, aPoint.x,
+-              nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER);
++              SVGLengthBinding::SVG_LENGTHTYPE_NUMBER);
+   val[1].Init(SVGContentUtils::Y, 0xff, aPoint.y,
+-              nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER);
++              SVGLengthBinding::SVG_LENGTHTYPE_NUMBER);
+   // Dummy width/height values
+   val[2].Init(SVGContentUtils::X, 0xff, 0,
+-              nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER);
++              SVGLengthBinding::SVG_LENGTHTYPE_NUMBER);
+   val[3].Init(SVGContentUtils::Y, 0xff, 0,
+-              nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER);
++              SVGLengthBinding::SVG_LENGTHTYPE_NUMBER);
+ 
+   gfxRect feArea = nsSVGUtils::GetRelativeRect(mPrimitiveUnits,
+     val, mTargetBBox, mMetrics);
+   gfxRect r = UserSpaceToFilterSpace(feArea);
+   return Point3D(r.x, r.y, GetPrimitiveNumber(SVGContentUtils::XY, aPoint.z));
+ }
+ 
+ gfxRect

+ 326 - 0
mozilla-release/patches/1435138-4-60a1.patch

@@ -0,0 +1,326 @@
+# HG changeset patch
+# User Boris Zbarsky <bzbarsky@mit.edu>
+# Date 1517577693 18000
+#      Fri Feb 02 08:21:33 2018 -0500
+# Node ID 41a8ffeb9c9f5a86cb51d8c9bf16a2c21be9b08d
+# Parent  fd5cde4290ec98d5ab7bf02f0761e870d9597dc8
+Bug 1435138 part 4.  Remove nsIDOMSVGLength.  r=qdot
+
+MozReview-Commit-ID: HwKT9Bdby6F
+
+diff --git a/dom/interfaces/svg/moz.build b/dom/interfaces/svg/moz.build
+--- a/dom/interfaces/svg/moz.build
++++ b/dom/interfaces/svg/moz.build
+@@ -4,13 +4,12 @@
+ # 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/.
+ 
+ with Files("**"):
+     BUG_COMPONENT = ("Core", "SVG")
+ 
+ XPIDL_SOURCES += [
+     'nsIDOMSVGElement.idl',
+-    'nsIDOMSVGLength.idl',
+ ]
+ 
+ XPIDL_MODULE = 'dom_svg'
+ 
+diff --git a/dom/interfaces/svg/nsIDOMSVGLength.idl b/dom/interfaces/svg/nsIDOMSVGLength.idl
+deleted file mode 100644
+--- a/dom/interfaces/svg/nsIDOMSVGLength.idl
++++ /dev/null
+@@ -1,15 +0,0 @@
+-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+-/* 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/. */
+-
+-#include "domstubs.idl"
+-
+-[uuid(2596325c-aed0-487e-96a1-0a6d589b9c6b)]
+-interface nsIDOMSVGLength : nsISupports
+-{ 
+-};
+-
+-
+-
+-
+diff --git a/dom/svg/DOMSVGLength.cpp b/dom/svg/DOMSVGLength.cpp
+--- a/dom/svg/DOMSVGLength.cpp
++++ b/dom/svg/DOMSVGLength.cpp
+@@ -6,17 +6,16 @@
+ 
+ #include "DOMSVGLength.h"
+ #include "DOMSVGLengthList.h"
+ #include "DOMSVGAnimatedLengthList.h"
+ #include "SVGLength.h"
+ #include "SVGAnimatedLengthList.h"
+ #include "nsSVGElement.h"
+ #include "nsSVGLength2.h"
+-#include "nsIDOMSVGLength.h"
+ #include "nsError.h"
+ #include "nsMathUtils.h"
+ #include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/FloatingPoint.h"
+ #include "nsSVGAttrTearoffTable.h"
+ 
+ // See the architecture comment in DOMSVGAnimatedLengthList.h.
+ 
+@@ -52,17 +51,16 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED
+ NS_IMPL_CYCLE_COLLECTION_TRACE_END
+ 
+ NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMSVGLength)
+ NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMSVGLength)
+ 
+ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGLength)
+   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
+   NS_INTERFACE_MAP_ENTRY(mozilla::DOMSVGLength) // pseudo-interface
+-  NS_INTERFACE_MAP_ENTRY(nsIDOMSVGLength)
+   NS_INTERFACE_MAP_ENTRY(nsISupports)
+ NS_INTERFACE_MAP_END
+ 
+ //----------------------------------------------------------------------
+ // Helper class: AutoChangeLengthNotifier
+ // Stack-based helper class to pair calls to WillChangeLengthList and
+ // DidChangeLengthList.
+ class MOZ_RAII AutoChangeLengthNotifier
+diff --git a/dom/svg/DOMSVGLength.h b/dom/svg/DOMSVGLength.h
+--- a/dom/svg/DOMSVGLength.h
++++ b/dom/svg/DOMSVGLength.h
+@@ -5,17 +5,16 @@
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #ifndef MOZILLA_DOMSVGLENGTH_H__
+ #define MOZILLA_DOMSVGLENGTH_H__
+ 
+ #include "DOMSVGLengthList.h"
+ #include "nsCycleCollectionParticipant.h"
+ #include "nsDebug.h"
+-#include "nsIDOMSVGLength.h"
+ #include "nsTArray.h"
+ #include "SVGLength.h"
+ #include "mozilla/Attributes.h"
+ #include "nsWrapperCache.h"
+ 
+ class nsSVGElement;
+ 
+ // We make DOMSVGLength a pseudo-interface to allow us to QI to it in order to
+@@ -69,33 +68,32 @@ class ErrorResult;
+  * type can find their corresponding internal SVGLength.
+  *
+  * To use these classes for <length> attributes as well as <list-of-length>
+  * attributes, we would need to take a bit from mListIndex and use that to
+  * indicate whether the object belongs to a list or non-list attribute, then
+  * if-else as appropriate. The bug for doing that work is:
+  * https://bugzilla.mozilla.org/show_bug.cgi?id=571734
+  */
+-class DOMSVGLength final : public nsIDOMSVGLength,
++class DOMSVGLength final : public nsISupports,
+                            public nsWrapperCache
+ {
+   friend class AutoChangeLengthNotifier;
+ 
+   /**
+    * Ctor for creating the object returned by nsSVGLength2::ToDOMBaseVal/ToDOMAnimVal
+    */
+   DOMSVGLength(nsSVGLength2* aVal, nsSVGElement* aSVGElement, bool aAnimVal);
+ 
+   ~DOMSVGLength();
+ 
+ public:
+   NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGLENGTH_IID)
+   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
+   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGLength)
+-  NS_DECL_NSIDOMSVGLENGTH
+ 
+   /**
+    * Generic ctor for DOMSVGLength objects that are created for an attribute.
+    */
+   DOMSVGLength(DOMSVGLengthList *aList,
+                uint8_t aAttrEnum,
+                uint32_t aListIndex,
+                bool aIsAnimValItem);
+diff --git a/dom/svg/SVGLength.h b/dom/svg/SVGLength.h
+--- a/dom/svg/SVGLength.h
++++ b/dom/svg/SVGLength.h
+@@ -3,17 +3,16 @@
+ /* 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/. */
+ 
+ #ifndef MOZILLA_SVGLENGTH_H__
+ #define MOZILLA_SVGLENGTH_H__
+ 
+ #include "nsDebug.h"
+-#include "nsIDOMSVGLength.h"
+ #include "nsMathUtils.h"
+ #include "mozilla/FloatingPoint.h"
+ #include "mozilla/dom/SVGLengthBinding.h"
+ 
+ class nsSVGElement;
+ 
+ namespace mozilla {
+ 
+diff --git a/dom/svg/nsSVGAttrTearoffTable.h b/dom/svg/nsSVGAttrTearoffTable.h
+--- a/dom/svg/nsSVGAttrTearoffTable.h
++++ b/dom/svg/nsSVGAttrTearoffTable.h
+@@ -8,17 +8,17 @@
+ #define NS_SVGATTRTEAROFFTABLE_H_
+ 
+ #include "nsDataHashtable.h"
+ #include "nsDebug.h"
+ #include "nsHashKeys.h"
+ 
+ /**
+  * Global hashmap to associate internal SVG data types (e.g. nsSVGLength2) with
+- * DOM tear-off objects (e.g. nsIDOMSVGLength). This allows us to always return
++ * DOM tear-off objects (e.g. DOMSVGLength). This allows us to always return
+  * the same object for subsequent requests for DOM objects.
+  *
+  * We don't keep an owning reference to the tear-off objects so they are
+  * responsible for removing themselves from this table when they die.
+  */
+ template<class SimpleType, class TearoffType>
+ class nsSVGAttrTearoffTable
+ {
+diff --git a/dom/svg/nsSVGLength2.h b/dom/svg/nsSVGLength2.h
+--- a/dom/svg/nsSVGLength2.h
++++ b/dom/svg/nsSVGLength2.h
+@@ -8,17 +8,16 @@
+ #define __NS_SVGLENGTH2_H__
+ 
+ #include "mozilla/Attributes.h"
+ #include "mozilla/UniquePtr.h"
+ #include "mozilla/dom/SVGLengthBinding.h"
+ #include "nsCoord.h"
+ #include "nsCycleCollectionParticipant.h"
+ #include "nsError.h"
+-#include "nsIDOMSVGLength.h"
+ #include "nsISMILAttr.h"
+ #include "nsMathUtils.h"
+ #include "nsSVGElement.h"
+ #include "SVGContentUtils.h"
+ #include "mozilla/gfx/Rect.h"
+ 
+ class nsIFrame;
+ class nsSMILValue;
+diff --git a/image/SVGDocumentWrapper.cpp b/image/SVGDocumentWrapper.cpp
+--- a/image/SVGDocumentWrapper.cpp
++++ b/image/SVGDocumentWrapper.cpp
+@@ -7,17 +7,16 @@
+ 
+ #include "mozilla/dom/DocumentTimeline.h"
+ #include "mozilla/dom/Element.h"
+ #include "nsICategoryManager.h"
+ #include "nsIChannel.h"
+ #include "nsIContentViewer.h"
+ #include "nsIDocument.h"
+ #include "nsIDocumentLoaderFactory.h"
+-#include "nsIDOMSVGLength.h"
+ #include "nsIHttpChannel.h"
+ #include "nsIObserverService.h"
+ #include "nsIParser.h"
+ #include "nsIPresShell.h"
+ #include "nsIRequest.h"
+ #include "nsIStreamListener.h"
+ #include "nsIXMLContentSink.h"
+ #include "nsNetCID.h"
+diff --git a/js/xpconnect/tests/mochitest/test_bug790732.html b/js/xpconnect/tests/mochitest/test_bug790732.html
+--- a/js/xpconnect/tests/mochitest/test_bug790732.html
++++ b/js/xpconnect/tests/mochitest/test_bug790732.html
+@@ -33,17 +33,16 @@ https://bugzilla.mozilla.org/show_bug.cg
+   is(Ci.nsIDOMMouseScrollEvent, MouseScrollEvent);
+   is(Ci.nsIDOMMutationEvent, MutationEvent);
+   // XXX We can't test this here because it's only exposed to chrome
+   //is(Ci.nsIDOMSimpleGestureEvent, SimpleGestureEvent);
+   is(Ci.nsIDOMUIEvent, UIEvent);
+   is(Ci.nsIDOMHTMLMediaElement, HTMLMediaElement);
+   is(Ci.nsIDOMOfflineResourceList, OfflineResourceList);
+   is(Ci.nsIDOMRange, Range);
+-  is(Ci.nsIDOMSVGLength, SVGLength);
+   is(Ci.nsIDOMNodeFilter, NodeFilter);
+   is(Ci.nsIDOMXPathResult, XPathResult);
+ 
+   // Test for Bug 895231
+   for (var k of Object.keys(Components.interfaces)) {
+     ok(SpecialPowers.Ci.hasOwnProperty(k),
+        k + " should be removed from the Components shim");
+   }
+diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp
+--- a/layout/svg/SVGTextFrame.cpp
++++ b/layout/svg/SVGTextFrame.cpp
+@@ -20,17 +20,16 @@
+ #include "mozilla/gfx/PatternHelpers.h"
+ #include "mozilla/Likely.h"
+ #include "nsAlgorithm.h"
+ #include "nsBidiPresUtils.h"
+ #include "nsBlockFrame.h"
+ #include "nsCaret.h"
+ #include "nsContentUtils.h"
+ #include "nsGkAtoms.h"
+-#include "nsIDOMSVGLength.h"
+ #include "nsISelection.h"
+ #include "nsQuickSort.h"
+ #include "SVGObserverUtils.h"
+ #include "nsSVGOuterSVGFrame.h"
+ #include "nsSVGPaintServerFrame.h"
+ #include "mozilla/dom/SVGRect.h"
+ #include "nsSVGIntegrationUtils.h"
+ #include "nsSVGUtils.h"
+diff --git a/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp b/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
+--- a/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
++++ b/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
+@@ -106,17 +106,16 @@
+ #include "nsIDOMRect.h"
+ #include "nsIDOMScreen.h"
+ #include "nsIDOMScrollAreaEvent.h"
+ #include "nsIDOMSerializer.h"
+ #include "nsIDOMSimpleGestureEvent.h"
+ #include "nsIDOMStyleSheet.h"
+ #include "nsIDOMStyleSheetList.h"
+ #include "nsIDOMSVGElement.h"
+-#include "nsIDOMSVGLength.h"
+ #include "nsIDOMText.h"
+ #include "nsIDOMTimeEvent.h"
+ #include "nsIDOMTimeRanges.h"
+ #include "nsIDOMTransitionEvent.h"
+ #include "nsIDOMTreeWalker.h"
+ #include "nsIDOMUIEvent.h"
+ #include "nsIDOMValidityState.h"
+ #include "nsIDOMWheelEvent.h"
+@@ -240,17 +239,16 @@
+ #include "mozilla/dom/ScrollBoxObjectBinding.h"
+ #include "mozilla/dom/SelectionBinding.h"
+ #include "mozilla/dom/ScrollAreaEventBinding.h"
+ #include "mozilla/dom/SimpleGestureEventBinding.h"
+ #include "mozilla/dom/StorageEventBinding.h"
+ #include "mozilla/dom/StyleSheetBinding.h"
+ #include "mozilla/dom/StyleSheetListBinding.h"
+ #include "mozilla/dom/SVGElementBinding.h"
+-#include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/TextBinding.h"
+ #include "mozilla/dom/TimeEventBinding.h"
+ #include "mozilla/dom/TimeRangesBinding.h"
+ #include "mozilla/dom/TransitionEventBinding.h"
+ #include "mozilla/dom/TreeBoxObjectBinding.h"
+ #include "mozilla/dom/TreeWalkerBinding.h"
+ #include "mozilla/dom/UIEventBinding.h"
+ #include "mozilla/dom/ValidityStateBinding.h"
+@@ -423,17 +421,16 @@ const ComponentsInterfaceShimEntry kComp
+   DEFINE_SHIM(Screen),
+   DEFINE_SHIM(ScrollAreaEvent),
+   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIScrollBoxObject, ScrollBoxObject),
+   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMSerializer, XMLSerializer),
+   DEFINE_SHIM(SimpleGestureEvent),
+   DEFINE_SHIM(StyleSheet),
+   DEFINE_SHIM(StyleSheetList),
+   DEFINE_SHIM(SVGElement),
+-  DEFINE_SHIM(SVGLength),
+   DEFINE_SHIM(Text),
+   DEFINE_SHIM(TimeEvent),
+   DEFINE_SHIM(TimeRanges),
+   DEFINE_SHIM(TransitionEvent),
+   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsITreeBoxObject, TreeBoxObject),
+   DEFINE_SHIM(TreeWalker),
+   DEFINE_SHIM(UIEvent),
+   DEFINE_SHIM(ValidityState),

+ 2005 - 0
mozilla-release/patches/1435477-60a1.patch

@@ -0,0 +1,2005 @@
+# HG changeset patch
+# User Robert Longson <longsonr@gmail.com>
+# Date 1518969193 0
+# Node ID 917a211c3efa92df32dc1d629e35a9c5fdbf3941
+# Parent  dfdbd53f06a69b5eebfb0332f40c2965a82f663e
+Bug 1435477 - Make the SVG dom code use the WebIDL constants from the bindings r=jwatt
+
+diff --git a/dom/svg/DOMSVGPathSeg.cpp b/dom/svg/DOMSVGPathSeg.cpp
+--- a/dom/svg/DOMSVGPathSeg.cpp
++++ b/dom/svg/DOMSVGPathSeg.cpp
+@@ -9,16 +9,18 @@
+ #include "SVGAnimatedPathSegList.h"
+ #include "nsSVGElement.h"
+ #include "nsError.h"
+ 
+ // See the architecture comment in DOMSVGPathSegList.h.
+ 
+ namespace mozilla {
+ 
++using namespace dom::SVGPathSegBinding;
++
+ // We could use NS_IMPL_CYCLE_COLLECTION(, except that in Unlink() we need to
+ // clear our list's weak ref to us to be safe. (The other option would be to
+ // not unlink and rely on the breaking of the other edges in the cycle, as
+ // NS_SVG_VAL_IMPL_CYCLE_COLLECTION does.)
+ NS_IMPL_CYCLE_COLLECTION_CLASS(DOMSVGPathSeg)
+ 
+ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMSVGPathSeg)
+   // We may not belong to a list, so we must null check tmp->mList.
+diff --git a/dom/svg/DOMSVGPathSeg.h b/dom/svg/DOMSVGPathSeg.h
+--- a/dom/svg/DOMSVGPathSeg.h
++++ b/dom/svg/DOMSVGPathSeg.h
+@@ -17,17 +17,17 @@ class nsSVGElement;
+ 
+ #define MOZ_SVG_LIST_INDEX_BIT_COUNT 31
+ 
+ namespace mozilla {
+ 
+ #define CHECK_ARG_COUNT_IN_SYNC(segType)                                      \
+   MOZ_ASSERT(ArrayLength(mArgs) ==                                            \
+                SVGPathSegUtils::ArgCountForType(uint32_t(segType)) ||         \
+-             uint32_t(segType) == PATHSEG_CLOSEPATH,                          \
++             uint32_t(segType) == dom::SVGPathSegBinding::PATHSEG_CLOSEPATH,  \
+              "Arg count/array size out of sync")
+ 
+ #define IMPL_SVGPATHSEG_SUBCLASS_COMMON(segName, segType)                     \
+   explicit DOMSVGPathSeg##segName(const float *aArgs)                         \
+     : DOMSVGPathSeg()                                                         \
+   {                                                                           \
+     CHECK_ARG_COUNT_IN_SYNC(segType);                                         \
+     memcpy(mArgs, aArgs,                                                      \
+@@ -228,17 +228,18 @@ class DOMSVGPathSegClosePath
+   : public DOMSVGPathSeg
+ {
+ public:
+   DOMSVGPathSegClosePath()
+     : DOMSVGPathSeg()
+   {
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(ClosePath, PATHSEG_CLOSEPATH)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    ClosePath, dom::SVGPathSegBinding::PATHSEG_CLOSEPATH)
+ 
+ protected:
+   // To allow IMPL_SVGPATHSEG_SUBCLASS_COMMON above to compile we need an
+   // mArgs, but since C++ doesn't allow zero-sized arrays we need to give it
+   // one (unused) element.
+   float mArgs[1];
+ };
+ 
+@@ -248,17 +249,18 @@ class DOMSVGPathSegMovetoAbs
+ public:
+   DOMSVGPathSegMovetoAbs(float x, float y)
+     : DOMSVGPathSeg()
+   {
+     mArgs[0] = x;
+     mArgs[1] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(MovetoAbs, PATHSEG_MOVETO_ABS)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    MovetoAbs, dom::SVGPathSegBinding::PATHSEG_MOVETO_ABS)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+ 
+ protected:
+   float mArgs[2];
+@@ -270,17 +272,18 @@ class DOMSVGPathSegMovetoRel
+ public:
+   DOMSVGPathSegMovetoRel(float x, float y)
+     : DOMSVGPathSeg()
+   {
+     mArgs[0] = x;
+     mArgs[1] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(MovetoRel, PATHSEG_MOVETO_REL)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    MovetoRel, dom::SVGPathSegBinding::PATHSEG_MOVETO_REL)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+ 
+ protected:
+   float mArgs[2];
+@@ -292,17 +295,18 @@ class DOMSVGPathSegLinetoAbs
+ public:
+   DOMSVGPathSegLinetoAbs(float x, float y)
+     : DOMSVGPathSeg()
+   {
+     mArgs[0] = x;
+     mArgs[1] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(LinetoAbs, PATHSEG_LINETO_ABS)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    LinetoAbs, dom::SVGPathSegBinding::PATHSEG_LINETO_ABS)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+ 
+ protected:
+   float mArgs[2];
+@@ -314,17 +318,18 @@ class DOMSVGPathSegLinetoRel
+ public:
+   DOMSVGPathSegLinetoRel(float x, float y)
+     : DOMSVGPathSeg()
+   {
+     mArgs[0] = x;
+     mArgs[1] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(LinetoRel, PATHSEG_LINETO_REL)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    LinetoRel, dom::SVGPathSegBinding::PATHSEG_LINETO_REL)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+ 
+ protected:
+   float mArgs[2];
+@@ -355,17 +360,18 @@ public:
+   void SetX1(float aX1, ErrorResult& rv);
+   float Y1();
+   void SetY1(float aY1, ErrorResult& rv);
+   float X2();
+   void SetX2(float aX2, ErrorResult& rv);
+   float Y2();
+   void SetY2(float aY2, ErrorResult& rv);
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(CurvetoCubicAbs, PATHSEG_CURVETO_CUBIC_ABS)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    CurvetoCubicAbs, dom::SVGPathSegBinding::PATHSEG_CURVETO_CUBIC_ABS)
+ 
+ protected:
+   float mArgs[6];
+ };
+ 
+ class DOMSVGPathSegCurvetoCubicRel
+   : public DOMSVGPathSeg
+ {
+@@ -378,17 +384,18 @@ public:
+     mArgs[0] = x1;
+     mArgs[1] = y1;
+     mArgs[2] = x2;
+     mArgs[3] = y2;
+     mArgs[4] = x;
+     mArgs[5] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(CurvetoCubicRel, PATHSEG_CURVETO_CUBIC_REL)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    CurvetoCubicRel, dom::SVGPathSegBinding::PATHSEG_CURVETO_CUBIC_REL)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+   float X1();
+   void SetX1(float aX1, ErrorResult& rv);
+   float Y1();
+@@ -411,17 +418,18 @@ public:
+     : DOMSVGPathSeg()
+   {
+     mArgs[0] = x1;
+     mArgs[1] = y1;
+     mArgs[2] = x;
+     mArgs[3] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(CurvetoQuadraticAbs, PATHSEG_CURVETO_QUADRATIC_ABS)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    CurvetoQuadraticAbs, dom::SVGPathSegBinding::PATHSEG_CURVETO_QUADRATIC_ABS)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+   float X1();
+   void SetX1(float aX1, ErrorResult& rv);
+   float Y1();
+@@ -440,17 +448,18 @@ public:
+     : DOMSVGPathSeg()
+   {
+     mArgs[0] = x1;
+     mArgs[1] = y1;
+     mArgs[2] = x;
+     mArgs[3] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(CurvetoQuadraticRel, PATHSEG_CURVETO_QUADRATIC_REL)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    CurvetoQuadraticRel, dom::SVGPathSegBinding::PATHSEG_CURVETO_QUADRATIC_REL)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+   float X1();
+   void SetX1(float aX1, ErrorResult& rv);
+   float Y1();
+@@ -473,17 +482,18 @@ public:
+     mArgs[1] = r2;
+     mArgs[2] = angle;
+     mArgs[3] = largeArcFlag;
+     mArgs[4] = sweepFlag;
+     mArgs[5] = x;
+     mArgs[6] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(ArcAbs, PATHSEG_ARC_ABS)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    ArcAbs, dom::SVGPathSegBinding::PATHSEG_ARC_ABS)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+   float R1();
+   void SetR1(float aR1, ErrorResult& rv);
+   float R2();
+@@ -512,17 +522,18 @@ public:
+     mArgs[1] = r2;
+     mArgs[2] = angle;
+     mArgs[3] = largeArcFlag;
+     mArgs[4] = sweepFlag;
+     mArgs[5] = x;
+     mArgs[6] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(ArcRel, PATHSEG_ARC_REL)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    ArcRel, dom::SVGPathSegBinding::PATHSEG_ARC_REL)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+   float R1();
+   void SetR1(float aR1, ErrorResult& rv);
+   float R2();
+@@ -543,17 +554,18 @@ class DOMSVGPathSegLinetoHorizontalAbs
+ {
+ public:
+   explicit DOMSVGPathSegLinetoHorizontalAbs(float x)
+     : DOMSVGPathSeg()
+   {
+     mArgs[0] = x;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(LinetoHorizontalAbs, PATHSEG_LINETO_HORIZONTAL_ABS)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    LinetoHorizontalAbs, dom::SVGPathSegBinding::PATHSEG_LINETO_HORIZONTAL_ABS)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+ 
+ protected:
+   float mArgs[1];
+ };
+ 
+@@ -562,17 +574,18 @@ class DOMSVGPathSegLinetoHorizontalRel
+ {
+ public:
+   explicit DOMSVGPathSegLinetoHorizontalRel(float x)
+     : DOMSVGPathSeg()
+   {
+     mArgs[0] = x;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(LinetoHorizontalRel, PATHSEG_LINETO_HORIZONTAL_REL)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    LinetoHorizontalRel, dom::SVGPathSegBinding::PATHSEG_LINETO_HORIZONTAL_REL)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+ 
+ protected:
+   float mArgs[1];
+ };
+ 
+@@ -581,17 +594,18 @@ class DOMSVGPathSegLinetoVerticalAbs
+ {
+ public:
+   explicit DOMSVGPathSegLinetoVerticalAbs(float y)
+     : DOMSVGPathSeg()
+   {
+     mArgs[0] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(LinetoVerticalAbs, PATHSEG_LINETO_VERTICAL_ABS)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    LinetoVerticalAbs, dom::SVGPathSegBinding::PATHSEG_LINETO_VERTICAL_ABS)
+ 
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+ 
+ protected:
+   float mArgs[1];
+ };
+ 
+@@ -600,17 +614,18 @@ class DOMSVGPathSegLinetoVerticalRel
+ {
+ public:
+   explicit DOMSVGPathSegLinetoVerticalRel(float y)
+     : DOMSVGPathSeg()
+   {
+     mArgs[0] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(LinetoVerticalRel, PATHSEG_LINETO_VERTICAL_REL)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    LinetoVerticalRel, dom::SVGPathSegBinding::PATHSEG_LINETO_VERTICAL_REL)
+ 
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+ 
+ protected:
+   float mArgs[1];
+ };
+ 
+@@ -623,17 +638,18 @@ public:
+     : DOMSVGPathSeg()
+   {
+     mArgs[0] = x2;
+     mArgs[1] = y2;
+     mArgs[2] = x;
+     mArgs[3] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(CurvetoCubicSmoothAbs, PATHSEG_CURVETO_CUBIC_SMOOTH_ABS)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    CurvetoCubicSmoothAbs, dom::SVGPathSegBinding::PATHSEG_CURVETO_CUBIC_SMOOTH_ABS)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+   float X2();
+   void SetX2(float aX2, ErrorResult& rv);
+   float Y2();
+@@ -652,17 +668,18 @@ public:
+     : DOMSVGPathSeg()
+   {
+     mArgs[0] = x2;
+     mArgs[1] = y2;
+     mArgs[2] = x;
+     mArgs[3] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(CurvetoCubicSmoothRel, PATHSEG_CURVETO_CUBIC_SMOOTH_REL)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    CurvetoCubicSmoothRel, dom::SVGPathSegBinding::PATHSEG_CURVETO_CUBIC_SMOOTH_REL)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+   float X2();
+   void SetX2(float aX2, ErrorResult& rv);
+   float Y2();
+@@ -678,17 +695,18 @@ class DOMSVGPathSegCurvetoQuadraticSmoot
+ public:
+   DOMSVGPathSegCurvetoQuadraticSmoothAbs(float x, float y)
+     : DOMSVGPathSeg()
+   {
+     mArgs[0] = x;
+     mArgs[1] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(CurvetoQuadraticSmoothAbs, PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    CurvetoQuadraticSmoothAbs, dom::SVGPathSegBinding::PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+ 
+ protected:
+   float mArgs[2];
+@@ -700,17 +718,18 @@ class DOMSVGPathSegCurvetoQuadraticSmoot
+ public:
+   DOMSVGPathSegCurvetoQuadraticSmoothRel(float x, float y)
+     : DOMSVGPathSeg()
+   {
+     mArgs[0] = x;
+     mArgs[1] = y;
+   }
+ 
+-  IMPL_SVGPATHSEG_SUBCLASS_COMMON(CurvetoQuadraticSmoothRel, PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL)
++  IMPL_SVGPATHSEG_SUBCLASS_COMMON(
++    CurvetoQuadraticSmoothRel, dom::SVGPathSegBinding::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL)
+ 
+   float X();
+   void SetX(float aX, ErrorResult& rv);
+   float Y();
+   void SetY(float aY, ErrorResult& rv);
+ 
+ protected:
+   float mArgs[2];
+diff --git a/dom/svg/SVGAnimatedPreserveAspectRatio.h b/dom/svg/SVGAnimatedPreserveAspectRatio.h
+--- a/dom/svg/SVGAnimatedPreserveAspectRatio.h
++++ b/dom/svg/SVGAnimatedPreserveAspectRatio.h
+@@ -22,46 +22,46 @@ namespace dom {
+ class DOMSVGAnimatedPreserveAspectRatio;
+ class SVGAnimationElement;
+ } // namespace dom
+ 
+ class SVGAnimatedPreserveAspectRatio final
+ {
+ public:
+   void Init() {
+-    mBaseVal.mAlign = SVG_PRESERVEASPECTRATIO_XMIDYMID;
+-    mBaseVal.mMeetOrSlice = SVG_MEETORSLICE_MEET;
++    mBaseVal.mAlign =
++      dom::SVGPreserveAspectRatioBinding::SVG_PRESERVEASPECTRATIO_XMIDYMID;
++    mBaseVal.mMeetOrSlice =
++      dom::SVGPreserveAspectRatioBinding::SVG_MEETORSLICE_MEET;
+     mAnimVal = mBaseVal;
+     mIsAnimated = false;
+     mIsBaseSet = false;
+   }
+ 
+   nsresult SetBaseValueString(const nsAString& aValue,
+                               nsSVGElement *aSVGElement,
+                               bool aDoSetAttr);
+   void GetBaseValueString(nsAString& aValue) const;
+ 
+   void SetBaseValue(const SVGPreserveAspectRatio &aValue,
+                     nsSVGElement *aSVGElement);
+   nsresult SetBaseAlign(uint16_t aAlign, nsSVGElement *aSVGElement) {
+     if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID) {
+       return NS_ERROR_FAILURE;
+     }
+-    SetBaseValue(SVGPreserveAspectRatio(
+-                   static_cast<SVGAlign>(aAlign), mBaseVal.GetMeetOrSlice()),
++    SetBaseValue(SVGPreserveAspectRatio(aAlign, mBaseVal.GetMeetOrSlice()),
+                  aSVGElement);
+     return NS_OK;
+   }
+   nsresult SetBaseMeetOrSlice(uint16_t aMeetOrSlice, nsSVGElement *aSVGElement) {
+     if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID ||
+         aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID) {
+       return NS_ERROR_FAILURE;
+     }
+-    SetBaseValue(SVGPreserveAspectRatio(
+-                   mBaseVal.GetAlign(), static_cast<SVGMeetOrSlice>(aMeetOrSlice)),
++    SetBaseValue(SVGPreserveAspectRatio(mBaseVal.GetAlign(), aMeetOrSlice),
+                  aSVGElement);
+     return NS_OK;
+   }
+   void SetAnimValue(uint64_t aPackedValue, nsSVGElement *aSVGElement);
+ 
+   const SVGPreserveAspectRatio &GetBaseValue() const
+     { return mBaseVal; }
+   const SVGPreserveAspectRatio &GetAnimValue() const
+diff --git a/dom/svg/SVGClipPathElement.cpp b/dom/svg/SVGClipPathElement.cpp
+--- a/dom/svg/SVGClipPathElement.cpp
++++ b/dom/svg/SVGClipPathElement.cpp
+@@ -3,23 +3,26 @@
+ /* 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/. */
+ 
+ #include "mozilla/ArrayUtils.h"
+ 
+ #include "mozilla/dom/SVGClipPathElement.h"
+ #include "mozilla/dom/SVGClipPathElementBinding.h"
++#include "mozilla/dom/SVGUnitTypesBinding.h"
+ #include "nsGkAtoms.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(ClipPath)
+ 
+ namespace mozilla {
+ namespace dom {
+ 
++using namespace SVGUnitTypesBinding;
++
+ JSObject*
+ SVGClipPathElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGClipPathElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::EnumInfo SVGClipPathElement::sEnumInfo[1] =
+ {
+diff --git a/dom/svg/SVGContentUtils.cpp b/dom/svg/SVGContentUtils.cpp
+--- a/dom/svg/SVGContentUtils.cpp
++++ b/dom/svg/SVGContentUtils.cpp
+@@ -30,16 +30,17 @@
+ #include "mozilla/FloatingPoint.h"
+ #include "nsStyleContext.h"
+ #include "nsSVGPathDataParser.h"
+ #include "SVGPathData.h"
+ #include "SVGPathElement.h"
+ 
+ using namespace mozilla;
+ using namespace mozilla::dom;
++using namespace mozilla::dom::SVGPreserveAspectRatioBinding;
+ using namespace mozilla::gfx;
+ 
+ SVGSVGElement*
+ SVGContentUtils::GetOuterSVGElement(nsSVGElement *aSVGElement)
+ {
+   nsIContent *element = nullptr;
+   nsIContent *ancestor = aSVGElement->GetFlattenedTreeParent();
+ 
+@@ -547,18 +548,18 @@ SVGContentUtils::GetViewBoxTransform(flo
+                                      float aViewboxWidth, float aViewboxHeight,
+                                      const SVGPreserveAspectRatio &aPreserveAspectRatio)
+ {
+   NS_ASSERTION(aViewportWidth  >= 0, "viewport width must be nonnegative!");
+   NS_ASSERTION(aViewportHeight >= 0, "viewport height must be nonnegative!");
+   NS_ASSERTION(aViewboxWidth  > 0, "viewBox width must be greater than zero!");
+   NS_ASSERTION(aViewboxHeight > 0, "viewBox height must be greater than zero!");
+ 
+-  SVGAlign align = aPreserveAspectRatio.GetAlign();
+-  SVGMeetOrSlice meetOrSlice = aPreserveAspectRatio.GetMeetOrSlice();
++  uint16_t align = aPreserveAspectRatio.GetAlign();
++  uint16_t meetOrSlice = aPreserveAspectRatio.GetMeetOrSlice();
+ 
+   // default to the defaults
+   if (align == SVG_PRESERVEASPECTRATIO_UNKNOWN)
+     align = SVG_PRESERVEASPECTRATIO_XMIDYMID;
+   if (meetOrSlice == SVG_MEETORSLICE_UNKNOWN)
+     meetOrSlice = SVG_MEETORSLICE_MEET;
+ 
+   float a, d, e, f;
+diff --git a/dom/svg/SVGFilterElement.cpp b/dom/svg/SVGFilterElement.cpp
+--- a/dom/svg/SVGFilterElement.cpp
++++ b/dom/svg/SVGFilterElement.cpp
+@@ -6,23 +6,26 @@
+ 
+ #include "mozilla/ArrayUtils.h"
+ 
+ #include "nsGkAtoms.h"
+ #include "nsCOMPtr.h"
+ #include "mozilla/dom/SVGFilterElement.h"
+ #include "mozilla/dom/SVGFilterElementBinding.h"
+ #include "mozilla/dom/SVGLengthBinding.h"
++#include "mozilla/dom/SVGUnitTypesBinding.h"
+ #include "nsSVGUtils.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Filter)
+ 
+ namespace mozilla {
+ namespace dom {
+ 
++using namespace SVGUnitTypesBinding;
++
+ JSObject*
+ SVGFilterElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGFilterElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::LengthInfo SVGFilterElement::sLengthInfo[4] =
+ {
+diff --git a/dom/svg/SVGGradientElement.cpp b/dom/svg/SVGGradientElement.cpp
+--- a/dom/svg/SVGGradientElement.cpp
++++ b/dom/svg/SVGGradientElement.cpp
+@@ -3,29 +3,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/. */
+ 
+ #include "mozilla/dom/SVGGradientElement.h"
+ 
+ #include "mozilla/ArrayUtils.h"
+ #include "mozilla/dom/SVGAnimatedTransformList.h"
++#include "mozilla/dom/SVGGradientElementBinding.h"
+ #include "mozilla/dom/SVGRadialGradientElementBinding.h"
+ #include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGLinearGradientElementBinding.h"
++#include "mozilla/dom/SVGUnitTypesBinding.h"
+ #include "nsCOMPtr.h"
+ #include "nsGkAtoms.h"
+ #include "nsSVGElement.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(LinearGradient)
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(RadialGradient)
+ 
+ namespace mozilla {
+ namespace dom {
+ 
++using namespace SVGGradientElementBinding;
++using namespace SVGUnitTypesBinding;
++
+ //--------------------- Gradients------------------------
+ 
+ nsSVGEnumMapping SVGGradientElement::sSpreadMethodMap[] = {
+   {&nsGkAtoms::pad, SVG_SPREADMETHOD_PAD},
+   {&nsGkAtoms::reflect, SVG_SPREADMETHOD_REFLECT},
+   {&nsGkAtoms::repeat, SVG_SPREADMETHOD_REPEAT},
+   {nullptr, 0}
+ };
+diff --git a/dom/svg/SVGGradientElement.h b/dom/svg/SVGGradientElement.h
+--- a/dom/svg/SVGGradientElement.h
++++ b/dom/svg/SVGGradientElement.h
+@@ -9,21 +9,16 @@
+ 
+ #include "nsAutoPtr.h"
+ #include "nsSVGAnimatedTransformList.h"
+ #include "nsSVGElement.h"
+ #include "nsSVGLength2.h"
+ #include "nsSVGEnum.h"
+ #include "nsSVGString.h"
+ 
+-static const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0;
+-static const unsigned short SVG_SPREADMETHOD_PAD     = 1;
+-static const unsigned short SVG_SPREADMETHOD_REFLECT = 2;
+-static const unsigned short SVG_SPREADMETHOD_REPEAT  = 3;
+-
+ class nsSVGGradientFrame;
+ class nsSVGLinearGradientFrame;
+ class nsSVGRadialGradientFrame;
+ 
+ nsresult
+ NS_NewSVGLinearGradientElement(nsIContent** aResult,
+                                already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
+ nsresult
+diff --git a/dom/svg/SVGMarkerElement.cpp b/dom/svg/SVGMarkerElement.cpp
+--- a/dom/svg/SVGMarkerElement.cpp
++++ b/dom/svg/SVGMarkerElement.cpp
+@@ -15,22 +15,25 @@
+ #include "mozilla/dom/SVGMarkerElement.h"
+ #include "mozilla/dom/SVGMarkerElementBinding.h"
+ #include "mozilla/Preferences.h"
+ #include "mozilla/gfx/Matrix.h"
+ #include "mozilla/FloatingPoint.h"
+ #include "SVGContentUtils.h"
+ 
+ using namespace mozilla::gfx;
++using namespace mozilla::dom::SVGMarkerElementBinding;
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Marker)
+ 
+ namespace mozilla {
+ namespace dom {
+ 
++using namespace SVGAngleBinding;
++
+ JSObject*
+ SVGMarkerElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGMarkerElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::LengthInfo SVGMarkerElement::sLengthInfo[4] =
+ {
+diff --git a/dom/svg/SVGMarkerElement.h b/dom/svg/SVGMarkerElement.h
+--- a/dom/svg/SVGMarkerElement.h
++++ b/dom/svg/SVGMarkerElement.h
+@@ -11,63 +11,56 @@
+ #include "nsSVGAngle.h"
+ #include "nsSVGEnum.h"
+ #include "nsSVGLength2.h"
+ #include "nsSVGViewBox.h"
+ #include "SVGAnimatedPreserveAspectRatio.h"
+ #include "nsSVGElement.h"
+ #include "mozilla/Attributes.h"
+ #include "mozilla/dom/SVGAnimatedEnumeration.h"
++#include "mozilla/dom/SVGMarkerElementBinding.h"
+ 
+ class nsSVGMarkerFrame;
+ struct nsSVGMark;
+ 
+ nsresult NS_NewSVGMarkerElement(nsIContent **aResult,
+                                 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
+ 
+ namespace mozilla {
+ namespace dom {
+ 
+-// Marker Unit Types
+-static const unsigned short SVG_MARKERUNITS_UNKNOWN         = 0;
+-static const unsigned short SVG_MARKERUNITS_USERSPACEONUSE = 1;
+-static const unsigned short SVG_MARKERUNITS_STROKEWIDTH    = 2;
+-
+-// Marker Orientation Types
+-static const unsigned short SVG_MARKER_ORIENT_UNKNOWN            = 0;
+-static const unsigned short SVG_MARKER_ORIENT_AUTO               = 1;
+-static const unsigned short SVG_MARKER_ORIENT_ANGLE              = 2;
+-static const unsigned short SVG_MARKER_ORIENT_AUTO_START_REVERSE = 3;
++// Non-Exposed Marker Orientation Types
++static const uint16_t SVG_MARKER_ORIENT_AUTO_START_REVERSE = 3;
+ 
+ class nsSVGOrientType
+ {
+ public:
+   nsSVGOrientType()
+-   : mAnimVal(SVG_MARKER_ORIENT_ANGLE),
+-     mBaseVal(SVG_MARKER_ORIENT_ANGLE) {}
++   : mAnimVal(SVGMarkerElementBinding::SVG_MARKER_ORIENT_ANGLE),
++     mBaseVal(SVGMarkerElementBinding::SVG_MARKER_ORIENT_ANGLE) {}
+ 
+   nsresult SetBaseValue(uint16_t aValue,
+                         nsSVGElement *aSVGElement);
+ 
+   // XXX FIXME like https://bugzilla.mozilla.org/show_bug.cgi?id=545550 but
+   // without adding an mIsAnimated member...?
+   void SetBaseValue(uint16_t aValue)
+     { mAnimVal = mBaseVal = uint8_t(aValue); }
+   // no need to notify, since nsSVGAngle does that
+   void SetAnimValue(uint16_t aValue)
+     { mAnimVal = uint8_t(aValue); }
+ 
+   // we want to avoid exposing SVG_MARKER_ORIENT_AUTO_START_REVERSE to
+   // Web content
+   uint16_t GetBaseValue() const
+     { return mAnimVal == SVG_MARKER_ORIENT_AUTO_START_REVERSE ?
+-               SVG_MARKER_ORIENT_UNKNOWN : mBaseVal; }
++               SVGMarkerElementBinding::SVG_MARKER_ORIENT_UNKNOWN : mBaseVal; }
+   uint16_t GetAnimValue() const
+     { return mAnimVal == SVG_MARKER_ORIENT_AUTO_START_REVERSE ?
+-               SVG_MARKER_ORIENT_UNKNOWN : mAnimVal; }
++               SVGMarkerElementBinding::SVG_MARKER_ORIENT_UNKNOWN : mAnimVal; }
+   uint16_t GetAnimValueInternal() const
+     { return mAnimVal; }
+ 
+   already_AddRefed<SVGAnimatedEnumeration>
+     ToDOMAnimatedEnum(nsSVGElement* aSVGElement);
+ 
+ private:
+   nsSVGEnumValue mAnimVal;
+diff --git a/dom/svg/SVGMaskElement.cpp b/dom/svg/SVGMaskElement.cpp
+--- a/dom/svg/SVGMaskElement.cpp
++++ b/dom/svg/SVGMaskElement.cpp
+@@ -6,22 +6,25 @@
+ 
+ #include "mozilla/ArrayUtils.h"
+ 
+ #include "nsCOMPtr.h"
+ #include "nsGkAtoms.h"
+ #include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGMaskElement.h"
+ #include "mozilla/dom/SVGMaskElementBinding.h"
++#include "mozilla/dom/SVGUnitTypesBinding.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Mask)
+ 
+ namespace mozilla {
+ namespace dom {
+ 
++using namespace SVGUnitTypesBinding;
++
+ JSObject*
+ SVGMaskElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGMaskElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ //--------------------- Masks ------------------------
+ 
+diff --git a/dom/svg/SVGMotionSMILAnimationFunction.cpp b/dom/svg/SVGMotionSMILAnimationFunction.cpp
+--- a/dom/svg/SVGMotionSMILAnimationFunction.cpp
++++ b/dom/svg/SVGMotionSMILAnimationFunction.cpp
+@@ -13,16 +13,17 @@
+ #include "nsAttrValueInlines.h"
+ #include "nsSMILParserUtils.h"
+ #include "nsSVGAngle.h"
+ #include "nsSVGPathDataParser.h"
+ #include "SVGMotionSMILType.h"
+ #include "SVGMotionSMILPathUtils.h"
+ 
+ using namespace mozilla::dom;
++using namespace mozilla::dom::SVGAngleBinding;
+ using namespace mozilla::gfx;
+ 
+ namespace mozilla {
+ 
+ SVGMotionSMILAnimationFunction::SVGMotionSMILAnimationFunction()
+   : mRotateType(eRotateType_Explicit),
+     mRotateAngle(0.0f),
+     mPathSourceType(ePathSourceType_None),
+diff --git a/dom/svg/SVGOrientSMILType.cpp b/dom/svg/SVGOrientSMILType.cpp
+--- a/dom/svg/SVGOrientSMILType.cpp
++++ b/dom/svg/SVGOrientSMILType.cpp
+@@ -8,26 +8,29 @@
+ #include "nsSMILValue.h"
+ #include "nsSVGAngle.h"
+ #include "nsDebug.h"
+ #include "mozilla/dom/SVGMarkerElement.h"
+ #include <math.h>
+ 
+ namespace mozilla {
+ 
++using namespace dom::SVGAngleBinding;
++using namespace dom::SVGMarkerElementBinding;
++
+ /*static*/ SVGOrientSMILType SVGOrientSMILType::sSingleton;
+ 
+ void
+ SVGOrientSMILType::Init(nsSMILValue& aValue) const
+ {
+   MOZ_ASSERT(aValue.IsNull(), "Unexpected value type");
+ 
+   aValue.mU.mOrient.mAngle = 0.0f;
+   aValue.mU.mOrient.mUnit = SVG_ANGLETYPE_UNSPECIFIED;
+-  aValue.mU.mOrient.mOrientType = dom::SVG_MARKER_ORIENT_ANGLE;
++  aValue.mU.mOrient.mOrientType = SVG_MARKER_ORIENT_ANGLE;
+   aValue.mType = this;
+ }
+ 
+ void
+ SVGOrientSMILType::Destroy(nsSMILValue& aValue) const
+ {
+   NS_PRECONDITION(aValue.mType == this, "Unexpected SMIL value.");
+   aValue.mU.mPtr = nullptr;
+@@ -62,18 +65,18 @@ SVGOrientSMILType::IsEqual(const nsSMILV
+ nsresult
+ SVGOrientSMILType::Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
+                        uint32_t aCount) const
+ {
+   NS_PRECONDITION(aValueToAdd.mType == aDest.mType,
+                   "Trying to add invalid types");
+   NS_PRECONDITION(aValueToAdd.mType == this, "Unexpected source type");
+ 
+-  if (aDest.mU.mOrient.mOrientType != dom::SVG_MARKER_ORIENT_ANGLE ||
+-      aValueToAdd.mU.mOrient.mOrientType != dom::SVG_MARKER_ORIENT_ANGLE) {
++  if (aDest.mU.mOrient.mOrientType != SVG_MARKER_ORIENT_ANGLE ||
++      aValueToAdd.mU.mOrient.mOrientType != SVG_MARKER_ORIENT_ANGLE) {
+     // TODO: it would be nice to be able to add to auto angles
+     return NS_ERROR_FAILURE;
+   }
+ 
+   // We may be dealing with two different angle units, so we normalize to
+   // degrees for the add:
+   float currentAngle = aDest.mU.mOrient.mAngle *
+                        nsSVGAngle::GetDegreesPerUnit(aDest.mU.mOrient.mUnit);
+@@ -93,18 +96,18 @@ SVGOrientSMILType::Add(nsSMILValue& aDes
+ nsresult
+ SVGOrientSMILType::ComputeDistance(const nsSMILValue& aFrom,
+                                    const nsSMILValue& aTo,
+                                    double& aDistance) const
+ {
+   NS_PRECONDITION(aFrom.mType == aTo.mType,"Trying to compare different types");
+   NS_PRECONDITION(aFrom.mType == this, "Unexpected source type");
+ 
+-  if (aFrom.mU.mOrient.mOrientType != dom::SVG_MARKER_ORIENT_ANGLE ||
+-      aTo.mU.mOrient.mOrientType != dom::SVG_MARKER_ORIENT_ANGLE) {
++  if (aFrom.mU.mOrient.mOrientType != SVG_MARKER_ORIENT_ANGLE ||
++      aTo.mU.mOrient.mOrientType != SVG_MARKER_ORIENT_ANGLE) {
+     // TODO: it would be nice to be able to compute distance with auto angles
+     return NS_ERROR_FAILURE;
+   }
+ 
+   // Normalize both to degrees in case they're different angle units:
+   double from = aFrom.mU.mOrient.mAngle *
+                   nsSVGAngle::GetDegreesPerUnit(aFrom.mU.mOrient.mUnit);
+   double to   = aTo.mU.mOrient.mAngle *
+@@ -122,18 +125,18 @@ SVGOrientSMILType::Interpolate(const nsS
+                                nsSMILValue& aResult) const
+ {
+   NS_PRECONDITION(aStartVal.mType == aEndVal.mType,
+                   "Trying to interpolate different types");
+   NS_PRECONDITION(aStartVal.mType == this,
+                   "Unexpected types for interpolation.");
+   NS_PRECONDITION(aResult.mType   == this, "Unexpected result type.");
+ 
+-  if (aStartVal.mU.mOrient.mOrientType != dom::SVG_MARKER_ORIENT_ANGLE ||
+-      aEndVal.mU.mOrient.mOrientType != dom::SVG_MARKER_ORIENT_ANGLE) {
++  if (aStartVal.mU.mOrient.mOrientType != SVG_MARKER_ORIENT_ANGLE ||
++      aEndVal.mU.mOrient.mOrientType != SVG_MARKER_ORIENT_ANGLE) {
+     // TODO: it would be nice to be able to handle auto angles too.
+     return NS_ERROR_FAILURE;
+   }
+ 
+   float start  = aStartVal.mU.mOrient.mAngle *
+                    nsSVGAngle::GetDegreesPerUnit(aStartVal.mU.mOrient.mUnit);
+   float end    = aEndVal.mU.mOrient.mAngle *
+                    nsSVGAngle::GetDegreesPerUnit(aEndVal.mU.mOrient.mUnit);
+diff --git a/dom/svg/SVGPathData.cpp b/dom/svg/SVGPathData.cpp
+--- a/dom/svg/SVGPathData.cpp
++++ b/dom/svg/SVGPathData.cpp
+@@ -18,16 +18,17 @@
+ #include <stdarg.h>
+ #include "nsStyleConsts.h"
+ #include "SVGContentUtils.h"
+ #include "SVGGeometryElement.h" // for nsSVGMark
+ #include "SVGPathSegUtils.h"
+ #include <algorithm>
+ 
+ using namespace mozilla;
++using namespace mozilla::dom::SVGPathSegBinding;
+ using namespace mozilla::gfx;
+ 
+ static bool IsMoveto(uint16_t aSegType)
+ {
+   return aSegType == PATHSEG_MOVETO_ABS ||
+          aSegType == PATHSEG_MOVETO_REL;
+ }
+ 
+diff --git a/dom/svg/SVGPathSegUtils.h b/dom/svg/SVGPathSegUtils.h
+--- a/dom/svg/SVGPathSegUtils.h
++++ b/dom/svg/SVGPathSegUtils.h
+@@ -3,46 +3,25 @@
+ /* 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/. */
+ 
+ #ifndef MOZILLA_SVGPATHSEGUTILS_H__
+ #define MOZILLA_SVGPATHSEGUTILS_H__
+ 
+ #include "mozilla/ArrayUtils.h"
++#include "mozilla/dom/SVGPathSegBinding.h"
+ #include "mozilla/gfx/Point.h"
+ #include "nsDebug.h"
+ 
+ namespace mozilla {
+ 
+-// Path Segment Types
+-static const unsigned short PATHSEG_UNKNOWN                      = 0;
+-static const unsigned short PATHSEG_CLOSEPATH                    = 1;
+-static const unsigned short PATHSEG_MOVETO_ABS                   = 2;
+-static const unsigned short PATHSEG_MOVETO_REL                   = 3;
+-static const unsigned short PATHSEG_LINETO_ABS                   = 4;
+-static const unsigned short PATHSEG_LINETO_REL                   = 5;
+-static const unsigned short PATHSEG_CURVETO_CUBIC_ABS            = 6;
+-static const unsigned short PATHSEG_CURVETO_CUBIC_REL            = 7;
+-static const unsigned short PATHSEG_CURVETO_QUADRATIC_ABS        = 8;
+-static const unsigned short PATHSEG_CURVETO_QUADRATIC_REL        = 9;
+-static const unsigned short PATHSEG_ARC_ABS                      = 10;
+-static const unsigned short PATHSEG_ARC_REL                      = 11;
+-static const unsigned short PATHSEG_LINETO_HORIZONTAL_ABS        = 12;
+-static const unsigned short PATHSEG_LINETO_HORIZONTAL_REL        = 13;
+-static const unsigned short PATHSEG_LINETO_VERTICAL_ABS          = 14;
+-static const unsigned short PATHSEG_LINETO_VERTICAL_REL          = 15;
+-static const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_ABS     = 16;
+-static const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_REL     = 17;
+-static const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;
+-static const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;
+-
+ #define NS_SVG_PATH_SEG_MAX_ARGS         7
+-#define NS_SVG_PATH_SEG_FIRST_VALID_TYPE mozilla::PATHSEG_CLOSEPATH
+-#define NS_SVG_PATH_SEG_LAST_VALID_TYPE  mozilla::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL
++#define NS_SVG_PATH_SEG_FIRST_VALID_TYPE dom::SVGPathSegBinding::PATHSEG_CLOSEPATH
++#define NS_SVG_PATH_SEG_LAST_VALID_TYPE  dom::SVGPathSegBinding::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL
+ #define NS_SVG_PATH_SEG_TYPE_COUNT       (NS_SVG_PATH_SEG_LAST_VALID_TYPE + 1)
+ 
+ /**
+  * Code that works with path segments can use an instance of this class to
+  * store/provide information about the start of the current subpath and the
+  * last path segment (if any).
+  */
+ struct SVGPathTraversalState
+@@ -196,66 +175,69 @@ public:
+   }
+ 
+   static bool IsValidType(uint32_t aType) {
+     return aType >= NS_SVG_PATH_SEG_FIRST_VALID_TYPE &&
+            aType <= NS_SVG_PATH_SEG_LAST_VALID_TYPE;
+   }
+ 
+   static bool IsCubicType(uint32_t aType) {
+-    return aType == PATHSEG_CURVETO_CUBIC_REL ||
+-           aType == PATHSEG_CURVETO_CUBIC_ABS ||
+-           aType == PATHSEG_CURVETO_CUBIC_SMOOTH_REL ||
+-           aType == PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;
++    return aType == dom::SVGPathSegBinding::PATHSEG_CURVETO_CUBIC_REL ||
++           aType == dom::SVGPathSegBinding::PATHSEG_CURVETO_CUBIC_ABS ||
++           aType == dom::SVGPathSegBinding::PATHSEG_CURVETO_CUBIC_SMOOTH_REL ||
++           aType == dom::SVGPathSegBinding::PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;
+   }
+ 
+   static bool IsQuadraticType(uint32_t aType) {
+-    return aType == PATHSEG_CURVETO_QUADRATIC_REL ||
+-           aType == PATHSEG_CURVETO_QUADRATIC_ABS ||
+-           aType == PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL ||
+-           aType == PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;
++    return aType == dom::SVGPathSegBinding::PATHSEG_CURVETO_QUADRATIC_REL ||
++           aType == dom::SVGPathSegBinding::PATHSEG_CURVETO_QUADRATIC_ABS ||
++           aType == dom::SVGPathSegBinding::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL ||
++           aType == dom::SVGPathSegBinding::PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;
+   }
+ 
+   static bool IsArcType(uint32_t aType) {
+-    return aType == PATHSEG_ARC_ABS ||
+-           aType == PATHSEG_ARC_REL;
++    return aType == dom::SVGPathSegBinding::PATHSEG_ARC_ABS ||
++           aType == dom::SVGPathSegBinding::PATHSEG_ARC_REL;
+   }
+ 
+   static bool IsRelativeOrAbsoluteType(uint32_t aType) {
+     MOZ_ASSERT(IsValidType(aType), "Seg type not recognized");
+ 
+     // When adding a new path segment type, ensure that the returned condition
+     // below is still correct.
+-    static_assert(NS_SVG_PATH_SEG_LAST_VALID_TYPE == PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,
++    static_assert(NS_SVG_PATH_SEG_LAST_VALID_TYPE ==
++                    dom::SVGPathSegBinding::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,
+                   "Unexpected type");
+ 
+-    return aType >= PATHSEG_MOVETO_ABS;
++    return aType >= dom::SVGPathSegBinding::PATHSEG_MOVETO_ABS;
+   }
+ 
+   static bool IsRelativeType(uint32_t aType) {
+     MOZ_ASSERT
+       (IsRelativeOrAbsoluteType(aType),
+        "IsRelativeType called with segment type that does not come in relative and absolute forms");
+ 
+     // When adding a new path segment type, ensure that the returned condition
+     // below is still correct.
+-    static_assert(NS_SVG_PATH_SEG_LAST_VALID_TYPE == PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,
++    static_assert(NS_SVG_PATH_SEG_LAST_VALID_TYPE ==
++                    dom::SVGPathSegBinding::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,
+                   "Unexpected type");
+ 
+     return aType & 1;
+   }
+ 
+   static uint32_t RelativeVersionOfType(uint32_t aType) {
+     MOZ_ASSERT
+       (IsRelativeOrAbsoluteType(aType),
+        "RelativeVersionOfType called with segment type that does not come in relative and absolute forms");
+ 
+     // When adding a new path segment type, ensure that the returned condition
+     // below is still correct.
+-    static_assert(NS_SVG_PATH_SEG_LAST_VALID_TYPE == PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,
++    static_assert(NS_SVG_PATH_SEG_LAST_VALID_TYPE ==
++                   dom::SVGPathSegBinding::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,
+                   "Unexpected type");
+ 
+     return aType | 1;
+   }
+ 
+   static uint32_t SameTypeModuloRelativeness(uint32_t aType1, uint32_t aType2) {
+     if (!IsRelativeOrAbsoluteType(aType1)) {
+       return aType1 == aType2;
+diff --git a/dom/svg/SVGPatternElement.cpp b/dom/svg/SVGPatternElement.cpp
+--- a/dom/svg/SVGPatternElement.cpp
++++ b/dom/svg/SVGPatternElement.cpp
+@@ -7,22 +7,25 @@
+ #include "mozilla/ArrayUtils.h"
+ 
+ #include "nsCOMPtr.h"
+ #include "nsGkAtoms.h"
+ #include "mozilla/dom/SVGAnimatedTransformList.h"
+ #include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGPatternElement.h"
+ #include "mozilla/dom/SVGPatternElementBinding.h"
++#include "mozilla/dom/SVGUnitTypesBinding.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Pattern)
+ 
+ namespace mozilla {
+ namespace dom {
+ 
++using namespace SVGUnitTypesBinding;
++
+ JSObject*
+ SVGPatternElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGPatternElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ //--------------------- Patterns ------------------------
+ 
+diff --git a/dom/svg/SVGPreserveAspectRatio.cpp b/dom/svg/SVGPreserveAspectRatio.cpp
+--- a/dom/svg/SVGPreserveAspectRatio.cpp
++++ b/dom/svg/SVGPreserveAspectRatio.cpp
+@@ -7,16 +7,17 @@
+ #include "SVGPreserveAspectRatio.h"
+ 
+ #include "mozilla/dom/SVGPreserveAspectRatioBinding.h"
+ #include "nsWhitespaceTokenizer.h"
+ #include "SVGAnimatedPreserveAspectRatio.h"
+ 
+ using namespace mozilla;
+ using namespace dom;
++using namespace SVGPreserveAspectRatioBinding;
+ 
+ NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMSVGPreserveAspectRatio, mSVGElement)
+ 
+ NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMSVGPreserveAspectRatio)
+ NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMSVGPreserveAspectRatio)
+ 
+ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGPreserveAspectRatio)
+   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
+diff --git a/dom/svg/SVGPreserveAspectRatio.h b/dom/svg/SVGPreserveAspectRatio.h
+--- a/dom/svg/SVGPreserveAspectRatio.h
++++ b/dom/svg/SVGPreserveAspectRatio.h
+@@ -2,68 +2,52 @@
+ /* vim: set ts=8 sts=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/. */
+ 
+ #ifndef MOZILLA_CONTENT_SVGPRESERVEASPECTRATIO_H_
+ #define MOZILLA_CONTENT_SVGPRESERVEASPECTRATIO_H_
+ 
++#include "mozilla/dom/SVGPreserveAspectRatioBinding.h"
+ #include "mozilla/HashFunctions.h"  // for HashGeneric
+ 
+ #include "nsWrapperCache.h"
+ #include "nsCycleCollectionParticipant.h"
+ #include "mozilla/ErrorResult.h"
+ #include "nsSVGElement.h"
+ 
+ namespace mozilla {
+-// Alignment Types
+-enum SVGAlign : uint8_t {
+-  SVG_PRESERVEASPECTRATIO_UNKNOWN = 0,
+-  SVG_PRESERVEASPECTRATIO_NONE = 1,
+-  SVG_PRESERVEASPECTRATIO_XMINYMIN = 2,
+-  SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3,
+-  SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4,
+-  SVG_PRESERVEASPECTRATIO_XMINYMID = 5,
+-  SVG_PRESERVEASPECTRATIO_XMIDYMID = 6,
+-  SVG_PRESERVEASPECTRATIO_XMAXYMID = 7,
+-  SVG_PRESERVEASPECTRATIO_XMINYMAX = 8,
+-  SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9,
+-  SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10
+-};
+ 
+ // These constants represent the range of valid enum values for the <align>
+ // parameter. They exclude the sentinel _UNKNOWN value.
+-const uint16_t SVG_ALIGN_MIN_VALID = SVG_PRESERVEASPECTRATIO_NONE;
+-const uint16_t SVG_ALIGN_MAX_VALID = SVG_PRESERVEASPECTRATIO_XMAXYMAX;
+-
+-// Meet-or-slice Types
+-enum SVGMeetOrSlice : uint8_t {
+-  SVG_MEETORSLICE_UNKNOWN = 0,
+-  SVG_MEETORSLICE_MEET = 1,
+-  SVG_MEETORSLICE_SLICE = 2
+-};
++const uint16_t SVG_ALIGN_MIN_VALID =
++  dom::SVGPreserveAspectRatioBinding::SVG_PRESERVEASPECTRATIO_NONE;
++const uint16_t SVG_ALIGN_MAX_VALID =
++  dom::SVGPreserveAspectRatioBinding::SVG_PRESERVEASPECTRATIO_XMAXYMAX;
+ 
+ // These constants represent the range of valid enum values for the
+ // <meetOrSlice> parameter. They exclude the sentinel _UNKNOWN value.
+-const uint16_t SVG_MEETORSLICE_MIN_VALID = SVG_MEETORSLICE_MEET;
+-const uint16_t SVG_MEETORSLICE_MAX_VALID = SVG_MEETORSLICE_SLICE;
++const uint16_t SVG_MEETORSLICE_MIN_VALID =
++  dom::SVGPreserveAspectRatioBinding::SVG_MEETORSLICE_MEET;
++const uint16_t SVG_MEETORSLICE_MAX_VALID =
++  dom::SVGPreserveAspectRatioBinding::SVG_MEETORSLICE_SLICE;
+ 
+ class SVGAnimatedPreserveAspectRatio;
+ 
+ class SVGPreserveAspectRatio final
+ {
+   friend class SVGAnimatedPreserveAspectRatio;
+ public:
+   explicit SVGPreserveAspectRatio()
+-    : mAlign(SVG_PRESERVEASPECTRATIO_UNKNOWN)
+-    , mMeetOrSlice(SVG_MEETORSLICE_UNKNOWN)
++    : mAlign(dom::SVGPreserveAspectRatioBinding::SVG_PRESERVEASPECTRATIO_UNKNOWN)
++    , mMeetOrSlice(dom::SVGPreserveAspectRatioBinding::SVG_MEETORSLICE_UNKNOWN)
+   {}
+ 
+-  SVGPreserveAspectRatio(SVGAlign aAlign, SVGMeetOrSlice aMeetOrSlice)
++  SVGPreserveAspectRatio(uint16_t aAlign, uint16_t aMeetOrSlice)
+     : mAlign(aAlign)
+     , mMeetOrSlice(aMeetOrSlice)
+   {}
+ 
+   static nsresult FromString(const nsAString& aString,
+                              SVGPreserveAspectRatio* aValue);
+   void ToString(nsAString& aValueAsString) const;
+ 
+@@ -71,30 +55,30 @@ public:
+ 
+   nsresult SetAlign(uint16_t aAlign) {
+     if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID)
+       return NS_ERROR_FAILURE;
+     mAlign = static_cast<uint8_t>(aAlign);
+     return NS_OK;
+   }
+ 
+-  SVGAlign GetAlign() const {
+-    return static_cast<SVGAlign>(mAlign);
++  uint16_t GetAlign() const {
++    return mAlign;
+   }
+ 
+   nsresult SetMeetOrSlice(uint16_t aMeetOrSlice) {
+     if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID ||
+         aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID)
+       return NS_ERROR_FAILURE;
+     mMeetOrSlice = static_cast<uint8_t>(aMeetOrSlice);
+     return NS_OK;
+   }
+ 
+-  SVGMeetOrSlice GetMeetOrSlice() const {
+-    return static_cast<SVGMeetOrSlice>(mMeetOrSlice);
++  uint16_t GetMeetOrSlice() const {
++    return mMeetOrSlice;
+   }
+ 
+   PLDHashNumber Hash() const {
+     return HashGeneric(mAlign, mMeetOrSlice);
+   }
+ 
+ private:
+   // We can't use enum types here because some compilers fail to pack them.
+diff --git a/dom/svg/SVGSVGElement.cpp b/dom/svg/SVGSVGElement.cpp
+--- a/dom/svg/SVGSVGElement.cpp
++++ b/dom/svg/SVGSVGElement.cpp
+@@ -27,16 +27,19 @@
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT_CHECK_PARSER(SVG)
+ 
+ using namespace mozilla::gfx;
+ 
+ namespace mozilla {
+ namespace dom {
+ 
++using namespace SVGPreserveAspectRatioBinding;
++using namespace SVGSVGElementBinding;
++
+ nsSVGEnumMapping SVGSVGElement::sZoomAndPanMap[] = {
+   {&nsGkAtoms::disable, SVG_ZOOMANDPAN_DISABLE},
+   {&nsGkAtoms::magnify, SVG_ZOOMANDPAN_MAGNIFY},
+   {nullptr, 0}
+ };
+ 
+ nsSVGElement::EnumInfo SVGSVGElement::sEnumInfo[1] =
+ {
+diff --git a/dom/svg/SVGTextContentElement.cpp b/dom/svg/SVGTextContentElement.cpp
+--- a/dom/svg/SVGTextContentElement.cpp
++++ b/dom/svg/SVGTextContentElement.cpp
+@@ -2,36 +2,39 @@
+ /* vim: set ts=8 sts=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/. */
+ 
+ #include "mozilla/dom/SVGTextContentElement.h"
+ 
+ #include "mozilla/dom/SVGLengthBinding.h"
++#include "mozilla/dom/SVGTextContentElementBinding.h"
+ #include "mozilla/dom/SVGIRect.h"
+ #include "nsBidiUtils.h"
+ #include "nsISVGPoint.h"
+ #include "nsTextFragment.h"
+ #include "nsTextFrameUtils.h"
+ #include "nsTextNode.h"
+ #include "SVGTextFrame.h"
+ 
+ namespace mozilla {
+ namespace dom {
+ 
++using namespace SVGTextContentElementBinding;
++
+ nsSVGEnumMapping SVGTextContentElement::sLengthAdjustMap[] = {
+-  { &nsGkAtoms::spacing, SVG_LENGTHADJUST_SPACING },
+-  { &nsGkAtoms::spacingAndGlyphs, SVG_LENGTHADJUST_SPACINGANDGLYPHS },
++  { &nsGkAtoms::spacing, LENGTHADJUST_SPACING },
++  { &nsGkAtoms::spacingAndGlyphs, LENGTHADJUST_SPACINGANDGLYPHS },
+   { nullptr, 0 }
+ };
+ 
+ nsSVGElement::EnumInfo SVGTextContentElement::sEnumInfo[1] =
+ {
+-  { &nsGkAtoms::lengthAdjust, sLengthAdjustMap, SVG_LENGTHADJUST_SPACING }
++  { &nsGkAtoms::lengthAdjust, sLengthAdjustMap, LENGTHADJUST_SPACING }
+ };
+ 
+ nsSVGElement::LengthInfo SVGTextContentElement::sLengthInfo[1] =
+ {
+   { &nsGkAtoms::textLength, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY }
+ };
+ 
+ SVGTextFrame*
+diff --git a/dom/svg/SVGTextContentElement.h b/dom/svg/SVGTextContentElement.h
+--- a/dom/svg/SVGTextContentElement.h
++++ b/dom/svg/SVGTextContentElement.h
+@@ -7,20 +7,16 @@
+ #ifndef mozilla_dom_SVGTextContentElement_h
+ #define mozilla_dom_SVGTextContentElement_h
+ 
+ #include "mozilla/dom/SVGGraphicsElement.h"
+ #include "mozilla/dom/SVGAnimatedEnumeration.h"
+ #include "nsSVGEnum.h"
+ #include "nsSVGLength2.h"
+ 
+-static const unsigned short SVG_LENGTHADJUST_UNKNOWN          = 0;
+-static const unsigned short SVG_LENGTHADJUST_SPACING          = 1;
+-static const unsigned short SVG_LENGTHADJUST_SPACINGANDGLYPHS = 2;
+-
+ class SVGTextFrame;
+ 
+ namespace mozilla {
+ class nsISVGPoint;
+ 
+ namespace dom {
+ 
+ class SVGIRect;
+diff --git a/dom/svg/SVGTextPathElement.cpp b/dom/svg/SVGTextPathElement.cpp
+--- a/dom/svg/SVGTextPathElement.cpp
++++ b/dom/svg/SVGTextPathElement.cpp
+@@ -1,26 +1,30 @@
+ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /* vim: set ts=8 sts=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/. */
+ 
+ #include "mozilla/dom/SVGTextPathElement.h"
+ #include "mozilla/dom/SVGLengthBinding.h"
++#include "mozilla/dom/SVGTextContentElementBinding.h"
+ #include "mozilla/dom/SVGTextPathElementBinding.h"
+ #include "nsSVGElement.h"
+ #include "nsGkAtoms.h"
+ #include "nsError.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(TextPath)
+ 
+ namespace mozilla {
+ namespace dom {
+ 
++using namespace SVGTextContentElementBinding;
++using namespace SVGTextPathElementBinding;
++
+ class SVGAnimatedLength;
+ 
+ JSObject*
+ SVGTextPathElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGTextPathElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+@@ -44,17 +48,17 @@ nsSVGEnumMapping SVGTextPathElement::sSp
+   {nullptr, 0}
+ };
+ 
+ nsSVGElement::EnumInfo SVGTextPathElement::sEnumInfo[3] =
+ {
+   // from SVGTextContentElement:
+   { &nsGkAtoms::lengthAdjust,
+     sLengthAdjustMap,
+-    SVG_LENGTHADJUST_SPACING
++    LENGTHADJUST_SPACING
+   },
+   // from SVGTextPathElement:
+   { &nsGkAtoms::method,
+     sMethodMap,
+     TEXTPATH_METHODTYPE_ALIGN
+   },
+   { &nsGkAtoms::spacing,
+     sSpacingMap,
+diff --git a/dom/svg/SVGTextPathElement.h b/dom/svg/SVGTextPathElement.h
+--- a/dom/svg/SVGTextPathElement.h
++++ b/dom/svg/SVGTextPathElement.h
+@@ -16,25 +16,16 @@ class nsIAtom;
+ class nsIContent;
+ 
+ nsresult NS_NewSVGTextPathElement(nsIContent **aResult,
+                                   already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
+ 
+ namespace mozilla {
+ namespace dom {
+ 
+-// textPath Method Types
+-static const unsigned short TEXTPATH_METHODTYPE_UNKNOWN  = 0;
+-static const unsigned short TEXTPATH_METHODTYPE_ALIGN    = 1;
+-static const unsigned short TEXTPATH_METHODTYPE_STRETCH  = 2;
+-// textPath Spacing Types
+-static const unsigned short TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
+-static const unsigned short TEXTPATH_SPACINGTYPE_AUTO    = 1;
+-static const unsigned short TEXTPATH_SPACINGTYPE_EXACT   = 2;
+-
+ typedef SVGTextContentElement SVGTextPathElementBase;
+ 
+ class SVGTextPathElement final : public SVGTextPathElementBase
+ {
+ friend class ::SVGTextFrame;
+ 
+ protected:
+   friend nsresult (::NS_NewSVGTextPathElement(nsIContent **aResult,
+diff --git a/dom/svg/SVGTransform.cpp b/dom/svg/SVGTransform.cpp
+--- a/dom/svg/SVGTransform.cpp
++++ b/dom/svg/SVGTransform.cpp
+@@ -17,16 +17,18 @@
+ 
+ namespace {
+   const double kRadPerDegree = 2.0 * M_PI / 360.0;
+ } // namespace
+ 
+ namespace mozilla {
+ namespace dom {
+ 
++using namespace SVGTransformBinding;
++
+ static nsSVGAttrTearoffTable<SVGTransform, SVGMatrix>&
+ SVGMatrixTearoffTable()
+ {
+   static nsSVGAttrTearoffTable<SVGTransform, SVGMatrix> sSVGMatrixTearoffTable;
+   return sSVGMatrixTearoffTable;
+ }
+ 
+ //----------------------------------------------------------------------
+diff --git a/dom/svg/SVGTransformListSMILType.cpp b/dom/svg/SVGTransformListSMILType.cpp
+--- a/dom/svg/SVGTransformListSMILType.cpp
++++ b/dom/svg/SVGTransformListSMILType.cpp
+@@ -7,16 +7,17 @@
+ #include "SVGTransformListSMILType.h"
+ #include "SVGTransformList.h"
+ #include "nsSVGTransform.h"
+ #include "nsSMILValue.h"
+ #include "nsCRT.h"
+ #include <math.h>
+ 
+ using namespace mozilla;
++using namespace dom::SVGTransformBinding;
+ 
+ typedef FallibleTArray<SVGTransformSMILData> TransformArray;
+ 
+ //----------------------------------------------------------------------
+ // nsISMILType implementation
+ 
+ void
+ SVGTransformListSMILType::Init(nsSMILValue &aValue) const
+diff --git a/dom/svg/SVGViewElement.cpp b/dom/svg/SVGViewElement.cpp
+--- a/dom/svg/SVGViewElement.cpp
++++ b/dom/svg/SVGViewElement.cpp
+@@ -8,16 +8,18 @@
+ #include "mozilla/dom/SVGViewElementBinding.h"
+ #include "DOMSVGStringList.h"
+ 
+ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(View)
+ 
+ namespace mozilla {
+ namespace dom {
+ 
++using namespace SVGViewElementBinding;
++
+ JSObject*
+ SVGViewElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
+ {
+   return SVGViewElementBinding::Wrap(aCx, this, aGivenProto);
+ }
+ 
+ nsSVGElement::StringListInfo SVGViewElement::sStringListInfo[1] =
+ {
+diff --git a/dom/svg/SVGViewElement.h b/dom/svg/SVGViewElement.h
+--- a/dom/svg/SVGViewElement.h
++++ b/dom/svg/SVGViewElement.h
+@@ -8,20 +8,16 @@
+ #define mozilla_dom_SVGViewElement_h
+ 
+ #include "nsSVGElement.h"
+ #include "nsSVGEnum.h"
+ #include "nsSVGViewBox.h"
+ #include "SVGAnimatedPreserveAspectRatio.h"
+ #include "SVGStringList.h"
+ 
+-static const unsigned short SVG_ZOOMANDPAN_UNKNOWN = 0;
+-static const unsigned short SVG_ZOOMANDPAN_DISABLE = 1;
+-static const unsigned short SVG_ZOOMANDPAN_MAGNIFY = 2;
+-
+ typedef nsSVGElement SVGViewElementBase;
+ 
+ class nsSVGOuterSVGFrame;
+ 
+ nsresult NS_NewSVGViewElement(nsIContent **aResult,
+                               already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
+ 
+ namespace mozilla {
+diff --git a/dom/svg/nsSVGAngle.cpp b/dom/svg/nsSVGAngle.cpp
+--- a/dom/svg/nsSVGAngle.cpp
++++ b/dom/svg/nsSVGAngle.cpp
+@@ -14,16 +14,18 @@
+ #include "nsSVGAttrTearoffTable.h"
+ #include "nsTextFormatter.h"
+ #include "SVGAngle.h"
+ #include "SVGAnimatedAngle.h"
+ #include "SVGOrientSMILType.h"
+ 
+ using namespace mozilla;
+ using namespace mozilla::dom;
++using namespace mozilla::dom::SVGAngleBinding;
++using namespace mozilla::dom::SVGMarkerElementBinding;
+ 
+ static nsIAtom** const unitMap[] =
+ {
+   nullptr, /* SVG_ANGLETYPE_UNKNOWN */
+   nullptr, /* SVG_ANGLETYPE_UNSPECIFIED */
+   &nsGkAtoms::deg,
+   &nsGkAtoms::rad,
+   &nsGkAtoms::grad
+diff --git a/dom/svg/nsSVGAngle.h b/dom/svg/nsSVGAngle.h
+--- a/dom/svg/nsSVGAngle.h
++++ b/dom/svg/nsSVGAngle.h
+@@ -6,48 +6,43 @@
+ 
+ #ifndef __NS_SVGANGLE_H__
+ #define __NS_SVGANGLE_H__
+ 
+ #include "nsCOMPtr.h"
+ #include "nsError.h"
+ #include "nsISMILAttr.h"
+ #include "mozilla/Attributes.h"
++#include "mozilla/dom/SVGAngleBinding.h"
+ #include "mozilla/UniquePtr.h"
+ 
+ class nsISupports;
+ class nsSMILValue;
+ class nsSVGElement;
+ 
+ namespace mozilla {
+ 
+-// Angle Unit Types
+-static const unsigned short SVG_ANGLETYPE_UNKNOWN     = 0;
+-static const unsigned short SVG_ANGLETYPE_UNSPECIFIED = 1;
+-static const unsigned short SVG_ANGLETYPE_DEG         = 2;
+-static const unsigned short SVG_ANGLETYPE_RAD         = 3;
+-static const unsigned short SVG_ANGLETYPE_GRAD        = 4;
+-
+ namespace dom {
+ class nsSVGOrientType;
+ class SVGAngle;
+ class SVGAnimatedAngle;
+ class SVGAnimationElement;
+ } // namespace dom
+ } // namespace mozilla
+ 
+ class nsSVGAngle
+ {
+   friend class mozilla::dom::SVGAngle;
+   friend class mozilla::dom::SVGAnimatedAngle;
+ 
+ public:
+   void Init(uint8_t aAttrEnum = 0xff,
+             float aValue = 0,
+-            uint8_t aUnitType = mozilla::SVG_ANGLETYPE_UNSPECIFIED) {
++            uint8_t aUnitType =
++              mozilla::dom::SVGAngleBinding::SVG_ANGLETYPE_UNSPECIFIED) {
+     mAnimVal = mBaseVal = aValue;
+     mAnimValUnit = mBaseValUnit = aUnitType;
+     mAttrEnum = aAttrEnum;
+     mIsAnimated = false;
+   }
+ 
+   nsresult SetBaseValueString(const nsAString& aValue,
+                               nsSVGElement *aSVGElement,
+diff --git a/dom/svg/nsSVGElement.cpp b/dom/svg/nsSVGElement.cpp
+--- a/dom/svg/nsSVGElement.cpp
++++ b/dom/svg/nsSVGElement.cpp
+@@ -8,16 +8,17 @@
+ #include "mozilla/DebugOnly.h"
+ #include "mozilla/Unused.h"
+ 
+ #include "nsSVGElement.h"
+ 
+ #include "mozilla/dom/SVGLengthBinding.h"
+ #include "mozilla/dom/SVGSVGElement.h"
+ #include "mozilla/dom/SVGTests.h"
++#include "mozilla/dom/SVGUnitTypesBinding.h"
+ #include "nsContentUtils.h"
+ #include "nsICSSDeclaration.h"
+ #include "nsIContentInlines.h"
+ #include "nsIDocument.h"
+ #include "nsIDOMMutationEvent.h"
+ #include "mozilla/InternalMutationEvent.h"
+ #include "mozAutoDocUpdate.h"
+ #include "nsError.h"
+@@ -59,16 +60,17 @@
+ #include "mozilla/DeclarationBlock.h"
+ #include "mozilla/DeclarationBlockInlines.h"
+ #include "mozilla/Unused.h"
+ #include "mozilla/RestyleManager.h"
+ #include "mozilla/RestyleManagerInlines.h"
+ 
+ using namespace mozilla;
+ using namespace mozilla::dom;
++using namespace mozilla::dom::SVGUnitTypesBinding;
+ 
+ // This is needed to ensure correct handling of calls to the
+ // vararg-list methods in this file:
+ //   nsSVGElement::GetAnimated{Length,Number,Integer}Values
+ // See bug 547964 for details:
+ static_assert(sizeof(void*) == sizeof(nullptr),
+               "nullptr should be the correct size");
+ 
+diff --git a/dom/svg/nsSVGElement.h b/dom/svg/nsSVGElement.h
+--- a/dom/svg/nsSVGElement.h
++++ b/dom/svg/nsSVGElement.h
+@@ -41,20 +41,16 @@ class nsSVGViewBox;
+ 
+ namespace mozilla {
+ class DeclarationBlock;
+ 
+ namespace dom {
+ class SVGSVGElement;
+ class SVGViewportElement;
+ 
+-static const unsigned short SVG_UNIT_TYPE_UNKNOWN           = 0;
+-static const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE    = 1;
+-static const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
+-
+ } // namespace dom
+ 
+ class SVGAnimatedNumberList;
+ class SVGNumberList;
+ class SVGAnimatedLengthList;
+ class SVGUserUnitList;
+ class SVGAnimatedPointList;
+ class SVGAnimatedPathSegList;
+diff --git a/dom/svg/nsSVGPathDataParser.cpp b/dom/svg/nsSVGPathDataParser.cpp
+--- a/dom/svg/nsSVGPathDataParser.cpp
++++ b/dom/svg/nsSVGPathDataParser.cpp
+@@ -8,16 +8,17 @@
+ 
+ #include "mozilla/gfx/Point.h"
+ #include "nsSVGDataParser.h"
+ #include "SVGContentUtils.h"
+ #include "SVGPathData.h"
+ #include "SVGPathSegUtils.h"
+ 
+ using namespace mozilla;
++using namespace mozilla::dom::SVGPathSegBinding;
+ using namespace mozilla::gfx;
+ 
+ static inline char16_t ToUpper(char16_t aCh)
+ {
+   return aCh >= 'a' && aCh <= 'z' ? aCh - 'a' + 'A' : aCh;
+ }
+ 
+ bool
+diff --git a/dom/svg/nsSVGTransform.cpp b/dom/svg/nsSVGTransform.cpp
+--- a/dom/svg/nsSVGTransform.cpp
++++ b/dom/svg/nsSVGTransform.cpp
+@@ -10,16 +10,18 @@
+ #include "nsTextFormatter.h"
+ 
+ namespace {
+   const double kRadPerDegree = 2.0 * M_PI / 360.0;
+ } // namespace
+ 
+ namespace mozilla {
+ 
++using namespace dom::SVGTransformBinding;
++
+ void
+ nsSVGTransform::GetValueAsString(nsAString& aValue) const
+ {
+   switch (mType) {
+     case SVG_TRANSFORM_TRANSLATE:
+       // The spec say that if Y is not provided, it is assumed to be zero.
+       if (mMatrix._32 != 0)
+         nsTextFormatter::ssprintf(aValue,
+diff --git a/dom/svg/nsSVGTransform.h b/dom/svg/nsSVGTransform.h
+--- a/dom/svg/nsSVGTransform.h
++++ b/dom/svg/nsSVGTransform.h
+@@ -3,51 +3,43 @@
+ /* 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/. */
+ 
+ #ifndef MOZILLA_SVGTRANSFORM_H__
+ #define MOZILLA_SVGTRANSFORM_H__
+ 
+ #include "gfxMatrix.h"
++#include "mozilla/dom/SVGTransformBinding.h"
+ #include "mozilla/gfx/Matrix.h"
+ #include "nsDebug.h"
+ 
+ namespace mozilla {
+ 
+-// Transform Types
+-static const unsigned short SVG_TRANSFORM_UNKNOWN = 0;
+-static const unsigned short SVG_TRANSFORM_MATRIX = 1;
+-static const unsigned short SVG_TRANSFORM_TRANSLATE = 2;
+-static const unsigned short SVG_TRANSFORM_SCALE = 3;
+-static const unsigned short SVG_TRANSFORM_ROTATE = 4;
+-static const unsigned short SVG_TRANSFORM_SKEWX = 5;
+-static const unsigned short SVG_TRANSFORM_SKEWY = 6;
+-
+ /*
+  * The DOM wrapper class for this class is DOMSVGTransformMatrix.
+  */
+ class nsSVGTransform
+ {
+ public:
+   // Default ctor initialises to matrix type with identity matrix
+   nsSVGTransform()
+     : mMatrix() // Initialises to identity
+     , mAngle(0.f)
+     , mOriginX(0.f)
+     , mOriginY(0.f)
+-    , mType(SVG_TRANSFORM_MATRIX)
++    , mType(dom::SVGTransformBinding::SVG_TRANSFORM_MATRIX)
+   { }
+ 
+   explicit nsSVGTransform(const gfxMatrix& aMatrix)
+     : mMatrix(aMatrix)
+     , mAngle(0.f)
+     , mOriginX(0.f)
+     , mOriginY(0.f)
+-    , mType(SVG_TRANSFORM_MATRIX)
++    , mType(dom::SVGTransformBinding::SVG_TRANSFORM_MATRIX)
+   { }
+ 
+   bool operator==(const nsSVGTransform& rhs) const {
+     return mType == rhs.mType &&
+       MatricesEqual(mMatrix, rhs.mMatrix) &&
+       mAngle == rhs.mAngle &&
+       mOriginX == rhs.mOriginX &&
+       mOriginY == rhs.mOriginY;
+@@ -122,27 +114,29 @@ public:
+ 
+   // Number of float-params required in constructor for matrix type.
+   // This is also the number of params we actually store, regardless of type.
+   static const uint32_t NUM_STORED_PARAMS = 6;
+ 
+   explicit SVGTransformSMILData(uint16_t aType)
+   : mTransformType(aType)
+   {
+-    MOZ_ASSERT(aType >= SVG_TRANSFORM_MATRIX && aType <= SVG_TRANSFORM_SKEWY,
++    MOZ_ASSERT(aType >=dom::SVGTransformBinding:: SVG_TRANSFORM_MATRIX &&
++               aType <= dom::SVGTransformBinding::SVG_TRANSFORM_SKEWY,
+                "Unexpected transform type");
+     for (uint32_t i = 0; i < NUM_STORED_PARAMS; ++i) {
+       mParams[i] = 0.f;
+     }
+   }
+ 
+   SVGTransformSMILData(uint16_t aType, float (&aParams)[NUM_SIMPLE_PARAMS])
+   : mTransformType(aType)
+   {
+-    MOZ_ASSERT(aType >= SVG_TRANSFORM_TRANSLATE && aType <= SVG_TRANSFORM_SKEWY,
++    MOZ_ASSERT(aType >= dom::SVGTransformBinding::SVG_TRANSFORM_TRANSLATE &&
++               aType <= dom::SVGTransformBinding::SVG_TRANSFORM_SKEWY,
+                "Expected 'simple' transform type");
+     for (uint32_t i = 0; i < NUM_SIMPLE_PARAMS; ++i) {
+       mParams[i] = aParams[i];
+     }
+     for (uint32_t i = NUM_SIMPLE_PARAMS; i < NUM_STORED_PARAMS; ++i) {
+       mParams[i] = 0.f;
+     }
+   }
+diff --git a/image/VectorImage.cpp b/image/VectorImage.cpp
+--- a/image/VectorImage.cpp
++++ b/image/VectorImage.cpp
+@@ -39,16 +39,17 @@
+ #include "nsDocument.h"
+ 
+ // undef the GetCurrentTime macro defined in WinBase.h from the MS Platform SDK
+ #undef GetCurrentTime
+ 
+ namespace mozilla {
+ 
+ using namespace dom;
++using namespace dom::SVGPreserveAspectRatioBinding;
+ using namespace gfx;
+ using namespace layers;
+ 
+ namespace image {
+ 
+ // Helper-class: SVGRootRenderingObserver
+ class SVGRootRenderingObserver final : public nsSVGRenderingObserver {
+ public:
+diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp
+--- a/layout/svg/SVGTextFrame.cpp
++++ b/layout/svg/SVGTextFrame.cpp
+@@ -26,16 +26,17 @@
+ #include "nsContentUtils.h"
+ #include "nsGkAtoms.h"
+ #include "nsISelection.h"
+ #include "nsQuickSort.h"
+ #include "SVGObserverUtils.h"
+ #include "nsSVGOuterSVGFrame.h"
+ #include "nsSVGPaintServerFrame.h"
+ #include "mozilla/dom/SVGRect.h"
++#include "mozilla/dom/SVGTextContentElementBinding.h"
+ #include "nsSVGIntegrationUtils.h"
+ #include "nsSVGUtils.h"
+ #include "nsTArray.h"
+ #include "nsTextFrame.h"
+ #include "nsTextNode.h"
+ #include "SVGAnimatedNumberList.h"
+ #include "SVGContentUtils.h"
+ #include "SVGContextPaint.h"
+@@ -47,16 +48,17 @@
+ #include "nsFrameSelection.h"
+ #include "nsStyleStructInlines.h"
+ #include <algorithm>
+ #include <cmath>
+ #include <limits>
+ 
+ using namespace mozilla;
+ using namespace mozilla::dom;
++using namespace mozilla::dom::SVGTextContentElementBinding;
+ using namespace mozilla::gfx;
+ using namespace mozilla::image;
+ 
+ // ============================================================================
+ // Utility functions
+ 
+ /**
+  * Using the specified gfxSkipCharsIterator, converts an offset and length
+@@ -5297,25 +5299,25 @@ SVGTextFrame::DoGlyphPositioning()
+     nscoord frameLength = vertical ? PrincipalChildList().FirstChild()->GetRect().height
+                                    : PrincipalChildList().FirstChild()->GetRect().width;
+     float actualTextLength =
+       static_cast<float>(presContext->AppUnitsToGfxUnits(frameLength) * factor);
+ 
+     uint16_t lengthAdjust =
+       element->EnumAttributes()[SVGTextContentElement::LENGTHADJUST].GetAnimValue();
+     switch (lengthAdjust) {
+-      case SVG_LENGTHADJUST_SPACINGANDGLYPHS:
++      case LENGTHADJUST_SPACINGANDGLYPHS:
+         // Scale the glyphs and their positions.
+         if (actualTextLength > 0) {
+           mLengthAdjustScaleFactor = expectedTextLength / actualTextLength;
+         }
+         break;
+ 
+       default:
+-        MOZ_ASSERT(lengthAdjust == SVG_LENGTHADJUST_SPACING);
++        MOZ_ASSERT(lengthAdjust == LENGTHADJUST_SPACING);
+         // Just add space between each glyph.
+         int32_t adjustableSpaces = 0;
+         for (uint32_t i = 1; i < mPositions.Length(); i++) {
+           if (!mPositions[i].mUnaddressable) {
+             adjustableSpaces++;
+           }
+         }
+         if (adjustableSpaces) {
+diff --git a/layout/svg/nsSVGFilterInstance.cpp b/layout/svg/nsSVGFilterInstance.cpp
+--- a/layout/svg/nsSVGFilterInstance.cpp
++++ b/layout/svg/nsSVGFilterInstance.cpp
+@@ -9,26 +9,28 @@
+ 
+ // Keep others in (case-insensitive) order:
+ #include "gfxPlatform.h"
+ #include "gfxUtils.h"
+ #include "nsSVGDisplayableFrame.h"
+ #include "mozilla/dom/HTMLCanvasElement.h"
+ #include "mozilla/dom/IDTracker.h"
+ #include "mozilla/dom/SVGLengthBinding.h"
++#include "mozilla/dom/SVGUnitTypesBinding.h"
+ #include "mozilla/dom/SVGFilterElement.h"
+ #include "SVGObserverUtils.h"
+ #include "nsSVGFilterFrame.h"
+ #include "nsSVGUtils.h"
+ #include "SVGContentUtils.h"
+ #include "FilterSupport.h"
+ #include "gfx2DGlue.h"
+ 
+ using namespace mozilla;
+ using namespace mozilla::dom;
++using namespace mozilla::dom::SVGUnitTypesBinding;
+ using namespace mozilla::gfx;
+ 
+ nsSVGFilterInstance::nsSVGFilterInstance(const nsStyleFilter& aFilter,
+                                          nsIFrame* aTargetFrame,
+                                          nsIContent* aTargetContent,
+                                          const UserSpaceMetrics& aMetrics,
+                                          const gfxRect& aTargetBBox,
+                                          const gfxSize& aUserSpaceToFilterSpaceScale) :
+diff --git a/layout/svg/nsSVGGradientFrame.cpp b/layout/svg/nsSVGGradientFrame.cpp
+--- a/layout/svg/nsSVGGradientFrame.cpp
++++ b/layout/svg/nsSVGGradientFrame.cpp
+@@ -7,25 +7,29 @@
+ // Main header first:
+ #include "nsSVGGradientFrame.h"
+ #include <algorithm>
+ 
+ // Keep others in (case-insensitive) order:
+ #include "AutoReferenceChainGuard.h"
+ #include "gfxPattern.h"
+ #include "mozilla/dom/SVGGradientElement.h"
++#include "mozilla/dom/SVGGradientElementBinding.h"
+ #include "mozilla/dom/SVGStopElement.h"
++#include "mozilla/dom/SVGUnitTypesBinding.h"
+ #include "nsContentUtils.h"
+ #include "SVGObserverUtils.h"
+ #include "nsSVGAnimatedTransformList.h"
+ 
+ // XXX Tight coupling with content classes ahead!
+ 
+ using namespace mozilla;
+ using namespace mozilla::dom;
++using namespace mozilla::dom::SVGGradientElementBinding;
++using namespace mozilla::dom::SVGUnitTypesBinding;
+ using namespace mozilla::gfx;
+ 
+ //----------------------------------------------------------------------
+ // Implementation
+ 
+ nsSVGGradientFrame::nsSVGGradientFrame(nsStyleContext* aContext,
+                                        ClassID aID)
+   : nsSVGPaintServerFrame(aContext, aID)
+diff --git a/layout/svg/nsSVGMaskFrame.cpp b/layout/svg/nsSVGMaskFrame.cpp
+--- a/layout/svg/nsSVGMaskFrame.cpp
++++ b/layout/svg/nsSVGMaskFrame.cpp
+@@ -10,19 +10,21 @@
+ // Keep others in (case-insensitive) order:
+ #include "AutoReferenceChainGuard.h"
+ #include "gfx2DGlue.h"
+ #include "gfxContext.h"
+ #include "mozilla/gfx/2D.h"
+ #include "mozilla/RefPtr.h"
+ #include "SVGObserverUtils.h"
+ #include "mozilla/dom/SVGMaskElement.h"
++#include "mozilla/dom/SVGUnitTypesBinding.h"
+ 
+ using namespace mozilla;
+ using namespace mozilla::dom;
++using namespace mozilla::dom::SVGUnitTypesBinding;
+ using namespace mozilla::gfx;
+ using namespace mozilla::image;
+ 
+ static LuminanceType
+ GetLuminanceType(uint8_t aNSMaskType)
+ {
+   switch (aNSMaskType) {
+     case NS_STYLE_MASK_TYPE_LUMINANCE:
+diff --git a/layout/svg/nsSVGPatternFrame.cpp b/layout/svg/nsSVGPatternFrame.cpp
+--- a/layout/svg/nsSVGPatternFrame.cpp
++++ b/layout/svg/nsSVGPatternFrame.cpp
+@@ -17,22 +17,24 @@
+ #include "mozilla/gfx/2D.h"
+ #include "nsContentUtils.h"
+ #include "nsGkAtoms.h"
+ #include "nsSVGDisplayableFrame.h"
+ #include "nsStyleContext.h"
+ #include "SVGObserverUtils.h"
+ #include "SVGGeometryFrame.h"
+ #include "mozilla/dom/SVGPatternElement.h"
++#include "mozilla/dom/SVGUnitTypesBinding.h"
+ #include "nsSVGUtils.h"
+ #include "nsSVGAnimatedTransformList.h"
+ #include "SVGContentUtils.h"
+ 
+ using namespace mozilla;
+ using namespace mozilla::dom;
++using namespace mozilla::dom::SVGUnitTypesBinding;
+ using namespace mozilla::gfx;
+ using namespace mozilla::image;
+ 
+ //----------------------------------------------------------------------
+ // Implementation
+ 
+ nsSVGPatternFrame::nsSVGPatternFrame(nsStyleContext* aContext)
+   : nsSVGPaintServerFrame(aContext, kClassID)
+diff --git a/layout/svg/nsSVGUtils.cpp b/layout/svg/nsSVGUtils.cpp
+--- a/layout/svg/nsSVGUtils.cpp
++++ b/layout/svg/nsSVGUtils.cpp
+@@ -42,27 +42,29 @@
+ #include "nsSVGForeignObjectFrame.h"
+ #include "nsSVGInnerSVGFrame.h"
+ #include "nsSVGIntegrationUtils.h"
+ #include "nsSVGLength2.h"
+ #include "nsSVGMaskFrame.h"
+ #include "nsSVGOuterSVGFrame.h"
+ #include "mozilla/dom/SVGClipPathElement.h"
+ #include "mozilla/dom/SVGPathElement.h"
++#include "mozilla/dom/SVGUnitTypesBinding.h"
+ #include "SVGGeometryElement.h"
+ #include "SVGGeometryFrame.h"
+ #include "nsSVGPaintServerFrame.h"
+ #include "mozilla/dom/SVGViewportElement.h"
+ #include "nsTextFrame.h"
+ #include "SVGContentUtils.h"
+ #include "SVGTextFrame.h"
+ #include "mozilla/Unused.h"
+ 
+ using namespace mozilla;
+ using namespace mozilla::dom;
++using namespace mozilla::dom::SVGUnitTypesBinding;
+ using namespace mozilla::gfx;
+ using namespace mozilla::image;
+ 
+ static bool sSVGPathCachingEnabled;
+ static bool sSVGDisplayListHitTestingEnabled;
+ static bool sSVGDisplayListPaintingEnabled;
+ static bool sSVGNewGetBBoxEnabled;
+ 

+ 206 - 0
mozilla-release/patches/1435568-60a1.patch

@@ -0,0 +1,206 @@
+# HG changeset patch
+# User Robert Longson <longsonr@gmail.com>
+# Date 1517952934 0
+# Node ID dd4ffa63228df3ab4b1e6de7eceb671c32c39978
+# Parent  675e3d87e3e70e29978a1200b00617243ffcf152
+Bug 1435568 - Remove SVGUnitTypes values from elements r=jwatt r=bkelly (DOM Peer)
+
+diff --git a/dom/svg/test/mochitest.ini b/dom/svg/test/mochitest.ini
+--- a/dom/svg/test/mochitest.ini
++++ b/dom/svg/test/mochitest.ini
+@@ -77,17 +77,16 @@ skip-if = android_version == '18' # bug 
+ [test_SVGMatrix.xhtml]
+ [test_SVG_namespace_ids.html]
+ [test_SVGNumberList.xhtml]
+ [test_SVGPointList.xhtml]
+ [test_SVGStringList.xhtml]
+ [test_SVGStyleElement.xhtml]
+ [test_SVGTransformListAddition.xhtml]
+ [test_SVGTransformList.xhtml]
+-[test_SVGUnitTypes.html]
+ [test_SVGxxxListIndexing.xhtml]
+ [test_SVGxxxList.xhtml]
+ [test_switch.xhtml]
+ [test_tabindex.html]
+ [test_tearoff_with_cc.html]
+ support-files = tearoff_with_cc_helper.html
+ [test_text_2.html]
+ [test_text_dirty.html]
+diff --git a/dom/svg/test/test_SVGUnitTypes.html b/dom/svg/test/test_SVGUnitTypes.html
+deleted file mode 100644
+--- a/dom/svg/test/test_SVGUnitTypes.html
++++ /dev/null
+@@ -1,41 +0,0 @@
+-<!DOCTYPE html>
+-<html xmlns="http://www.w3.org/1999/xhtml">
+-<!--
+-https://bugzilla.mozilla.org/show_bug.cgi?id=366697
+--->
+-<head>
+-<title>Test for Bug 842201</title>
+-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+-</head>
+-<body>
+-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=842201">Mozilla Bug 842201</a>
+-<p id="display"></p>
+-<div id="content" style="display: none"></div>
+-
+-<pre id="test">
+-<script class="testbody" type="application/javascript">
+-SimpleTest.waitForExplicitFinish();
+-
+-function runTest()
+-{
+-  is(SVGPatternElement.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, 2,
+-     "Pattern should implement SVGUnitTypes values");
+-  is(SVGFilterElement.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, 2,
+-     "Filter should implement SVGUnitTypes values");
+-  is(SVGMaskElement.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, 2,
+-     "Mask should implement SVGUnitTypes values");
+-  is(SVGClipPathElement.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, 2,
+-     "ClipPath should implement SVGUnitTypes values");
+-  is(SVGLinearGradientElement.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, 2,
+-     "LinearGradient should implement SVGUnitTypes values");
+-  is(SVGRadialGradientElement.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, 2,
+-     "RadialGradient should implement SVGUnitTypes values");
+-  SimpleTest.finish();
+-}
+-
+-window.addEventListener("load", runTest);
+-</script>
+-</pre>
+-</body>
+-</html>
+diff --git a/dom/webidl/SVGClipPathElement.webidl b/dom/webidl/SVGClipPathElement.webidl
+--- a/dom/webidl/SVGClipPathElement.webidl
++++ b/dom/webidl/SVGClipPathElement.webidl
+@@ -12,10 +12,8 @@
+ 
+ interface SVGClipPathElement : SVGElement {
+   [Constant]
+   readonly attribute SVGAnimatedEnumeration clipPathUnits;
+   [Constant]
+   readonly attribute SVGAnimatedTransformList transform;
+ };
+ 
+-SVGClipPathElement implements SVGUnitTypeValues;
+-
+diff --git a/dom/webidl/SVGFilterElement.webidl b/dom/webidl/SVGFilterElement.webidl
+--- a/dom/webidl/SVGFilterElement.webidl
++++ b/dom/webidl/SVGFilterElement.webidl
+@@ -23,10 +23,9 @@ interface SVGFilterElement : SVGElement 
+   readonly attribute SVGAnimatedLength width;
+   [Constant]
+   readonly attribute SVGAnimatedLength height;
+ 
+   // ImageData apply(ImageData source);
+ };
+ 
+ SVGFilterElement implements SVGURIReference;
+-SVGFilterElement implements SVGUnitTypeValues;
+ 
+diff --git a/dom/webidl/SVGGradientElement.webidl b/dom/webidl/SVGGradientElement.webidl
+--- a/dom/webidl/SVGGradientElement.webidl
++++ b/dom/webidl/SVGGradientElement.webidl
+@@ -22,9 +22,8 @@ interface SVGGradientElement : SVGElemen
+   readonly attribute SVGAnimatedEnumeration gradientUnits;
+   [Constant]
+   readonly attribute SVGAnimatedTransformList gradientTransform;
+   [Constant]
+   readonly attribute SVGAnimatedEnumeration spreadMethod;
+ };
+ 
+ SVGGradientElement implements SVGURIReference;
+-SVGGradientElement implements SVGUnitTypeValues;
+diff --git a/dom/webidl/SVGMaskElement.webidl b/dom/webidl/SVGMaskElement.webidl
+--- a/dom/webidl/SVGMaskElement.webidl
++++ b/dom/webidl/SVGMaskElement.webidl
+@@ -25,10 +25,8 @@ interface SVGMaskElement : SVGElement {
+   [Constant]
+   readonly attribute SVGAnimatedLength y;
+   [Constant]
+   readonly attribute SVGAnimatedLength width;
+   [Constant]
+   readonly attribute SVGAnimatedLength height;
+ };
+ 
+-SVGMaskElement implements SVGUnitTypeValues;
+-
+diff --git a/dom/webidl/SVGPatternElement.webidl b/dom/webidl/SVGPatternElement.webidl
+--- a/dom/webidl/SVGPatternElement.webidl
++++ b/dom/webidl/SVGPatternElement.webidl
+@@ -24,9 +24,8 @@ interface SVGPatternElement : SVGElement
+   [Constant]
+   readonly attribute SVGAnimatedLength width;
+   [Constant]
+   readonly attribute SVGAnimatedLength height;
+ };
+ 
+ SVGPatternElement implements SVGFitToViewBox;
+ SVGPatternElement implements SVGURIReference;
+-SVGPatternElement implements SVGUnitTypeValues;
+diff --git a/dom/webidl/SVGUnitTypeValues.webidl b/dom/webidl/SVGUnitTypeValues.webidl
+deleted file mode 100644
+--- a/dom/webidl/SVGUnitTypeValues.webidl
++++ /dev/null
+@@ -1,19 +0,0 @@
+-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+-/* 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/.
+- *
+- * The origin of this IDL file is
+- * https://svgwg.org/svg2-draft/
+- *
+- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+- * liability, trademark and document use rules apply.
+- */
+-
+-[NoInterfaceObject]
+-interface SVGUnitTypeValues {
+-  // Unit Types
+-  const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0;
+-  const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1;
+-  const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
+-};
+diff --git a/dom/webidl/SVGUnitTypes.webidl b/dom/webidl/SVGUnitTypes.webidl
+--- a/dom/webidl/SVGUnitTypes.webidl
++++ b/dom/webidl/SVGUnitTypes.webidl
+@@ -6,11 +6,14 @@
+  * The origin of this IDL file is
+  * https://svgwg.org/svg2-draft/
+  *
+  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+  * liability, trademark and document use rules apply.
+  */
+ 
+ interface SVGUnitTypes {
++  // Unit Types
++  const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0;
++  const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1;
++  const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
+ };
+ 
+-SVGUnitTypes implements SVGUnitTypeValues;
+diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build
+--- a/dom/webidl/moz.build
++++ b/dom/webidl/moz.build
+@@ -867,17 +867,16 @@ WEBIDL_FILES = [
+     'SVGTextElement.webidl',
+     'SVGTextPathElement.webidl',
+     'SVGTextPositioningElement.webidl',
+     'SVGTitleElement.webidl',
+     'SVGTransform.webidl',
+     'SVGTransformList.webidl',
+     'SVGTSpanElement.webidl',
+     'SVGUnitTypes.webidl',
+-    'SVGUnitTypeValues.webidl',
+     'SVGURIReference.webidl',
+     'SVGUseElement.webidl',
+     'SVGViewElement.webidl',
+     'SVGZoomAndPan.webidl',
+     'SVGZoomAndPanValues.webidl',
+     'TCPServerSocket.webidl',
+     'TCPServerSocketEvent.webidl',
+     'TCPSocket.webidl',

+ 9 - 9
mozilla-release/patches/1436251-3-PARTIAL-79a1.patch

@@ -2,7 +2,7 @@
 # User Mitchell Hentges <mhentges@mozilla.com>
 # Date 1591911305 0
 # Node ID 7d6e0d798df277d5bc0e23ae22636d3b224534f6
-# Parent  7fc99244202e04bce1eb0ce3e7ba8d2118869d64
+# Parent  83a984b24416f8f1ed58e47952f5c7967ecf1a3c
 Bug 1636251: Patch Sentry events to ensure a raw username isn't sent to Sentry r=rstewart
 
 To avoid sending identifying information, common absolute paths are patched with placeholder values. For example, devs
@@ -16,15 +16,15 @@ Differential Revision: https://phabricator.services.mozilla.com/D78962
 diff --git a/build/mach_bootstrap.py b/build/mach_bootstrap.py
 --- a/build/mach_bootstrap.py
 +++ b/build/mach_bootstrap.py
-@@ -260,17 +260,17 @@ def bootstrap(topsrcdir, mozilla_dir=Non
-     def post_dispatch_handler(context, handler, instance, result,
-                               start_time, end_time, depth, args):
-         """Perform global operations after command dispatch.
- 
-         """
+@@ -287,17 +287,17 @@ def bootstrap(topsrcdir, mozilla_dir=Non
+         # We call mach environment in client.mk which would cause the
+         # data submission below to block the forward progress of make.
+         if handler.name in ('environment'):
+             return
  
          return
  
+ 
 -    def populate_context(context, key=None):
 +    def populate_context(key=None):
          if key is None:
@@ -38,7 +38,7 @@ diff --git a/build/mach_bootstrap.py b/build/mach_bootstrap.py
 diff --git a/python/mach/mach/main.py b/python/mach/mach/main.py
 --- a/python/mach/mach/main.py
 +++ b/python/mach/mach/main.py
-@@ -146,17 +146,17 @@ class ContextWrapper(object):
+@@ -145,17 +145,17 @@ class ContextWrapper(object):
          object.__setattr__(self, '_context', context)
          object.__setattr__(self, '_handler', handler)
  
@@ -129,7 +129,7 @@ diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mo
 diff --git a/testing/tools/mach_test_package_bootstrap.py b/testing/tools/mach_test_package_bootstrap.py
 --- a/testing/tools/mach_test_package_bootstrap.py
 +++ b/testing/tools/mach_test_package_bootstrap.py
-@@ -183,27 +183,35 @@ def bootstrap(test_package_root):
+@@ -182,27 +182,35 @@ def bootstrap(test_package_root):
          print('Python 2.7 or above (but not Python 3) is required to run mach.')
          print('You are running Python', platform.python_version())
          sys.exit(1)

+ 2 - 2
mozilla-release/patches/1436663-60a1.patch

@@ -2,7 +2,7 @@
 # User Masayuki Nakano <masayuki@d-toybox.com>
 # Date 1518074244 -32400
 # Node ID 216fac39a9f44b708a4242a47a8ee8296eed3a34
-# Parent  eb7d23191b97d06c5f124db471b880b06862b536
+# Parent  45e60974d6838f10bc0314d5dce3f1239b808c1e
 Bug 1436663 - EditorBase::JoinNodeDeep() should set result after actually joining the nodes r=m_kato
 
 EditorBase::JoinNodeDeep() returns a DOM point which was start of right node.
@@ -44,7 +44,7 @@ diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp
  
      // Get new left and right nodes, and begin anew
      parentNode = rightNodeToJoin;
-     rightNodeToJoin = parentNode->GetChildAt(length);
+     rightNodeToJoin = parentNode->GetChildAt_Deprecated(length);
 diff --git a/editor/libeditor/EditorDOMPoint.h b/editor/libeditor/EditorDOMPoint.h
 --- a/editor/libeditor/EditorDOMPoint.h
 +++ b/editor/libeditor/EditorDOMPoint.h

+ 7 - 6
mozilla-release/patches/1436692-60a1.patch

@@ -2,13 +2,13 @@
 # User Andrea Marchesini <amarchesini@mozilla.com>
 # Date 1518108205 -3600
 # Node ID 0fdcc0c8f50f2613722928710057c7fdc6101314
-# Parent  10c35d0b440233ebb8f387d3976e075ff222bc6e
+# Parent  96ce2fc1680946e12ac8a14047ed646e67f6e5e0
 Bug 1436692 - Implement PerformanceObserver::takeRecords(), r=valentin
 
 diff --git a/dom/performance/PerformanceObserver.cpp b/dom/performance/PerformanceObserver.cpp
 --- a/dom/performance/PerformanceObserver.cpp
 +++ b/dom/performance/PerformanceObserver.cpp
-@@ -215,8 +215,15 @@ void
+@@ -187,8 +187,15 @@ void
  PerformanceObserver::Disconnect()
  {
    if (mConnected) {
@@ -27,12 +27,12 @@ diff --git a/dom/performance/PerformanceObserver.cpp b/dom/performance/Performan
 diff --git a/dom/performance/PerformanceObserver.h b/dom/performance/PerformanceObserver.h
 --- a/dom/performance/PerformanceObserver.h
 +++ b/dom/performance/PerformanceObserver.h
-@@ -51,16 +51,18 @@ public:
-                                JS::Handle<JSObject*> aGivenProto) override;
+@@ -52,16 +52,18 @@ public:
  
    nsISupports* GetParentObject() const { return mOwner; }
  
-   void Observe(const PerformanceObserverInit& aOptions);
+   void Observe(const PerformanceObserverInit& aOptions,
+                mozilla::ErrorResult& aRv);
  
    void Disconnect();
  
@@ -49,7 +49,7 @@ diff --git a/dom/performance/PerformanceObserver.h b/dom/performance/Performance
 diff --git a/dom/webidl/PerformanceObserver.webidl b/dom/webidl/PerformanceObserver.webidl
 --- a/dom/webidl/PerformanceObserver.webidl
 +++ b/dom/webidl/PerformanceObserver.webidl
-@@ -7,17 +7,19 @@
+@@ -7,18 +7,20 @@
   * https://w3c.github.io/performance-timeline/#the-performanceobserver-interface
   */
  
@@ -66,6 +66,7 @@ diff --git a/dom/webidl/PerformanceObserver.webidl b/dom/webidl/PerformanceObser
   Constructor(PerformanceObserverCallback callback),
   Exposed=(Window,Worker)]
  interface PerformanceObserver {
+   [Throws]
 -  void observe(PerformanceObserverInit options);
 -  void disconnect();
 +    void                 observe(PerformanceObserverInit options);

+ 5 - 4
mozilla-release/patches/1436744-60a1.patch

@@ -2,7 +2,7 @@
 # User Andrea Marchesini <amarchesini@mozilla.com>
 # Date 1518465742 -3600
 # Node ID d33f2acef1ed12be6bce66e8a615fa17b1d9be9b
-# Parent  64dc1980c3fa40cba6c5519e5815500c72f42f47
+# Parent  8b27eed036213deabe9b3b27215fe16018d122d3
 Bug 1436744 - Get rid of WorkerCheckAPIExposureOnMainThreadRunnable, r=catalinb
 
 diff --git a/dom/base/DOMPrefsInternal.h b/dom/base/DOMPrefsInternal.h
@@ -86,7 +86,7 @@ diff --git a/dom/performance/Performance.cpp b/dom/performance/Performance.cpp
                                     mUserEntries,
                                     mResourceEntries);
  
-@@ -527,34 +495,16 @@ Performance::QueueEntry(PerformanceEntry
+@@ -534,34 +502,16 @@ Performance::QueueEntry(PerformanceEntry
                                             PerformanceObserver,
                                             QueueEntry, (aEntry));
  
@@ -166,7 +166,7 @@ diff --git a/dom/performance/PerformanceObserverEntryList.h b/dom/performance/Pe
 diff --git a/dom/webidl/PerformanceObserver.webidl b/dom/webidl/PerformanceObserver.webidl
 --- a/dom/webidl/PerformanceObserver.webidl
 +++ b/dom/webidl/PerformanceObserver.webidl
-@@ -10,16 +10,16 @@
+@@ -10,17 +10,17 @@
  dictionary PerformanceObserverInit {
    required sequence<DOMString> entryTypes;
    boolean buffered = false;
@@ -180,6 +180,7 @@ diff --git a/dom/webidl/PerformanceObserver.webidl b/dom/webidl/PerformanceObser
   Constructor(PerformanceObserverCallback callback),
   Exposed=(Window,Worker)]
  interface PerformanceObserver {
+   [Throws]
      void                 observe(PerformanceObserverInit options);
      void                 disconnect();
      PerformanceEntryList takeRecords();
@@ -209,7 +210,7 @@ diff --git a/dom/webidl/PerformanceObserverEntryList.webidl b/dom/webidl/Perform
 diff --git a/dom/workers/WorkerRunnable.cpp b/dom/workers/WorkerRunnable.cpp
 --- a/dom/workers/WorkerRunnable.cpp
 +++ b/dom/workers/WorkerRunnable.cpp
-@@ -630,34 +630,16 @@ WorkerMainThreadRunnable::Run()
+@@ -616,34 +616,16 @@ WorkerMainThreadRunnable::Run()
                                         mSyncLoopTarget.forget(),
                                         runResult);
  

+ 8 - 8
mozilla-release/patches/1444490-61a1.patch

@@ -2,7 +2,7 @@
 # User Tom Ritter <tom@mozilla.com>
 # Date 1520606238 21600
 # Node ID ab89c04fa91c6f6cea88b34d4a6ced81c6a3a2cd
-# Parent  22d80c6d2f93a74670e11b39f580409961bc804a
+# Parent  f02d8be26218f64dbf352fcf3a0bf320caf9e088
 Bug 1444490 Declare classses (and one method) in network/ final to reduce virtual function calls r=nwgh
 
 MozReview-Commit-ID: 4oaazbPhpbc
@@ -289,13 +289,13 @@ diff --git a/netwerk/cache2/CacheIOThread.h b/netwerk/cache2/CacheIOThread.h
 diff --git a/netwerk/cache2/CacheIndex.cpp b/netwerk/cache2/CacheIndex.cpp
 --- a/netwerk/cache2/CacheIndex.cpp
 +++ b/netwerk/cache2/CacheIndex.cpp
-@@ -165,17 +165,17 @@ private:
+@@ -172,17 +172,17 @@ private:
+   const SHA1Sum::Hash *mHash;
    RefPtr<CacheIndex> mIndex;
-   RefPtr<CacheIndexRecordWrapper> mOldRecord;
-   uint32_t mOldFrecency{0};
-   bool mDoNotSearchInIndex{false};
-   bool mDoNotSearchInUpdates{false};
-   const StaticMutexAutoLock& mProofOfLock;
+   CacheIndexRecord    *mOldRecord;
+   uint32_t             mOldFrecency;
+   bool                 mDoNotSearchInIndex;
+   bool                 mDoNotSearchInUpdates;
  };
  
 -class FileOpenHelper : public CacheFileIOListener
@@ -311,7 +311,7 @@ diff --git a/netwerk/cache2/CacheIndex.cpp b/netwerk/cache2/CacheIndex.cpp
 diff --git a/netwerk/cache2/CacheIndex.h b/netwerk/cache2/CacheIndex.h
 --- a/netwerk/cache2/CacheIndex.h
 +++ b/netwerk/cache2/CacheIndex.h
-@@ -676,18 +676,19 @@ private:
+@@ -661,18 +661,19 @@ private:
    // information is not correct.
    bool     mStateLogged;
  

+ 3 - 3
mozilla-release/patches/1446270-61a1.patch

@@ -2,7 +2,7 @@
 # User Makoto Kato <m_kato@ga2.so-net.ne.jp>
 # Date 1521185894 -32400
 # Node ID bf807404eb8885b6811ef22069eb0b92f9ea470b
-# Parent  326ab94b619ba797e719c0145ea5407eebbe3475
+# Parent  936c3d6571cfbca451b8de2b9ab90c6f570ff9d7
 Bug 1446270 - Android/arm target should turn on crash reporter as default. r=froydnj
 
 target value of Anndroid/arm is arm-unknown-linux-androideabi, so arm-*-linux*
@@ -16,7 +16,7 @@ MozReview-Commit-ID: 8V6sWAN07F9
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
-@@ -1932,24 +1932,26 @@ dnl ====================================
+@@ -2664,24 +2664,26 @@ dnl ====================================
  
  case $target in
  i?86-*-mingw*|x86_64-*-mingw*)
@@ -45,4 +45,4 @@ diff --git a/old-configure.in b/old-configure.in
      [MOZ_CRASHREPORTER=],
      [MOZ_CRASHREPORTER=F # Force enable breakpad])
  
- if test "$OS_ARCH" != "$HOST_OS_ARCH" -a "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "Darwin" -a "$MOZ_WIDGET_TOOLKIT" != "android"; then
+ if test "$OS_ARCH" != "$HOST_OS_ARCH" -a "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "Darwin"; then

+ 16 - 16
mozilla-release/patches/1446650-61a1.patch

@@ -2,13 +2,13 @@
 # User Robert Longson <longsonr@gmail.com>
 # Date 1521744230 0
 # Node ID 962be3a60013250b9fea1b3ead5e0c9c16b4629b
-# Parent  de510e025e6faa302e1b8abd24f4cd41926ad2d2
+# Parent  d77a096bc3f5090d76ddf314ef92572895421b8b
 Bug 1446650 - support the SVG 2 side attribute for textPaths r=dholbert
 
 diff --git a/dom/svg/SVGTextPathElement.cpp b/dom/svg/SVGTextPathElement.cpp
 --- a/dom/svg/SVGTextPathElement.cpp
 +++ b/dom/svg/SVGTextPathElement.cpp
-@@ -38,31 +38,41 @@ nsSVGEnumMapping SVGTextPathElement::sMe
+@@ -43,31 +43,41 @@ nsSVGEnumMapping SVGTextPathElement::sMe
  };
  
  nsSVGEnumMapping SVGTextPathElement::sSpacingMap[] = {
@@ -29,7 +29,7 @@ diff --git a/dom/svg/SVGTextPathElement.cpp b/dom/svg/SVGTextPathElement.cpp
    // from SVGTextContentElement:
    { &nsGkAtoms::lengthAdjust,
      sLengthAdjustMap,
-     SVG_LENGTHADJUST_SPACING
+     LENGTHADJUST_SPACING
    },
    // from SVGTextPathElement:
    { &nsGkAtoms::method,
@@ -51,7 +51,7 @@ diff --git a/dom/svg/SVGTextPathElement.cpp b/dom/svg/SVGTextPathElement.cpp
    { &nsGkAtoms::href, kNameSpaceID_None, true },
    { &nsGkAtoms::href, kNameSpaceID_XLink, true }
  };
-@@ -103,16 +113,22 @@ SVGTextPathElement::Method()
+@@ -108,16 +118,22 @@ SVGTextPathElement::Method()
  }
  
  already_AddRefed<SVGAnimatedEnumeration>
@@ -77,14 +77,14 @@ diff --git a/dom/svg/SVGTextPathElement.cpp b/dom/svg/SVGTextPathElement.cpp
 diff --git a/dom/svg/SVGTextPathElement.h b/dom/svg/SVGTextPathElement.h
 --- a/dom/svg/SVGTextPathElement.h
 +++ b/dom/svg/SVGTextPathElement.h
-@@ -25,16 +25,20 @@ namespace dom {
- static const unsigned short TEXTPATH_METHODTYPE_UNKNOWN  = 0;
- static const unsigned short TEXTPATH_METHODTYPE_ALIGN    = 1;
- static const unsigned short TEXTPATH_METHODTYPE_STRETCH  = 2;
- // textPath Spacing Types
- static const unsigned short TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
- static const unsigned short TEXTPATH_SPACINGTYPE_AUTO    = 1;
- static const unsigned short TEXTPATH_SPACINGTYPE_EXACT   = 2;
+@@ -16,16 +16,20 @@ class nsIAtom;
+ class nsIContent;
+ 
+ nsresult NS_NewSVGTextPathElement(nsIContent **aResult,
+                                   already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
+ 
+ namespace mozilla {
+ namespace dom {
  
 +// textPath side types
 +static const uint16_t TEXTPATH_SIDETYPE_LEFT    = 1;
@@ -98,7 +98,7 @@ diff --git a/dom/svg/SVGTextPathElement.h b/dom/svg/SVGTextPathElement.h
  
  protected:
    friend nsresult (::NS_NewSVGTextPathElement(nsIContent **aResult,
-@@ -48,37 +52,39 @@ public:
+@@ -39,37 +43,39 @@ public:
  
    virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
                           bool aPreallocateChildren) const override;
@@ -215,7 +215,7 @@ new file mode 100644
 diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp
 --- a/layout/svg/SVGTextFrame.cpp
 +++ b/layout/svg/SVGTextFrame.cpp
-@@ -3392,17 +3392,18 @@ SVGTextFrame::MutationObserver::Attribut
+@@ -3393,17 +3393,18 @@ SVGTextFrame::MutationObserver::Attribut
  
  void
  SVGTextFrame::HandleAttributeChangeInDescendant(Element* aElement,
@@ -235,7 +235,7 @@ diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp
        nsIFrame* childElementFrame = aElement->GetPrimaryFrame();
        if (childElementFrame) {
          childElementFrame->DeleteProperty(
-@@ -5106,17 +5107,20 @@ SVGTextFrame::DoTextPathLayout()
+@@ -5107,17 +5108,20 @@ SVGTextFrame::DoTextPathLayout()
        it.AdvancePastCurrentTextPathFrame();
        uint32_t end = it.TextElementCharIndex();
        for (uint32_t i = start; i < end; i++) {
@@ -257,7 +257,7 @@ diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp
      do {
        uint32_t i = it.TextElementCharIndex();
        gfxFloat halfAdvance =
-@@ -5127,17 +5131,23 @@ SVGTextFrame::DoTextPathLayout()
+@@ -5128,17 +5132,23 @@ SVGTextFrame::DoTextPathLayout()
                                  : mPositions[i].mPosition.x) +
                        sign * halfAdvance + offset;
  

+ 8 - 8
mozilla-release/patches/1447931-62a1.patch

@@ -2,7 +2,7 @@
 # User Tarek Ziadé <tarek@mozilla.com>
 # Date 1528834970 25200
 # Node ID 1d8ffa02b2af02b23a34f426466a8f26395ac0d2
-# Parent  23ab9d4fe794988e9b1d85472daca3c1b796b633
+# Parent  ae437b73631a30697f8b4655df29e5d410ac231a
 Bug 1447931 - NetworkActivity becomes IOActivity - r=baku,mak,valentin
 
 Generalizes NetworkActivity so it can be used for sockets but also disk files.
@@ -37,7 +37,7 @@ diff --git a/dom/tests/browser/dummy.html b/dom/tests/browser/dummy.html
 diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
 --- a/modules/libpref/init/all.js
 +++ b/modules/libpref/init/all.js
-@@ -5412,21 +5412,23 @@ pref("memory.dump_reports_on_oom", false
+@@ -5367,21 +5367,23 @@ pref("memory.dump_reports_on_oom", false
  
  // Number of stack frames to capture in createObjectURL for about:memory.
  pref("memory.blob_report.stack_frames", 0);
@@ -1204,7 +1204,7 @@ diff --git a/netwerk/base/nsFileStreams.cpp b/netwerk/base/nsFileStreams.cpp
  ////////////////////////////////////////////////////////////////////////////////
  // nsFileStreamBase
  
-@@ -347,17 +353,32 @@ nsFileStreamBase::DoOpen()
+@@ -350,17 +356,32 @@ nsFileStreamBase::DoOpen()
      } else
  #endif // XP_WIN
      {
@@ -1311,7 +1311,7 @@ diff --git a/netwerk/base/nsSocketTransport2.cpp b/netwerk/base/nsSocketTranspor
  #include "nsISocketProvider.h"
  #include "nsISSLSocketControl.h"
  #include "nsIPipe.h"
-@@ -1361,18 +1361,18 @@ nsSocketTransport::InitiateSocket()
+@@ -1359,18 +1359,18 @@ nsSocketTransport::InitiateSocket()
      bool usingSSL;
  
      rv = BuildSocket(fd, proxyTransparent, usingSSL);
@@ -1372,7 +1372,7 @@ diff --git a/netwerk/base/nsSocketTransportService2.cpp b/netwerk/base/nsSocketT
  
  #define REPAIR_POLLABLE_EVENT_TIME 10
  
-@@ -709,17 +709,17 @@ nsSocketTransportService::ShutdownThread
+@@ -695,17 +695,17 @@ nsSocketTransportService::ShutdownThread
          obsSvc->RemoveObserver(this, NS_NETWORK_LINK_TOPIC);
      }
  
@@ -1391,7 +1391,7 @@ diff --git a/netwerk/base/nsSocketTransportService2.cpp b/netwerk/base/nsSocketT
  }
  
  NS_IMETHODIMP
-@@ -1373,22 +1373,22 @@ nsSocketTransportService::Observe(nsISup
+@@ -1363,22 +1363,22 @@ nsSocketTransportService::Observe(nsISup
      SOCKET_LOG(("nsSocketTransportService::Observe topic=%s", topic));
  
      if (!strcmp(topic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID)) {
@@ -1534,14 +1534,14 @@ new file mode 100644
 diff --git a/netwerk/test/unit/xpcshell.ini b/netwerk/test/unit/xpcshell.ini
 --- a/netwerk/test/unit/xpcshell.ini
 +++ b/netwerk/test/unit/xpcshell.ini
-@@ -16,17 +16,16 @@ support-files =
-   data/test_readline7.txt
+@@ -17,17 +17,16 @@ support-files =
    data/test_readline8.txt
    data/signed_win.exe
    socks_client_subprocess.js
    test_link.desktop
    test_link.url
    ../../dns/effective_tld_names.dat
+   test_alt-data_cross_process.js
  
 -[test_network_activity.js]
  [test_nsIBufferedOutputStream_writeFrom_block.js]

+ 29 - 29
mozilla-release/patches/1448490-1-61a1.patch

@@ -2,7 +2,7 @@
 # User Kartikaya Gupta <kgupta@mozilla.com>
 # Date 1521932761 14400
 # Node ID 5d9f32557d7740c7c30f7bc6057c4de0c294d828
-# Parent  617d0ff335f40bbc53662182b6c83b305cd7806a
+# Parent  1e0735269b2bf9e6aa3dca09987f35f5a5983a27
 Bug 1448490 - Make the layers id a struct instead of a uint64_t. r=mattwoodrow
 
 The new struct is in LayersTypes.h, all the rest of the changes are just
@@ -63,7 +63,7 @@ diff --git a/dom/browser-element/BrowserElementParent.h b/dom/browser-element/Br
 diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp
 --- a/dom/ipc/ContentChild.cpp
 +++ b/dom/ipc/ContentChild.cpp
-@@ -877,17 +877,17 @@ ContentChild::ProvideWindowCommon(TabChi
+@@ -912,17 +912,17 @@ ContentChild::ProvideWindowCommon(TabChi
    // until one of these callbacks is called.
    auto resolve = [&] (const CreatedWindowInfo& info) {
      MOZ_RELEASE_ASSERT(NS_IsMainThread());
@@ -82,7 +82,7 @@ diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp
      ready = true;
  
      // NOTE: We have to handle this immediately in the resolve callback in order
-@@ -906,17 +906,17 @@ ContentChild::ProvideWindowCommon(TabChi
+@@ -941,17 +941,17 @@ ContentChild::ProvideWindowCommon(TabChi
      }
  
      // If the TabChild has been torn down, we don't need to do this anymore.
@@ -101,7 +101,7 @@ diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp
      nsIDocShell* openerShell;
      if (opener && (openerShell = opener->GetDocShell())) {
        nsCOMPtr<nsILoadContext> context = do_QueryInterface(openerShell);
-@@ -1324,17 +1324,17 @@ ContentChild::RecvReinitRendering(Endpoi
+@@ -1361,17 +1361,17 @@ ContentChild::RecvReinitRendering(Endpoi
                                    Endpoint<PVideoDecoderManagerChild>&& aVideoManager,
                                    nsTArray<uint32_t>&& namespaces)
  {
@@ -120,7 +120,7 @@ diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp
    if (!CompositorManagerChild::Init(Move(aCompositor), namespaces[0])) {
      return GetResultForRenderingInitFailure(aCompositor.OtherPid());
    }
-@@ -1346,17 +1346,17 @@ ContentChild::RecvReinitRendering(Endpoi
+@@ -1383,17 +1383,17 @@ ContentChild::RecvReinitRendering(Endpoi
    }
    if (!gfx::VRManagerChild::ReinitForContent(Move(aVRBridge))) {
      return GetResultForRenderingInitFailure(aVRBridge.OtherPid());
@@ -139,7 +139,7 @@ diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp
    return IPC_OK();
  }
  
-@@ -1371,17 +1371,17 @@ ContentChild::RecvAudioDefaultDeviceChan
+@@ -1408,17 +1408,17 @@ ContentChild::RecvAudioDefaultDeviceChan
  
  mozilla::ipc::IPCResult
  ContentChild::RecvReinitRenderingForDeviceReset()
@@ -161,7 +161,7 @@ diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp
 diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp
 --- a/dom/ipc/ContentParent.cpp
 +++ b/dom/ipc/ContentParent.cpp
-@@ -1492,44 +1492,44 @@ ContentParent::ProcessingError(Result aC
+@@ -1493,44 +1493,44 @@ ContentParent::ProcessingError(Result aC
      return;
    }
    // Other errors are big deals.
@@ -209,7 +209,7 @@ diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp
    RefPtr<ContentParent> contentParent = cpm->GetContentProcessById(aCpId);
    if (ChildID() != aCpId && !contentParent->CanCommunicateWith(ChildID())) {
      return IPC_FAIL_NO_REASON(this);
-@@ -1544,17 +1544,17 @@ ContentParent::RecvAllocateLayerTreeId(c
+@@ -1545,17 +1545,17 @@ ContentParent::RecvAllocateLayerTreeId(c
    if (!AllocateLayerTreeId(contentParent, browserParent, aTabId, aId)) {
      return IPC_FAIL_NO_REASON(this);
    }
@@ -228,7 +228,7 @@ diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp
    if (!contentParent->CanCommunicateWith(ChildID())) {
      return IPC_FAIL(this, "Spoofed DeallocateLayerTreeId call");
    }
-@@ -4617,17 +4617,17 @@ ContentParent::RecvCreateWindow(PBrowser
+@@ -4691,17 +4691,17 @@ ContentParent::RecvCreateWindow(PBrowser
                                  const uint32_t& aReferrerPolicy,
                                  CreateWindowResolver&& aResolve)
  {
@@ -288,7 +288,7 @@ diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h
  
    virtual mozilla::ipc::IPCResult RecvInitBackground(Endpoint<mozilla::ipc::PBackgroundParent>&& aEndpoint) override;
  
-@@ -1041,20 +1041,20 @@ private:
+@@ -1064,20 +1064,20 @@ public:
                                                    const URIParams& aNewURI,
                                                    const IPC::Principal& aLoadingPrincipal,
                                                    const bool& aInPrivateBrowsing) override;
@@ -411,7 +411,7 @@ diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl
  using mozilla::Telemetry::DiscardedData from "mozilla/TelemetryComms.h";
  using mozilla::CrossProcessMutexHandle from "mozilla/ipc/CrossProcessMutex.h";
  
-@@ -808,18 +809,18 @@ parent:
+@@ -813,18 +814,18 @@ parent:
          returns (nsString providerName, OptionalIPCStream postData, OptionalURIParams uri);
  
      sync NotifyKeywordSearchLoading(nsString providerName, nsString keyword);
@@ -435,7 +435,7 @@ diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl
 diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp
 --- a/dom/ipc/TabChild.cpp
 +++ b/dom/ipc/TabChild.cpp
-@@ -392,17 +392,17 @@ TabChild::TabChild(nsIContentChild* aMan
+@@ -391,17 +391,17 @@ TabChild::TabChild(nsIContentChild* aMan
                     uint32_t aChromeFlags)
    : TabContext(aContext)
    , mTabGroup(aTabGroup)
@@ -454,7 +454,7 @@ diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp
    , mIgnoreKeyPressEvent(false)
    , mHasValidInnerSize(false)
    , mDestroyed(false)
-@@ -1071,26 +1071,26 @@ TabChild::DestroyWindow()
+@@ -1070,26 +1070,26 @@ TabChild::DestroyWindow()
      }
  
      if (mRemoteFrame) {
@@ -484,7 +484,7 @@ diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp
  {
    mIPCOpen = false;
  
-@@ -1164,17 +1164,17 @@ TabChild::RecvLoadURL(const nsCString& a
+@@ -1163,17 +1163,17 @@ TabChild::RecvLoadURL(const nsCString& a
  
    CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("URL"), aURI);
  
@@ -503,7 +503,7 @@ diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp
    RecvShow(ScreenIntSize(0, 0), aShowInfo, mParentIsActive, nsSizeMode_Normal);
    mDidFakeShow = true;
  }
-@@ -1260,17 +1260,17 @@ TabChild::RecvShow(const ScreenIntSize& 
+@@ -1259,17 +1259,17 @@ TabChild::RecvShow(const ScreenIntSize& 
    if (!res) {
      return IPC_FAIL_NO_REASON(this);
    }
@@ -522,7 +522,7 @@ diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp
  
    mLayersConnected = Some(aLayersConnected);
    InitRenderingState(aTextureFactoryIdentifier, aLayersId, aCompositorOptions, aRenderFrame);
-@@ -2731,51 +2731,51 @@ TabChild::InitTabChildGlobal()
+@@ -2730,51 +2730,51 @@ TabChild::InitTabChildGlobal()
      }
    }
  
@@ -579,7 +579,7 @@ diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp
      if (mLayersConnected == Some(true)) {
        success = CreateRemoteLayerManager(compositorChild);
      }
-@@ -2814,17 +2814,17 @@ TabChild::CreateRemoteLayerManager(mozil
+@@ -2813,17 +2813,17 @@ TabChild::CreateRemoteLayerManager(mozil
      success = mPuppetWidget->CreateRemoteLayerManager([&] (LayerManager* aLayerManager) -> bool {
        MOZ_ASSERT(aLayerManager->AsWebRenderLayerManager());
        return aLayerManager->AsWebRenderLayerManager()->Initialize(aCompositorChild,
@@ -598,7 +598,7 @@ diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp
      }
      if (!success) {
        // Since no LayerManager is associated with the tab's widget, we will never
-@@ -3067,23 +3067,23 @@ TabChild::GetFrom(nsIPresShell* aPresShe
+@@ -3066,23 +3066,23 @@ TabChild::GetFrom(nsIPresShell* aPresShe
    if (!doc) {
        return nullptr;
    }
@@ -624,7 +624,7 @@ diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp
                         const TimeStamp& aCompositeEnd)
  {
    MOZ_ASSERT(mPuppetWidget);
-@@ -3137,17 +3137,17 @@ TabChild::InvalidateLayers()
+@@ -3136,17 +3136,17 @@ TabChild::InvalidateLayers()
    MOZ_ASSERT(lm);
  
    FrameLayerBuilder::InvalidateAllLayers(lm);
@@ -1967,7 +1967,7 @@ diff --git a/gfx/layers/LayerMetricsWrapper.h b/gfx/layers/LayerMetricsWrapper.h
 diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp
 --- a/gfx/layers/Layers.cpp
 +++ b/gfx/layers/Layers.cpp
-@@ -2216,18 +2216,18 @@ ImageLayer::DumpPacket(layerscope::Layer
+@@ -2188,18 +2188,18 @@ ImageLayer::DumpPacket(layerscope::Layer
    layer->set_type(LayersPacket::Layer::ImageLayer);
    DumpFilter(layer, mSamplingFilter);
  }
@@ -1988,7 +1988,7 @@ diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp
      aStream << " [force-ehr]";
    }
  }
-@@ -2235,17 +2235,17 @@ RefLayer::PrintInfo(std::stringstream& a
+@@ -2207,17 +2207,17 @@ RefLayer::PrintInfo(std::stringstream& a
  void
  RefLayer::DumpPacket(layerscope::LayersPacket* aPacket, const void* aParent)
  {
@@ -2010,7 +2010,7 @@ diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp
 diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h
 --- a/gfx/layers/Layers.h
 +++ b/gfx/layers/Layers.h
-@@ -2725,19 +2725,19 @@ private:
+@@ -2633,19 +2633,19 @@ private:
    virtual bool RepositionChild(Layer* aChild, Layer* aAfter) override
    { MOZ_CRASH("GFX: RefLayer"); return false; }
  
@@ -2032,7 +2032,7 @@ diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h
    }
    /**
     * CONSTRUCTION PHASE ONLY
-@@ -2789,38 +2789,38 @@ public:
+@@ -2697,38 +2697,38 @@ public:
    {
      mFirstChild = mLastChild = nullptr;
      aLayer->SetParent(nullptr);
@@ -3200,7 +3200,7 @@ diff --git a/gfx/layers/apz/src/AndroidDynamicToolbarAnimator.h b/gfx/layers/apz
 diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp
 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
 +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
-@@ -758,17 +758,17 @@ AsyncPanZoomController::InitializeGlobal
+@@ -765,17 +765,17 @@ AsyncPanZoomController::InitializeGlobal
                       gfxPrefs::APZCurveFunctionY2()));
    ClearOnShutdown(&gVelocityCurveFunction);
  
@@ -3592,7 +3592,7 @@ diff --git a/gfx/layers/apz/src/HitTestingTreeNode.cpp b/gfx/layers/apz/src/HitT
  void
  HitTestingTreeNode::SetHitTestData(const EventRegions& aRegions,
                                     const LayerIntRegion& aVisibleRegion,
-@@ -369,17 +369,17 @@ HitTestingTreeNode::GetVisibleRegion() c
+@@ -372,17 +372,17 @@ HitTestingTreeNode::GetVisibleRegion() c
  void
  HitTestingTreeNode::Dump(const char* aPrefix) const
  {
@@ -7846,7 +7846,7 @@ diff --git a/layout/ipc/RenderFrameParent.h b/layout/ipc/RenderFrameParent.h
 diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp
 --- a/widget/nsBaseWidget.cpp
 +++ b/widget/nsBaseWidget.cpp
-@@ -1018,17 +1018,17 @@ nsBaseWidget::UpdateZoomConstraints(cons
+@@ -1033,17 +1033,17 @@ nsBaseWidget::UpdateZoomConstraints(cons
  
      if (aConstraints) {
        // We have some constraints, but the compositor and APZC aren't created yet.
@@ -7865,7 +7865,7 @@ diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp
  nsBaseWidget::AsyncPanZoomEnabled() const
  {
    return !!mAPZC;
-@@ -1396,17 +1396,17 @@ void nsBaseWidget::CreateCompositor(int 
+@@ -1413,17 +1413,17 @@ void nsBaseWidget::CreateCompositor(int 
      PLayerTransactionChild* shadowManager = nullptr;
  
      nsTArray<LayersBackend> backendHints;
@@ -7884,7 +7884,7 @@ diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp
      }
  
      if (!success) {
-@@ -1899,17 +1899,17 @@ void
+@@ -1916,17 +1916,17 @@ void
  nsBaseWidget::ZoomToRect(const uint32_t& aPresShellId,
                           const FrameMetrics::ViewID& aViewId,
                           const CSSRect& aRect,
@@ -7903,7 +7903,7 @@ diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp
        ScrollableLayerGuid(layerId, aPresShellId, aViewId),
        aRect,
        aFlags));
-@@ -1946,17 +1946,17 @@ void
+@@ -1963,17 +1963,17 @@ void
  nsBaseWidget::StartAsyncScrollbarDrag(const AsyncDragMetrics& aDragMetrics)
  {
    if (!AsyncPanZoomEnabled()) {

+ 3 - 3
mozilla-release/patches/1449035-62a1.patch

@@ -2,7 +2,7 @@
 # User Sylvestre Ledru <sledru@mozilla.com>
 # Date 1526119391 -7200
 # Node ID ca08a480132a0ece3a496f9719e4a0fc1f675389
-# Parent  ceb0fab694ea733ec67ca50456e4997bf0023c7f
+# Parent  1b8180ca8c960540e4a7804d01a93924b8dacc68
 Bug 1449035 - Codespell: move to quiet-level=7 to also ignore the binary r=ahal
 
 MozReview-Commit-ID: 9ldfPPRqiSu
@@ -10,7 +10,7 @@ MozReview-Commit-ID: 9ldfPPRqiSu
 diff --git a/tools/lint/spell/__init__.py b/tools/lint/spell/__init__.py
 --- a/tools/lint/spell/__init__.py
 +++ b/tools/lint/spell/__init__.py
-@@ -113,17 +113,17 @@ def lint(paths, config, fix=None, **lint
+@@ -114,17 +114,17 @@ def lint(paths, config, fix=None, **lint
      exclude_list = os.path.join(here, 'exclude-list.txt')
      cmd_args = [binary,
                  '--disable-colors',
@@ -28,4 +28,4 @@ diff --git a/tools/lint/spell/__init__.py b/tools/lint/spell/__init__.py
  
      if fix:
          cmd_args.append('--write-changes')
-     log.debug("Command: {}".format(' '.join(cmd_args)))
+ 

+ 21 - 20
mozilla-release/patches/1456552-62a1.patch

@@ -1,8 +1,9 @@
 # HG changeset patch
 # User Tom Ritter <tom@mozilla.com>
 # Date 1526506367 18000
+#      Wed May 16 16:32:47 2018 -0500
 # Node ID 87f1c846afc3eca37b82d8e86dd3fe451175ab21
-# Parent  d9e4a3f6c80145070187f4aba8806dada75b2178
+# Parent  28c54aefcd75c1585dec0e010470a444b191689d
 Bug 1456552 Make Optimized MinGW builds use -O# instead of falling through and collecting a -O r=ted
 
 We use -O2 for js (because we can) and we use -O1 for the root because there is an x86 compiler bug
@@ -13,14 +14,14 @@ MozReview-Commit-ID: CnDk2ko3jfo
 diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 --- a/js/src/old-configure.in
 +++ b/js/src/old-configure.in
-@@ -561,16 +561,18 @@ case "$target" in
-         if test -z "$CLANG_CC"; then
-             # Use static libgcc and libstdc++
-             LDFLAGS="$LDFLAGS -static"
-         else
-             # Silence problematic clang warnings
-             CXXFLAGS="$CXXFLAGS -Wno-incompatible-ms-struct"
-         fi
+@@ -637,16 +637,18 @@ case "$target" in
+         # Use static libgcc and libstdc++
+         LDFLAGS="$LDFLAGS -static"
+         # Use temp file for windres (bug 213281)
+         RCFLAGS='-O coff --use-temp-file'
+         # mingw doesn't require kernel32, user32, and advapi32 explicitly
+         LIBS="$LIBS -lgdi32 -lwinmm -lwsock32"
+         MOZ_FIX_LINK_PATHS=
  
 +        MOZ_OPTIMIZE_FLAGS="-O2"
 +
@@ -30,18 +31,18 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
          TARGET_COMPILER_ABI=msvc
          HOST_CC='$(CC)'
          HOST_CXX='$(CXX)'
-         STRIP='echo'
-         STRIP_FLAGS='not_strip'
+         if test "$AS_BIN"; then
+             AS="$(basename "$AS_BIN")"
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
-@@ -649,16 +649,18 @@ case "$target" in
-         CXXFLAGS="$CXXFLAGS -mms-bitfields"
-         DSO_LDOPTS='-shared'
+@@ -800,16 +800,18 @@ case "$target" in
+         # Use static libgcc and libstdc++
+         LDFLAGS="$LDFLAGS -static"
          # Use temp file for windres (bug 213281)
          RCFLAGS='-O coff --use-temp-file'
          # mingw doesn't require kernel32, user32, and advapi32 explicitly
-         LIBS="$LIBS -luuid -lusp10 -lgdi32 -lwinmm -lwsock32 -luserenv -lsecur32"
+         LIBS="$LIBS -luuid -lgdi32 -lwinmm -lwsock32 -luserenv -lsecur32"
          MOZ_FIX_LINK_PATHS=
  
 +        MOZ_OPTIMIZE_FLAGS="-O1"
@@ -49,8 +50,8 @@ diff --git a/old-configure.in b/old-configure.in
          WIN32_CONSOLE_EXE_LDFLAGS=-mconsole
          WIN32_GUI_EXE_LDFLAGS=-mwindows
  
-         if test -z "$CLANG_CC"; then
-             # Use static libgcc and libstdc++
-             LDFLAGS="$LDFLAGS -static"
- 
-             # GCC/binutils can't link to a function if we try to include dllexport function
+         # GCC/binutils can't link to a function if we try to include dllexport function
+         # in the same library as dllimport caller. To work around it, we build NSPR
+         # and NSS with -mnop-fun-dllimport flag. The drawback of this solution is that
+         # function thunks need to be generated for cross-DLL calls.
+         MOZ_FOLD_LIBS_FLAGS="-mnop-fun-dllimport"

+ 3 - 11
mozilla-release/patches/1458385-2-70a1.patch

@@ -2,7 +2,7 @@
 # User Tom Prince <mozilla@hocat.ca>
 # Date 1562863213 0
 # Node ID 1be59290f02e8bdce79be475ca7d1f6a9d6603e7
-# Parent  32b5e712e57a2e481f585f6d253de485ad007361
+# Parent  b76bab5c971741f73e15566736db8119d3663e01
 Bug 1458385: Generate MARs with the appropriate channel-id explicitly; r=nthomas
 
 Rather than relying on the mar-channel-id set in the `mar` binary, set the channel
@@ -14,7 +14,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D37481
 diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py
 --- a/python/mozbuild/mozbuild/mach_commands.py
 +++ b/python/mozbuild/mozbuild/mach_commands.py
-@@ -1164,19 +1164,29 @@ class Repackage(MachCommandBase):
+@@ -1185,11 +1185,21 @@ class Repackage(MachCommandBase):
                       help='Mar binary path')
      @CommandArgument('--output', '-o', type=str, required=True,
                       help='Output filename')
@@ -38,14 +38,6 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
 +            arch=arch,
 +            mar_channel_id=mar_channel_id,
 +        )
- 
- 
- @CommandProvider
- class CreateMachEnvironment(MachCommandBase):
-     """Create the mach virtualenvs."""
- 
-     @Command('create-mach-environment', category='devenv',
-              description=(
 diff --git a/python/mozbuild/mozbuild/repackaging/mar.py b/python/mozbuild/mozbuild/repackaging/mar.py
 --- a/python/mozbuild/mozbuild/repackaging/mar.py
 +++ b/python/mozbuild/mozbuild/repackaging/mar.py
@@ -66,7 +58,7 @@ diff --git a/python/mozbuild/mozbuild/repackaging/mar.py b/python/mozbuild/mozbu
          raise Exception("Package file %s is not a valid .zip or .tar file." % package)
      if arch and arch not in _BCJ_OPTIONS:
          raise Exception("Unknown architecture {}, available architectures: {}".format(
-             arch, list(_BCJ_OPTIONS.keys())))
+             arch, _BCJ_OPTIONS.keys()))
  
      ensureParentDir(output)
      tmpdir = tempfile.mkdtemp()

+ 9 - 9
mozilla-release/patches/1460620-66a1.patch

@@ -2,13 +2,13 @@
 # User Tom Ritter <tom@mozilla.com>
 # Date 1546982199 21600
 # Node ID 763f90cc2fac67d6c5598df0fc3af3a335680382
-# Parent  20bc5b00bd3700228ead45acb7f2764d4197bbe2
+# Parent  10f3b4731e9e145f58c3ecc91418f7b937fe04d2
 Bug 1460620 - Have MinGW look for d3dcompiler_47.dll (so it will be packaged) r=froydnj
 
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
-@@ -2397,22 +2397,27 @@ if test -n "$MOZ_ANGLE_RENDERER"; then
+@@ -2158,22 +2158,27 @@ if test -n "$MOZ_ANGLE_RENDERER"; then
      AC_MSG_ERROR([Couldn't determine MOZ_D3D_CPU_SUFFIX.])
    fi
  
@@ -41,7 +41,7 @@ diff --git a/old-configure.in b/old-configure.in
        if test -f "$MOZ_D3DCOMPILER_VISTA_DLL_PATH"; then
          AC_MSG_RESULT([Found MOZ_D3DCOMPILER_VISTA_DLL_PATH: $MOZ_D3DCOMPILER_VISTA_DLL_PATH])
          MOZ_HAS_WINSDK_WITH_D3D=1
-@@ -2420,23 +2425,30 @@ if test -n "$MOZ_ANGLE_RENDERER"; then
+@@ -2181,23 +2186,30 @@ if test -n "$MOZ_ANGLE_RENDERER"; then
          AC_MSG_RESULT([AArch64 Windows includes d3dcompiler DLLs])
          MOZ_D3DCOMPILER_VISTA_DLL_PATH=
        else
@@ -74,7 +74,7 @@ diff --git a/old-configure.in b/old-configure.in
    fi
  
    # On mingw, check if headers are provided by toolchain.
-@@ -2448,20 +2460,18 @@ if test -n "$MOZ_ANGLE_RENDERER"; then
+@@ -2209,20 +2221,18 @@ if test -n "$MOZ_ANGLE_RENDERER"; then
    # Check that we found what we needed.
    MOZ_FOUND_A_D3D_COMPILER=
  
@@ -100,7 +100,7 @@ diff --git a/old-configure.in b/old-configure.in
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -1147,16 +1147,17 @@ set_config('MOZ_UNSIGNED_SYSTEM_SCOPE', 
+@@ -1169,16 +1169,17 @@ set_config('MOZ_UNSIGNED_SYSTEM_SCOPE', 
  
  
  # Shader Compiler for Windows (and MinGW Cross Compile)
@@ -114,7 +114,7 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
                        (lambda t, h: t.kernel == 'WINNT' and h.kernel == 'Linux'))
  
  
- # Alternative Crashreporter setting
- option("--with-crashreporter-url", env="MOZ_CRASHREPORTER_URL",
-        default="https://crash-reports.mozilla.com/", nargs=1,
-        help="Set an alternative crashreporter url")
+ # VPX
+ # ===
+ 
+ with only_when(compile_environment):

+ 7 - 6
mozilla-release/patches/1460796-62a1.patch

@@ -1,8 +1,9 @@
 # HG changeset patch
 # User Tom Ritter <tom@mozilla.com>
 # Date 1526007876 18000
+#      Thu May 10 22:04:36 2018 -0500
 # Node ID b463e90d80980565d860a60714ee7c73296edf75
-# Parent  14dee9dd79951eab9e53d7595b8028075fadc73f
+# Parent  b30032d4014f202af284b8f32d0478e161662f46
 Bug 1460796 Resolve 'Missing entry point ScriptBreak' by including usp10 for the MinGW build r=froydnj
 
 MozReview-Commit-ID: KirwpvYty5s
@@ -10,7 +11,7 @@ MozReview-Commit-ID: KirwpvYty5s
 diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 --- a/js/src/old-configure.in
 +++ b/js/src/old-configure.in
-@@ -635,17 +635,17 @@ case "$target" in
+@@ -634,17 +634,17 @@ case "$target" in
          CXXFLAGS="$CXXFLAGS -mms-bitfields"
          DSO_LDOPTS='-shared'
          RC='$(WINDRES)'
@@ -23,12 +24,12 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 +        LIBS="$LIBS -lusp10 -lgdi32 -lwinmm -lwsock32"
          MOZ_FIX_LINK_PATHS=
  
+         MOZ_OPTIMIZE_FLAGS="-O2"
+ 
          WIN32_CONSOLE_EXE_LDFLAGS=-mconsole
          WIN32_GUI_EXE_LDFLAGS=-mwindows
      else
          TARGET_COMPILER_ABI=msvc
-         HOST_CC='$(CC)'
-         HOST_CXX='$(CXX)'
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
@@ -45,9 +46,9 @@ diff --git a/old-configure.in b/old-configure.in
 +        LIBS="$LIBS -luuid -lusp10 -lgdi32 -lwinmm -lwsock32 -luserenv -lsecur32"
          MOZ_FIX_LINK_PATHS=
  
+         MOZ_OPTIMIZE_FLAGS="-O1"
+ 
          WIN32_CONSOLE_EXE_LDFLAGS=-mconsole
          WIN32_GUI_EXE_LDFLAGS=-mwindows
  
          # GCC/binutils can't link to a function if we try to include dllexport function
-         # in the same library as dllimport caller. To work around it, we build NSPR
-         # and NSS with -mnop-fun-dllimport flag. The drawback of this solution is that

+ 4 - 4
mozilla-release/patches/1462605-62a1.patch

@@ -2,7 +2,7 @@
 # User Andrea Marchesini <amarchesini@mozilla.com>
 # Date 1526653219 -7200
 # Node ID cbc132bb5984f025f5a6233d55a937a13358c8bc
-# Parent  280f46f1457c77387d111a2e42f4db88dd000c05
+# Parent  0853437659bc43a87a036581a5bf14ca28d515f5
 Bug 1462605 - PerformanceNavigationTiming.name must be the value of the address of the current document, r=valentin
 
 diff --git a/dom/performance/PerformanceMainThread.cpp b/dom/performance/PerformanceMainThread.cpp
@@ -63,11 +63,11 @@ diff --git a/dom/performance/PerformanceMainThread.cpp b/dom/performance/Perform
        timing->SetPropertiesFromHttpChannel(httpChannel);
      }
  
--    mDocEntry = new PerformanceNavigationTiming(std::move(timing), this);
+-    mDocEntry = new PerformanceNavigationTiming(Move(timing), this);
 +    nsAutoString name;
 +    GetURLSpecFromChannel(mChannel, name);
 +
-+    mDocEntry = new PerformanceNavigationTiming(std::move(timing), this, name);
++    mDocEntry = new PerformanceNavigationTiming(Move(timing), this, name);
    }
  }
  
@@ -109,7 +109,7 @@ diff --git a/dom/performance/PerformanceNavigationTiming.h b/dom/performance/Per
    // zeroTime initialized to navigationStart
    PerformanceNavigationTiming(UniquePtr<PerformanceTimingData>&& aPerformanceTiming,
 -                              Performance* aPerformance)
--    : PerformanceResourceTiming(std::move(aPerformanceTiming), aPerformance,
+-    : PerformanceResourceTiming(Move(aPerformanceTiming), aPerformance,
 -                                NS_LITERAL_STRING("document")) {
 -      SetEntryType(NS_LITERAL_STRING("navigation"));
 -      SetInitiatorType(NS_LITERAL_STRING("navigation"));

+ 5 - 5
mozilla-release/patches/1463065-62a1.patch

@@ -2,13 +2,13 @@
 # User Andrea Marchesini <amarchesini@mozilla.com>
 # Date 1526906955 -7200
 # Node ID f61158077bd0c9358634f1476e91b6376baafa28
-# Parent  7d85bf8f8c5839eb2ebf623ca7d202091770c6d6
+# Parent  58aed25769b770268715fbbde9512aa0a466bf4b
 Bug 1463065 - "server" is not a valid PerformanceEntry type, r=valentin
 
 diff --git a/dom/performance/PerformanceObserver.cpp b/dom/performance/PerformanceObserver.cpp
 --- a/dom/performance/PerformanceObserver.cpp
 +++ b/dom/performance/PerformanceObserver.cpp
-@@ -131,21 +131,20 @@ PerformanceObserver::QueueEntry(Performa
+@@ -130,21 +130,20 @@ PerformanceObserver::QueueEntry(Performa
    aEntry->GetEntryType(entryType);
    if (!mEntryTypes.Contains<nsString>(entryType)) {
      return;
@@ -26,8 +26,8 @@ diff --git a/dom/performance/PerformanceObserver.cpp b/dom/performance/Performan
  };
  
  void
- PerformanceObserver::Observe(const PerformanceObserverInit& aOptions)
+ PerformanceObserver::Observe(const PerformanceObserverInit& aOptions,
+                              ErrorResult& aRv)
  {
    if (aOptions.mEntryTypes.IsEmpty()) {
-     return;
-   }
+     aRv.Throw(NS_ERROR_DOM_TYPE_ERR);

File diff suppressed because it is too large
+ 523 - 83
mozilla-release/patches/1465585-3-std-62a1.patch


+ 3 - 3
mozilla-release/patches/1465996-62a1.patch

@@ -2,7 +2,7 @@
 # User Gregory Szorc <gps@mozilla.com>
 # Date 1527813352 25200
 # Node ID c3afc68aab2c175165f73ded98a4d2a34decbabe
-# Parent  8840d27c95342e0592ba3ba938d31b7d6dd8ebd1
+# Parent  31c2db6e5e3d37af772f4570fb6cef246b379cf0
 Bug 1465996 - Disable l10n-check in code coverage builds; r=ted
 
 Because we don't care about them for this build configuration.
@@ -20,6 +20,6 @@ diff --git a/browser/config/mozconfigs/linux64/code-coverage b/browser/config/mo
  TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
  
  ac_add_options --disable-install-strip
- ac_add_options --disable-jemalloc
- ac_add_options --disable-crashreporter
  ac_add_options --disable-elf-hack
+ ac_add_options --enable-debug
+ ac_add_options --disable-sandbox

+ 3 - 4
mozilla-release/patches/1467285-62a1.patch

@@ -2,7 +2,7 @@
 # User Jed Davis <jld@mozilla.com>
 # Date 1528320279 21600
 # Node ID e1fec9d31bcd25c8672b540289cd893cad8e2dc9
-# Parent  e71c6c7ec1a0369b1b365ff20ed7fe385c47a1b1
+# Parent  4bf55e0d5fe4a20b121860ab0ac5f792c2fe212e
 Bug 1467285 - Disable warnings-as-errors on code coverage builds to avoid false positives. r=marco
 
 MozReview-Commit-ID: AlGvRrzzZtn
@@ -10,7 +10,7 @@ MozReview-Commit-ID: AlGvRrzzZtn
 diff --git a/browser/config/mozconfigs/linux64/code-coverage b/browser/config/mozconfigs/linux64/code-coverage
 --- a/browser/config/mozconfigs/linux64/code-coverage
 +++ b/browser/config/mozconfigs/linux64/code-coverage
-@@ -2,14 +2,15 @@
+@@ -4,13 +4,14 @@ MOZ_AUTOMATION_L10N_CHECK=0
  
  TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
  
@@ -24,5 +24,4 @@ diff --git a/browser/config/mozconfigs/linux64/code-coverage b/browser/config/mo
  
  export CFLAGS="--coverage"
  export CXXFLAGS="--coverage"
- export LDFLAGS="--coverage -L$topsrcdir/clang/lib/clang/7.0.1/lib/linux/"
- export LIBS="-lclang_rt.profile-x86_64"
+ export LDFLAGS="--coverage -L$TOOLTOOL_DIR/gtk3/usr/local/lib"

+ 3 - 3
mozilla-release/patches/1471339-6-63a1.patch

@@ -2,17 +2,17 @@
 # User Marco Castelluccio <mcastelluccio@mozilla.com>
 # Date 1530232841 -3600
 # Node ID 3424dbb3eaa5d2599d54d57a1439de78c5b6ac47
-# Parent  4276b0bd611075e125829fb403752c2de13af0c7
+# Parent  88b922d95a0ed8d2ed1fe6a410a055cd709f8848
 Bug 1471339 - Link with clang_rt.profile-x86_64 library in Linux code coverage builds. r=glandium
 
 diff --git a/browser/config/mozconfigs/linux64/code-coverage b/browser/config/mozconfigs/linux64/code-coverage
 --- a/browser/config/mozconfigs/linux64/code-coverage
 +++ b/browser/config/mozconfigs/linux64/code-coverage
-@@ -8,9 +8,10 @@ ac_add_options --disable-crashreporter
- ac_add_options --disable-elf-hack
+@@ -9,9 +9,10 @@ ac_add_options --disable-elf-hack
  ac_add_options --enable-debug
  ac_add_options --disable-sandbox
  ac_add_options --disable-profiling
+ ac_add_options --disable-warnings-as-errors
  ac_add_options --enable-coverage
  
  export CFLAGS="--coverage"

+ 10 - 8
mozilla-release/patches/1471556-63a1.patch

@@ -2,7 +2,7 @@
 # User Jacek Caban <jacek@codeweavers.com>
 # Date 1530032022 -7200
 # Node ID 13a4a0eb572e317dd71b8fdd2fe9b2ba2851087f
-# Parent  519f359547210c37741af0fe854e52f62417cddd
+# Parent  994a2e0c4f6a5687f4d0bd80a8854c2619f858db
 Bug 1471556 - Support mingw clang in configure scripts. r=glandium
 
 MozReview-Commit-ID: GKLbHvYgXnL
@@ -10,7 +10,7 @@ MozReview-Commit-ID: GKLbHvYgXnL
 diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 --- a/js/src/old-configure.in
 +++ b/js/src/old-configure.in
-@@ -439,18 +439,22 @@ if test "$GNU_CC"; then
+@@ -438,18 +438,22 @@ if test "$GNU_CC"; then
          # symbols for shared objects in some cases.
          if test -z "$MOZ_ASAN$MOZ_MSAN$MOZ_UBSAN$MOZ_TSAN"; then
              # Don't allow undefined symbols in libraries
@@ -35,7 +35,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
                       AC_MSG_RESULT([no]))
      CFLAGS=$_SAVE_CFLAGS
      AC_MSG_CHECKING([for -z noexecstack option to ld])
-@@ -632,24 +636,30 @@ case "$target" in
+@@ -631,24 +635,30 @@ case "$target" in
      if test -n "$GNU_CC" -o -n "$CLANG_CC"; then
          CC="$CC -mwindows"
          CXX="$CXX -mwindows"
@@ -60,15 +60,15 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 +            CXXFLAGS="$CXXFLAGS -Wno-incompatible-ms-struct"
 +        fi
 +
+         MOZ_OPTIMIZE_FLAGS="-O2"
+ 
          WIN32_CONSOLE_EXE_LDFLAGS=-mconsole
          WIN32_GUI_EXE_LDFLAGS=-mwindows
      else
          TARGET_COMPILER_ABI=msvc
          HOST_CC='$(CC)'
          HOST_CXX='$(CXX)'
-         if test "$AS_BIN"; then
-             AS="$(basename "$AS_BIN")"
-@@ -790,17 +800,17 @@ case "$target" in
+@@ -791,17 +801,17 @@ case "$target" in
      MOZ_USER_DIR="Mozilla"
  
      case "$host_os" in
@@ -115,7 +115,7 @@ diff --git a/old-configure.in b/old-configure.in
                       AC_MSG_RESULT([no]))
      CFLAGS=$_SAVE_CFLAGS
      AC_MSG_CHECKING([for -z noexecstack option to ld])
-@@ -794,32 +798,38 @@ case "$target" in
+@@ -794,34 +798,40 @@ case "$target" in
      if test -n "$GNU_CC" -o -n "$CLANG_CC"; then
          CC="$CC -mwindows"
          CXX="$CXX -mwindows"
@@ -132,6 +132,8 @@ diff --git a/old-configure.in b/old-configure.in
          LIBS="$LIBS -luuid -lusp10 -lgdi32 -lwinmm -lwsock32 -luserenv -lsecur32"
          MOZ_FIX_LINK_PATHS=
  
+         MOZ_OPTIMIZE_FLAGS="-O1"
+ 
          WIN32_CONSOLE_EXE_LDFLAGS=-mconsole
          WIN32_GUI_EXE_LDFLAGS=-mwindows
  
@@ -161,7 +163,7 @@ diff --git a/old-configure.in b/old-configure.in
          AR='lib'
          AR_FLAGS='-NOLOGO -OUT:$@'
          AR_EXTRACT=
-@@ -988,17 +998,17 @@ case "$target" in
+@@ -990,17 +1000,17 @@ case "$target" in
      MOZ_USER_DIR="Mozilla"
  
      case "$host_os" in

+ 6 - 8
mozilla-release/patches/1471648-67a1.patch

@@ -2,7 +2,7 @@
 # User Pavel Slepushkin <slepushkin@yandex.ru>
 # Date 1549026489 0
 # Node ID 5cf0c9b4e97bb208a2eaa3fdb3ad641b3b224b7a
-# Parent  52f7c36e21942b5d35d0877fe94bb5255c3dd92d
+# Parent  486069b3537b88379db3bcc41efc8bd4d66f5178
 Bug 1471648 - [mozlog] Add support for Python 3; r=raphael
 
 Differential Revision: https://phabricator.services.mozilla.com/D18069
@@ -37,7 +37,7 @@ diff --git a/testing/mozbase/mozlog/mozlog/formatters/html/html.py b/testing/moz
 diff --git a/testing/mozbase/mozlog/mozlog/formatters/machformatter.py b/testing/mozbase/mozlog/mozlog/formatters/machformatter.py
 --- a/testing/mozbase/mozlog/mozlog/formatters/machformatter.py
 +++ b/testing/mozbase/mozlog/mozlog/formatters/machformatter.py
-@@ -138,17 +138,17 @@ class MachFormatter(base.BaseFormatter):
+@@ -115,17 +115,17 @@ class MachFormatter(base.BaseFormatter):
          count = summary['counts']
          logs = summary['unexpected_logs']
  
@@ -56,7 +56,7 @@ diff --git a/testing/mozbase/mozlog/mozlog/formatters/machformatter.py b/testing
          # Format skip counts
          skip_tests = count["test"]["expected"]["skip"]
          skip_subtests = count["subtest"]["expected"]["skip"]
-@@ -162,17 +162,17 @@ class MachFormatter(base.BaseFormatter):
+@@ -139,17 +139,17 @@ class MachFormatter(base.BaseFormatter):
          checks = self.summary.aggregate('unexpected', count)
          unexpected_count = sum(checks.values())
          if unexpected_count:
@@ -78,7 +78,7 @@ diff --git a/testing/mozbase/mozlog/mozlog/formatters/machformatter.py b/testing
 diff --git a/testing/mozbase/mozlog/mozlog/handlers/base.py b/testing/mozbase/mozlog/mozlog/handlers/base.py
 --- a/testing/mozbase/mozlog/mozlog/handlers/base.py
 +++ b/testing/mozbase/mozlog/mozlog/handlers/base.py
-@@ -49,36 +49,49 @@ class StreamHandler(BaseHandler):
+@@ -73,36 +73,49 @@ class StreamHandler(BaseHandler):
      :param formatter: formatter to convert messages to string format
      """
  
@@ -235,7 +235,7 @@ diff --git a/testing/mozbase/mozlog/setup.py b/testing/mozbase/mozlog/setup.py
 diff --git a/testing/mozbase/mozlog/tests/manifest.ini b/testing/mozbase/mozlog/tests/manifest.ini
 --- a/testing/mozbase/mozlog/tests/manifest.ini
 +++ b/testing/mozbase/mozlog/tests/manifest.ini
-@@ -1,10 +1,7 @@
+@@ -1,9 +1,6 @@
  [DEFAULT]
  subsuite = mozbase, os == "linux"
  [test_logger.py]
@@ -245,8 +245,6 @@ diff --git a/testing/mozbase/mozlog/tests/manifest.ini b/testing/mozbase/mozlog/
 -skip-if = python == 3
  [test_structured.py]
 -skip-if = python == 3
- [test_capture.py]
-\ No newline at end of file
 diff --git a/testing/mozbase/mozlog/tests/test_formatters.py b/testing/mozbase/mozlog/tests/test_formatters.py
 --- a/testing/mozbase/mozlog/tests/test_formatters.py
 +++ b/testing/mozbase/mozlog/tests/test_formatters.py
@@ -612,7 +610,7 @@ diff --git a/testing/mozbase/mozrunner/setup.py b/testing/mozbase/mozrunner/setu
      'mozinfo>=0.7,<2',
 -    'mozlog==3.*',
 +    'mozlog~=4.0',
-     'mozprocess>=0.23,<2',
+     'mozprocess>=0.23,<1',
      'mozprofile~=2.1',
      'six>=1.10.0,<2',
  ]

+ 6 - 6
mozilla-release/patches/1472806-1-63a1.patch

@@ -1,9 +1,8 @@
 # HG changeset patch
 # User Nathan Froyd <froydnj@mozilla.com>
 # Date 1530651867 14400
-#      Tue Jul 03 17:04:27 2018 -0400
 # Node ID b8e6e7b84ce5b0ed0a402b20f50bc8d2979dce04
-# Parent  42ddb37ae86c4ec1bfb8620586e0d1feda882ada
+# Parent  7e6eabfa350b1c28cc988ed468cbb7d78cb13b01
 Bug 1472806 - fix -Wpessimizing-move warnings in Interceptor.cpp; r=aklotz
 
 There's no need to invoke std::move here, because Get() is already
@@ -12,7 +11,7 @@ returning a temporary that can be moved into the RefPtr.
 diff --git a/ipc/mscom/Interceptor.cpp b/ipc/mscom/Interceptor.cpp
 --- a/ipc/mscom/Interceptor.cpp
 +++ b/ipc/mscom/Interceptor.cpp
-@@ -255,17 +255,17 @@ Interceptor::Create(STAUniquePtr<IUnknow
+@@ -239,17 +239,17 @@ Interceptor::Create(STAUniquePtr<IUnknow
  {
    MOZ_ASSERT(aOutInterface && aTarget && aSink);
    if (!aOutInterface) {
@@ -21,7 +20,7 @@ diff --git a/ipc/mscom/Interceptor.cpp b/ipc/mscom/Interceptor.cpp
  
    detail::LiveSetAutoLock lock(GetLiveSet());
  
--  RefPtr<IWeakReference> existingWeak(Move(GetLiveSet().Get(aTarget.get())));
+-  RefPtr<IWeakReference> existingWeak(std::move(GetLiveSet().Get(aTarget.get())));
 +  RefPtr<IWeakReference> existingWeak(GetLiveSet().Get(aTarget.get()));
    if (existingWeak) {
      RefPtr<IWeakReferenceSource> existingStrong;
@@ -31,7 +30,7 @@ diff --git a/ipc/mscom/Interceptor.cpp b/ipc/mscom/Interceptor.cpp
        lock.Unlock();
        return existingStrong->QueryInterface(aInitialIid, aOutInterface);
      }
-@@ -902,17 +902,17 @@ Interceptor::Release()
+@@ -886,17 +886,17 @@ Interceptor::Release()
  Interceptor::DisconnectRemotesForTarget(IUnknown* aTarget)
  {
    MOZ_ASSERT(aTarget);
@@ -40,7 +39,7 @@ diff --git a/ipc/mscom/Interceptor.cpp b/ipc/mscom/Interceptor.cpp
  
    // It is not an error if the interceptor doesn't exist, so we return
    // S_FALSE instead of an error in that case.
--  RefPtr<IWeakReference> existingWeak(Move(GetLiveSet().Get(aTarget)));
+-  RefPtr<IWeakReference> existingWeak(std::move(GetLiveSet().Get(aTarget)));
 +  RefPtr<IWeakReference> existingWeak(GetLiveSet().Get(aTarget));
    if (!existingWeak) {
      return S_FALSE;
@@ -50,3 +49,4 @@ diff --git a/ipc/mscom/Interceptor.cpp b/ipc/mscom/Interceptor.cpp
    if (FAILED(existingWeak->ToStrongRef(getter_AddRefs(existingStrong)))) {
      return S_FALSE;
    }
+

+ 8 - 5
mozilla-release/patches/1473786-2-64a1.patch

@@ -2,13 +2,16 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1530845442 -32400
 # Node ID a9caa2a0b5ed5189e945762272e895439aa7b847
-# Parent  77b272718390ba73df33af3942baf1828ca7060b
+# Parent  a7d25701daa11833f6f6ec4f893b0573c3482708
 Bug 1473786 - Enable LTO on macOS builds. r=ted
 
 diff --git a/browser/config/mozconfigs/macosx64/beta b/browser/config/mozconfigs/macosx64/beta
 --- a/browser/config/mozconfigs/macosx64/beta
 +++ b/browser/config/mozconfigs/macosx64/beta
-@@ -1,6 +1,8 @@
+@@ -2,9 +2,11 @@ if [ -n "$ENABLE_RELEASE_PROMOTION" ]; t
+   MOZ_AUTOMATION_UPDATE_PACKAGING=1
+ fi
+ 
  . "$topsrcdir/browser/config/mozconfigs/macosx64/common-opt"
  
  ac_add_options --enable-official-branding
@@ -37,9 +40,9 @@ diff --git a/browser/config/mozconfigs/macosx64/nightly b/browser/config/mozconf
 diff --git a/browser/config/mozconfigs/macosx64/release b/browser/config/mozconfigs/macosx64/release
 --- a/browser/config/mozconfigs/macosx64/release
 +++ b/browser/config/mozconfigs/macosx64/release
-@@ -1,13 +1,15 @@
- # This make file should be identical to the beta mozconfig, apart from the
- # safeguard below
+@@ -5,13 +5,15 @@ if [ -n "$ENABLE_RELEASE_PROMOTION" ]; t
+   MOZ_AUTOMATION_UPDATE_PACKAGING=1
+ fi
  
  . "$topsrcdir/browser/config/mozconfigs/macosx64/common-opt"
  

+ 4 - 4
mozilla-release/patches/1474488-2only-64a1.patch

@@ -2,7 +2,7 @@
 # User Thomas P. <pdknsk+mozilla@gmail.com>
 # Date 1536634043 0
 # Node ID 75f0a4384b0f31f7356d4bb92bb6429ba82d281f
-# Parent  d901cc0cc45d308aaef2bb42b78a4b5b7fcd3a56
+# Parent  ff3405212698a96972d261c956452a006eaeecd5
 Bug 1474488: add --enable-undefined-sanitizer with custom checks r=froydnj
 
 diff --git a/build/autoconf/frameptr.m4 b/build/autoconf/frameptr.m4
@@ -65,7 +65,7 @@ diff --git a/build/autoconf/sanitize.m4 b/build/autoconf/sanitize.m4
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -1494,16 +1494,36 @@ js_option('--enable-address-sanitizer', 
+@@ -1497,16 +1497,36 @@ js_option('--enable-address-sanitizer', 
  
  @depends_if('--enable-address-sanitizer')
  def asan(value):
@@ -105,7 +105,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
 diff --git a/config/rules.mk b/config/rules.mk
 --- a/config/rules.mk
 +++ b/config/rules.mk
-@@ -983,23 +983,25 @@ cargo_linker_env_var := CARGO_TARGET_$(R
+@@ -980,23 +980,25 @@ cargo_linker_env_var := CARGO_TARGET_$(R
  # already works with the current setup) setup on Windows, and we don't
  # have to pass in any special linker options on Windows.
  ifneq (WINNT,$(OS_ARCH))
@@ -168,7 +168,7 @@ diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build
 +    ]
 +
  if CONFIG['OS_TARGET'] == 'WINNT':
-     DEFFILE = 'mozglue.def'
+     DEFFILE = '!mozglue.def'
      # We'll break the DLL blocklist if we immediately load user32.dll
      DELAYLOAD_DLLS += [
          'user32.dll',

+ 6 - 6
mozilla-release/patches/1476333-2-63a1.patch

@@ -2,7 +2,7 @@
 # User Brian Grinstead <bgrinstead@mozilla.com>
 # Date 1532445170 25200
 # Node ID dd386b5b9fa7f5cd6dc4bbbfa0503b3eb2969af5
-# Parent  9c47dafc65faa7c86d8dda4deddbffdc8954cf08
+# Parent  359d83fcf8bb665fb2e368175a8b5cd446252160
 Bug 1476333 - Refer to AppConstants.BROWSER_CHROME_URL to get the browser URL from the frontend;r=Gijs
 
 Before this change, we accessed the browser URL in the following ways:
@@ -828,7 +828,7 @@ new file mode 100644
 diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js
 --- a/browser/components/nsBrowserGlue.js
 +++ b/browser/components/nsBrowserGlue.js
-@@ -1644,17 +1644,17 @@ BrowserGlue.prototype = {
+@@ -1650,17 +1650,17 @@ BrowserGlue.prototype = {
    /**
     * Uncollapses PersonalToolbar if its collapsed status is not
     * persisted, and user customized it or changed default bookmarks.
@@ -847,7 +847,7 @@ diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserG
        // children, or if it has a persisted currentset value.
        let toolbarIsCustomized = xulStore.hasValue(BROWSER_DOCURL, "PersonalToolbar", "currentset");
        let getToolbarFolderCount = () => {
-@@ -1668,17 +1668,17 @@ BrowserGlue.prototype = {
+@@ -1674,17 +1674,17 @@ BrowserGlue.prototype = {
          xulStore.setValue(BROWSER_DOCURL, "PersonalToolbar", "collapsed", "false");
        }
      }
@@ -855,7 +855,7 @@ diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserG
  
    // eslint-disable-next-line complexity
    _migrateUI: function BG__migrateUI() {
-     const UI_VERSION = 57;
+     const UI_VERSION = 56;
 -    const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
 +    const BROWSER_DOCURL = AppConstants.BROWSER_CHROME_URL;
  
@@ -866,7 +866,7 @@ diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserG
        // This is a new profile, nothing to migrate.
        Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
  
-@@ -2245,17 +2245,17 @@ BrowserGlue.prototype = {
+@@ -2242,17 +2242,17 @@ BrowserGlue.prototype = {
      let chromeWindow = RecentWindow.getMostRecentBrowserWindow();
      chromeWindow.openPreferences(...args);
    },
@@ -1263,7 +1263,7 @@ diff --git a/browser/modules/Sanitizer.jsm b/browser/modules/Sanitizer.jsm
 diff --git a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm
 --- a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm
 +++ b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm
-@@ -644,17 +644,17 @@ var BrowserTestUtils = {
+@@ -643,17 +643,17 @@ var BrowserTestUtils = {
      }
  
      if (options.hasOwnProperty("remote")) {

+ 6 - 5
mozilla-release/patches/1480004-63a1.patch

@@ -1,14 +1,15 @@
 # HG changeset patch
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1533880288 -32400
+#      Fri Aug 10 14:51:28 2018 +0900
 # Node ID 783e7599b5c2512066cfcae30cfff438d1ecba58
-# Parent  59c8b66c6f4ec6589fcab297df81e7de7eb121c6
+# Parent  d6db6699e050997b9d9e04dbf5fe1a3de1c3456a
 Bug 1480004 - Normalize optimization level passed to the linker when doing LTO with clang. r=froydnj
 
 diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 --- a/js/src/old-configure.in
 +++ b/js/src/old-configure.in
-@@ -1262,16 +1262,27 @@ if test -n "$MOZ_OPTIMIZE"; then
+@@ -1415,16 +1415,27 @@ if test -n "$MOZ_OPTIMIZE"; then
          [printf("Hello World\n");],
          _results=yes,
          _results=no)
@@ -31,15 +32,15 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
  fi
  fi # COMPILE_ENVIRONMENT
  
+ AC_SUBST_LIST(MOZ_FRAMEPTR_FLAGS)
  AC_SUBST_LIST(MOZ_OPTIMIZE_FLAGS)
  AC_SUBST_LIST(MOZ_OPTIMIZE_LDFLAGS)
  AC_SUBST_LIST(MOZ_PGO_OPTIMIZE_FLAGS)
  
- dnl ========================================================
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
-@@ -2231,16 +2231,27 @@ if test -n "$MOZ_OPTIMIZE"; then
+@@ -3464,16 +3464,27 @@ if test -n "$MOZ_OPTIMIZE"; then
          [printf("Hello World\n");],
          _results=yes,
          _results=no)
@@ -62,8 +63,8 @@ diff --git a/old-configure.in b/old-configure.in
  fi
  fi # COMPILE_ENVIRONMENT
  
+ AC_SUBST_LIST(MOZ_FRAMEPTR_FLAGS)
  AC_SUBST_LIST(MOZ_OPTIMIZE_FLAGS)
  AC_SUBST_LIST(MOZ_OPTIMIZE_LDFLAGS)
  AC_SUBST_LIST(MOZ_PGO_OPTIMIZE_FLAGS)
  
- dnl ========================================================

+ 5 - 5
mozilla-release/patches/1480005-3-86a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1610595645 0
 # Node ID 300c5c7f61b7d7a5c62ff89c5984f8abc3a31da5
-# Parent  05aacc1c2ddde100d57645ca0adbd8e6651b7c33
+# Parent  ae3e26ff3c844592aa93fda325c3de66482fe5db
 Bug 1480005 - Remove check for RANLIB. r=firefox-build-system-reviewers,nalexander
 
 It hasn't been used since bug 569597 and bug 1295937.
@@ -80,8 +80,8 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
      if test -z "$HOST_CXX"; then
          HOST_CXX='$(CXX)'
      fi
-@@ -569,17 +568,16 @@ case "$target" in
-         fi
+@@ -570,17 +569,16 @@ case "$target" in
+         MOZ_OPTIMIZE_FLAGS="-O2"
  
          WIN32_CONSOLE_EXE_LDFLAGS=-mconsole
          WIN32_GUI_EXE_LDFLAGS=-mwindows
@@ -101,7 +101,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
-@@ -102,17 +102,16 @@ if test "$target" != "$host"; then
+@@ -103,17 +103,16 @@ if test "$target" != "$host"; then
  else
      AC_PROG_CC
      case "$target" in
@@ -119,7 +119,7 @@ diff --git a/old-configure.in b/old-configure.in
  if test -n "$MOZ_WINCONSOLE"; then
      AC_DEFINE(MOZ_WINCONSOLE)
  fi
-@@ -672,17 +671,16 @@ case "$target" in
+@@ -690,17 +689,16 @@ case "$target" in
              # function thunks need to be generated for cross-DLL calls.
              MOZ_FOLD_LIBS_FLAGS="-mnop-fun-dllimport"
          else

+ 0 - 0
mozilla-release/patches/1481555_63a1.patch → mozilla-release/patches/1481555-63a1.patch


+ 2 - 3
mozilla-release/patches/1481721-64a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1536706349 0
 # Node ID 23860890d959f318130e619976cbeae4472937a3
-# Parent  8b6bfa0280062356b2bb2657394a159dee656ac2
+# Parent  da36ef75492bd9bbd6b85b1c1039f7f4b4379657
 Bug 1481721 - Switch Linux nightlies and PGO builds to clang r=froydnj
 
 And enable LTO on CI builds using clang + PGO.
@@ -12,7 +12,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D4991
 diff --git a/build/mozconfig.no-compile b/build/mozconfig.no-compile
 --- a/build/mozconfig.no-compile
 +++ b/build/mozconfig.no-compile
-@@ -16,16 +16,17 @@ unset RUSTC
+@@ -16,15 +16,16 @@ unset RUSTC
  unset CARGO
  unset RUSTDOC
  unset RUSTFMT
@@ -27,7 +27,6 @@ diff --git a/build/mozconfig.no-compile b/build/mozconfig.no-compile
  unset ENABLE_CLANG_PLUGIN
  
  unset MOZ_STDCXX_COMPAT
- unset MOZ_NO_PIE_COMPAT
  
  unset NASM
 diff --git a/build/unix/mozconfig.unix b/build/unix/mozconfig.unix

+ 0 - 0
mozilla-release/patches/1483228-2-67a1.patch → mozilla-release/patches/1483228-2no3-67a1.patch


+ 3 - 3
mozilla-release/patches/1485216-2-66a1.patch

@@ -2,7 +2,7 @@
 # User Nathan Froyd <froydnj@mozilla.com>
 # Date 1548263690 18000
 # Node ID 784f80261f91d29e8a6ac0674ffdd10d4b28f137
-# Parent  a695fd2e9a323dfd754e70c7475d0fcdc2364332
+# Parent  9f6d3cbd2e9b9ad19dfda7a70a99d19219bf66b0
 Bug 1485216 - follow-up - really delete now-dead code; r=me
 
 diff --git a/xpcom/threads/LabeledEventQueue.h b/xpcom/threads/LabeledEventQueue.h
@@ -205,7 +205,7 @@ deleted file mode 100644
 -  explicit SchedulerEventQueue(UniquePtr<AbstractEventQueue> aQueue)
 -    : mLock("Scheduler")
 -    , mNonCooperativeCondVar(mLock, "SchedulerNonCoop")
--    , mQueue(Move(aQueue))
+-    , mQueue(std::move(aQueue))
 -    , mScheduler(nullptr)
 -  {}
 -
@@ -387,7 +387,7 @@ deleted file mode 100644
 -{
 -  // We want to leak the reference when we fail to dispatch it, so that
 -  // we won't release the event in a wrong thread.
--  LeakRefPtr<nsIRunnable> event(Move(aEvent));
+-  LeakRefPtr<nsIRunnable> event(std::move(aEvent));
 -  nsCOMPtr<nsIThreadObserver> obs;
 -
 -  {

+ 6 - 6
mozilla-release/patches/1485454-2-63a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1535377234 0
 # Node ID 1586964885f9449cfd189c41a684ebbaee433518
-# Parent  38e7e4bcf26167bf3e370fcba5e20f6b910e723e
+# Parent  e8798e51311982cfcb973ae110d2e3a3fe871089
 Bug 1485454 - [mozlint] Fix stylish formatter, issues without a column aren't indented enough, r=sylvestre
 
 After fixing the absolute path issue in codespell, I noticed that the stylish
@@ -16,7 +16,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D4013
 diff --git a/python/mozlint/mozlint/formatters/stylish.py b/python/mozlint/mozlint/formatters/stylish.py
 --- a/python/mozlint/mozlint/formatters/stylish.py
 +++ b/python/mozlint/mozlint/formatters/stylish.py
-@@ -62,23 +62,28 @@ class StylishFormatter(object):
+@@ -64,23 +64,28 @@ class StylishFormatter(object):
              for err in errors:
                  assert isinstance(err, Issue)
                  self._update_max(err)
@@ -50,7 +50,7 @@ diff --git a/python/mozlint/mozlint/formatters/stylish.py b/python/mozlint/mozli
 diff --git a/python/mozlint/test/test_formatters.py b/python/mozlint/test/test_formatters.py
 --- a/python/mozlint/test/test_formatters.py
 +++ b/python/mozlint/test/test_formatters.py
-@@ -18,50 +18,50 @@ NORMALISED_PATHS = {
+@@ -20,50 +20,50 @@ NORMALISED_PATHS = {
      'cwd': mozpath.normpath(os.getcwd()),
  }
  
@@ -106,8 +106,8 @@ diff --git a/python/mozlint/test/test_formatters.py b/python/mozlint/test/test_f
          'format': """
  {cwd}/a: 2 errors
  {cwd}/d: 0 errors, 1 warning
-@@ -89,30 +89,32 @@ def result(scope='module'):
-             column="2",
+@@ -91,30 +91,32 @@ def result(scope='module'):
+             column=2,
              rule="bar-not-allowed",
          ),
          Issue(
@@ -119,7 +119,7 @@ diff --git a/python/mozlint/test/test_formatters.py b/python/mozlint/test/test_f
              source="if baz:",
          ),
      )
-     result = ResultSummary('/fake/root')
+     result = ResultSummary()
      for c in containers:
          result.issues[c.path].append(c)
      return result

+ 5 - 5
mozilla-release/patches/1488307-64a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1535594149 -32400
 # Node ID e2a02b08089b0bd0c18ceac0b2eb1e3888d56dc2
-# Parent  135ac6630535bc7d585e2a0d422347c2fee2ae91
+# Parent  0b88ec99d88949a2832dc4d9b843641397fd60f0
 Bug 1488307 - Build the LLVM gold plugin. r=mshal
 
 As much as it's tempting to use LLD for LTO, it still causes some
@@ -16,7 +16,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D4896
 diff --git a/build/build-clang/build-clang.py b/build/build-clang/build-clang.py
 --- a/build/build-clang/build-clang.py
 +++ b/build/build-clang/build-clang.py
-@@ -212,16 +212,18 @@ def build_one_stage(cc, cxx, asm, ld, ar
+@@ -213,16 +213,18 @@ def build_one_stage(cc, cxx, asm, ld, ar
              "-DCMAKE_BUILD_TYPE=%s" % build_type,
              "-DCMAKE_INSTALL_PREFIX=%s" % inst_dir,
              "-DLLVM_TARGETS_TO_BUILD=X86;ARM;AArch64",
@@ -30,8 +30,8 @@ diff --git a/build/build-clang/build-clang.py b/build/build-clang/build-clang.py
          if is_windows():
              cmake_args.insert(-1, "-DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON")
              cmake_args.insert(-1, "-DLLVM_USE_CRT_RELEASE=MT")
+         else:
+             # libllvm as a shared library is not supported on Windows
+             cmake_args += ["-DLLVM_LINK_LLVM_DYLIB=ON"]
          if ranlib is not None:
              cmake_args += ["-DCMAKE_RANLIB=%s" % slashify_path(ranlib)]
-         if libtool is not None:
-             cmake_args += ["-DCMAKE_LIBTOOL=%s" % slashify_path(libtool)]
-         if osx_cross_compile:

+ 3 - 3
mozilla-release/patches/1488463-64a1.patch

@@ -2,13 +2,13 @@
 # User Jon Coppeard <jcoppeard@mozilla.com>
 # Date 1536143136 -3600
 # Node ID ccd4dbac66cde136db3b188a962fbef0606b0db6
-# Parent  6a873e824d95de110223a37631d7a790cb92cb20
+# Parent  e73ade04b5fd59b6b72db828b0ef63bd13da107a
 Bug 1488463 - Handle OOM in RegExpShared::compile() r=nbp
 
 diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp
 --- a/js/src/vm/RegExpObject.cpp
 +++ b/js/src/vm/RegExpObject.cpp
-@@ -1056,18 +1056,20 @@ RegExpShared::compile(JSContext* cx, Mut
+@@ -1035,18 +1035,20 @@ RegExpShared::compile(JSContext* cx, Mut
  
      RegExpCompilation& compilation = re->compilation(mode, input->hasLatin1Chars());
      if (code.jitCode) {
@@ -17,7 +17,7 @@ diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp
          // compilation.jitCode (to ensure no purging happens between adding the
          // tables and setting the JIT code).
          for (size_t i = 0; i < tables.length(); i++) {
--            if (!re->addTable(Move(tables[i])))
+-            if (!re->addTable(std::move(tables[i])))
 +            if (!re->addTable(std::move(tables[i]))) {
 +                ReportOutOfMemory(cx);
                  return false;

+ 7 - 5
mozilla-release/patches/1489698-5-65a1.patch

@@ -3,14 +3,14 @@
 # Date 1536361555 14400
 #      Fri Sep 07 19:05:55 2018 -0400
 # Node ID a17dfbac6b10ec140dc69ed3053662987eba25ef
-# Parent  8fb1d96edf3d89bbec33fd1ac7a902128e199f47
+# Parent  15fa97a591c4509f30ddd99a3d0fe58da49ba67a
 Bug 1489698 - Add moz.build for js/src/jit. r=jandem,froydnj
 
 diff --git a/js/src/jit/moz.build b/js/src/jit/moz.build
 new file mode 100644
 --- /dev/null
 +++ b/js/src/jit/moz.build
-@@ -0,0 +1,246 @@
+@@ -0,0 +1,247 @@
 +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 +# vim: set filetype=python:
 +# This Source Code Form is subject to the terms of the Mozilla Public
@@ -48,6 +48,7 @@ new file mode 100644
 +    'BaselineJIT.cpp',
 +    'BitSet.cpp',
 +    'BytecodeAnalysis.cpp',
++    'C1Spewer.cpp',
 +    'CacheIR.cpp',
 +    'CacheIRCompiler.cpp',
 +    'CacheIRSpewer.cpp',
@@ -260,7 +261,7 @@ new file mode 100644
 diff --git a/js/src/moz.build b/js/src/moz.build
 --- a/js/src/moz.build
 +++ b/js/src/moz.build
-@@ -224,92 +224,16 @@ UNIFIED_SOURCES += [
+@@ -223,93 +223,16 @@ UNIFIED_SOURCES += [
      'irregexp/NativeRegExpMacroAssembler.cpp',
      'irregexp/RegExpAST.cpp',
      'irregexp/RegExpCharacters.cpp',
@@ -285,6 +286,7 @@ diff --git a/js/src/moz.build b/js/src/moz.build
 -    'jit/BaselineJIT.cpp',
 -    'jit/BitSet.cpp',
 -    'jit/BytecodeAnalysis.cpp',
+-    'jit/C1Spewer.cpp',
 -    'jit/CacheIR.cpp',
 -    'jit/CacheIRCompiler.cpp',
 -    'jit/CacheIRSpewer.cpp',
@@ -353,7 +355,7 @@ diff --git a/js/src/moz.build b/js/src/moz.build
      'jsexn.cpp',
      'jsfriendapi.cpp',
      'jsgc.cpp',
-@@ -461,163 +385,16 @@ if CONFIG['MOZ_INSTRUMENTS']:
+@@ -461,163 +384,16 @@ if CONFIG['MOZ_INSTRUMENTS']:
  
  if CONFIG['ENABLE_TRACE_LOGGING']:
      SOURCES += [
@@ -517,7 +519,7 @@ diff --git a/js/src/moz.build b/js/src/moz.build
  else:
      UNIFIED_SOURCES += [
          'threading/posix/CpuCount.cpp',
-@@ -659,16 +436,17 @@ GENERATED_FILES += ['frontend/ReservedWo
+@@ -659,16 +435,17 @@ GENERATED_FILES += ['frontend/ReservedWo
  ReservedWordsGenerated = GENERATED_FILES['frontend/ReservedWordsGenerated.h']
  ReservedWordsGenerated.script = 'frontend/GenerateReservedWords.py'
  ReservedWordsGenerated.inputs += [

+ 4 - 4
mozilla-release/patches/1490463-2-64a1.patch

@@ -2,7 +2,7 @@
 # User Ted Mielczarek <ted@mielczarek.org>
 # Date 1537300942 14400
 # Node ID 23cb01b0c33ee3bd87ada94f26ac759584334bcb
-# Parent  59c09497bad3564ddae9bd8f0ee33281c7e67fdc
+# Parent  5052de28f8e3dcc0a2cb10c742dfaffe9b8a65f2
 Bug 1490463 - part 2 - use srcdir_rel for passing manifest paths to mt.exe; r=mshal
 
 mt.exe doesn't like absolute paths, so we use srcdir-relative paths
@@ -12,11 +12,11 @@ diff --git a/config/rules.mk b/config/rules.mk
 --- a/config/rules.mk
 +++ b/config/rules.mk
 @@ -547,25 +547,25 @@ endif
- $(PROGRAM): $(PROGOBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(RESFILE) $(GLOBAL_DEPS) $(call mkdir_deps,$(FINAL_TARGET))
+ $(PROGRAM): $(PROGOBJS) $(STATIC_LIBS) $(RUST_STATIC_LIB) $(EXTRA_DEPS) $(RESFILE) $(GLOBAL_DEPS) $(call mkdir_deps,$(FINAL_TARGET))
  	$(REPORT_BUILD)
  	@$(RM) $@.manifest
  ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
- 	$(LINKER) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_$(OBJS_VAR_SUFFIX)) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
+ 	$(LINKER) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_$(OBJS_VAR_SUFFIX)) $(RESFILE) $(STATIC_LIBS) $(RUST_STATIC_LIB) $(SHARED_LIBS) $(OS_LIBS)
  ifdef MSMANIFEST_TOOL
  	@if test -f $@.manifest; then \
  		if test -f '$(srcdir)/$(notdir $@).manifest'; then \
@@ -91,7 +91,7 @@ diff --git a/config/rules.mk b/config/rules.mk
  
  ifdef ENABLE_STRIP
 @@ -699,25 +699,25 @@ endif
- 	$(MKSHLIB) $($@_$(OBJS_VAR_SUFFIX)) $(RESFILE) $(LDFLAGS) $(STATIC_LIBS) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
+ 	$(MKSHLIB) $($@_$(OBJS_VAR_SUFFIX)) $(RESFILE) $(LDFLAGS) $(STATIC_LIBS) $(RUST_STATIC_LIB) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
  	$(call py_action,check_binary,--target $@)
  
  ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))

+ 19 - 18
mozilla-release/patches/1490738-64a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1536961443 0
 # Node ID a2c931b4586020392dacdb53efb42b0d055e36e4
-# Parent  565f0b063a82c47cbd48bb78f612a8e22b27f690
+# Parent  dd1a0a0d91568f4ee1cb6ad805a8125d67ad44ba
 Bug 1490738 - Enable PGO via the environment in in-tree mozconfigs r=froydnj
 
 Some mozconfigs actually rely on testing whether the variable is set or
@@ -34,7 +34,7 @@ diff --git a/browser/config/mozconfigs/linux32/beta b/browser/config/mozconfigs/
 diff --git a/browser/config/mozconfigs/linux32/devedition b/browser/config/mozconfigs/linux32/devedition
 --- a/browser/config/mozconfigs/linux32/devedition
 +++ b/browser/config/mozconfigs/linux32/devedition
-@@ -1,21 +1,21 @@
+@@ -1,19 +1,19 @@
  if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
    MOZ_AUTOMATION_UPDATE_PACKAGING=1
  fi
@@ -48,13 +48,11 @@ diff --git a/browser/config/mozconfigs/linux32/devedition b/browser/config/mozco
  
  ac_add_options --enable-verify-mar
  
- # This will overwrite the default of stripping everything and keep the symbol table.
- # This is useful for profiling and debugging and only increases the package size
- # by 2 MBs.
- STRIP_FLAGS="--strip-debug"
- 
  ac_add_options --with-branding=browser/branding/aurora
  
+ # Enable MOZ_ALLOW_LEGACY_EXTENSIONS
+ ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
+ 
 -ac_add_options MOZ_PGO=1
 -
  . "$topsrcdir/build/mozconfig.common.override"
@@ -102,13 +100,12 @@ diff --git a/browser/config/mozconfigs/linux64/beta b/browser/config/mozconfigs/
 diff --git a/browser/config/mozconfigs/linux64/devedition b/browser/config/mozconfigs/linux64/devedition
 --- a/browser/config/mozconfigs/linux64/devedition
 +++ b/browser/config/mozconfigs/linux64/devedition
-@@ -1,21 +1,21 @@
+@@ -1,19 +1,18 @@
  if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
    MOZ_AUTOMATION_UPDATE_PACKAGING=1
  fi
- 
 +export MOZ_PGO=1
-+
+ 
  . "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
  
  # Add-on signing is not required for DevEdition
@@ -116,13 +113,11 @@ diff --git a/browser/config/mozconfigs/linux64/devedition b/browser/config/mozco
  
  ac_add_options --enable-verify-mar
  
- # This will overwrite the default of stripping everything and keep the symbol table.
- # This is useful for profiling and debugging and only increases the package size
- # by 2 MBs.
- STRIP_FLAGS="--strip-debug"
- 
  ac_add_options --with-branding=browser/branding/aurora
  
+ # Enable MOZ_ALLOW_LEGACY_EXTENSIONS
+ ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
+ 
 -ac_add_options MOZ_PGO=1
 -
  . "$topsrcdir/build/mozconfig.common.override"
@@ -154,7 +149,7 @@ diff --git a/browser/config/mozconfigs/linux64/release b/browser/config/mozconfi
 diff --git a/browser/config/mozconfigs/whitelist b/browser/config/mozconfigs/whitelist
 --- a/browser/config/mozconfigs/whitelist
 +++ b/browser/config/mozconfigs/whitelist
-@@ -40,25 +40,25 @@ for platform in all_platforms:
+@@ -27,25 +27,25 @@ for platform in all_platforms:
      whitelist['release'][platform] = [
          'ac_add_options --enable-update-channel=release',
          'ac_add_options --enable-official-branding',
@@ -205,7 +200,7 @@ diff --git a/browser/config/mozconfigs/win32/beta b/browser/config/mozconfigs/wi
 diff --git a/browser/config/mozconfigs/win32/devedition b/browser/config/mozconfigs/win32/devedition
 --- a/browser/config/mozconfigs/win32/devedition
 +++ b/browser/config/mozconfigs/win32/devedition
-@@ -1,17 +1,17 @@
+@@ -1,20 +1,20 @@
  if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
    MOZ_AUTOMATION_UPDATE_PACKAGING=1
  fi
@@ -222,6 +217,9 @@ diff --git a/browser/config/mozconfigs/win32/devedition b/browser/config/mozconf
  
  ac_add_options --with-branding=browser/branding/aurora
  
+ # Enable MOZ_ALLOW_LEGACY_EXTENSIONS
+ ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
+ 
 -ac_add_options MOZ_PGO=1
 -
  . "$topsrcdir/build/mozconfig.common.override"
@@ -272,7 +270,7 @@ diff --git a/browser/config/mozconfigs/win64/beta b/browser/config/mozconfigs/wi
 diff --git a/browser/config/mozconfigs/win64/devedition b/browser/config/mozconfigs/win64/devedition
 --- a/browser/config/mozconfigs/win64/devedition
 +++ b/browser/config/mozconfigs/win64/devedition
-@@ -1,18 +1,18 @@
+@@ -1,21 +1,21 @@
  if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
    MOZ_AUTOMATION_UPDATE_PACKAGING=1
  fi
@@ -290,6 +288,9 @@ diff --git a/browser/config/mozconfigs/win64/devedition b/browser/config/mozconf
  
  ac_add_options --with-branding=browser/branding/aurora
  
+ # Enable MOZ_ALLOW_LEGACY_EXTENSIONS
+ ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
+ 
 -ac_add_options MOZ_PGO=1
 -
  . "$topsrcdir/build/mozconfig.common.override"

+ 6 - 6
mozilla-release/patches/1492037-64a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1536532895 -32400
 # Node ID 7e05c2752c5a2a16082854a01e76e53c1b03659b
-# Parent  c8757e653c8e5fab1a95fbcec160a85c216c7294
+# Parent  d935abfd00a6255711bd3657261121ad60b7adc8
 Bug 1492037 - Build clang with LLVM as a shared library. r=froydnj
 
 Doing so changes the size of the compressed toolchain archive from ~280M
@@ -55,12 +55,12 @@ diff --git a/build/build-clang/build-clang.py b/build/build-clang/build-clang.py
  import which
  from distutils.dir_util import copy_tree
  
-@@ -217,16 +218,19 @@ def build_one_stage(cc, cxx, asm, ld, ar
+@@ -215,16 +216,19 @@ def build_one_stage(cc, cxx, asm, ld, ar
+             "-DLLVM_ENABLE_ASSERTIONS=%s" % ("ON" if assertions else "OFF"),
+             "-DPYTHON_EXECUTABLE=%s" % slashify_path(python_path),
              "-DLLVM_TOOL_LIBCXX_BUILD=%s" % ("ON" if build_libcxx else "OFF"),
              "-DLIBCXX_LIBCPPABI_VERSION=\"\"",
          ]
-         if is_linux():
-             cmake_args += ["-DLLVM_BINUTILS_INCDIR=%s/include" % gcc_dir]
          if is_windows():
              cmake_args.insert(-1, "-DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON")
              cmake_args.insert(-1, "-DLLVM_USE_CRT_RELEASE=MT")
@@ -75,7 +75,7 @@ diff --git a/build/build-clang/build-clang.py b/build/build-clang/build-clang.py
              cmake_args += [
                  "-DCMAKE_SYSTEM_NAME=Darwin",
                  "-DCMAKE_SYSTEM_VERSION=10.10",
-@@ -361,21 +365,27 @@ def prune_final_dir_for_clang_tidy(final
+@@ -359,21 +363,27 @@ def prune_final_dir_for_clang_tidy(final
      re_clang_tidy = re.compile(
          r"^clang-(apply-replacements|format|tidy)(\.exe)?$", re.I)
      for f in glob.glob("%s/bin/*" % final_dir):
@@ -106,7 +106,7 @@ diff --git a/build/build-clang/build-clang.py b/build/build-clang/build-clang.py
              delete(f)
  
      # Completely remove libexec/, msbuilld-bin and tools, if it exists.
-@@ -595,21 +605,21 @@ if __name__ == "__main__":
+@@ -593,21 +603,21 @@ if __name__ == "__main__":
      if is_darwin():
          extra_cflags = []
          extra_cxxflags = ["-stdlib=libc++"]

+ 4 - 4
mozilla-release/patches/1492149-66a1.patch

@@ -2,7 +2,7 @@
 # User Marco Bonardo <mbonardo@mozilla.com>
 # Date 1545325550 0
 # Node ID 29301855b37c89d9b78fa9fde38d4951e03fade6
-# Parent  f418e337faad1634682ea14eebb23c7fd45a414c
+# Parent  99c14e85bfb5dc6a5d1e02da2493073eadd7c58b
 Bug 1492149 - Add MOZ_OBJDIR to the pgo env, so cygprofile.txt can be found. r=froydnj
 
 Differential Revision: https://phabricator.services.mozilla.com/D15115
@@ -10,7 +10,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D15115
 diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py
 --- a/build/pgo/profileserver.py
 +++ b/build/pgo/profileserver.py
-@@ -65,16 +65,19 @@ if __name__ == '__main__':
+@@ -74,16 +74,19 @@ if __name__ == '__main__':
                  if e not in env:
                      continue
  
@@ -28,5 +28,5 @@ diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py
                                 cmdargs=['data:text/html,<script>Quitter.quit()</script>'],
                                 env=env)
          runner.start()
-         runner.wait()
- 
+         ret = runner.wait()
+         if ret:

+ 8 - 8
mozilla-release/patches/1492268-64a1.patch

@@ -2,7 +2,7 @@
 # User Adam Gashlin <agashlin@mozilla.com>
 # Date 1537309421 0
 # Node ID 61ffb6c642cde13f8a37ffbbe546d06ecd431c08
-# Parent  5a31f5a1c383679df0b9b4783fc8f940e3e0c18b
+# Parent  83a3de9a196a06faeeb39c508f8b5a94310dafb4
 Bug 1492268: Allow a Rust library to link to a program r=froydnj
 
 Differential Revision: https://phabricator.services.mozilla.com/D6200
@@ -10,7 +10,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D6200
 diff --git a/config/rules.mk b/config/rules.mk
 --- a/config/rules.mk
 +++ b/config/rules.mk
-@@ -539,21 +539,21 @@ LINKER_OUT=$(subst /,\,$1)
+@@ -532,21 +532,21 @@ LINKER_OUT=$(subst /,\,$1)
  else
  LINKER_OUT=$1
  endif
@@ -29,12 +29,12 @@ diff --git a/config/rules.mk b/config/rules.mk
  ifdef MSMANIFEST_TOOL
  	@if test -f $@.manifest; then \
  		if test -f '$(srcdir)/$(notdir $@).manifest'; then \
- 			echo 'Embedding manifest from $(srcdir_rel)/$(notdir $@).manifest and $@.manifest'; \
- 			$(MT) -NOLOGO -MANIFEST '$(srcdir_rel)/$(notdir $@).manifest' $@.manifest -OUTPUTRESOURCE:$@\;1; \
+ 			echo 'Embedding manifest from $(srcdir)/$(notdir $@).manifest and $@.manifest'; \
+ 			$(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$(notdir $@).manifest' $@.manifest -OUTPUTRESOURCE:$@\;1; \
  		else \
  			echo 'Embedding manifest from $@.manifest'; \
  			$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
-@@ -564,17 +564,17 @@ ifdef MSMANIFEST_TOOL
+@@ -557,17 +557,17 @@ ifdef MSMANIFEST_TOOL
  	fi
  endif	# MSVC with manifest tool
  ifdef MOZ_PROFILE_GENERATE
@@ -53,7 +53,7 @@ diff --git a/config/rules.mk b/config/rules.mk
  endif
  ifdef MOZ_POST_PROGRAM_COMMAND
  	$(MOZ_POST_PROGRAM_COMMAND) $@
-@@ -686,22 +686,22 @@ else
+@@ -677,22 +677,22 @@ else
  	$(HOST_CXX) $(HOST_OUTOPTION)$@ $(HOST_OBJS) $(HOST_CXX_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
  endif
  
@@ -77,11 +77,11 @@ diff --git a/config/rules.mk b/config/rules.mk
  ifdef EMBED_MANIFEST_AT
  	@if test -f $@.manifest; then \
  		if test -f '$(srcdir)/$@.manifest'; then \
- 			echo 'Embedding manifest from $(srcdir_rel)/$@.manifest and $@.manifest'; \
+ 			echo 'Embedding manifest from $(srcdir)/$@.manifest and $@.manifest'; \
 diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
 --- a/python/mozbuild/mozbuild/backend/recursivemake.py
 +++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -1473,37 +1473,37 @@ class RecursiveMakeBackend(CommonBackend
+@@ -1394,37 +1394,37 @@ class RecursiveMakeBackend(CommonBackend
              if isinstance(lib, (HostLibrary, HostRustLibrary)):
                  backend_file.write_once('HOST_LIBS += %s\n' %
                                          pretty_relpath(lib, lib.import_name))

+ 13 - 12
mozilla-release/patches/1492526-64a1.patch

@@ -2,7 +2,7 @@
 # User Tom Prince <mozilla@hocat.ca>
 # Date 1538417740 0
 # Node ID 7783682f8ba7753ad6bdccd716edf37cb53ebc22
-# Parent  67097350cbcfc99b00048d82577cf0396b80d295
+# Parent  4bde7dc78ee14be41845bd8b52f6a340e42b2816
 Bug 1492526: Don't build mar's as part of the build; r=firefox-build-system-reviewers,mshal,Callek
 
 We need to sign parts of the contents of the archives, so the mar's that we
@@ -81,11 +81,10 @@ diff --git a/browser/config/mozconfigs/linux64/beta b/browser/config/mozconfigs/
 diff --git a/browser/config/mozconfigs/linux64/devedition b/browser/config/mozconfigs/linux64/devedition
 --- a/browser/config/mozconfigs/linux64/devedition
 +++ b/browser/config/mozconfigs/linux64/devedition
-@@ -1,12 +1,8 @@
+@@ -1,11 +1,8 @@
 -if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
 -  MOZ_AUTOMATION_UPDATE_PACKAGING=1
 -fi
--
  export MOZ_PGO=1
  
  . "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
@@ -116,7 +115,7 @@ diff --git a/browser/config/mozconfigs/linux64/release b/browser/config/mozconfi
 diff --git a/browser/config/mozconfigs/macosx64/beta b/browser/config/mozconfigs/macosx64/beta
 --- a/browser/config/mozconfigs/macosx64/beta
 +++ b/browser/config/mozconfigs/macosx64/beta
-@@ -1,10 +1,6 @@
+@@ -1,12 +1,8 @@
 -if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
 -  MOZ_AUTOMATION_UPDATE_PACKAGING=1
 -fi
@@ -126,6 +125,8 @@ diff --git a/browser/config/mozconfigs/macosx64/beta b/browser/config/mozconfigs
  ac_add_options --enable-official-branding
  ac_add_options --enable-verify-mar
  
+ ac_add_options --enable-lto
+ 
  . "$topsrcdir/build/mozconfig.common.override"
 diff --git a/browser/config/mozconfigs/macosx64/devedition b/browser/config/mozconfigs/macosx64/devedition
 --- a/browser/config/mozconfigs/macosx64/devedition
@@ -159,17 +160,17 @@ diff --git a/browser/config/mozconfigs/macosx64/release b/browser/config/mozconf
  ac_add_options --enable-official-branding
  ac_add_options --enable-verify-mar
  
+ ac_add_options --enable-lto
+ 
  # safeguard against someone forgetting to re-set EARLY_BETA_OR_EARLIER in
- # defines.sh during the beta cycle
- export BUILDING_RELEASE=1
 diff --git a/browser/config/mozconfigs/whitelist b/browser/config/mozconfigs/whitelist
 --- a/browser/config/mozconfigs/whitelist
 +++ b/browser/config/mozconfigs/whitelist
-@@ -25,30 +25,28 @@ whitelist['nightly']['macosx64'] += [
-     'if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then',
-     'if test "${MOZ_UPDATE_CHANNEL}" = "nightly-try"; then',
-     'ac_add_options --with-macbundlename-prefix=Firefox',
-     'fi',
+@@ -13,30 +13,28 @@ for platform in all_platforms:
+         'ac_add_options --with-branding=browser/branding/nightly',
+     ]
+ 
+ whitelist['nightly']['macosx64'] += [
      'ac_add_options --disable-install-strip',
      'ac_add_options --enable-instruments',
      'ac_add_options --enable-dtrace',
@@ -445,7 +446,7 @@ diff --git a/build/unix/mozconfig.unix b/build/unix/mozconfig.unix
 diff --git a/testing/mozharness/mozharness/mozilla/building/buildbase.py b/testing/mozharness/mozharness/mozilla/building/buildbase.py
 --- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
 +++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
-@@ -897,32 +897,27 @@ or run without that action (ie: --no-{ac
+@@ -896,32 +896,27 @@ or run without that action (ie: --no-{ac
          # Set the source repository to what we're building from since
          # the default is to query `hg paths` which isn't reliable with pooled
          # storage

+ 2 - 2
mozilla-release/patches/1500447-64a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1539964472 0
 # Node ID 96304d13c406be1eb813e7c8cadabd04a8aad12d
-# Parent  ad1423c329b80072dd1962896d8b4f162ee3b174
+# Parent  46176eb8152bc6be974ec360434b40821d2fd60b
 Bug 1500447 - [mozlint] Make sure lineno and column are always int (if present), r=rwood
 
 This also updates the test for string inputs.
@@ -56,4 +56,4 @@ diff --git a/python/mozlint/test/test_formatters.py b/python/mozlint/test/test_f
              path='a/b/c.txt',
              message="oh no baz",
              lineno=4,
-             source="if baz:",
+             column=10,

+ 22 - 22
mozilla-release/patches/1502159-2-65a1.patch

@@ -2,7 +2,7 @@
 # User Matthew Gaudet <mgaudet@mozilla.com>
 # Date 1540568623 0
 # Node ID 1c2afde752e7eb78e6d4b4ebe10b1f1e3c3842f7
-# Parent  fa21e92ecb4a23af49df9c1bd370d132ebd3f45b
+# Parent  9124468a25f5f3b1bcc7a4195425ccb9d96ef12b
 Bug 1502159 - Remove C1Spewer r=jandem
 
 It appears the C1 Spewer is not partciularly well used. Loading logs into
@@ -462,24 +462,24 @@ diff --git a/js/src/jit/JitSpewer.h b/js/src/jit/JitSpewer.h
      bool isSpewing() const {
          return graph_;
      }
-diff --git a/js/src/moz.build b/js/src/moz.build
---- a/js/src/moz.build
-+++ b/js/src/moz.build
-@@ -236,17 +236,16 @@ UNIFIED_SOURCES += [
-     'jit/BaselineDebugModeOSR.cpp',
-     'jit/BaselineFrame.cpp',
-     'jit/BaselineFrameInfo.cpp',
-     'jit/BaselineIC.cpp',
-     'jit/BaselineInspector.cpp',
-     'jit/BaselineJIT.cpp',
-     'jit/BitSet.cpp',
-     'jit/BytecodeAnalysis.cpp',
--    'jit/C1Spewer.cpp',
-     'jit/CacheIR.cpp',
-     'jit/CacheIRCompiler.cpp',
-     'jit/CacheIRSpewer.cpp',
-     'jit/CodeGenerator.cpp',
-     'jit/CompileWrappers.cpp',
-     'jit/Disassembler.cpp',
-     'jit/EagerSimdUnbox.cpp',
-     'jit/EdgeCaseAnalysis.cpp',
+diff --git a/js/src/jit/moz.build b/js/src/jit/moz.build
+--- a/js/src/jit/moz.build
++++ b/js/src/jit/moz.build
+@@ -30,17 +30,16 @@ UNIFIED_SOURCES += [
+     'BaselineDebugModeOSR.cpp',
+     'BaselineFrame.cpp',
+     'BaselineFrameInfo.cpp',
+     'BaselineIC.cpp',
+     'BaselineInspector.cpp',
+     'BaselineJIT.cpp',
+     'BitSet.cpp',
+     'BytecodeAnalysis.cpp',
+-    'C1Spewer.cpp',
+     'CacheIR.cpp',
+     'CacheIRCompiler.cpp',
+     'CacheIRSpewer.cpp',
+     'CodeGenerator.cpp',
+     'CompileWrappers.cpp',
+     'Disassembler.cpp',
+     'EagerSimdUnbox.cpp',
+     'EdgeCaseAnalysis.cpp',

+ 22 - 13
mozilla-release/patches/1503537-65a1.patch

@@ -2,7 +2,7 @@
 # User Sylvestre Ledru <sledru@mozilla.com>
 # Date 1543433481 0
 # Node ID 361a75deb3cedb5dd1c65d881fa16d97efb0f144
-# Parent  68e586a2fc3c0f3544cde2b92ca65c8546679be9
+# Parent  c1139e9a4fd3c93c872c0aa08514518038dcd400
 Bug 1503537 - Get rid of the pdfium & mortar code r=peterv
 
 Differential Revision: https://phabricator.services.mozilla.com/D10352
@@ -35,7 +35,7 @@ diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
 --- a/browser/installer/package-manifest.in
 +++ b/browser/installer/package-manifest.in
-@@ -576,20 +576,16 @@
+@@ -580,20 +580,16 @@
  @BINPATH@/libEGL.dll
  @BINPATH@/libGLESv2.dll
  
@@ -103,7 +103,7 @@ diff --git a/gfx/thebes/PrintTargetEMF.cpp b/gfx/thebes/PrintTargetEMF.cpp
 deleted file mode 100644
 --- a/gfx/thebes/PrintTargetEMF.cpp
 +++ /dev/null
-@@ -1,198 +0,0 @@
+@@ -1,207 +0,0 @@
 -/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 - * 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
@@ -112,6 +112,7 @@ deleted file mode 100644
 -#include "PrintTargetEMF.h"
 -#include "nsAnonymousTemporaryFile.h"
 -#include "nsIFile.h"
+-#include "nsNativeCharsetUtils.h"
 -#include "mozilla/widget/PDFiumProcessParent.h"
 -#include "mozilla/widget/PDFiumParent.h"
 -#include "mozilla/widget/WindowsEMF.h"
@@ -207,12 +208,20 @@ deleted file mode 100644
 -  NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
 -
 -  nsAutoCString filePath;
+-#ifdef XP_WIN
+-  // Unfortunately, SkFILEWStream does not support wide char paths yet.
+-  // We have to use the native charset even though it is lossy :(
+-  nsAutoString filePathU;
+-  mPDFFileForOnePage->GetPath(filePathU);
+-  NS_CopyUnicodeToNative(filePathU, filePath);
+-#else
 -  mPDFFileForOnePage->GetNativePath(filePath);
+-#endif
 -  auto  stream = MakeUnique<SkFILEWStream>(filePath.get());
 -
 -  // Creating a new PrintTargetSkPDF for each page so that we can convert each
 -  // of them into EMF contents individually by the PDFium processes.
--  mTargetForCurrentPage = PrintTargetSkPDF::CreateOrNull(Move(stream), mSize);
+-  mTargetForCurrentPage = PrintTargetSkPDF::CreateOrNull(std::move(stream), mSize);
 -  mTargetForCurrentPage->BeginPrinting(mTitle, NS_LITERAL_STRING(""), 0, 0);
 -  mTargetForCurrentPage->BeginPage();
 -
@@ -259,7 +268,7 @@ deleted file mode 100644
 -{
 -  if (!mRefTarget) {
 -    auto dummy = MakeUnique<SkNullWStream>();
--    mRefTarget = PrintTargetSkPDF::CreateOrNull(Move(dummy), mSize);
+-    mRefTarget = PrintTargetSkPDF::CreateOrNull(std::move(dummy), mSize);
 -  }
 -
 -  if (!mRefDT) {
@@ -337454,7 +337463,7 @@ diff --git a/toolkit/content/license.html b/toolkit/content/license.html
        <li><a href="about:license#qrcode-generator">QR Code Generator License</a></li>
        <li><a href="about:license#raven-js">Raven.js License</a></li>
        <li><a href="about:license#react">React License</a></li>
-@@ -2221,33 +2220,16 @@ CAUSED AND ON ANY THEORY OF LIABILITY, W
+@@ -2220,33 +2219,16 @@ CAUSED AND ON ANY THEORY OF LIABILITY, W
  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE.
@@ -337488,7 +337497,7 @@ diff --git a/toolkit/content/license.html b/toolkit/content/license.html
  <pre>
  Copyright (C) 2012 by Marijn Haverbeke &lt;marijnh@gmail.com&gt;
  
-@@ -3033,30 +3015,27 @@ WITH THE USE OR PERFORMANCE OF THIS SOFT
+@@ -3032,30 +3014,27 @@ WITH THE USE OR PERFORMANCE OF THIS SOFT
      <p>This license applies to parts of the code in:</p>
      <ul>
  #ifndef RELEASE_OR_BETA
@@ -337519,7 +337528,7 @@ diff --git a/toolkit/content/license.html b/toolkit/content/license.html
  
  <pre>
  Copyright (c) 2006-2016 The Chromium Authors. All rights reserved.
-@@ -4034,47 +4013,16 @@ 5. Disclaimer/Limitation of Liability: T
+@@ -4033,47 +4012,16 @@ 5. Disclaimer/Limitation of Liability: T
     BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
@@ -337567,7 +337576,7 @@ diff --git a/toolkit/content/license.html b/toolkit/content/license.html
  <pre>
  Copyright (c) 2009-2016 Stuart Knightley, David Duponchel, Franz Buchinger, António Afonso
  
-@@ -4238,22 +4186,16 @@ THE SOFTWARE.
+@@ -4237,22 +4185,16 @@ THE SOFTWARE.
  
      <p>This license applies to the following files:</p>
  
@@ -337590,7 +337599,7 @@ diff --git a/toolkit/content/license.html b/toolkit/content/license.html
  for implementing Khronos specifications, without altering or removing
  any trademark, copyright or other notice from the specification.
  
-@@ -4341,45 +4283,16 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE F
+@@ -4340,45 +4282,16 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE F
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
@@ -337636,7 +337645,7 @@ diff --git a/toolkit/content/license.html b/toolkit/content/license.html
  
  <pre>
  Copyright (c) 2009-2014 by the contributors listed in the libc++ CREDITS.TXT
-@@ -5436,55 +5349,16 @@ OR SERVICES; LOSS OF USE, DATA, OR PROFI
+@@ -5435,55 +5348,16 @@ OR SERVICES; LOSS OF USE, DATA, OR PROFI
  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
@@ -337721,7 +337730,7 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
 --- a/toolkit/xre/nsAppRunner.cpp
 +++ b/toolkit/xre/nsAppRunner.cpp
-@@ -766,20 +766,19 @@ nsXULAppInfo::GetWidgetToolkit(nsACStrin
+@@ -767,20 +767,19 @@ nsXULAppInfo::GetWidgetToolkit(nsACStrin
                  static_cast<int>(GeckoProcessType_ ## b), \
                  "GeckoProcessType in nsXULAppAPI.h not synchronized with nsIXULRuntime.idl");
  
@@ -338700,7 +338709,7 @@ deleted file mode 100644
 -  MOZ_ASSERT(aEMFContents.IsReadable());
 -
 -  if (mTarget) {
--    mTarget->ConvertToEMFDone(aResult, Move(aEMFContents));
+-    mTarget->ConvertToEMFDone(aResult, std::move(aEMFContents));
 -  }
 -
 -  return IPC_OK();

+ 3 - 3
mozilla-release/patches/1504938-65a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1541518164 0
 # Node ID 08fd490775118779dc99816107685149558da736
-# Parent  ad131d37d0f2986b572401ecf1b6546aa6ef96eb
+# Parent  4385c99fd1c0fbb4ba9ea09cfa6fb454d439fa99
 Bug 1504938 - Require xkbcommon >= 0.4.1 when building with wayland enabled. r=firefox-build-system-reviewers,ted
 
 Some XKB_* #defines are used that aren't available in older releases.
@@ -12,8 +12,8 @@ Differential Revision: https://phabricator.services.mozilla.com/D10996
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -186,18 +186,18 @@ def toolkit_gtk(toolkit):
-     return toolkit == 'gtk3'
+@@ -188,18 +188,18 @@ set_define(toolkit_define, True)
+ 
  
  set_config('MOZ_X11', True, when=toolkit_gtk)
  set_define('MOZ_X11', True, when=toolkit_gtk)

+ 2 - 2
mozilla-release/patches/1506027-2-65a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1542151019 0
 # Node ID 31306e519cf5bd31779cc859fad138f3ffe83c2e
-# Parent  a38e1508d9fed86796f092f2f400e990c68624ed
+# Parent  a885b1ed747c9674e056a56337dde4db932e2834
 Bug 1506027 - Don't define MOZ_WIDGET_GTK to a numerical value. r=mshal
 
 And simplify related configure code a little.
@@ -49,4 +49,4 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
  
  # Wayland support
  # ==============================================================
- wayland_headers = pkg_check_modules('MOZ_WAYLAND', 'gtk+-wayland-3.0 >= 3.22',
+ wayland_headers = pkg_check_modules(

+ 4 - 4
mozilla-release/patches/1506665-67a1.patch

@@ -1,9 +1,9 @@
 # HG changeset patch
 # User sotaro <sotaro.ikeda.g@gmail.com>
-# Date 1551801345 -3600
-# Node ID e89daf66b77642a9670dfa751aed70dfdca91a9f
-# Parent  a8aa7d3ce711c5a387989336cd1befe763e8d948
-Bug 1506665 - Add more GLContext failure handling r=jgilbert a=RyanVM
+# Date 1551479857 0
+# Node ID 86fe7556c9af2059d858e9eb0c7afca4c1ba65d0
+# Parent  efec51b1aaf2bab63edb2eced66637eb1e030a17
+Bug 1506665 - Add more GLContext failure handling r=jgilbert
 
 diff --git a/dom/canvas/WebGLContext.cpp b/dom/canvas/WebGLContext.cpp
 --- a/dom/canvas/WebGLContext.cpp

+ 4 - 4
mozilla-release/patches/1513009-2-66a1.patch

@@ -2,7 +2,7 @@
 # User Emilio Cobos Alvarez <emilio@crisal.io>
 # Date 1544787255 -3600
 # Node ID 19447cbd145a5a84f23867d57d8d09cd8cd5e6b2
-# Parent  a66e24c4f2ad9ab99ad35febec91e27266c18554
+# Parent  2f9789a0cfe0be17b2e7ad880d05b0c1b8f0747b
 Bug 1513009 - Deny Rust warnings on automation. r=ted
 
 Summary:
@@ -55,7 +55,7 @@ diff --git a/build/moz.configure/flags.configure b/build/moz.configure/flags.con
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -1568,17 +1568,17 @@ imply_option('RUSTC_OPT_LEVEL', '2', whe
+@@ -1611,17 +1611,17 @@ imply_option('RUSTC_OPT_LEVEL', '2', whe
  def rustc_opt_level(opt_level_option, moz_optimize):
      if opt_level_option:
          return opt_level_option[0]
@@ -74,7 +74,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
      # optimization level. Since Cargo only supports 2 profiles, we're in
      # a bit of a bind.
      #
-@@ -1609,18 +1609,16 @@ def rust_compiler_flags(opt_level, debug
+@@ -1652,18 +1652,16 @@ def rust_compiler_flags(opt_level, debug
  
      flags = []
      for opt in opts:
@@ -97,7 +97,7 @@ diff --git a/build/moz.configure/warnings.configure b/build/moz.configure/warnin
 --- a/build/moz.configure/warnings.configure
 +++ b/build/moz.configure/warnings.configure
 @@ -8,16 +8,28 @@ js_option('--enable-warnings-as-errors',
-           default=depends('MOZ_AUTOMATION', '--help')(lambda x, _: bool(x)),
+           default=depends('MOZ_AUTOMATION')(lambda x: bool(x)),
            help='Enable treating warnings as errors')
  
  add_old_configure_assignment(

+ 4 - 4
mozilla-release/patches/1513134-1no2-66a1.patch

@@ -3,7 +3,7 @@
 # Date 1544556797 0
 #      Tue Dec 11 19:33:17 2018 +0000
 # Node ID 968eef77fcd10672402a785cf886e1dd34e4a4a9
-# Parent  e255dedee8b3d2ed3d72506d9a778af569bb903c
+# Parent  bda074bd3b0d48b7af86f0f5bffe61fc8241ddd5
 Bug 1513134 - Make ConfigureSandbox._apply_imports clear _imports itself. r=firefox-build-system-reviewers,gps
 
 This is a not strictly necessary drive-by cleanup.
@@ -13,7 +13,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D14124
 diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py
 --- a/python/mozbuild/mozbuild/configure/__init__.py
 +++ b/python/mozbuild/mozbuild/configure/__init__.py
-@@ -814,17 +814,17 @@ class ConfigureSandbox(dict):
+@@ -810,17 +810,17 @@ class ConfigureSandbox(dict):
              # them later.
              imports = self._imports.setdefault(func, [])
              imports.insert(0, (_from, _import, _as))
@@ -31,8 +31,8 @@ diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mo
                  what = _import.split('.')[0]
                  glob[what] = self._get_one_import('%s%s' % (_from, what))
  
-     @memoized_property
-@@ -1058,13 +1058,12 @@ class ConfigureSandbox(dict):
+     def _get_one_import(self, what):
+@@ -1018,13 +1018,12 @@ class ConfigureSandbox(dict):
              func.__name__,
              func.func_defaults,
              closure

+ 66 - 68
mozilla-release/patches/1513134-3-66a1.patch

@@ -3,7 +3,7 @@
 # Date 1544556868 0
 #      Tue Dec 11 19:34:28 2018 +0000
 # Node ID 0f7e4ff45912953576a5c3420cc0ac94abe0ca5b
-# Parent  85d21910cfce763340331665b0c30b8a23f657ee
+# Parent  aa12b511865f87687ff65a8050fd3af3db0f07d0
 Bug 1513134 - Detect unnecessary --help dependencies. r=firefox-build-system-reviewers,gps
 
 Depends on D14125
@@ -13,7 +13,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D14126
 diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
 --- a/build/moz.configure/init.configure
 +++ b/build/moz.configure/init.configure
-@@ -977,27 +977,27 @@ def target_is_solaris(target):
+@@ -971,27 +971,27 @@ def target_is_solaris(target):
  set_define('XP_SOLARIS', target_is_solaris)
  
  # The application/project to build
@@ -45,7 +45,7 @@ diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.confi
  option('--enable-project', nargs=1, default=default_project,
         help='Project to build')
  
-@@ -1014,18 +1014,18 @@ def include_project_configure(project, e
+@@ -1008,18 +1008,18 @@ def include_project_configure(project, e
          base_dir = os.path.join(base_dir, external_source_dir[0])
  
      path = os.path.join(base_dir, project[0], 'moz.configure')
@@ -66,7 +66,7 @@ diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.confi
  set_config('MOZ_BUILD_APP', build_project)
  set_define('MOZ_BUILD_APP', build_project)
  add_old_configure_assignment('MOZ_BUILD_APP', build_project)
-@@ -1150,11 +1150,11 @@ def project_flag(env=None, set_for_old_c
+@@ -1145,18 +1145,18 @@ def project_flag(env=None, set_for_old_c
      if set_as_define:
          set_define(env, option_implementation)
      if set_for_old_configure:
@@ -80,6 +80,13 @@ diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.confi
 +@depends(milestone)
 +def enabled_in_nightly(milestone):
      return milestone.is_nightly
+ 
+ # Set the MOZ_CONFIGURE_OPTIONS variable with all the options that
+ # were passed somehow (environment, command line, mozconfig)
+ 
+ 
+ @dependable
+ @imports(_from='mozbuild.shellutil', _import='quote')
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
@@ -101,9 +108,9 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
  
  include('android-ndk.configure', when=compiling_android)
  
- with only_when(target_is_osx):
-     # MacOS deployment target version
-     # ==============================================================
+ # MacOS deployment target version
+ # ==============================================================
+ # This needs to happen before any compilation test is done.
 diff --git a/build/moz.configure/warnings.configure b/build/moz.configure/warnings.configure
 --- a/build/moz.configure/warnings.configure
 +++ b/build/moz.configure/warnings.configure
@@ -124,7 +131,7 @@ diff --git a/build/moz.configure/warnings.configure b/build/moz.configure/warnin
      depends('--enable-warnings-as-errors')(lambda x: bool(x)))
  
  
- @depends('--enable-warnings-as-errors')
+ # GCC/Clang warnings:
 diff --git a/js/moz.configure b/js/moz.configure
 --- a/js/moz.configure
 +++ b/js/moz.configure
@@ -191,14 +198,14 @@ diff --git a/js/moz.configure b/js/moz.configure
  build_ctypes = depends_if('--enable-ctypes')(lambda _: True)
  
  set_config('BUILD_CTYPES', build_ctypes)
-@@ -382,18 +382,18 @@ set_define('BUILD_CTYPES', build_ctypes)
- @depends(build_ctypes, building_js)
+@@ -384,18 +384,18 @@ add_old_configure_assignment('BUILD_CTYP
  def js_has_ctypes(ctypes, js):
      if ctypes and js:
          return True
  
  set_config('JS_HAS_CTYPES', js_has_ctypes)
  set_define('JS_HAS_CTYPES', js_has_ctypes)
+ add_old_configure_assignment('JS_HAS_CTYPES', js_has_ctypes)
  
 -@depends('--enable-ctypes', '--enable-compile-environment', '--help')
 -def ctypes_and_compile_environment(ctypes, compile_environment, _):
@@ -251,36 +258,29 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
              # - don't use global variables
              if func in self._imports or func.func_closure:
                  return True
-diff --git a/python/mozbuild/mozbuild/configure/lint.py.1513134.later b/python/mozbuild/mozbuild/configure/lint.py.1513134.later
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/configure/lint.py.1513134.later
-@@ -0,0 +1,25 @@
-+--- lint.py
-++++ lint.py
-+@@ -103,16 +102,22 @@ class LintSandbox(ConfigureSandbox):
-+                     # dependency.
-+                     if arg == 'os' and glob.get('os') is self.OS:
-+                         continue
-+                     if arg in self.BUILTINS:
-+                         continue
-+                     return True
-+         return False
-+ 
-++    def _missing_help_dependency(self, obj):
-++        if (isinstance(obj, DependsFunction) and
-++                self._help_option in obj.dependencies):
-++            return False
-++        return self._need_help_dependency(obj)
-++
-+     @memoize
-+     def _value_for_depends(self, obj, need_help_dependency=False):
-+         with_help = self._help_option in obj.dependencies
-+         if with_help:
-+             for arg in obj.dependencies:
-+                 if self._missing_help_dependency(arg):
-+                     raise ConfigureError(
-+                         "`%s` depends on '--help' and `%s`. "
+@@ -95,16 +94,22 @@ class LintSandbox(ConfigureSandbox):
+                     # dependency.
+                     if arg == 'os' and glob.get('os') is self.OS:
+                         continue
+                     if arg in self.BUILTINS:
+                         continue
+                     return True
+         return False
+ 
++    def _missing_help_dependency(self, obj):
++        if (isinstance(obj, DependsFunction) and
++                self._help_option in obj.dependencies):
++            return False
++        return self._need_help_dependency(obj)
++
+     @memoize
+     def _value_for_depends(self, obj):
+         with_help = self._help_option in obj.dependencies
+         if with_help:
+             for arg in obj.dependencies:
+                 if self._missing_help_dependency(arg):
+                     raise ConfigureError(
+                         "`%s` depends on '--help' and `%s`. "
 diff --git a/python/mozbuild/mozbuild/test/configure/test_lint.py b/python/mozbuild/mozbuild/test/configure/test_lint.py
 --- a/python/mozbuild/mozbuild/test/configure/test_lint.py
 +++ b/python/mozbuild/mozbuild/test/configure/test_lint.py
@@ -355,7 +355,7 @@ diff --git a/python/mozbuild/mozbuild/test/configure/test_lint.py b/python/mozbu
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -462,18 +462,18 @@ set_define('MOZ_SAMPLE_TYPE_FLOAT32', sa
+@@ -427,18 +427,18 @@ set_define('MOZ_SAMPLE_TYPE_FLOAT32', sa
  set_define('MOZ_VORBIS', sample_type_is_float)
  set_config('MOZ_VORBIS', sample_type_is_float)
  set_define('MOZ_TREMOR', sample_type_is_s16)
@@ -376,7 +376,7 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
         choices=('widevine',),
         default=eme_default,
         help='Enable support for Encrypted Media Extensions')
-@@ -777,18 +777,18 @@ option('--disable-synth-speechd', help='
+@@ -742,18 +742,18 @@ option('--disable-synth-speechd', help='
  
  set_config('MOZ_SYNTH_SPEECHD',
             depends_if('--disable-synth-speechd')(lambda _: True))
@@ -397,37 +397,35 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
  add_old_configure_assignment('MOZ_WEBSPEECH', webspeech)
  
  # Speech API test backend
-diff --git a/toolkit/moz.configure.1513134.later b/toolkit/moz.configure.1513134.later
+@@ -1222,18 +1222,18 @@ set_config('MOZ_VERIFY_MAR_SIGNATURE',
+ option('--enable-tasktracer', help='Enable TaskTracer')
+ 
+ set_define('MOZ_TASK_TRACER', depends_if('--enable-tasktracer')(lambda _: True))
+ set_config('MOZ_TASK_TRACER', depends_if('--enable-tasktracer')(lambda _: True))
+ 
+ # Reflow counting
+ # ==============================================================
+ 
+-@depends(moz_debug, '--help')
+-def reflow_perf(debug, _):
++@depends(moz_debug)
++def reflow_perf(debug):
+     if debug:
+         return True
+ 
+ option('--enable-reflow-perf', help='Enable reflow performance tracing',
+        default=reflow_perf)
+ 
+ # The difference in conditions here comes from the initial implementation
+ # in old-configure, which was unexplained there as well.
+diff --git a/toolkit/moz.configure.1513134-3.later b/toolkit/moz.configure.1513134-3.later
 new file mode 100644
 --- /dev/null
-+++ b/toolkit/moz.configure.1513134.later
-@@ -0,0 +1,42 @@
++++ b/toolkit/moz.configure.1513134-3.later
+@@ -0,0 +1,19 @@
 +--- moz.configure
 ++++ moz.configure
 +@@ -1236,35 +1236,35 @@ set_config('MOZ_VERIFY_MAR_SIGNATURE',
-+ option('--enable-tasktracer', help='Enable TaskTracer')
-+ 
-+ set_define('MOZ_TASK_TRACER', depends_if('--enable-tasktracer')(lambda _: True))
-+ set_config('MOZ_TASK_TRACER', depends_if('--enable-tasktracer')(lambda _: True))
-+ 
-+ # Reflow counting
-+ # ==============================================================
-+ 
-+-@depends(moz_debug, '--help')
-+-def reflow_perf(debug, _):
-++@depends(moz_debug)
-++def reflow_perf(debug):
-+     if debug:
-+         return True
-+ 
-+ option('--enable-reflow-perf',
-+        default=reflow_perf,
-+        help='{Enable|Disable} reflow performance tracing')
-+ 
-+ # The difference in conditions here comes from the initial implementation
-+ # in old-configure, which was unexplained there as well.
-+ set_define('MOZ_REFLOW_PERF', depends_if('--enable-reflow-perf')(lambda _: True))
-+ set_define('MOZ_REFLOW_PERF_DSP', reflow_perf)
 + 
 + # Layout debugger
 + # ==============================================================

+ 20 - 24
mozilla-release/patches/1513798-09-66a1.patch

@@ -3,7 +3,7 @@
 # Date 1544685155 -32400
 #      Thu Dec 13 16:12:35 2018 +0900
 # Node ID 93d4d156771f860e7d85625edd00bfea5bf70ee3
-# Parent  4697e259ed0fa22559377db8a34a7f8c7e9f65d5
+# Parent  6499936019eccf13e28f40a3860853ddf92d396c
 Bug 1513798 - Move --with-macos-{sdk,private-frameworks} to python configure. r=nalexander
 
 Because we now set the sysroot include flags early in python configure,
@@ -15,7 +15,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D14380
 diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
 --- a/build/moz.configure/old.configure
 +++ b/build/moz.configure/old.configure
-@@ -242,18 +242,16 @@ def old_configure_options(*options):
+@@ -232,18 +232,16 @@ def old_configure_options(*options):
      '--with-doc-include-dirs',
      '--with-doc-input-dirs',
      '--with-doc-output-dir',
@@ -37,10 +37,10 @@ diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configu
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -191,36 +191,75 @@ add_old_configure_assignment('YASM', hav
+@@ -190,36 +190,75 @@ add_old_configure_assignment('YASM', hav
  
- @depends('--disable-compile-environment', build_project, '--help')
- def compiling_android(compile_env, build_project, _):
+ @depends('--disable-compile-environment', build_project)
+ def compiling_android(compile_env, build_project):
      return compile_env and build_project in ('mobile/android', 'js')
  
  
@@ -127,7 +127,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
            help='Do not check that Xcode is installed and properly configured')
  
  
-@@ -901,21 +940,21 @@ def compiler(language, host_or_target, c
+@@ -900,34 +939,37 @@ def compiler(language, host_or_target, c
      # Normally, we'd use `var` instead of `_var`, but the interaction with
      # old-configure complicates things, and for now, we a) can't take the plain
      # result from check_prog as CC/CXX/HOST_CC/HOST_CXX and b) have to let
@@ -151,30 +151,26 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
              # --with-ccache.
              if provided_wrapper[:len(wrapper)] == wrapper:
                  provided_wrapper = provided_wrapper[len(wrapper):]
-@@ -939,16 +978,19 @@ def compiler(language, host_or_target, c
-                     % quote(os.path.dirname(full_path)))
-             if os.path.normcase(find_program(compiler)) != os.path.normcase(
-                     full_path):
-                 die('Found `%s` before `%s` in your $PATH. '
-                     'Please reorder your $PATH.',
-                     quote(os.path.dirname(found_compiler)),
-                     quote(os.path.dirname(full_path)))
+             wrapper.extend(provided_wrapper)
+             flags = provided_compiler.flags
+         else:
+             flags = []
  
 +        if not flags and macos_sdk and host_or_target.os == 'OSX':
 +            flags = ['-isysroot', macos_sdk]
 +
-         info = check_compiler(wrapper + [compiler] + flags, language,
-                               host_or_target)
- 
-         # Check that the additional flags we got are enough to not require any
-         # more flags. If we get an exception, just ignore it; it's liable to be
-         # invalid command-line flags, which means the compiler we're checking
-         # doesn't support those command-line flags and will fail one or more of
-         # the checks below.
+         # Ideally, we'd always use the absolute path, but unfortunately, on
+         # Windows, the compiler is very often in a directory containing spaces.
+         # Unfortunately, due to the way autoconf does its compiler tests with
+         # eval, that doesn't work out. So in that case, check that the
+         # compiler can still be found in $PATH, and use the file name instead
+         # of the full path.
+         if quote(compiler) != compiler:
+             full_path = os.path.abspath(compiler)
 diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 --- a/js/src/old-configure.in
 +++ b/js/src/old-configure.in
-@@ -290,60 +290,16 @@ AC_SUBST(_MSC_VER)
+@@ -299,60 +299,16 @@ AC_SUBST(_MSC_VER)
  AC_SUBST(GNU_CC)
  AC_SUBST(GNU_CXX)
  
@@ -238,7 +234,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
-@@ -323,76 +323,16 @@ AC_SUBST_LIST(STL_FLAGS)
+@@ -333,76 +333,16 @@ AC_SUBST_LIST(STL_FLAGS)
  AC_SUBST(WRAP_STL_INCLUDES)
  AC_SUBST(MOZ_MSVC_STL_WRAP_RAISE)
  

+ 11 - 12
mozilla-release/patches/1515257-8-66a1.patch

@@ -3,7 +3,7 @@
 # Date 1545219548 0
 #      Wed Dec 19 11:39:08 2018 +0000
 # Node ID 1a8798cea67c7c12354545172447be1c70cd6549
-# Parent  185dd0dea0aab429bdb94a70cfe93256a1f1f2e8
+# Parent  c346081894bfba20e1976f8920210650059bd2f2
 Bug 1515257 - Move --with-system-libvpx to python configure. r=firefox-build-system-reviewers,ted
 
 Depends on D14951
@@ -34,7 +34,7 @@ diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configu
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
-@@ -1744,18 +1744,16 @@ dnl ====================================
+@@ -1779,18 +1779,16 @@ dnl ====================================
  
  MOZ_ARG_HEADER(Application)
  
@@ -53,7 +53,7 @@ diff --git a/old-configure.in b/old-configure.in
  MOZ_UNIVERSALCHARDET=1
  MOZ_XUL=1
  MOZ_ZIPWRITER=1
-@@ -2124,123 +2122,16 @@ if test -n "$MOZ_APPLEMEDIA"; then
+@@ -2155,123 +2153,16 @@ if test -n "$MOZ_APPLEMEDIA"; then
    # We load VideoToolbox and CoreMedia dynamically, so they don't appear here.
    LDFLAGS="$LDFLAGS -framework AudioToolbox"
    dnl Verify CoreMedia is available.
@@ -177,7 +177,7 @@ diff --git a/old-configure.in b/old-configure.in
  AC_DEFINE(MOZ_WEBM_ENCODER)
  AC_SUBST(MOZ_WEBM_ENCODER)
  
-@@ -3713,18 +3604,16 @@ AC_SUBST(USE_N32)
+@@ -3870,18 +3761,16 @@ AC_SUBST(USE_N32)
  AC_SUBST(CC_VERSION)
  AC_SUBST(NS_ENABLE_TSF)
  AC_SUBST(WIN32_CONSOLE_EXE_LDFLAGS)
@@ -199,7 +199,7 @@ diff --git a/old-configure.in b/old-configure.in
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -1179,16 +1179,92 @@ set_config('MOZ_UNSIGNED_SYSTEM_SCOPE', 
+@@ -1241,15 +1241,91 @@ set_define('MOZ_REFLOW_PERF_DSP', reflow
  
  with only_when(compile_environment):
      fxc = check_prog('FXC', ('fxc.exe', 'fxc2.exe'), when=depends(target)
@@ -284,11 +284,10 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 +    add_old_configure_assignment('VPX_ASFLAGS', vpx_as_flags)
 +
 +
- # ANGLE OpenGL->D3D translator for WebGL
- # ==============================================================
+ # Alternative Crashreporter setting
+ option("--with-crashreporter-url", env="MOZ_CRASHREPORTER_URL",
+        default="https://crash-reports.mozilla.com/", nargs=1,
+        help="Set an alternative crashreporter url")
  
- with only_when(compile_environment & target_is_windows):
-     def d3d_compiler_dll_result(value):
-         if not value.path:
-             return 'provided by the OS'
-         return value.path
+ set_config("MOZ_CRASHREPORTER_URL",
+            depends("--with-crashreporter-url")(lambda x: x[0].rstrip("/")))

+ 34 - 31
mozilla-release/patches/1515579-2only-66a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1547163466 0
 # Node ID fa8e39feef4389d1ff83fe952c76ffba7c2217d6
-# Parent  de5caf2b74ba5ccca80fa85fb8c839c61e55b2f1
+# Parent  d77804d83c27036db5e9e99aedc8ff54e9482a82
 Bug 1515579 - Use absolute paths for compilers, etc. r=ted
 
 In bug 1259382, some workarounds were added to make the build system
@@ -23,7 +23,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D15182
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -721,37 +721,65 @@ def vc_compiler_path(host, target, vs_ma
+@@ -723,37 +723,65 @@ def vc_compiler_path(host, target, vs_ma
          # Choose the newest version.
          data = all_versions[-1][1]
      paths = data.get(vc_target)
@@ -34,21 +34,36 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
  
 -@depends(vc_compiler_path)
 +@dependable
-+@imports('os')
+ @imports('os')
+-def toolchain_search_path(vc_compiler_path):
 +@imports(_from='os', _import='environ')
 +def original_path():
 +    return environ['PATH'].split(os.pathsep)
 +
 +
 +@depends(vc_compiler_path, original_path)
- @imports('os')
--def toolchain_search_path(vc_compiler_path):
++@imports('os')
 +@imports(_from='os', _import='environ')
 +def toolchain_search_path(vc_compiler_path, original_path):
 +    result = list(original_path)
      if vc_compiler_path:
 -        result = [os.environ.get('PATH')]
 -        result.extend(vc_compiler_path)
+-
+-        # Also add in the location to which `mach bootstrap` or
+-        # `mach artifact toolchain` installs clang.
+-        mozbuild_state_dir = os.environ.get('MOZBUILD_STATE_PATH',
+-                                            os.path.expanduser(os.path.join('~', '.mozbuild')))
+-        bootstrap_clang_path = os.path.join(mozbuild_state_dir, 'clang', 'bin')
+-        result.append(bootstrap_clang_path)
+-
+-        bootstrap_cbindgen_path = os.path.join(mozbuild_state_dir, 'cbindgen')
+-        result.append(bootstrap_cbindgen_path)
+-
+-        # We're going to alter PATH for good in windows.configure, but we also
+-        # need to do it for the valid_compiler() check below.
+-        os.environ['PATH'] = os.pathsep.join(result)
+-        return result
 +        # The second item, if there is one, is necessary to have in $PATH for
 +        # Windows to load the required DLLs from there.
 +        if len(vc_compiler_path) > 1:
@@ -56,13 +71,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
 +
 +        # The first item is where the programs are going to be
 +        result.append(vc_compiler_path[0])
- 
--        # Also add in the location to which `mach bootstrap` or
--        # `mach artifact toolchain` installs clang.
--        mozbuild_state_dir = os.environ.get('MOZBUILD_STATE_PATH',
--                                            os.path.expanduser(os.path.join('~', '.mozbuild')))
--        bootstrap_clang_path = os.path.join(mozbuild_state_dir, 'clang', 'bin')
--        result.append(bootstrap_clang_path)
++
 +    # Also add in the location to which `mach bootstrap` or
 +    # `mach artifact toolchain` installs clang.
 +    mozbuild_state_dir = os.environ.get('MOZBUILD_STATE_PATH',
@@ -75,9 +84,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
 +
 +    return result
 +
- 
--        bootstrap_cbindgen_path = os.path.join(mozbuild_state_dir, 'cbindgen')
--        result.append(bootstrap_cbindgen_path)
++
 +# As a workaround until bug 1516228 and bug 1516253 are fixed, set the PATH
 +# variable for the build to contain the toolchain search path.
 +@depends(toolchain_search_path)
@@ -90,11 +97,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
 +        if p not in altered_path:
 +            altered_path.append(p)
 +    return os.pathsep.join(altered_path)
- 
--        # We're going to alter PATH for good in windows.configure, but we also
--        # need to do it for the valid_compiler() check below.
--        os.environ['PATH'] = os.pathsep.join(result)
--        return result
++
 +
 +set_config('PATH', altered_path)
  
@@ -105,15 +108,15 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
      target platforms.
      `host_or_target` is either `host` or `target` (the @depends functions
      from init.configure.
-@@ -955,36 +983,16 @@ def compiler(language, host_or_target, c
-             # --with-ccache.
-             if provided_wrapper[:len(wrapper)] == wrapper:
-                 provided_wrapper = provided_wrapper[len(wrapper):]
+@@ -960,36 +988,16 @@ def compiler(language, host_or_target, c
              wrapper.extend(provided_wrapper)
              flags = provided_compiler.flags
          else:
              flags = []
  
+         if not flags and macos_sdk and host_or_target.os == 'OSX':
+             flags = ['-isysroot', macos_sdk]
+ 
 -        # Ideally, we'd always use the absolute path, but unfortunately, on
 -        # Windows, the compiler is very often in a directory containing spaces.
 -        # Unfortunately, due to the way autoconf does its compiler tests with
@@ -134,15 +137,15 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
 -                    quote(os.path.dirname(found_compiler)),
 -                    quote(os.path.dirname(full_path)))
 -
-         if not flags and macos_sdk and host_or_target.os == 'OSX':
-             flags = ['-isysroot', macos_sdk]
- 
          info = check_compiler(wrapper + [compiler] + flags, language,
                                host_or_target)
  
          # Check that the additional flags we got are enough to not require any
          # more flags. If we get an exception, just ignore it; it's liable to be
-@@ -1432,17 +1440,18 @@ def pgo_flags(compiler, build_env, targe
+         # invalid command-line flags, which means the compiler we're checking
+         # doesn't support those command-line flags and will fail one or more of
+         # the checks below.
+@@ -1434,17 +1442,18 @@ def pgo_flags(compiler, build_env, targe
  
  
  set_config('PROFILE_GEN_CFLAGS', pgo_flags.gen_cflags)
@@ -162,7 +165,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
      if compiler.type in ('gcc', 'clang'):
          return '-E -o '
      else:
-@@ -1903,17 +1912,18 @@ def as_info(target, c_compiler):
+@@ -1904,17 +1913,18 @@ def as_info(target, c_compiler):
  # One would expect the assembler to be specified merely as a program.  But in
  # cases where the assembler is passed down into js/, it can be specified in
  # the same way as CC: a program + a list of argument flags.  We might as well
@@ -261,7 +264,7 @@ diff --git a/build/moz.configure/windows.configure b/build/moz.configure/windows
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -1073,17 +1073,18 @@ def midl_names(c_compiler, toolchain_pre
+@@ -1095,17 +1095,18 @@ def midl_names(c_compiler, toolchain_pre
  def check_for_midl(target, compile_environment):
      if target.os != 'WINNT':
          return
@@ -281,7 +284,7 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
          env = {
              'x86': 'win32',
              'x86_64': 'x64',
-@@ -1146,17 +1147,18 @@ set_config('MOZ_UNSIGNED_APP_SCOPE', uns
+@@ -1168,17 +1169,18 @@ set_config('MOZ_UNSIGNED_APP_SCOPE', uns
  set_config('MOZ_UNSIGNED_SYSTEM_SCOPE', unsigned_addon_scopes.system)
  
  

+ 24 - 24
mozilla-release/patches/1515581-66a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1545344724 0
 # Node ID dca16fc55e60d74323807411fb441b4a6c60c97c
-# Parent  f63a0d0975fd60658a402fa2ebaa47ae755eaee7
+# Parent  3b7ad610754445c9b7dd8732543dfc81174ba03d
 Bug 1515581 - Move RC and WINDRES to python configure. r=nalexander
 
 Remove the version check for WINDRES, because, as per bug 454112, it
@@ -14,7 +14,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D15070
 diff --git a/build/autoconf/toolchain.m4 b/build/autoconf/toolchain.m4
 --- a/build/autoconf/toolchain.m4
 +++ b/build/autoconf/toolchain.m4
-@@ -56,17 +56,16 @@ esac
+@@ -62,17 +62,16 @@ esac
  AC_PROG_CC
  AC_PROG_CXX
  
@@ -35,7 +35,7 @@ diff --git a/build/autoconf/toolchain.m4 b/build/autoconf/toolchain.m4
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -2096,8 +2096,19 @@ def make_shared_library(target, compiler
+@@ -2088,8 +2088,19 @@ def make_shared_library(target, compiler
      return namespace(
          mkshlib=cxx + flags + soname + output,
          mkcshlib=cc + flags + soname + output,
@@ -76,7 +76,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
  
  dnl Initialize the Pthread test variables early so they can be
  dnl  overridden by each platform.
-@@ -99,17 +98,16 @@ if test "$target" != "$host"; then
+@@ -100,17 +99,16 @@ if test "$target" != "$host"; then
      MOZ_CROSS_COMPILER
  else
      AC_PROG_CC
@@ -92,9 +92,9 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
      if test -z "$HOST_CXX"; then
          HOST_CXX='$(CXX)'
      fi
- fi
- 
-@@ -220,35 +218,16 @@ case "$target" in
+     if test -z "$HOST_RANLIB"; then
+         HOST_RANLIB='$(RANLIB)'
+@@ -230,35 +228,16 @@ case "$target" in
                   __W32API_MINOR_VERSION < $_W32API_MINOR_VERSION)
                  #error "test failed."
              #endif
@@ -130,7 +130,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
      AC_DEFINE_UNQUOTED(_WIN32_IE,0x0800)
  
      ;;
-@@ -575,25 +554,23 @@ case "$target" in
+@@ -587,25 +566,23 @@ case "$target" in
      	CXXFLAGS="$CXXFLAGS -mieee"
      ;;
      esac
@@ -156,7 +156,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
  
          if test -z "$CLANG_CC"; then
              # Use static libgcc and libstdc++
-@@ -1611,17 +1588,16 @@ dnl = Maintainer debug option (no --enab
+@@ -1626,17 +1603,16 @@ dnl = Maintainer debug option (no --enab
  dnl =
  dnl ========================================================
  
@@ -195,7 +195,7 @@ diff --git a/old-configure.in b/old-configure.in
  dnl Set various checks
  dnl ========================================================
  MISSING_X=
-@@ -113,17 +112,16 @@ else
+@@ -114,17 +113,16 @@ else
        # Work around the conftest.exe access problem on Windows
        sleep 2
      esac
@@ -206,14 +206,14 @@ diff --git a/old-configure.in b/old-configure.in
      AC_CHECK_PROGS(STRIP, strip, :)
 -    AC_CHECK_PROGS(WINDRES, windres, :)
      AC_CHECK_PROGS(OTOOL, otool, :)
- fi
- 
- if test -n "$MOZ_WINCONSOLE"; then
-     AC_DEFINE(MOZ_WINCONSOLE)
- fi
- 
- MOZ_TOOL_VARIABLES
-@@ -263,36 +261,16 @@ case "$target" in
+     if test -z "$HOST_RANLIB"; then
+         HOST_RANLIB="$RANLIB"
+     fi
+     if test -z "$HOST_AR"; then
+         HOST_AR="$AR"
+     fi
+     if test -z "$HOST_AR_FLAGS"; then
+@@ -273,36 +271,16 @@ case "$target" in
                   __W32API_MINOR_VERSION < $_W32API_MINOR_VERSION)
                  #error "test failed."
              #endif
@@ -250,7 +250,7 @@ diff --git a/old-configure.in b/old-configure.in
      AC_DEFINE_UNQUOTED(WINVER,0x$WINVER)
      AC_DEFINE_UNQUOTED(_WIN32_WINNT,0x$WINVER)
      # Require OS features provided by IE 8.0 (Win7)
-@@ -695,27 +673,25 @@ case "$target" in
+@@ -708,27 +686,25 @@ case "$target" in
          CFLAGS="$CFLAGS -mieee"
          CXXFLAGS="$CXXFLAGS -mieee"
      ;;
@@ -276,9 +276,9 @@ diff --git a/old-configure.in b/old-configure.in
          LIBS="$LIBS -luuid -lusp10 -lgdi32 -lwinmm -lwsock32 -luserenv -lsecur32"
          MOZ_FIX_LINK_PATHS=
  
-         WIN32_CONSOLE_EXE_LDFLAGS=-mconsole
-         WIN32_GUI_EXE_LDFLAGS=-mwindows
-@@ -3614,19 +3590,17 @@ dnl = Maintainer debug option (no --enab
+         MOZ_OPTIMIZE_FLAGS="-O1"
+ 
+@@ -3525,19 +3501,17 @@ dnl = Maintainer debug option (no --enab
  dnl =
  dnl ========================================================
  
@@ -298,7 +298,7 @@ diff --git a/old-configure.in b/old-configure.in
  AC_SUBST(WARNINGS_AS_ERRORS)
  AC_SUBST_LIST(WARNINGS_CFLAGS)
  AC_SUBST_SET(MOZ_EXTENSIONS)
-@@ -4108,17 +4082,16 @@ if test -z "$direct_nspr_config"; then
+@@ -4015,17 +3989,16 @@ if test -z "$direct_nspr_config"; then
      CFLAGS="$_SUBDIR_CFLAGS"
      CPPFLAGS="$_SUBDIR_CPPFLAGS"
      CXXFLAGS="$_SUBDIR_CXXFLAGS"
@@ -316,7 +316,7 @@ diff --git a/old-configure.in b/old-configure.in
  # Run all configure scripts specified by a subconfigure
  if test -n "$_subconfigure_subdir"; then
    _save_srcdir="$srcdir"
-@@ -4142,17 +4115,16 @@ CXX="$_SUBDIR_CXX"
+@@ -4049,17 +4022,16 @@ CXX="$_SUBDIR_CXX"
  CFLAGS="$_SUBDIR_CFLAGS"
  CPPFLAGS="$_SUBDIR_CPPFLAGS"
  CXXFLAGS="$_SUBDIR_CXXFLAGS"

+ 8 - 8
mozilla-release/patches/1515595-2-66a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1545432833 0
 # Node ID eb4b6440b878912f26e2b1235a069a7f130541c4
-# Parent  caf81c5c712d043eb46f4840d8c7dc333fc5f1c3
+# Parent  9bf17bb62f35727e2ac3faefd318e05f4b72c08b
 Bug 1515595 - Move AR to python configure. r=froydnj
 
 Depends on D15179
@@ -12,7 +12,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D15180
 diff --git a/build/autoconf/toolchain.m4 b/build/autoconf/toolchain.m4
 --- a/build/autoconf/toolchain.m4
 +++ b/build/autoconf/toolchain.m4
-@@ -58,17 +58,16 @@ case "${TOOLCHAIN_PREFIX}" in
+@@ -52,17 +52,16 @@ case "${TOOLCHAIN_PREFIX}" in
  /*)
      PATH="/:$PATH"
      ;;
@@ -33,7 +33,7 @@ diff --git a/build/autoconf/toolchain.m4 b/build/autoconf/toolchain.m4
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -2133,8 +2133,34 @@ set_config('MKCSHLIB', make_shared_libra
+@@ -2119,8 +2119,34 @@ set_config('MKCSHLIB', make_shared_libra
  def rc_names(c_compiler, toolchain_prefix):
      if c_compiler.type in ('gcc', 'clang'):
          return tuple('%s%s' % (p, 'windres')
@@ -108,8 +108,8 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
          HOST_CXX='$(CXX)'
      fi
  fi
-@@ -572,26 +569,16 @@ case "$target" in
-         fi
+@@ -581,26 +578,16 @@ case "$target" in
+         MOZ_OPTIMIZE_FLAGS="-O2"
  
          WIN32_CONSOLE_EXE_LDFLAGS=-mconsole
          WIN32_GUI_EXE_LDFLAGS=-mwindows
@@ -135,7 +135,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
              WIN32_SUBSYSTEM_VERSION=6.02
          else
              WIN32_SUBSYSTEM_VERSION=6.01
-@@ -1573,18 +1560,16 @@ MOZ_ARG_WITH_STRING(cross-lib,
+@@ -1582,18 +1569,16 @@ MOZ_ARG_WITH_STRING(cross-lib,
      CROSS_LIB=/usr/$target)
  AC_SUBST(CROSS_LIB)
  dnl ========================================================
@@ -191,7 +191,7 @@ diff --git a/old-configure.in b/old-configure.in
      AC_DEFINE(MOZ_WINCONSOLE)
  fi
  
-@@ -696,26 +693,16 @@ case "$target" in
+@@ -713,26 +710,16 @@ case "$target" in
              # function thunks need to be generated for cross-DLL calls.
              MOZ_FOLD_LIBS_FLAGS="-mnop-fun-dllimport"
          else
@@ -218,7 +218,7 @@ diff --git a/old-configure.in b/old-configure.in
              WIN32_SUBSYSTEM_VERSION=6.02
          else
              WIN32_SUBSYSTEM_VERSION=6.01
-@@ -3320,18 +3307,16 @@ if test "$NECKO_COOKIES"; then
+@@ -3231,18 +3218,16 @@ if test "$NECKO_COOKIES"; then
  fi
  
  dnl ========================================================

+ 4 - 6
mozilla-release/patches/1515746-2-67a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1549570605 0
 # Node ID 3c7c50fba28399ae0d1a3812e5088cde55aacd8e
-# Parent  23e9c2b85daa2723a38bc1e6c47a5f8ede65dbd5
+# Parent  aea3f36c877d9dd5e096292594e7e2794e04f38d
 Bug 1515746 - [flake8] Upgrade flake8 and dependencies, r=egao
 
 This bumps flake8 to version 3.7.5.
@@ -17,10 +17,10 @@ Differential Revision: https://phabricator.services.mozilla.com/D18353
 diff --git a/.flake8 b/.flake8
 --- a/.flake8
 +++ b/.flake8
-@@ -1,23 +1,32 @@
+@@ -1,21 +1,32 @@
  [flake8]
--# See http://pep8.readthedocs.io/en/latest/intro.html#configuration
--ignore = E121, E123, E126, E129, E133, E226, E241, E242, E704, W503, E402, E741
+ # See http://pep8.readthedocs.io/en/latest/intro.html#configuration
+ ignore = E121, E123, E126, E129, E133, E226, E241, E242, E704, W503, E402, E741
  max-line-length = 99
  exclude =
 -    browser/moz.configure,
@@ -36,8 +36,6 @@ diff --git a/.flake8 b/.flake8
      ipc/chromium/,
      js/*.configure,
      memory/moz.configure,
-     python/mozbuild/dumbmake,
-     python/mozbuild/mozbuild,
      security/nss/,
      testing/mochitest/pywebsocket,
      tools/lint/test/files,

+ 3 - 3
mozilla-release/patches/1515746-3-67a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1549570622 0
 # Node ID f96c1460ffc09ef61bf3e2c93bfda21cdb86fb2f
-# Parent  41bd35dcfec4e4aa6c4b059b31240755612c98d4
+# Parent  4e8341e883c1615b4db10b103ea4f8dbe46ad34b
 Bug 1515746 - [flake8] Unsupport subdir .flake8 files and use new 'per-file-ignores' config instead, r=egao
 
 This removes all .flake8 files except for the one at the root of the repo.
@@ -26,13 +26,13 @@ diff --git a/.flake8 b/.flake8
 --- a/.flake8
 +++ b/.flake8
 @@ -11,22 +11,31 @@ exclude =
+     gfx/angle/,
+     gfx/harfbuzz,
      glx/skia/,
      intl/icu/,
      ipc/chromium/,
      js/*.configure,
      memory/moz.configure,
-     python/mozbuild/dumbmake,
-     python/mozbuild/mozbuild,
      security/nss/,
 +    testing/firefox-ui/**/__init__.py,
 +    testing/marionette/**/__init__.py,

+ 11 - 11
mozilla-release/patches/1515843-3-66a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1545433217 0
 # Node ID a415ca5d5ffd1c934f1d2d6585535b08d634d2fd
-# Parent  390cac30a14c7a8bda22aa46686bef866a4635fc
+# Parent  9920880669e32054c8a51f45ce114f3a93d47bb1
 Bug 1515843 - Remove HOST_AR/HOST_RANLIB. r=ted
 
 Now that we're not even building host static libraries, we don't need
@@ -43,7 +43,7 @@ diff --git a/build/autoconf/toolchain.m4 b/build/autoconf/toolchain.m4
 diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 --- a/js/src/old-configure.in
 +++ b/js/src/old-configure.in
-@@ -77,17 +77,16 @@ else
+@@ -76,17 +76,16 @@ else
  fi
  
  MOZ_ANDROID_NDK
@@ -61,9 +61,9 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
  #   In Mozilla, we use the names $target, $host and $build incorrectly, but are
  #   too far gone to back out now. See Bug 475488:
  #     - When we say $target, we mean $host, that is, the system on which
-@@ -107,25 +106,16 @@ else
+@@ -105,25 +104,16 @@ else
+     AC_CHECK_PROGS(AR, ar, :)
      AC_CHECK_PROGS(STRIP, strip, :)
-     AC_CHECK_PROGS(WINDRES, windres, :)
      if test -z "$HOST_CC"; then
          HOST_CC='$(CC)'
      fi
@@ -87,7 +87,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
  dnl ========================================================
  
  # Target the Windows 8.1 SDK by default
-@@ -496,20 +486,17 @@ if test "$GNU_CXX"; then
+@@ -438,20 +428,17 @@ if test "$GNU_CXX"; then
  fi
  
  dnl ========================================================
@@ -108,7 +108,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
      HOST_BIN_SUFFIX=.exe
  
      case "${host_cpu}" in
-@@ -1749,19 +1736,16 @@ AC_SUBST(OS_LIBS)
+@@ -1686,19 +1673,16 @@ AC_SUBST(OS_LIBS)
  
  AC_SUBST(HOST_CC)
  AC_SUBST(HOST_CXX)
@@ -131,7 +131,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
-@@ -95,17 +95,16 @@ esac
+@@ -94,17 +94,16 @@ esac
  AC_SUBST(ANDROID_SOURCE)
  AC_SUBST(ANDROID_PACKAGE_NAME)
  AC_SUBST(OBJCOPY)
@@ -149,14 +149,14 @@ diff --git a/old-configure.in b/old-configure.in
      MOZ_CROSS_COMPILER
  else
      AC_PROG_CC
-@@ -116,25 +115,16 @@ else
+@@ -114,25 +113,16 @@ else
+       sleep 2
      esac
      AC_PROG_CXX
      AC_PROG_RANLIB
      MOZ_PATH_PROGS(AS, $AS as, $CC)
      AC_CHECK_PROGS(AR, ar, :)
      AC_CHECK_PROGS(STRIP, strip, :)
-     AC_CHECK_PROGS(WINDRES, windres, :)
      AC_CHECK_PROGS(OTOOL, otool, :)
 -    if test -z "$HOST_RANLIB"; then
 -        HOST_RANLIB="$RANLIB"
@@ -175,7 +175,7 @@ diff --git a/old-configure.in b/old-configure.in
  
  MOZ_TOOL_VARIABLES
  
-@@ -628,20 +618,17 @@ if test "$MOZ_DMD"; then
+@@ -554,20 +544,17 @@ if test "$MOZ_DMD"; then
  fi
  
  dnl ========================================================
@@ -196,7 +196,7 @@ diff --git a/old-configure.in b/old-configure.in
      HOST_BIN_SUFFIX=.exe
  
      case "${host_cpu}" in
-@@ -4024,19 +4011,16 @@ AC_SUBST(OS_LIBS)
+@@ -3732,19 +3719,16 @@ AC_SUBST(OS_LIBS)
  
  AC_SUBST(HOST_CC)
  AC_SUBST(HOST_CXX)

+ 15 - 16
mozilla-release/patches/1515852-66a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1545407242 0
 # Node ID 2c4de7449db2b6fa793d6a0f9919759cb81a3895
-# Parent  51bc49f4f22cce5a8667abb22c2653cc75b3f66d
+# Parent  bef8b23e988993f0edbaab87f5d8391eb0337221
 Bug 1515852 - Move --with-system-jpeg to python configure. r=froydnj
 
 We remove --disable-libjpeg-turbo because that's only useful when Yasm
@@ -57,7 +57,7 @@ diff --git a/old-configure.in b/old-configure.in
  dnl Set the minimum version of toolkit libs used by mozilla
  dnl ========================================================
  GLIB_VERSION=2.22
-@@ -1633,61 +1632,16 @@ if test -z "$MOZ_SYSTEM_NSS"; then
+@@ -1631,61 +1630,16 @@ if test -z "$MOZ_SYSTEM_NSS"; then
          WINNT|Darwin|Linux|DragonFly|FreeBSD|NetBSD|OpenBSD|SunOS)
              ;;
          *)
@@ -119,7 +119,7 @@ diff --git a/old-configure.in b/old-configure.in
  
  dnl ========================================================
  dnl system PNG Support
-@@ -1744,18 +1698,16 @@ dnl ====================================
+@@ -1742,18 +1696,16 @@ dnl ====================================
  
  MOZ_ARG_HEADER(Application)
  
@@ -138,7 +138,7 @@ diff --git a/old-configure.in b/old-configure.in
  MOZ_ZIPWRITER=1
  MOZ_NO_SMART_CARDS=
  NECKO_COOKIES=1
-@@ -2241,104 +2193,16 @@ if test -n "$MOZ_CRASHREPORTER"; then
+@@ -2337,104 +2289,16 @@ if test -n "$MOZ_CRASHREPORTER"; then
      if test -z "$HAVE_64BIT_BUILD" -a -n "$COMPILE_ENVIRONMENT"; then
        MOZ_CRASHREPORTER_INJECTOR=1
        AC_DEFINE(MOZ_CRASHREPORTER_INJECTOR)
@@ -243,7 +243,7 @@ diff --git a/old-configure.in b/old-configure.in
  dnl Turn on libav-fft for 32-bit windows, and all 64-bit supported platforms.
  dnl 32-bit linux/os x have text relocation issues.
  
-@@ -3539,22 +3403,19 @@ HOST_CFLAGS=`echo \
+@@ -3654,22 +3518,19 @@ HOST_CFLAGS=`echo \
      $_COMPILATION_HOST_CFLAGS \
      $HOST_CFLAGS`
  
@@ -266,7 +266,7 @@ diff --git a/old-configure.in b/old-configure.in
  AC_SUBST(MOZ_SYSTEM_NSS)
  
  HOST_CMFLAGS="-x objective-c -fobjc-exceptions"
-@@ -3604,18 +3465,16 @@ AC_SUBST(USE_N32)
+@@ -3719,18 +3580,16 @@ AC_SUBST(USE_N32)
  AC_SUBST(CC_VERSION)
  AC_SUBST(NS_ENABLE_TSF)
  AC_SUBST(WIN32_CONSOLE_EXE_LDFLAGS)
@@ -383,7 +383,7 @@ diff --git a/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -1202,31 +1202,31 @@ with only_when(compile_environment):
+@@ -1264,31 +1264,31 @@ with only_when(compile_environment):
          check_symbol('vpx_codec_dec_init_ver', flags=vpx.libs, onerror=lambda: die(
              "--with-system-libvpx requested but symbol vpx_codec_dec_init_ver "
              "not found"
@@ -422,7 +422,7 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
      # "softfloat" ABI.
      # The "softfloat" ABI is binary-compatible with the "softfp" ABI, so
      # we can safely mix code built with both ABIs. So, if we detect
-@@ -1255,16 +1255,142 @@ with only_when(compile_environment):
+@@ -1317,15 +1317,141 @@ with only_when(compile_environment):
          return flags
  
  
@@ -557,11 +557,10 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 +                % (version, what))
 +
 +
- # ANGLE OpenGL->D3D translator for WebGL
- # ==============================================================
- 
- with only_when(compile_environment & target_is_windows):
-     def d3d_compiler_dll_result(value):
-         if not value.path:
-             return 'provided by the OS'
-         return value.path
+ # Alternative Crashreporter setting
+ option("--with-crashreporter-url", env="MOZ_CRASHREPORTER_URL",
+        default="https://crash-reports.mozilla.com/", nargs=1,
+        help="Set an alternative crashreporter url")
+ 
+ set_config("MOZ_CRASHREPORTER_URL",
+            depends("--with-crashreporter-url")(lambda x: x[0].rstrip("/")))

Some files were not shown because too many files changed in this diff