Merge mozilla-central to autoland. CLOSED TREE
authorCsoregi Natalia <ncsoregi@mozilla.com>
Wed, 13 Mar 2019 23:47:01 +0200
changeset 521781 a8f1fd35587fa7df233e2fced117f22926b7cabd
parent 521778 a14e6fd4010b2f4e07a3353edf4971926566ce6f (diff)
parent 521780 85d3d2603b8f8f90e658ae5ef4a728b450c8bb81 (current diff)
child 521782 e4718a35d70b174f7acf7528c3de81b567a87b66
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-central to autoland. CLOSED TREE
--- a/.cron.yml
+++ b/.cron.yml
@@ -111,16 +111,17 @@ jobs:
           by-project:
               mozilla-central: [{hour: 10, minute: 30}]
 
     - name: chromium-update
       job:
           type: decision-task
           treeherder-symbol: Chromium
           target-tasks-method: chromium_update
+          optimize-target-tasks: false
       run-on-projects:
           - mozilla-central
       when:
           by-project:
               mozilla-central: [{hour: 10, minute: 30}]
 
     - name: bouncer-check
       job:
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3090,17 +3090,16 @@ dependencies = [
  "lalrpop 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "lalrpop-util 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "webrender"
 version = "0.60.0"
 dependencies = [
- "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 13.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
--- a/browser/components/shell/content/setDesktopBackground.js
+++ b/browser/components/shell/content/setDesktopBackground.js
@@ -20,18 +20,20 @@ var gSetBackground = {
 
   load() {
     this._canvas = document.getElementById("screen");
     this._screenWidth = screen.width;
     this._screenHeight = screen.height;
     if (AppConstants.platform == "macosx") {
       document.documentElement.getButton("accept").hidden = true;
     }
-    if (this._screenWidth / this._screenHeight >= 1.6)
-      document.getElementById("monitor").setAttribute("aspectratio", "16:10");
+    // Cap ratio to 4 so the dialog width doesn't get ridiculous. Highest
+    // regular screens seem to be 32:9 (3.56) according to Wikipedia.
+    let screenRatio = Math.min(this._screenWidth / this._screenHeight, 4);
+    this._canvas.width = this._canvas.height * screenRatio;
 
     if (AppConstants.platform == "win") {
       // Hide fill + fit options if < Win7 since they don't work.
       var version = Services.sysinfo.getProperty("version");
       var isWindows7OrHigher = (parseFloat(version) >= 6.1);
       if (!isWindows7OrHigher) {
         document.getElementById("fillPosition").hidden = true;
         document.getElementById("fitPosition").hidden = true;
--- a/browser/components/shell/content/setDesktopBackground.xul
+++ b/browser/components/shell/content/setDesktopBackground.xul
@@ -58,21 +58,19 @@
       <label value="&color.label;"/>
       <html:input id="desktopColor"
                   type="color"
                   onchange="gSetBackground.updateColor(this.value);"/> 
     </hbox>
 #endif
 
     <vbox align="center">
-      <stack>
-        <!-- if width and height are not present, they default to 300x150 and stretch the stack -->
-        <html:canvas id="screen" width="1" height="1" role="presentation"/>
-        <image id="monitor"/>
-      </stack>
+      <!-- default to 16:9, will be adjusted to match user's actual screen -->
+      <html:canvas id="screen" width="202" height="114" role="presentation"/>
+      <image id="monitor-base"/>
     </vbox>
 
 #ifdef XP_MACOSX
     <separator/>
 
     <hbox align="right">
       <button id="setDesktopBackground"
               label="&setDesktopBackground.title;"
--- a/browser/components/shell/test/browser_setDesktopBackgroundPreview.js
+++ b/browser/components/shell/test/browser_setDesktopBackgroundPreview.js
@@ -34,27 +34,24 @@ add_task(async function() {
     // Need to explicitly close the menu (and wait for it), otherwise it fails
     // verify/later tests
     const menuClosed = BrowserTestUtils.waitForPopupEvent(menu, "hidden");
     menu.hidePopup();
 
     const win = await dialogLoad;
 
     /* setDesktopBackground.js does a setTimeout to wait for correct
-       dimensions. If we don't wait here we could read the monitor image
-       URL before it's changed to the widescreen version */
+       dimensions. If we don't wait here we could read the preview dimensions
+       before they're changed to match the screen */
     await TestUtils.waitForTick();
 
-    const img = win.document.getElementById("monitor");
-    const measure = new Image();
-    const measureLoad = BrowserTestUtils.waitForEvent(measure, "load");
-    measure.src =
-      getComputedStyle(img).listStyleImage.slice(4, -1).replace(/"/g, "");
-    await measureLoad;
+    const canvas = win.document.getElementById("screen");
+    // Only test to two decimal places
+    const screenRatio = Math.floor((screen.width / screen.height) * 100);
+    const previewRatio = Math.floor((canvas.clientWidth / canvas.clientHeight) * 100);
 
-    Assert.equal(img.clientWidth, measure.naturalWidth, "Monitor image correct width");
-    Assert.equal(img.clientHeight, measure.naturalHeight, "Monitor image correct height");
+    Assert.equal(previewRatio, screenRatio, "Preview's aspect ratio matches screen's");
 
     win.close();
 
     await menuClosed;
   });
 });
--- a/browser/extensions/formautofill/locales/en-US/formautofill.properties
+++ b/browser/extensions/formautofill/locales/en-US/formautofill.properties
@@ -75,17 +75,17 @@ phishingWarningMessage = Also autofills 
 phishingWarningMessage2 = Autofills %S
 # LOCALIZATION NOTE (insecureFieldWarningDescription): %S is brandShortName. This string is used in drop down
 # suggestion when users try to autofill credit card on an insecure website (without https).
 insecureFieldWarningDescription = %S has detected an insecure site. Form Autofill is temporarily disabled.
 # LOCALIZATION NOTE (clearFormBtnLabel2): Label for the button in the dropdown menu that used to clear the populated
 # form.
 clearFormBtnLabel2 = Clear Autofill Form
 
-autofillHeader = Forms & Autofill
+autofillHeader = Forms and Autofill
 # LOCALIZATION NOTE (autofillAddressesCheckbox): Label for the checkbox that enables autofilling addresses.
 autofillAddressesCheckbox = Autofill addresses
 # LOCALIZATION NOTE (learnMoreLabel): Label for the link that leads users to the Form Autofill SUMO page.
 learnMoreLabel = Learn more
 # LOCALIZATION NOTE (savedAddressesBtnLabel): Label for the button that opens a dialog that shows the
 # list of saved addresses.
 savedAddressesBtnLabel = Saved Addresses…
 # LOCALIZATION NOTE (autofillCreditCardsCheckbox): Label for the checkbox that enables autofilling credit cards.
--- a/browser/locales/en-US/browser/preferences/preferences.ftl
+++ b/browser/locales/en-US/browser/preferences/preferences.ftl
@@ -230,17 +230,17 @@ containers-remove-alert-msg =
 containers-remove-ok-button = Remove this Container
 containers-remove-cancel-button = Don’t remove this Container
 
 
 ## General Section - Language & Appearance
 
 language-and-appearance-header = Language and Appearance
 
-fonts-and-colors-header = Fonts & Colors
+fonts-and-colors-header = Fonts and Colors
 
 default-font = Default font
     .accesskey = D
 default-font-size = Size
     .accesskey = S
 
 advanced-fonts =
     .label = Advanced…
@@ -677,17 +677,17 @@ sync-tos-link = Terms of Service
 sync-fxa-privacy-notice = Privacy Notice
 
 ## Privacy Section
 
 privacy-header = Browser Privacy
 
 ## Privacy Section - Forms
 
-logins-header = Logins & Passwords
+logins-header = Logins and Passwords
 forms-ask-to-save-logins =
     .label = Ask to save logins and passwords for websites
     .accesskey = r
 forms-exceptions =
     .label = Exceptions…
     .accesskey = x
 forms-saved-logins =
     .label = Saved Logins…
@@ -717,17 +717,17 @@ history-remember-label = { -brand-short-
 
 history-remember-option-all =
     .label = Remember history
 history-remember-option-never =
     .label = Never remember history
 history-remember-option-custom =
     .label = Use custom settings for history
 
-history-remember-description = { -brand-short-name } will remember your browsing, download, form and search history.
+history-remember-description = { -brand-short-name } will remember your browsing, download, form, and search history.
 history-dontremember-description = { -brand-short-name } will use the same settings as private browsing, and will not remember any history as you browse the Web.
 
 history-private-browsing-permanent =
     .label = Always use private browsing mode
     .accesskey = p
 
 history-remember-browser-option =
     .label = Remember browsing and download history
@@ -753,17 +753,17 @@ history-clear-button =
 
 sitedata-header = Cookies and Site Data
 
 sitedata-total-size-calculating = Calculating site data and cache size…
 
 # Variables:
 #   $value (Number) - Value of the unit (for example: 4.6, 500)
 #   $unit (String) - Name of the unit (for example: "bytes", "KB")
-sitedata-total-size = Your stored cookies, site data and cache are currently using { $value } { $unit } of disk space.
+sitedata-total-size = Your stored cookies, site data, and cache are currently using { $value } { $unit } of disk space.
 
 sitedata-learn-more = Learn more
 
 sitedata-delete-on-close =
     .label = Delete cookies and site data when { -brand-short-name } is closed
     .accesskey = c
 
 sitedata-delete-on-close-private-browsing = In permanent private browsing mode, cookies and site data will always be cleared when { -brand-short-name } is closed.
--- a/browser/themes/linux/jar.mn
+++ b/browser/themes/linux/jar.mn
@@ -4,22 +4,21 @@
 
 browser.jar:
 % skin browser classic/1.0 %skin/classic/browser/
 #include ../shared/jar.inc.mn
   skin/classic/browser/sanitizeDialog.css
 * skin/classic/browser/syncedtabs/sidebar.css     (syncedtabs/sidebar.css)
 * skin/classic/browser/browser.css
 * skin/classic/browser/compacttheme.css
-  skin/classic/browser/monitor.png
-  skin/classic/browser/monitor_16-10.png
+  skin/classic/browser/monitor-base.png
+  skin/classic/browser/monitor-border.png
 * skin/classic/browser/pageInfo.css
   skin/classic/browser/pageInfo.png
 * skin/classic/browser/searchbar.css
-  skin/classic/browser/setDesktopBackground.css
   skin/classic/browser/slowStartup-16.png
   skin/classic/browser/webRTC-indicator.css  (../shared/webRTC-indicator.css)
 * skin/classic/browser/controlcenter/panel.css        (controlcenter/panel.css)
 * skin/classic/browser/customizableui/panelUI.css (customizableui/panelUI.css)
 * skin/classic/browser/downloads/allDownloadsView.css   (downloads/allDownloadsView.css)
 * skin/classic/browser/downloads/downloads.css        (downloads/downloads.css)
   skin/classic/browser/notification-icons/geo-blocked.svg  (notification-icons/geo-blocked.svg)
   skin/classic/browser/notification-icons/geo-detailed.svg (notification-icons/geo-det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t=%vABQ3g@1Fc}zE84;jv9X1Pd1!mTQQ;q62Ja3T7mhrlb~pXtuEslZJS7%
z*uk1ztLfOgeQ)9^1ai-!vc8EeCvNQbGRM-m?sCEBqIYnwD=p8M%Q5F$MJ`+nsuI|L
zR@DNWL#KCXXKa1kTPN&1WWl{2s6-2I4YMZ_tgkZGV$DhIJ@wz{eb{tg#qZuK-4N+c
z3o<*yY7{zrcAJjbmJ}T3Ga6jlG%Ar&zN2YzFVJlCyZmT=y-sT%&6+K6rmx0KJENDP
z?L6XwB29grn9e$6<(mu!PL@*k*@a_8q?!wFTh^h6U+>=dJ%6I?g9kaSD80#akbUF)
w*v*pXnNESfzTVs3@Pe^Ec0+D{d-omD&~AgM=(3aK{5t`T_O5o1Y=h7K137gv*Z=?k
deleted file mode 100644
index 0f8c616f78d5c65b2c190f9364c1a48941d21c61..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index f6e87b14c12ff131697a1fc2e47d5fc3bebcfae5..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/themes/osx/jar.mn
+++ b/browser/themes/osx/jar.mn
@@ -12,19 +12,18 @@ browser.jar:
 * skin/classic/browser/pageInfo.css
 * skin/classic/browser/searchbar.css
   skin/classic/browser/slowStartup-16.png
   skin/classic/browser/webRTC-indicator.css
 * skin/classic/browser/controlcenter/panel.css        (controlcenter/panel.css)
 * skin/classic/browser/customizableui/panelUI.css    (customizableui/panelUI.css)
 * skin/classic/browser/downloads/allDownloadsView.css (downloads/allDownloadsView.css)
 * skin/classic/browser/downloads/downloads.css              (downloads/downloads.css)
-  skin/classic/browser/setDesktopBackground.css
-  skin/classic/browser/monitor.png
-  skin/classic/browser/monitor_16-10.png
+  skin/classic/browser/monitor-base.png
+  skin/classic/browser/monitor-border.png
   skin/classic/browser/notification-icons/geo-blocked.svg  (notification-icons/geo-blocked.svg)
   skin/classic/browser/notification-icons/geo.svg          (notification-icons/geo.svg)
   skin/classic/browser/places/allBookmarks.png              (places/allBookmarks.png)
 * skin/classic/browser/places/sidebar.css                   (places/sidebar.css)
   skin/classic/browser/places/organizer.css                 (places/organizer.css)
   skin/classic/browser/places/toolbar.png                   (places/toolbar.png)
   skin/classic/browser/places/toolbarDropMarker.png         (places/toolbarDropMarker.png)
   skin/classic/browser/places/editBookmark.css              (places/editBookmark.css)
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7b61c6b45b1cb064d5550afcf43a3d7d2a80c578
GIT binary patch
literal 1656
zc$@)v28a2HP)<h;3K|Lk000e1NJLTq006H5000^Y1ONa4Yn;S5000I*Nkl<Zcmd_t
z1B`8LmWT1*f4%!u-A`@X?pR~Q8QZpP+qM~w<8&~dXl%A^Ue(#}nq+6^q~c-SbiU`!
z(#E}2PgW`J5a0HYe}2PrT^0Y}nNR%2m%4HmcZzqr+v2LYhj(><(%a9w+xZphozLd}
zr1xp}Ua8)G#{Ej~eDYQ5z0dV0-mmm}^u5kp7594kBkx~&AAGfXJ?MU=w;y<)gR5eg
z_uY^5{`#X|a_wQRl6w!o`s`2qr*{IqznAG~bu?YLy`2j;-E_l^J>PKMZ8uJL+XdV6
zw08K2$GTd*k8$?F`R6vYpiqVq2aCm-GY8k)<=mNT&YW*&*{&ZfVo}PM^?yU}--gy;
z?%hONwTY>>SgmOjg+>_`ZCaGWCVjCOTVKk+!EK8RF-*kaeIMX~u98Q2$9wyp(rD2N
zl(C&fZ4$SB>&_jV?Qz(j7)tr^w33F12E9j4Hp}u4nL0ruV2Z{tO(et=Wy)52ufwz&
zhBMRlq2*|CaCD}v4lWEwWdd41`ytL<B@gzFr>Pb}Axg=q-xO~7;H(cPxr;NkFHISG
ze@lYUE=g^`RHh|KqW9Yp&FRq?)@Y%u0x1)PRf%yrWl_qxP5HjXQ}3HwVp`pL*ty%T
zl51`}EESFHQGlUN%d+eu5Bm-eXNF~q5?gd3dqA2N(4d>`or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}vCB<TVh>z2=q_KD(D@uVVu5xx!S_JO<X_C42(9KL7lS_xDfMdV~pk
z%MUYJ!7!LY!HbrzRlJe50GV$~X_x7JMP#V$+F;k$&P><~50HA>wd4-VeUzM7f}tNS
zE2mJm*aXtIpU;m<^avtZ-urXPpts>1W?AI=dw6K>W;6g=nImiASOM2OssyjE&u!=R
zTbA^S(?AfGRG`>wetU3BTGfi|HeTYJB@Oz^%kvjse7Rm<U*F%~Cj|u_mD*-EoCi@Y
zDu6k>L2wf)(M6lb23n=Hz*>)HHdH3`vl9D)g+XAVs?<|-Il-(Y7r6r@%As;XKi}zK
z>R*+-SBW`3p}f(Wik&<$>f5Rg={)EJ5Ajwej{#(~aUC#GQX6^|;<uXGcRDk<9U+6y
z&o6IpZ!4g9dU~o<)JqUR*d!xC9z6>oH@0_e&NUZXUm6~ap%yMY!Xa~O16}0E5IwaY
zwMg}9(=YOMp2)LSNF2?fsM2t_Ypk6N3kODZ`pKs<6O|OtrX=CpijhP!OdQ(ED-0Mh
zT}#L<$Kc5;w1lMIz?2Ma&(F_6!utOE?{fGbfBf-p3PZ!jYmNQiQUfELcw$3k2rKzt
z4C-U+3PQzhr+cg%Q$L0<B&cMpBrmae6FmMMLwO|_WuS?UA*{S}{+ZbSXQt%Xs00n)
be*4WY#F5_{uf%Nq00000NkvXXu0mjfP%G46
deleted file mode 100644
index a1c485039fe1e8589fa45aa9ed6dc3d62ef4a17e..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index cf0b555d18f9902b8cf56b2daacfc6353e89b583..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/browser/themes/osx/setDesktopBackground.css
+++ /dev/null
@@ -1,18 +0,0 @@
-/* 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/. */
-
-@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
-@namespace html url("http://www.w3.org/1999/xhtml");
-
-html|canvas#screen {
-  margin: 12px 11px 38px;
-}
-
-#monitor {
-  list-style-image: url("chrome://browser/skin/monitor.png");
-}
-
-#monitor[aspectratio="16:10"] {
-  list-style-image: url("chrome://browser/skin/monitor_16-10.png");
-}
--- a/browser/themes/shared/controlcenter/cryptominers-disabled.svg
+++ b/browser/themes/shared/controlcenter/cryptominers-disabled.svg
@@ -1,7 +1,7 @@
 <!-- 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/. -->
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="context-fill" fill-opacity="context-fill-opacity">
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="context-fill" fill-opacity="context-fill-opacity">
   <path d="M14.71 1.29a1 1 0 0 0-1.42 0l-.7.71H9v-.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5V2H5a2 2 0 0 0-1.6.8L2.2 4.4A1 1 0 0 0 3 6h4v1.59l-5.71 5.7a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l12-12a1 1 0 0 0 0-1.42z"/>
   <path d="M7 14.5a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5V10l-2 2z"/>
 </svg>
--- a/browser/themes/shared/controlcenter/cryptominers.svg
+++ b/browser/themes/shared/controlcenter/cryptominers.svg
@@ -1,6 +1,6 @@
 <!-- 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/. -->
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="context-fill" fill-opacity="context-fill-opacity">
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="context-fill" fill-opacity="context-fill-opacity">
   <path d="M13 2H9v-.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5V2H5a2 2 0 0 0-1.6.8L2.2 4.4A1 1 0 0 0 3 6h4v8.5a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5V6h4z"/>
 </svg>
--- a/browser/themes/shared/controlcenter/fingerprinters-disabled.svg
+++ b/browser/themes/shared/controlcenter/fingerprinters-disabled.svg
@@ -1,8 +1,8 @@
 <!-- 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/. -->
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="context-fill" fill-opacity="context-fill-opacity">
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="context-fill" fill-opacity="context-fill-opacity">
   <path d="M14.71 1.29a1 1 0 0 0-1.42 0l-.56.57A7 7 0 0 0 1 7a1 1 0 0 0 2 0 5 5 0 0 1 5-5 5 5 0 0 1 3.31 1.28l-.7.7A4 4 0 0 0 8 3a4 4 0 0 0-4 4 2 2 0 0 1-2 2 1 1 0 0 0 0 2 3.86 3.86 0 0 0 2.33-.75l-3 3a.91.91 0 0 0-.08.13.82.82 0 0 0-.11.17 1.17 1.17 0 0 0-.06.2A.86.86 0 0 0 1 14a.61.61 0 0 0 0 .23.62.62 0 0 0 0 .13v.08a.76.76 0 0 0 .12.19s0 .06.06.09a1 1 0 0 0 1.42 0l12-12a1 1 0 0 0 .11-1.43zM6 7a2 2 0 0 1 2-2 1.94 1.94 0 0 1 1.18.41l-.72.72A.91.91 0 0 0 8 6a1 1 0 0 0-1 1 4.76 4.76 0 0 1-.06.65L5.12 9.47A4.1 4.1 0 0 0 6 7z"/>
   <path d="M9.68 9.32a8.06 8.06 0 0 1-1.42 2.48 11 11 0 0 0-1.15 1.75 1 1 0 0 0 .44 1.34A.93.93 0 0 0 8 15a1 1 0 0 0 .89-.55 9.74 9.74 0 0 1 1-1.44A8.84 8.84 0 0 0 12 7z"/>
   <path d="M12.91 6.09A5.5 5.5 0 0 1 13 7a8.24 8.24 0 0 1-1.14 4.28A5.75 5.75 0 0 0 11 14a1 1 0 0 0 2 0 3.91 3.91 0 0 1 .63-1.79A10.18 10.18 0 0 0 15 7a6.81 6.81 0 0 0-.48-2.52z"/>
 </svg>
--- a/browser/themes/shared/controlcenter/fingerprinters.svg
+++ b/browser/themes/shared/controlcenter/fingerprinters.svg
@@ -1,8 +1,8 @@
 <!-- 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/. -->
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="context-fill" fill-opacity="context-fill-opacity">
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="context-fill" fill-opacity="context-fill-opacity">
   <path d="M8 0a7 7 0 0 0-7 7 1 1 0 0 0 2 0 5 5 0 0 1 10 0 8.24 8.24 0 0 1-1.14 4.28A5.75 5.75 0 0 0 11 14a1 1 0 0 0 2 0 3.91 3.91 0 0 1 .63-1.79A10.18 10.18 0 0 0 15 7a7 7 0 0 0-7-7z"/>
   <path d="M8 3a4 4 0 0 0-4 4 2 2 0 0 1-2 2 1 1 0 0 0 0 2 4 4 0 0 0 4-4 2 2 0 0 1 4 0 6.88 6.88 0 0 1-1.74 4.8 11 11 0 0 0-1.15 1.75 1 1 0 0 0 .44 1.34A.93.93 0 0 0 8 15a1 1 0 0 0 .89-.55 9.74 9.74 0 0 1 1-1.44A8.84 8.84 0 0 0 12 7a4 4 0 0 0-4-4z"/>
   <path d="M8 6a1 1 0 0 0-1 1c0 4.21-5.26 6-5.32 6.05a1 1 0 0 0-.63 1.27A1 1 0 0 0 2 15a1.25 1.25 0 0 0 .32 0C2.59 14.86 9 12.66 9 7a1 1 0 0 0-1-1z"/>
 </svg>
--- a/browser/themes/shared/controlcenter/panel.inc.css
+++ b/browser/themes/shared/controlcenter/panel.inc.css
@@ -449,16 +449,18 @@ description#identity-popup-content-verif
 
 .identity-popup-content-blocking-list-state-label {
   -moz-box-flex: 1;
   text-align: end;
   margin-inline-start: 5px;
   margin-inline-end: 2px;
 }
 
+.identity-popup-fingerprintersView-icon,
+.identity-popup-cryptominersView-icon,
 .identity-popup-trackersView-icon,
 .identity-popup-cookiesView-icon {
   margin-inline-end: 10px;
   -moz-context-properties: fill, fill-opacity;
 }
 
 .identity-popup-trackersView-icon {
   list-style-image: url(chrome://browser/skin/controlcenter/trackers-disabled.svg);
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -11,16 +11,17 @@
   skin/classic/browser/aboutNetError-new.css                   (../shared/aboutNetError-new.css)
   skin/classic/browser/blockedSite.css                         (../shared/blockedSite.css)
   skin/classic/browser/error-pages.css                         (../shared/error-pages.css)
   skin/classic/browser/aboutRestartRequired.css                (../shared/aboutRestartRequired.css)
 * skin/classic/browser/aboutSessionRestore.css                 (../shared/aboutSessionRestore.css)
   skin/classic/browser/aboutLibrary.css                        (../shared/aboutLibrary.css)
   skin/classic/browser/aboutTabCrashed.css                     (../shared/aboutTabCrashed.css)
   skin/classic/browser/aboutWelcomeBack.css                    (../shared/aboutWelcomeBack.css)
+  skin/classic/browser/setDesktopBackground.css                (../shared/setDesktopBackground.css)
   skin/classic/browser/addons/addon-install-blocked.svg        (../shared/addons/addon-install-blocked.svg)
   skin/classic/browser/addons/addon-install-confirm.svg        (../shared/addons/addon-install-confirm.svg)
   skin/classic/browser/addons/addon-install-downloading.svg    (../shared/addons/addon-install-downloading.svg)
   skin/classic/browser/addons/addon-install-error.svg          (../shared/addons/addon-install-error.svg)
   skin/classic/browser/addons/addon-install-installed.svg      (../shared/addons/addon-install-installed.svg)
   skin/classic/browser/addons/addon-install-warning.svg        (../shared/addons/addon-install-warning.svg)
   skin/classic/browser/addons/addon-private-browsing.svg       (../shared/addons/addon-private-browsing.svg)
   skin/classic/browser/controlcenter/3rdpartycookies.svg       (../shared/controlcenter/3rdpartycookies.svg)
rename from browser/themes/linux/setDesktopBackground.css
rename to browser/themes/shared/setDesktopBackground.css
--- a/browser/themes/linux/setDesktopBackground.css
+++ b/browser/themes/shared/setDesktopBackground.css
@@ -1,18 +1,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/. */
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 @namespace html url("http://www.w3.org/1999/xhtml");
 
 html|canvas#screen {
-  margin: 12px 11px 32px;
+  border-style: solid;
+  border-width: 12px 11px;
+  border-image: url("chrome://browser/skin/monitor-border.png") 12 11 stretch;
 }
 
-#monitor {
-  list-style-image: url("chrome://browser/skin/monitor.png");
+#monitor-base {
+  list-style-image: url("chrome://browser/skin/monitor-base.png");
 }
-
-#monitor[aspectratio="16:10"] {
-  list-style-image: url("chrome://browser/skin/monitor_16-10.png");
-}
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -4,22 +4,21 @@
 
 browser.jar:
 % skin browser classic/1.0 %skin/classic/browser/
 #include ../shared/jar.inc.mn
   skin/classic/browser/sanitizeDialog.css
 * skin/classic/browser/syncedtabs/sidebar.css     (syncedtabs/sidebar.css)
 * skin/classic/browser/browser.css
 * skin/classic/browser/compacttheme.css
-  skin/classic/browser/monitor.png
-  skin/classic/browser/monitor_16-10.png
+  skin/classic/browser/monitor-base.png
+  skin/classic/browser/monitor-border.png
   skin/classic/browser/pageInfo.css
   skin/classic/browser/pageInfo.png
 * skin/classic/browser/searchbar.css
-  skin/classic/browser/setDesktopBackground.css
   skin/classic/browser/slowStartup-16.png
   skin/classic/browser/webRTC-indicator.css  (../shared/webRTC-indicator.css)
 * skin/classic/browser/controlcenter/panel.css                 (controlcenter/panel.css)
 * skin/classic/browser/customizableui/panelUI.css       (customizableui/panelUI.css)
 * skin/classic/browser/downloads/allDownloadsView.css   (downloads/allDownloadsView.css)
 * skin/classic/browser/downloads/downloads.css                 (downloads/downloads.css)
   skin/classic/browser/notification-icons/geo-blocked.svg      (notification-icons/geo-blocked.svg)
   skin/classic/browser/notification-icons/geo-detailed.svg     (notification-icons/geo-detailed.svg)
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..45a241021713df9f21b7415019e62392ca1b569c
GIT binary patch
literal 1087
zc$@)01i<@=P)<h;3K|Lk000e1NJLTq003S9000yS1ONa4t{6h^000CANkl<ZcmZN$
zAPq1|^syBH+AE7KTW%f-f3jV5s_CBo|1dK%^C)?XOv4Wme6%|X%`yu!r@6bj%C=HV
zOM|*$=Iy%;DqXED$v$2AJ&<_kBHrU?An@~`Qu+PxGh+w-CiqW$j{JT|zpcBlV9Dlr
zn=8xpW!+$N>u%-uLE*|ryEnt`{_fGvhudtk!!i29;^t_%;F3#DT+m$5oRiMhvpAzU
zO*SMc3eFEWBJq2m=VDd?F$$V>Z~T(a<&*sB(MS5h?)z`Q&HD_eif=Bx^TY$oTgwgY
z#nM$2A7Jwwm3`iz=l8(boX3JW1o2sPA_47(cjUGH)i+LVy+oE9o;v55@$^xPs(FAa
zGtAFXls(>&LlAx%bf!cB`F@XcIg1XRn-xb@0Sy5HfhdXe*_SWKLt977N+hBLM*FCC
zf(#@wLIsq9u*awDl0^V0KS6vz1&1PFgy<%-u)-PqpFsAGH|8NYs04~kq*BNPUF@b^
zQCYBHowaFnENBTtl2JTVWVAG(XP4e(D-diwqURVjuVNCF3Lq}i{Vcjk%M(Wg`$wQ<
zb0WY9G&Cdx!9byBpIvs?W0yk)8Yv`9WJ@ylfKcsZHVY&6Wns2e@URgBN<eI=305-2
zMn*B1x4Mu4C=66aviVm}trEdw6tk*(jHv5ba6EB9fkJ9%Sz$p(J29F=AX<H@)iIF0
z>SAHUcM!qO-d@z~k<sO=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5(*pF{8yc*cd~^_(AI_WOCQB0Y&GvTJ;uDegjIc)TK_}1V_%}HF#=#!^zUy
zAxr?@<8!LEdVvkvS&A}$JW$o1YQD7<0GKn5?@$1ZJg?bG9#z*f1e_L~G~emm32nJr
zUNI{x?~U(BNEV0~q|2;6XgXswZ9qu&x^(sad(3H#DiB@6?nuFchAp_^kE_d?v)E6y
zwTs28?t=%vABQ3g@1Fc}zE84;jv9X1Pd1!mTQQ;q62Ja3T7mhrlb~pXtuEslZJS7%
z*uk1ztLfOgeQ)9^1ai-!vc8EeCvNQbGRM-m?sCEBqIYnwD=p8M%Q5F$MJ`+nsuI|L
zR@DNWL#KCXXKa1kTPN&1WWl{2s6-2I4YMZ_tgkZGV$DhIJ@wz{eb{tg#qZuK-4N+c
z3o<*yY7{zrcAJjbmJ}T3Ga6jlG%Ar&zN2YzFVJlCyZmT=y-sT%&6+K6rmx0KJENDP
z?L6XwB29grn9e$6<(mu!PL@*k*@a_8q?!wFTh^h6U+>=dJ%6I?g9kaSD80#akbUF)
w*v*pXnNESfzTVs3@Pe^Ec0+D{d-omD&~AgM=(3aK{5t`T_O5o1Y=h7K137gv*Z=?k
deleted file mode 100644
index a3f7d7fac943de8729c1345bf49c2cc4d5f659e9..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 6413f64f7d67f961a9393408cfc28575da6a8fef..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/browser/themes/windows/setDesktopBackground.css
+++ /dev/null
@@ -1,18 +0,0 @@
-/* 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/. */
-
-@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
-@namespace html url("http://www.w3.org/1999/xhtml");
-
-html|canvas#screen {
-  margin: 12px 11px 32px;
-}
-
-#monitor {
-  list-style-image: url("chrome://browser/skin/monitor.png");
-}
-
-#monitor[aspectratio="16:10"] {
-  list-style-image: url("chrome://browser/skin/monitor_16-10.png");
-}
--- a/devtools/client/debugger/new/src/actions/sources/tests/loadSource.spec.js
+++ b/devtools/client/debugger/new/src/actions/sources/tests/loadSource.spec.js
@@ -2,16 +2,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/>. */
 
 // @flow
 
 import {
   actions,
   selectors,
+  watchForState,
   createStore,
   makeSource
 } from "../../../utils/test-head";
 import { sourceThreadClient } from "../../tests/helpers/threadClient.js";
 
 describe("loadSourceText", () => {
   it("should load source text", async () => {
     const store = createStore(sourceThreadClient);
@@ -112,23 +113,30 @@ describe("loadSourceText", () => {
 
     await dispatch(actions.loadSourceText(prevSource));
     const curSource = selectors.getSource(getState(), "foo1");
 
     expect(prevSource === curSource).toBeTruthy();
   });
 
   it("should indicate a loading source", async () => {
-    const { dispatch, getState } = createStore(sourceThreadClient);
+    const store = createStore(sourceThreadClient);
+    const { dispatch } = store;
+
+    const source = makeSource("foo2");
+    await dispatch(actions.newSource(source));
 
-    // Don't block on this so we can check the loading state.
-    const source = makeSource("foo1");
-    dispatch(actions.loadSourceText(source));
-    const fooSource = selectors.getSource(getState(), "foo1");
-    expect(fooSource && fooSource.loadedState).toEqual("loading");
+    const wasLoading = watchForState(store, state => {
+      const fooSource = selectors.getSource(state, "foo2");
+      return fooSource && fooSource.loadedState === "loading";
+    });
+
+    await dispatch(actions.loadSourceText(source));
+
+    expect(wasLoading()).toBe(true);
   });
 
   it("should indicate an errored source text", async () => {
     const { dispatch, getState } = createStore(sourceThreadClient);
 
     const source = makeSource("bad-id");
     await dispatch(actions.newSource(source));
     await dispatch(actions.loadSourceText(source));
--- a/devtools/client/debugger/new/src/client/index.js
+++ b/devtools/client/debugger/new/src/client/index.js
@@ -2,17 +2,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/>. */
 
 // @flow
 
 import * as firefox from "./firefox";
 import * as chrome from "./chrome";
 
-import { prefs, asyncStore } from "../utils/prefs";
+import { prefs, asyncStore, verifyPrefSchema } from "../utils/prefs";
 import { setupHelper } from "../utils/dbg";
 
 import {
   bootstrapApp,
   bootstrapStore,
   bootstrapWorkers
 } from "../utils/bootstrap";
 import { initialBreakpointsState } from "../reducers/breakpoints";
@@ -72,16 +72,18 @@ export async function onConnect(
   sourceMaps: Object,
   panel: Panel
 ) {
   // NOTE: the landing page does not connect to a JS process
   if (!connection) {
     return;
   }
 
+  verifyPrefSchema();
+
   const client = getClient(connection);
   const commands = client.clientCommands;
 
   const initialState = await loadInitialState();
 
   const { store, actions, selectors } = bootstrapStore(
     commands,
     sourceMaps,
--- a/devtools/client/debugger/new/src/reducers/sources.js
+++ b/devtools/client/debugger/new/src/reducers/sources.js
@@ -174,16 +174,25 @@ function update(
 }
 
 /*
  * Update a source when its state changes
  * e.g. the text was loaded, it was blackboxed
  */
 function updateSource(state: SourcesState, source: Object) {
   const existingSource = state.sources[source.id];
+
+  // If there is no existing version of the source, it means that we probably
+  // ended up here as a result of an async action, and the sources were cleared
+  // between the action starting and the source being updated.
+  if (!existingSource) {
+    // TODO: We may want to consider throwing here once we have a better
+    // handle on async action flow control.
+    return state;
+  }
   return {
     ...state,
     sources: {
       ...state.sources,
       [source.id]: { ...existingSource, ...source }
     }
   };
 }
--- a/devtools/client/debugger/new/src/utils/prefs.js
+++ b/devtools/client/debugger/new/src/utils/prefs.js
@@ -1,20 +1,20 @@
 /* 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/>. */
 
 // @flow
 
 import { PrefsHelper } from "devtools-modules";
-import { isDevelopment, isTesting } from "devtools-environment";
+import { isDevelopment } from "devtools-environment";
 import Services from "devtools-services";
 import { asyncStoreHelper } from "./asyncStoreHelper";
 
-const prefsSchemaVersion = "1.0.8";
+const prefsSchemaVersion = "1.0.9";
 const pref = Services.pref;
 
 if (isDevelopment()) {
   pref("devtools.debugger.logging", false);
   pref("devtools.debugger.alphabetize-outline", false);
   pref("devtools.debugger.auto-pretty-print", false);
   pref("devtools.source-map.client-service.enabled", true);
   pref("devtools.chrome.enabled", false);
@@ -127,15 +127,17 @@ export const features = new PrefsHelper(
 
 export const asyncStore = asyncStoreHelper("debugger", {
   pendingBreakpoints: ["pending-breakpoints", {}],
   tabs: ["tabs", []],
   xhrBreakpoints: ["xhr-breakpoints", []],
   eventListenerBreakpoints: ["event-listener-breakpoints", []]
 });
 
-if (!isTesting && prefs.debuggerPrefsSchemaVersion !== prefsSchemaVersion) {
-  // clear pending Breakpoints
-  asyncStore.pendingBreakpoints = {};
-  asyncStore.tabs = [];
-  asyncStore.xhrBreakpoints = [];
-  prefs.debuggerPrefsSchemaVersion = prefsSchemaVersion;
+export function verifyPrefSchema() {
+  if (prefs.debuggerPrefsSchemaVersion !== prefsSchemaVersion) {
+    // clear pending Breakpoints
+    asyncStore.pendingBreakpoints = {};
+    asyncStore.tabs = [];
+    asyncStore.xhrBreakpoints = [];
+    prefs.debuggerPrefsSchemaVersion = prefsSchemaVersion;
+  }
 }
--- a/devtools/client/debugger/new/src/utils/test-head.js
+++ b/devtools/client/debugger/new/src/utils/test-head.js
@@ -98,17 +98,18 @@ function makeSource(name: string, props:
     ]
   };
   return (rv: any);
 }
 
 function makeOriginalSource(name: string, props?: Object): Source {
   const rv = {
     ...makeSourceRaw(name, props),
-    id: `${name}/originalSource`
+    id: `${name}/originalSource`,
+    actors: []
   };
   return (rv: any);
 }
 
 function makeFuncLocation(startLine, endLine) {
   if (!endLine) {
     endLine = startLine + 1;
   }
@@ -152,26 +153,54 @@ function waitForState(store: any, predic
       if (ret) {
         unsubscribe();
         resolve(ret);
       }
     });
   });
 }
 
+function watchForState(store: any, predicate: any): () => boolean {
+  let sawState = false;
+  const checkState = function() {
+    if (!sawState && predicate(store.getState())) {
+      sawState = true;
+    }
+    return sawState;
+  };
+
+  let unsubscribe;
+  if (!checkState()) {
+    unsubscribe = store.subscribe(() => {
+      if (checkState()) {
+        unsubscribe();
+      }
+    });
+  }
+
+  return function read() {
+    if (unsubscribe) {
+      unsubscribe();
+    }
+
+    return sawState;
+  };
+}
+
 function getTelemetryEvents(eventName: string) {
   return window.dbg._telemetry.events[eventName] || [];
 }
 
 export {
   actions,
   selectors,
   reducers,
   createStore,
   commonLog,
   getTelemetryEvents,
   makeFrame,
   makeSource,
   makeOriginalSource,
   makeSymbolDeclaration,
   waitForState,
+  watchForState,
   getHistory
 };
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -2370,17 +2370,17 @@ void nsGlobalWindowOuter::ClearStatus() 
 
 void nsGlobalWindowOuter::SetDocShell(nsDocShell* aDocShell) {
   MOZ_ASSERT(aDocShell);
 
   if (aDocShell == mDocShell) {
     return;
   }
 
-  mDocShell = aDocShell;  // Weak Reference
+  mDocShell = aDocShell;
   mBrowsingContext = aDocShell->GetBrowsingContext();
 
   nsCOMPtr<nsPIDOMWindowOuter> parentWindow = GetScriptableParentOrNull();
   MOZ_RELEASE_ASSERT(!parentWindow || !mTabGroup ||
                      mTabGroup ==
                          nsGlobalWindowOuter::Cast(parentWindow)->mTabGroup);
 
   mTopLevelOuterContentWindow =
@@ -2463,17 +2463,17 @@ void nsGlobalWindowOuter::DetachFromDocS
     // param. We also trigger a full GC for chrome windows.
     nsJSContext::PokeGC(JS::GCReason::SET_DOC_SHELL,
                         (mTopLevelOuterContentWindow || mIsChrome)
                             ? nullptr
                             : GetWrapperPreserveColor());
     mContext = nullptr;
   }
 
-  mDocShell = nullptr;  // Weak Reference
+  mDocShell = nullptr;
 
   if (mFrames) {
     mFrames->SetDocShell(nullptr);
   }
 
   MaybeForgiveSpamCount();
   CleanUp();
 }
@@ -7801,17 +7801,16 @@ mozilla::dom::DocGroup* nsPIDOMWindowOut
   if (doc) {
     return doc->GetDocGroup();
   }
   return nullptr;
 }
 
 nsPIDOMWindowOuter::nsPIDOMWindowOuter(uint64_t aWindowID)
     : mFrameElement(nullptr),
-      mDocShell(nullptr),
       mModalStateDepth(0),
       mIsActive(false),
       mIsBackground(false),
       mMediaSuspend(
           Preferences::GetBool("media.block-autoplay-until-in-foreground", true)
               ? nsISuspendedTypes::SUSPENDED_BLOCK
               : nsISuspendedTypes::NONE_SUSPENDED),
       mAudioMuted(false),
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -3631,81 +3631,41 @@ void EventStateManager::SetPresContext(n
 }
 
 void EventStateManager::ClearFrameRefs(nsIFrame* aFrame) {
   if (aFrame && aFrame == mCurrentTarget) {
     mCurrentTargetContent = aFrame->GetContent();
   }
 }
 
-static Maybe<gfx::IntPoint> ComputeHotspot(const nsIFrame::Cursor& aCursor) {
-  if (!aCursor.mContainer) {
-    return {};
-  }
-
-  // css3-ui says to use the CSS-specified hotspot if present,
-  // otherwise use the intrinsic hotspot, otherwise use the top left
-  // corner.
-  uint32_t hotspotX, hotspotY;
-  if (aCursor.mHaveHotspot) {
-    int32_t imgWidth, imgHeight;
-    aCursor.mContainer->GetWidth(&imgWidth);
-    aCursor.mContainer->GetHeight(&imgHeight);
-
-    // XXX std::max(NS_lround(x), 0)?
-    hotspotX = aCursor.mHotspotX > 0.0f ? uint32_t(aCursor.mHotspotX + 0.5f)
-                                        : uint32_t(0);
-    if (hotspotX >= uint32_t(imgWidth)) hotspotX = imgWidth - 1;
-    hotspotY = aCursor.mHotspotY > 0.0f ? uint32_t(aCursor.mHotspotY + 0.5f)
-                                        : uint32_t(0);
-    if (hotspotY >= uint32_t(imgHeight)) hotspotY = imgHeight - 1;
-  } else {
-    hotspotX = 0;
-    hotspotY = 0;
-    nsCOMPtr<nsIProperties> props(do_QueryInterface(aCursor.mContainer));
-    if (props) {
-      nsCOMPtr<nsISupportsPRUint32> hotspotXWrap, hotspotYWrap;
-
-      props->Get("hotspotX", NS_GET_IID(nsISupportsPRUint32),
-                 getter_AddRefs(hotspotXWrap));
-      props->Get("hotspotY", NS_GET_IID(nsISupportsPRUint32),
-                 getter_AddRefs(hotspotYWrap));
-
-      if (hotspotXWrap) hotspotXWrap->GetData(&hotspotX);
-      if (hotspotYWrap) hotspotYWrap->GetData(&hotspotY);
-    }
-  }
-
-  return Some(gfx::IntPoint{hotspotX, hotspotY});
-}
+struct CursorImage {
+  gfx::IntPoint mHotspot;
+  nsCOMPtr<imgIContainer> mContainer;
+  bool mEarlierCursorLoading = false;
+};
 
 // Given the event that we're processing, and the computed cursor and hotspot,
 // determine whether the custom CSS cursor should be blocked (that is, not
 // honored).
 //
 // We will not honor it all of the following are true:
 //
 //  * layout.cursor.block.enabled is true.
 //  * the size of the custom cursor is bigger than layout.cursor.block.max-size.
 //  * the bounds of the cursor would end up outside of the viewport of the
 //    top-level content document.
 //
 // This is done in order to prevent hijacking the cursor, see bug 1445844 and
 // co.
 static bool ShouldBlockCustomCursor(nsPresContext* aPresContext,
                                     WidgetEvent* aEvent,
-                                    const nsIFrame::Cursor& aCursor,
-                                    const Maybe<gfx::IntPoint>& aHotspot) {
+                                    const CursorImage& aCursor) {
   if (!StaticPrefs::layout_cursor_block_enabled()) {
     return false;
   }
-  if (!aCursor.mContainer) {
-    return false;
-  }
-  MOZ_ASSERT(aHotspot);
 
   int32_t width = 0;
   int32_t height = 0;
   aCursor.mContainer->GetWidth(&width);
   aCursor.mContainer->GetHeight(&height);
 
   int32_t maxSize = StaticPrefs::layout_cursor_block_max_size();
 
@@ -3723,72 +3683,154 @@ static bool ShouldBlockCustomCursor(nsPr
   if (!topLevel) {
     return false;
   }
 
   nsPoint point = nsLayoutUtils::GetEventCoordinatesRelativeTo(
       aEvent, topLevel->PresShell()->GetRootFrame());
 
   nsSize size(CSSPixel::ToAppUnits(width), CSSPixel::ToAppUnits(height));
-  nsPoint hotspot(CSSPixel::ToAppUnits(aHotspot->x),
-                  CSSPixel::ToAppUnits(aHotspot->y));
+  nsPoint hotspot(CSSPixel::ToAppUnits(aCursor.mHotspot.x),
+                  CSSPixel::ToAppUnits(aCursor.mHotspot.y));
 
   nsRect cursorRect(point - hotspot, size);
   return !topLevel->GetVisibleArea().Contains(cursorRect);
 }
 
+static gfx::IntPoint ComputeHotspot(imgIContainer* aContainer,
+                                    const Maybe<gfx::Point>& aHotspot) {
+  MOZ_ASSERT(aContainer);
+  // css3-ui says to use the CSS-specified hotspot if present,
+  // otherwise use the intrinsic hotspot, otherwise use the top left
+  // corner.
+  uint32_t hotspotX, hotspotY;
+  if (aHotspot) {
+    int32_t imgWidth, imgHeight;
+    aContainer->GetWidth(&imgWidth);
+    aContainer->GetHeight(&imgHeight);
+
+    // XXX std::max(NS_lround(x), 0)?
+    hotspotX = aHotspot->x > 0.0f ? uint32_t(aHotspot->x + 0.5f) : uint32_t(0);
+    if (hotspotX >= uint32_t(imgWidth)) hotspotX = imgWidth - 1;
+    hotspotY = aHotspot->y > 0.0f ? uint32_t(aHotspot->y + 0.5f) : uint32_t(0);
+    if (hotspotY >= uint32_t(imgHeight)) hotspotY = imgHeight - 1;
+  } else {
+    hotspotX = 0;
+    hotspotY = 0;
+    nsCOMPtr<nsIProperties> props(do_QueryInterface(aContainer));
+    if (props) {
+      nsCOMPtr<nsISupportsPRUint32> hotspotXWrap, hotspotYWrap;
+
+      props->Get("hotspotX", NS_GET_IID(nsISupportsPRUint32),
+                 getter_AddRefs(hotspotXWrap));
+      props->Get("hotspotY", NS_GET_IID(nsISupportsPRUint32),
+                 getter_AddRefs(hotspotYWrap));
+
+      if (hotspotXWrap) hotspotXWrap->GetData(&hotspotX);
+      if (hotspotYWrap) hotspotYWrap->GetData(&hotspotY);
+    }
+  }
+  return {hotspotX, hotspotY};
+}
+
+static CursorImage ComputeCustomCursor(nsPresContext* aPresContext,
+                                       WidgetEvent* aEvent,
+                                       const nsIFrame& aFrame,
+                                       const nsIFrame::Cursor& aCursor) {
+  if (aCursor.mAllowCustomCursor == nsIFrame::AllowCustomCursorImage::No) {
+    return {};
+  }
+  const ComputedStyle& style =
+      aCursor.mStyle ? *aCursor.mStyle : *aFrame.Style();
+
+  // If we are falling back because any cursor before us is loading, let the
+  // consumer know.
+  bool loading = false;
+  for (const nsCursorImage& image : style.StyleUI()->mCursorImages) {
+    uint32_t status;
+    imgRequestProxy* req = image.GetImage();
+    if (!req || NS_FAILED(req->GetImageStatus(&status))) {
+      continue;
+    }
+    if (!(status & imgIRequest::STATUS_LOAD_COMPLETE)) {
+      loading = true;
+      continue;
+    }
+    if (status & imgIRequest::STATUS_ERROR) {
+      continue;
+    }
+    nsCOMPtr<imgIContainer> container;
+    req->GetImage(getter_AddRefs(container));
+    if (!container) {
+      continue;
+    }
+    Maybe<gfx::Point> specifiedHotspot =
+        image.mHaveHotspot ? Some(gfx::Point{image.mHotspotX, image.mHotspotY})
+                           : Nothing();
+    gfx::IntPoint hotspot = ComputeHotspot(container, specifiedHotspot);
+    CursorImage result{hotspot, std::move(container), loading};
+    if (ShouldBlockCustomCursor(aPresContext, aEvent, result)) {
+      continue;
+    }
+    // This is the one we want!
+    return result;
+  }
+  return {{}, nullptr, loading};
+}
+
 void EventStateManager::UpdateCursor(nsPresContext* aPresContext,
                                      WidgetEvent* aEvent,
                                      nsIFrame* aTargetFrame,
                                      nsEventStatus* aStatus) {
   if (aTargetFrame && IsRemoteTarget(aTargetFrame->GetContent())) {
     return;
   }
 
   auto cursor = StyleCursorKind::Default;
-  imgIContainer* container = nullptr;
+  nsCOMPtr<imgIContainer> container;
   Maybe<gfx::IntPoint> hotspot;
 
   // If cursor is locked just use the locked one
   if (mLockCursor != kInvalidCursorKind) {
     cursor = mLockCursor;
   }
   // If not locked, look for correct cursor
   else if (aTargetFrame) {
-    nsIFrame::Cursor framecursor;
     nsPoint pt =
         nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, aTargetFrame);
+    Maybe<nsIFrame::Cursor> framecursor = aTargetFrame->GetCursor(pt);
     // Avoid setting cursor when the mouse is over a windowless plugin.
-    if (NS_FAILED(aTargetFrame->GetCursor(pt, framecursor))) {
+    if (!framecursor) {
       if (XRE_IsContentProcess()) {
         mLastFrameConsumedSetCursor = true;
       }
       return;
     }
     // Make sure cursors get reset after the mouse leaves a
     // windowless plugin frame.
     if (mLastFrameConsumedSetCursor) {
       ClearCachedWidgetCursor(aTargetFrame);
       mLastFrameConsumedSetCursor = false;
     }
+
+    CursorImage customCursor =
+        ComputeCustomCursor(aPresContext, aEvent, *aTargetFrame, *framecursor);
+
     // If the current cursor is from the same frame, and it is now
     // loading some new image for the cursor, we should wait for a
     // while rather than taking its fallback cursor directly.
-    if (framecursor.mLoading && gLastCursorSourceFrame == aTargetFrame &&
+    if (customCursor.mEarlierCursorLoading &&
+        gLastCursorSourceFrame == aTargetFrame &&
         TimeStamp::NowLoRes() - gLastCursorUpdateTime <
             TimeDuration::FromMilliseconds(kCursorLoadingTimeout)) {
       return;
     }
-    cursor = framecursor.mCursor;
-    container = framecursor.mContainer;
-    hotspot = ComputeHotspot(framecursor);
-
-    if (ShouldBlockCustomCursor(aPresContext, aEvent, framecursor, hotspot)) {
-      container = nullptr;
-    }
+    cursor = framecursor->mCursor;
+    container = customCursor.mContainer.forget();
+    hotspot = Some(customCursor.mHotspot);
   }
 
   if (nsContentUtils::UseActivityCursor()) {
     // Check whether or not to show the busy cursor
     nsCOMPtr<nsIDocShell> docShell(aPresContext->GetDocShell());
     if (!docShell) return;
     auto busyFlags = docShell->GetBusyFlags();
 
--- a/dom/media/gtest/TestGroupId.cpp
+++ b/dom/media/gtest/TestGroupId.cpp
@@ -9,16 +9,17 @@
 #include "gtest/gtest-printers.h"
 #include "gtest/gtest.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/UniquePtr.h"
 #include "nsTArray.h"
 #include "webrtc/MediaEngineSource.h"
 
 using ::testing::Return;
+using namespace mozilla;
 
 void PrintTo(const nsString& aValue, ::std::ostream* aStream) {
   NS_ConvertUTF16toUTF8 str(aValue);
   (*aStream) << str.get();
 }
 void PrintTo(const nsCString& aValue, ::std::ostream* aStream) {
   (*aStream) << aValue.get();
 }
--- a/dom/media/systemservices/moz.build
+++ b/dom/media/systemservices/moz.build
@@ -43,22 +43,16 @@ if CONFIG['OS_TARGET'] == 'Android':
     UNIFIED_SOURCES += [
         'OpenSLESProvider.cpp',
     ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
   UNIFIED_SOURCES += ['OSXRunLoopSingleton.cpp']
   EXPORTS += ['OSXRunLoopSingleton.h']
 
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    # This is intended as a temporary workaround to enable building with VS2015.
-    # media\webrtc\trunk\webrtc/base/criticalsection.h(59): warning C4312:
-    # 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
-    CXXFLAGS += ['-wd4312']
-
 EXPORTS.mozilla += ['ShmemPool.h',]
 
 EXPORTS.mozilla.media += ['CamerasTypes.h',
                           'DeviceChangeCallback.h',
                           'MediaChild.h',
                           'MediaParent.h',
                           'MediaSystemResourceClient.h',
                           'MediaSystemResourceManager.h',
--- a/dom/media/webrtc/moz.build
+++ b/dom/media/webrtc/moz.build
@@ -83,15 +83,8 @@ include('/ipc/chromium/chromium-config.m
 #    android API types
 CXXFLAGS += [
     '-Wno-error=attributes',
     '-Wno-error=shadow',
 ]
 
 DEFINES['TRACING'] = True
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    CXXFLAGS += [
-        '-wd4275', # non dll-interface class used as base for dll-interface class
-        '-wd4312', # This is intended as a temporary hack to support building with VS2015
-                   # 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
-    ]
--- a/dom/plugins/ipc/moz.build
+++ b/dom/plugins/ipc/moz.build
@@ -142,16 +142,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gtk3
 else:
     # Force build against gtk+2 for struct offsets and such.
     CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS']
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
-
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    # This is intended as a temporary hack to support building with VS2015.
-    # conversion from 'X' to 'Y' requires a narrowing conversion
-    CXXFLAGS += ['-wd4838']
-
-    # 'type cast': conversion from 'unsigned int' to 'HIMC' of greater size
-    CXXFLAGS += ['-wd4312']
--- a/dom/plugins/test/testplugin/testplugin.mozbuild
+++ b/dom/plugins/test/testplugin/testplugin.mozbuild
@@ -50,21 +50,16 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
     CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS']
     CFLAGS += CONFIG['MOZ_GTK2_CFLAGS']
     OS_LIBS += CONFIG['MOZ_GTK2_LIBS']
     OS_LIBS += CONFIG['XLDFLAGS']
     OS_LIBS += CONFIG['XLIBS']
     OS_LIBS += CONFIG['XEXT_LIBS']
 
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    # This is intended as a temporary hack to support building with VS2015.
-    # conversion from 'X' to 'Y' requires a narrowing conversion
-    CXXFLAGS += ['-wd4838']
-
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     FINAL_TARGET = 'dist/plugins/%s.plugin/Contents/MacOS' % cocoa_name
     OBJDIR_FILES.dist.plugins['%s.plugin' % cocoa_name].Contents += ['%s/Info.plist' % relative_path]
 else:
     FINAL_TARGET = 'dist/plugins'
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/gfx/layers/apz/src/APZCTreeManager.cpp
+++ b/gfx/layers/apz/src/APZCTreeManager.cpp
@@ -385,16 +385,19 @@ APZCTreeManager::UpdateHitTestingTreeImp
   // and so maintaining a list and removing APZCs that are still alive is much
   // simpler.
   ForEachNode<ReverseIterator>(mRootNode.get(),
                                [&state](HitTestingTreeNode* aNode) {
                                  state.mNodesToDestroy.AppendElement(aNode);
                                });
   mRootNode = nullptr;
   mUsingAsyncZoomContainer = false;
+  int asyncZoomContainerNestingDepth = 0;
+  bool haveMultipleAsyncZoomContainers = false;
+  bool haveRootContentOutsideAsyncZoomContainer = false;
 
   if (aRoot) {
     std::stack<gfx::TreeAutoIndent> indents;
     std::stack<AncestorTransform> ancestorTransforms;
     HitTestingTreeNode* parent = nullptr;
     HitTestingTreeNode* next = nullptr;
     LayersId layersId = aRootLayerTreeId;
     ancestorTransforms.push(AncestorTransform());
@@ -404,17 +407,26 @@ APZCTreeManager::UpdateHitTestingTreeImp
     mTreeLock.AssertCurrentThreadIn();
 
     ForEachNode<ReverseIterator>(
         aRoot,
         [&](ScrollNode aLayerMetrics) {
           mApzcTreeLog << aLayerMetrics.Name() << '\t';
 
           if (aLayerMetrics.IsAsyncZoomContainer()) {
+            if (mUsingAsyncZoomContainer) {
+              haveMultipleAsyncZoomContainers = true;
+            }
             mUsingAsyncZoomContainer = true;
+            ++asyncZoomContainerNestingDepth;
+          }
+
+          if (aLayerMetrics.Metrics().IsRootContent() &&
+              asyncZoomContainerNestingDepth == 0) {
+            haveRootContentOutsideAsyncZoomContainer = true;
           }
 
           HitTestingTreeNode* node = PrepareNodeForLayer(
               lock, aLayerMetrics, aLayerMetrics.Metrics(), layersId,
               ancestorTransforms.top(), parent, next, state);
           MOZ_ASSERT(node);
           AsyncPanZoomController* apzc = node->GetApzc();
           aLayerMetrics.SetApzc(apzc);
@@ -462,26 +474,41 @@ APZCTreeManager::UpdateHitTestingTreeImp
             layersId = *newLayersId;
           }
 
           indents.push(gfx::TreeAutoIndent(mApzcTreeLog));
           state.mParentHasPerspective.push(
               aLayerMetrics.TransformIsPerspective());
         },
         [&](ScrollNode aLayerMetrics) {
+          if (aLayerMetrics.IsAsyncZoomContainer()) {
+            --asyncZoomContainerNestingDepth;
+          }
+
           next = parent;
           parent = parent->GetParent();
           layersId = next->GetLayersId();
           ancestorTransforms.pop();
           indents.pop();
           state.mParentHasPerspective.pop();
         });
 
     mApzcTreeLog << "[end]\n";
 
+    MOZ_ASSERT(
+        !mUsingAsyncZoomContainer || !haveRootContentOutsideAsyncZoomContainer,
+        "If there is an async zoom container, all scroll nodes with root "
+        "content scroll metadata should be inside it");
+    // TODO(bug 1534459): Avoid multiple async zoom containers. They
+    // can't currently occur in production code, but that will become
+    // possible with either OOP iframes or desktop zooming (due to
+    // RDM), and will need to be guarded against.
+    // MOZ_ASSERT(!haveMultipleAsyncZoomContainers,
+    //           "Should only have one async zoom container");
+
     // If we have perspective transforms deferred to children, do another
     // walk of the tree and actually apply them to the children.
     // We can't do this "as we go" in the previous traversal, because by the
     // time we realize we need to defer a perspective transform for an APZC,
     // we may already have processed a previous layer (including children
     // found in its subtree) that shares that APZC.
     if (!state.mPerspectiveTransformsDeferredToChildren.empty()) {
       ForEachNode<ReverseIterator>(
new file mode 100644
--- /dev/null
+++ b/gfx/layers/apz/test/mochitest/helper_hittest_clipped_fixed_modal.html
@@ -0,0 +1,84 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <title>Hit-testing on content covered by a fullscreen fixed-position item clipped away</title>
+  <script type="application/javascript" src="apz_test_utils.js"></script>
+  <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
+  <script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
+  <meta name="viewport" content="width=device-width"/>
+<style>
+.modal
+{
+    position:fixed;
+    z-index:10;
+    width:100%;
+    height:100%;
+    left:0;
+    top:0;
+    clip:rect(1px,1px,1px,1px);
+}
+.modal__content
+{
+    overflow:auto;
+    position:fixed;
+    top:0;
+    left:0;
+    width:100%;
+    height:100%;
+}
+.modal__body
+{
+    position:absolute;
+    top:0;
+    left:0;
+    width:100%;
+    height:100%;
+}
+.content
+{
+    position:fixed;
+    top:0;
+    left:0;
+    width:100%;
+    height:100%;
+    overflow-y:auto
+}
+</style>
+</head>
+<body>
+<div class="content">
+ <div style="height: 5000px; background-image: linear-gradient(red,blue)">
+    Filler to make the content div scrollable
+ </div>
+</div>
+<div class="modal">
+ <div class="modal__content">
+  <div class="modal__body">
+  </div>
+ </div>
+</div>
+</body>
+<script type="application/javascript">
+
+function* test(testDriver) {
+  var config = getHitTestConfig();
+  var utils = config.utils;
+
+  // layerize the scrollable frame
+  var subframe = document.querySelector(".content");
+  utils.setDisplayPortForElement(0, 0, 800, 2000, subframe, 1);
+  yield waitForApzFlushedRepaints(testDriver);
+
+  var target = document.querySelector(".content");
+  checkHitResult(hitTest(centerOf(target)),
+                 APZHitResultFlags.VISIBLE,
+                 utils.getViewId(subframe),
+                 "content covered by a clipped fixed div");
+
+  subtestDone();
+}
+
+waitUntilApzStable().then(runContinuation(test));
+
+</script>
+</html>
--- a/gfx/layers/apz/test/mochitest/test_group_hittest.html
+++ b/gfx/layers/apz/test/mochitest/test_group_hittest.html
@@ -31,16 +31,17 @@ var subtests = [
   {"file": "helper_hittest_fixed_in_scrolled_transform.html", "prefs": prefs},
   {"file": "helper_hittest_float_bug1434846.html", "prefs": prefs},
   {"file": "helper_hittest_float_bug1443518.html", "prefs": prefs},
   {"file": "helper_hittest_checkerboard.html", "prefs": prefs},
   {"file": "helper_hittest_backface_hidden.html", "prefs": prefs},
   {"file": "helper_hittest_touchaction.html", "prefs": prefs},
   {"file": "helper_hittest_nested_transforms_bug1459696.html", "prefs": prefs},
   {"file": "helper_hittest_sticky_bug1478304.html", "prefs": prefs},
+  {"file": "helper_hittest_clipped_fixed_modal.html", "prefs": prefs},
 ];
 
 if (isApzEnabled()) {
   SimpleTest.waitForExplicitFinish();
   window.onload = function() {
     runSubtestsSeriallyInFreshWindows(subtests)
     .then(SimpleTest.finish, SimpleTest.finish);
   };
--- a/gfx/vr/service/moz.build
+++ b/gfx/vr/service/moz.build
@@ -33,14 +33,8 @@ if CONFIG['OS_TARGET'] in ('WINNT', 'Lin
     # OpenVRSession includes MacIOSurface.h which includes Mac headers
     # which define Size and Points types in the root namespace that
     # often conflict with our own types.
     SOURCES += [
         'OpenVRSession.cpp'
     ]
 
 FINAL_LIBRARY = 'xul'
-
-# This is intended as a temporary hack to enable VS2015 builds.
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    # ovr_capi_dynamic.h '<unnamed-tag>': Alignment specifier is less than
-    # actual alignment (8), and will be ignored
-    CXXFLAGS += ['-wd4359']
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -15,27 +15,27 @@ use std::sync::atomic::{AtomicUsize, Ord
 use std::ops::Range;
 use std::os::raw::{c_void, c_char, c_float};
 #[cfg(target_os = "android")]
 use std::os::raw::{c_int};
 use std::time::Duration;
 use gleam::gl;
 
 use webrender::api::*;
+use webrender::api::units::*;
 use webrender::{ReadPixelsFormat, Renderer, RendererOptions, RendererStats, ThreadListener};
 use webrender::{ExternalImage, ExternalImageHandler, ExternalImageSource};
 use webrender::DebugFlags;
 use webrender::{ApiRecordingReceiver, BinaryRecorder};
 use webrender::{AsyncPropertySampler, PipelineInfo, SceneBuilderHooks};
 use webrender::{UploadMethod, VertexUsageHint, ProfilerHooks, set_profiler_hooks};
 use webrender::{Device, Shaders, WrShaders, ShaderPrecacheFlags};
 use thread_profiler::register_thread_with_profiler;
 use moz2d_renderer::Moz2dBlobImageHandler;
 use program_cache::{WrProgramCache, remove_disk_cache};
-use app_units::Au;
 use rayon;
 use euclid::SideOffsets2D;
 use nsstring::nsAString;
 
 #[cfg(target_os = "macos")]
 use core_foundation::string::CFString;
 #[cfg(target_os = "macos")]
 use core_graphics::font::CGFont;
--- a/gfx/webrender_bindings/src/moz2d_renderer.rs
+++ b/gfx/webrender_bindings/src/moz2d_renderer.rs
@@ -2,16 +2,17 @@
 
 //! Provides the webrender-side implementation of gecko blob images.
 //!
 //! Pretty much this is just a shim that calls back into Moz2DImageRenderer, but
 //! it also handles merging "partial" blob images (see `merge_blob_images`) and
 //! registering fonts found in the blob (see `prepare_request`).
 
 use webrender::api::*;
+use webrender::api::units::{BlobDirtyRect, BlobToDeviceTranslation};
 use bindings::{ByteSlice, MutByteSlice, wr_moz2d_render_cb, ArcVecU8, gecko_profiler_start_marker, gecko_profiler_end_marker};
 use rayon::ThreadPool;
 use rayon::prelude::*;
 
 use std::collections::hash_map::HashMap;
 use std::collections::hash_map;
 use std::collections::btree_map::BTreeMap;
 use std::collections::Bound::Included;
@@ -463,17 +464,17 @@ impl GeckoProfilerMarker {
 
 impl Drop for GeckoProfilerMarker {
     fn drop(&mut self) {
         unsafe { gecko_profiler_end_marker(self.name.as_ptr() as *const c_char); }
     }
 }
 
 impl AsyncBlobImageRasterizer for Moz2dBlobRasterizer {
-   
+
     fn rasterize(&mut self, requests: &[BlobImageParams], low_priority: bool) -> Vec<(BlobImageRequest, BlobImageResult)> {
         // All we do here is spin up our workers to callback into gecko to replay the drawing commands.
         let _marker = GeckoProfilerMarker::new(b"BlobRasterization\0");
 
         let requests: Vec<Job> = requests.into_iter().map(|params| {
             let command = &self.blob_commands[&params.request.key];
             let blob = Arc::clone(&command.data);
             Job {
@@ -543,17 +544,17 @@ fn rasterize_blob(job: Job) -> (BlobImag
                 rasterized_rect,
                 data: Arc::new(output),
             })
         } else {
             panic!("Moz2D replay problem");
         }
     };
 
-    (job.request, result)    
+    (job.request, result)
 }
 
 impl BlobImageHandler for Moz2dBlobImageHandler {
     fn add(&mut self, key: BlobImageKey, data: Arc<BlobImageData>, tile_size: Option<TileSize>) {
         {
             let index = BlobReader::new(&data);
             assert!(index.reader.has_more());
         }
--- a/gfx/wr/Cargo.lock
+++ b/gfx/wr/Cargo.lock
@@ -1623,17 +1623,16 @@ dependencies = [
  "dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "webrender"
 version = "0.60.0"
 dependencies = [
- "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 13.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1778,17 +1777,16 @@ dependencies = [
  "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "wrench"
 version = "0.3.0"
 dependencies = [
- "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
  "dwrote 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
--- a/gfx/wr/examples/alpha_perf.rs
+++ b/gfx/wr/examples/alpha_perf.rs
@@ -9,16 +9,18 @@ extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
 use boilerplate::{Example, HandyDandyRectBuilder};
 use std::cmp;
 use webrender::api::*;
+use webrender::api::units::FramebufferIntSize;
+
 
 struct App {
     rect_count: usize,
 }
 
 impl Example for App {
     fn render(
         &mut self,
--- a/gfx/wr/examples/animation.rs
+++ b/gfx/wr/examples/animation.rs
@@ -17,16 +17,18 @@ extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
 use boilerplate::{Example, HandyDandyRectBuilder};
 use euclid::Angle;
 use webrender::api::*;
+use webrender::api::units::*;
+
 
 struct App {
     property_key0: PropertyBindingKey<LayoutTransform>,
     property_key1: PropertyBindingKey<LayoutTransform>,
     property_key2: PropertyBindingKey<LayoutTransform>,
     opacity_key: PropertyBindingKey<f32>,
     opacity: f32,
     angle0: f32,
--- a/gfx/wr/examples/basic.rs
+++ b/gfx/wr/examples/basic.rs
@@ -1,28 +1,29 @@
 /* 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/. */
 
-extern crate app_units;
 extern crate euclid;
 extern crate gleam;
 extern crate glutin;
 extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
 use boilerplate::{Example, HandyDandyRectBuilder};
 use euclid::vec2;
 use winit::TouchPhase;
 use std::collections::HashMap;
 use webrender::ShaderPrecacheFlags;
 use webrender::api::*;
+use webrender::api::units::*;
+
 
 #[derive(Debug)]
 enum Gesture {
     None,
     Pan,
     Zoom,
 }
 
--- a/gfx/wr/examples/blob.rs
+++ b/gfx/wr/examples/blob.rs
@@ -13,16 +13,17 @@ mod boilerplate;
 
 use boilerplate::{Example, HandyDandyRectBuilder};
 use rayon::{ThreadPool, ThreadPoolBuilder};
 use rayon::prelude::*;
 use std::collections::HashMap;
 use std::sync::Arc;
 use webrender::api::{self, DisplayListBuilder, DocumentId, PipelineId, RenderApi, Transaction};
 use webrender::api::{ColorF, SpaceAndClipInfo};
+use webrender::api::units::*;
 use webrender::euclid::size2;
 
 // This example shows how to implement a very basic BlobImageHandler that can only render
 // a checkerboard pattern.
 
 // The deserialized command list internally used by this example is just a color.
 type ImageRenderingCommands = api::ColorU;
 
@@ -42,17 +43,17 @@ fn deserialize_blob(blob: &[u8]) -> Resu
     };
 }
 
 // This is the function that applies the deserialized drawing commands and generates
 // actual image data.
 fn render_blob(
     commands: Arc<ImageRenderingCommands>,
     descriptor: &api::BlobImageDescriptor,
-    tile: Option<api::TileOffset>,
+    tile: Option<TileOffset>,
 ) -> api::BlobImageResult {
     let color = *commands;
 
     // Note: This implementation ignores the dirty rect which isn't incorrect
     // but is a missed optimization.
 
     // Allocate storage for the result. Right now the resource cache expects the
     // tiles to have have no stride or offset.
@@ -135,17 +136,17 @@ impl CheckerboardRenderer {
 }
 
 impl api::BlobImageHandler for CheckerboardRenderer {
     fn add(&mut self, key: api::BlobImageKey, cmds: Arc<api::BlobImageData>, _: Option<api::TileSize>) {
         self.image_cmds
             .insert(key, Arc::new(deserialize_blob(&cmds[..]).unwrap()));
     }
 
-    fn update(&mut self, key: api::BlobImageKey, cmds: Arc<api::BlobImageData>, _dirty_rect: &api::BlobDirtyRect) {
+    fn update(&mut self, key: api::BlobImageKey, cmds: Arc<api::BlobImageData>, _dirty_rect: &BlobDirtyRect) {
         // Here, updating is just replacing the current version of the commands with
         // the new one (no incremental updates).
         self.image_cmds
             .insert(key, Arc::new(deserialize_blob(&cmds[..]).unwrap()));
     }
 
     fn delete(&mut self, key: api::BlobImageKey) {
         self.image_cmds.remove(&key);
@@ -194,17 +195,17 @@ impl api::AsyncBlobImageRasterizer for R
 struct App {}
 
 impl Example for App {
     fn render(
         &mut self,
         api: &RenderApi,
         builder: &mut DisplayListBuilder,
         txn: &mut Transaction,
-        _framebuffer_size: api::FramebufferIntSize,
+        _framebuffer_size: FramebufferIntSize,
         pipeline_id: PipelineId,
         _document_id: DocumentId,
     ) {
         let blob_img1 = api.generate_blob_image_key();
         txn.add_blob_image(
             blob_img1,
             api::ImageDescriptor::new(500, 500, api::ImageFormat::BGRA8, true, false),
             serialize_blob(api::ColorU::new(50, 50, 150, 255)),
@@ -214,40 +215,40 @@ impl Example for App {
         let blob_img2 = api.generate_blob_image_key();
         txn.add_blob_image(
             blob_img2,
             api::ImageDescriptor::new(200, 200, api::ImageFormat::BGRA8, true, false),
             serialize_blob(api::ColorU::new(50, 150, 50, 255)),
             None,
         );
 
-        let bounds = api::LayoutRect::new(api::LayoutPoint::zero(), builder.content_size());
+        let bounds = LayoutRect::new(LayoutPoint::zero(), builder.content_size());
         let space_and_clip = SpaceAndClipInfo::root_scroll(pipeline_id);
 
         builder.push_simple_stacking_context(
             &api::LayoutPrimitiveInfo::new(bounds),
             space_and_clip.spatial_id,
         );
 
         builder.push_image(
             &api::LayoutPrimitiveInfo::new((30, 30).by(500, 500)),
             &space_and_clip,
-            api::LayoutSize::new(500.0, 500.0),
-            api::LayoutSize::new(0.0, 0.0),
+            LayoutSize::new(500.0, 500.0),
+            LayoutSize::new(0.0, 0.0),
             api::ImageRendering::Auto,
             api::AlphaType::PremultipliedAlpha,
             blob_img1.as_image(),
             ColorF::WHITE,
         );
 
         builder.push_image(
             &api::LayoutPrimitiveInfo::new((600, 600).by(200, 200)),
             &space_and_clip,
-            api::LayoutSize::new(200.0, 200.0),
-            api::LayoutSize::new(0.0, 0.0),
+            LayoutSize::new(200.0, 200.0),
+            LayoutSize::new(0.0, 0.0),
             api::ImageRendering::Auto,
             api::AlphaType::PremultipliedAlpha,
             blob_img2.as_image(),
             ColorF::WHITE,
         );
 
         builder.pop_stacking_context();
     }
--- a/gfx/wr/examples/common/boilerplate.rs
+++ b/gfx/wr/examples/common/boilerplate.rs
@@ -6,19 +6,20 @@ extern crate env_logger;
 extern crate euclid;
 
 use gleam::gl;
 use glutin::{self, GlContext};
 use std::env;
 use std::path::PathBuf;
 use webrender;
 use winit;
-use webrender::DebugFlags;
-use webrender::ShaderPrecacheFlags;
+use webrender::{DebugFlags, ShaderPrecacheFlags};
 use webrender::api::*;
+use webrender::api::units::*;
+
 
 struct Notifier {
     events_proxy: winit::EventsLoopProxy,
 }
 
 impl Notifier {
     fn new(events_proxy: winit::EventsLoopProxy) -> Notifier {
         Notifier { events_proxy }
--- a/gfx/wr/examples/document.rs
+++ b/gfx/wr/examples/document.rs
@@ -9,16 +9,17 @@ extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
 use boilerplate::Example;
 use euclid::TypedScale;
 use webrender::api::*;
+use webrender::api::units::*;
 
 // This example creates multiple documents overlapping each other with
 // specified layer indices.
 
 struct Document {
     id: DocumentId,
     pipeline_id: PipelineId,
     content_rect: LayoutRect,
--- a/gfx/wr/examples/frame_output.rs
+++ b/gfx/wr/examples/frame_output.rs
@@ -10,16 +10,18 @@ extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
 use boilerplate::{Example, HandyDandyRectBuilder};
 use euclid::TypedScale;
 use gleam::gl;
 use webrender::api::*;
+use webrender::api::units::*;
+
 
 // This example demonstrates using the frame output feature to copy
 // the output of a WR framebuffer to a custom texture.
 
 #[derive(Debug)]
 struct Document {
     id: DocumentId,
     pipeline_id: PipelineId,
--- a/gfx/wr/examples/iframe.rs
+++ b/gfx/wr/examples/iframe.rs
@@ -7,16 +7,17 @@ extern crate glutin;
 extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
 use boilerplate::{Example, HandyDandyRectBuilder};
 use webrender::api::*;
+use webrender::api::units::*;
 
 // This example uses the push_iframe API to nest a second pipeline's displaylist
 // inside the root pipeline's display list. When it works, a green square is
 // shown. If it fails, a red square is shown.
 
 struct App {}
 
 impl Example for App {
--- a/gfx/wr/examples/image_resize.rs
+++ b/gfx/wr/examples/image_resize.rs
@@ -9,16 +9,17 @@ extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 #[path = "common/image_helper.rs"]
 mod image_helper;
 
 use boilerplate::{Example, HandyDandyRectBuilder};
 use webrender::api::*;
+use webrender::api::units::*;
 
 struct App {
     image_key: ImageKey,
 }
 
 impl Example for App {
     fn render(
         &mut self,
--- a/gfx/wr/examples/multiwindow.rs
+++ b/gfx/wr/examples/multiwindow.rs
@@ -1,25 +1,24 @@
 /* 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/. */
 
-extern crate app_units;
 extern crate euclid;
 extern crate gleam;
 extern crate glutin;
 extern crate webrender;
 extern crate winit;
 
-use app_units::Au;
 use gleam::gl;
 use glutin::GlContext;
 use std::fs::File;
 use std::io::Read;
 use webrender::api::*;
+use webrender::api::units::*;
 use webrender::DebugFlags;
 use winit::dpi::LogicalSize;
 
 struct Notifier {
     events_proxy: winit::EventsLoopProxy,
 }
 
 impl Notifier {
--- a/gfx/wr/examples/scrolling.rs
+++ b/gfx/wr/examples/scrolling.rs
@@ -9,18 +9,20 @@ extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
 use boilerplate::{Example, HandyDandyRectBuilder};
 use euclid::SideOffsets2D;
 use webrender::api::*;
+use webrender::api::units::*;
 use winit::dpi::LogicalPosition;
 
+
 struct App {
     cursor_position: WorldPoint,
 }
 
 impl Example for App {
     fn render(
         &mut self,
         _api: &RenderApi,
--- a/gfx/wr/examples/texture_cache_stress.rs
+++ b/gfx/wr/examples/texture_cache_stress.rs
@@ -9,16 +9,18 @@ extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
 use boilerplate::{Example, HandyDandyRectBuilder};
 use gleam::gl;
 use std::mem;
 use webrender::api::*;
+use webrender::api::units::*;
+
 
 struct ImageGenerator {
     patterns: [[u8; 3]; 6],
     next_pattern: usize,
     current_image: Vec<u8>,
 }
 
 impl ImageGenerator {
--- a/gfx/wr/examples/yuv.rs
+++ b/gfx/wr/examples/yuv.rs
@@ -8,16 +8,18 @@ extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
 use boilerplate::Example;
 use gleam::gl;
 use webrender::api::*;
+use webrender::api::units::*;
+
 
 fn init_gl_texture(
     id: gl::GLuint,
     internal: gl::GLenum,
     external: gl::GLenum,
     bytes: &[u8],
     gl: &gl::Gl,
 ) {
--- a/gfx/wr/webrender/Cargo.toml
+++ b/gfx/wr/webrender/Cargo.toml
@@ -17,17 +17,16 @@ replay = ["webrender_api/deserialize", "
 pathfinder = ["pathfinder_font_renderer", "pathfinder_gfx_utils", "pathfinder_partitioner", "pathfinder_path_utils"]
 serialize_program = ["serde", "webrender_build/serialize_program"]
 no_static_freetype = []
 
 [build-dependencies]
 webrender_build = { version = "0.0.1", path = "../webrender_build" }
 
 [dependencies]
-app_units = "0.7"
 base64 = { optional = true, version = "0.10" }
 bincode = "1.0"
 bitflags = "1.0"
 byteorder = "1.0"
 cfg-if = "0.1.2"
 cstr = "0.1.2"
 fxhash = "0.2.1"
 gleam = "0.6.12"
--- a/gfx/wr/webrender/res/clip_shared.glsl
+++ b/gfx/wr/webrender/res/clip_shared.glsl
@@ -1,50 +1,53 @@
 /* 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 rect,render_task,gpu_cache,snap,transform
 
 #ifdef WR_VERTEX_SHADER
 
-in int aClipRenderTaskAddress;
-in int aClipTransformId;
-in int aPrimTransformId;
-in int aClipSegment;
+in ivec2 aTransformIds;
 in ivec4 aClipDataResourceAddress;
 in vec2 aClipLocalPos;
 in vec4 aClipTileRect;
 in vec4 aClipDeviceArea;
 in vec4 aClipSnapOffsets;
+in vec4 aClipOrigins;
+in float aDevicePixelScale;
 
 struct ClipMaskInstance {
-    int render_task_address;
     int clip_transform_id;
     int prim_transform_id;
     ivec2 clip_data_address;
     ivec2 resource_address;
     vec2 local_pos;
     RectWithSize tile_rect;
     RectWithSize sub_rect;
     vec4 snap_offsets;
+    vec2 task_origin;
+    vec2 screen_origin;
+    float device_pixel_scale;
 };
 
 ClipMaskInstance fetch_clip_item() {
     ClipMaskInstance cmi;
 
-    cmi.render_task_address = aClipRenderTaskAddress;
-    cmi.clip_transform_id = aClipTransformId;
-    cmi.prim_transform_id = aPrimTransformId;
+    cmi.clip_transform_id = aTransformIds.x;
+    cmi.prim_transform_id = aTransformIds.y;
     cmi.clip_data_address = aClipDataResourceAddress.xy;
     cmi.resource_address = aClipDataResourceAddress.zw;
     cmi.local_pos = aClipLocalPos;
     cmi.tile_rect = RectWithSize(aClipTileRect.xy, aClipTileRect.zw);
     cmi.sub_rect = RectWithSize(aClipDeviceArea.xy, aClipDeviceArea.zw);
     cmi.snap_offsets = aClipSnapOffsets;
+    cmi.task_origin = aClipOrigins.xy;
+    cmi.screen_origin = aClipOrigins.zw;
+    cmi.device_pixel_scale = aDevicePixelScale;
 
     return cmi;
 }
 
 struct ClipVertexInfo {
     vec3 local_pos;
     RectWithSize clipped_local_rect;
 };
@@ -54,43 +57,44 @@ RectWithSize intersect_rect(RectWithSize
     return RectWithSize(p.xy, max(vec2(0.0), p.zw - p.xy));
 }
 
 // The transformed vertex function that always covers the whole clip area,
 // which is the intersection of all clip instances of a given primitive
 ClipVertexInfo write_clip_tile_vertex(RectWithSize local_clip_rect,
                                       Transform prim_transform,
                                       Transform clip_transform,
-                                      ClipArea area,
                                       RectWithSize sub_rect,
-                                      vec4 snap_offsets) {
-    vec2 device_pos = area.screen_origin + sub_rect.p0 +
-                      aPosition.xy * sub_rect.size;
+                                      vec4 snap_offsets,
+                                      vec2 task_origin,
+                                      vec2 screen_origin,
+                                      float device_pixel_scale) {
+    vec2 device_pos = screen_origin + sub_rect.p0 + aPosition.xy * sub_rect.size;
 
     // If the primitive we are drawing a clip mask for was snapped, then
     // remove the effect of that snapping, so that the local position
     // interpolation below works correctly relative to the clip item.
     vec2 snap_offset = mix(
         snap_offsets.xy,
         snap_offsets.zw,
         aPosition.xy
     );
 
     device_pos -= snap_offset;
 
-    vec2 world_pos = device_pos / area.device_pixel_scale;
+    vec2 world_pos = device_pos / device_pixel_scale;
 
     vec4 pos = prim_transform.m * vec4(world_pos, 0.0, 1.0);
     pos.xyz /= pos.w;
 
     vec4 p = get_node_pos(pos.xy, clip_transform);
     vec3 local_pos = p.xyw * pos.w;
 
     vec4 vertex_pos = vec4(
-        area.common_data.task_rect.p0 + sub_rect.p0 + aPosition.xy * sub_rect.size,
+        task_origin + sub_rect.p0 + aPosition.xy * sub_rect.size,
         0.0,
         1.0
     );
 
     gl_Position = uTransform * vertex_pos;
 
     init_transform_vs(vec4(local_clip_rect.p0, local_clip_rect.p0 + local_clip_rect.size));
 
--- a/gfx/wr/webrender/res/cs_clip_box_shadow.glsl
+++ b/gfx/wr/webrender/res/cs_clip_box_shadow.glsl
@@ -35,32 +35,33 @@ BoxShadowData fetch_data(ivec2 address) 
         int(data[1].y),
         dest_rect
     );
     return bs_data;
 }
 
 void main(void) {
     ClipMaskInstance cmi = fetch_clip_item();
-    ClipArea area = fetch_clip_area(cmi.render_task_address);
     Transform clip_transform = fetch_transform(cmi.clip_transform_id);
     Transform prim_transform = fetch_transform(cmi.prim_transform_id);
     BoxShadowData bs_data = fetch_data(cmi.clip_data_address);
     ImageResource res = fetch_image_resource_direct(cmi.resource_address);
 
     RectWithSize dest_rect = bs_data.dest_rect;
     dest_rect.p0 += cmi.local_pos;
 
     ClipVertexInfo vi = write_clip_tile_vertex(
         dest_rect,
         prim_transform,
         clip_transform,
-        area,
         cmi.sub_rect,
-        cmi.snap_offsets
+        cmi.snap_offsets,
+        cmi.task_origin,
+        cmi.screen_origin,
+        cmi.device_pixel_scale
     );
     vLocalPos = vi.local_pos;
     vLayer = res.layer;
     vClipMode = bs_data.clip_mode;
 
     vec2 uv0 = res.uv_rect.p0;
     vec2 uv1 = res.uv_rect.p1;
 
--- a/gfx/wr/webrender/res/cs_clip_image.glsl
+++ b/gfx/wr/webrender/res/cs_clip_image.glsl
@@ -19,30 +19,31 @@ struct ImageMaskData {
 ImageMaskData fetch_mask_data(ivec2 address) {
     vec4 data = fetch_from_gpu_cache_1_direct(address);
     ImageMaskData mask_data = ImageMaskData(data.xy);
     return mask_data;
 }
 
 void main(void) {
     ClipMaskInstance cmi = fetch_clip_item();
-    ClipArea area = fetch_clip_area(cmi.render_task_address);
     Transform clip_transform = fetch_transform(cmi.clip_transform_id);
     Transform prim_transform = fetch_transform(cmi.prim_transform_id);
     ImageMaskData mask = fetch_mask_data(cmi.clip_data_address);
     RectWithSize local_rect = RectWithSize(cmi.local_pos, mask.local_mask_size);
     ImageResource res = fetch_image_resource_direct(cmi.resource_address);
 
     ClipVertexInfo vi = write_clip_tile_vertex(
         local_rect,
         prim_transform,
         clip_transform,
-        area,
         cmi.sub_rect,
-        cmi.snap_offsets
+        cmi.snap_offsets,
+        cmi.task_origin,
+        cmi.screen_origin,
+        cmi.device_pixel_scale
     );
     vLocalPos = vi.local_pos.xy / vi.local_pos.z;
     vLayer = res.layer;
     vClipMaskImageUv = (vLocalPos - cmi.tile_rect.p0) / cmi.tile_rect.size;
     vec2 texture_size = vec2(textureSize(sColor0, 0));
     vClipMaskUvRect = vec4(res.uv_rect.p0, res.uv_rect.p1 - res.uv_rect.p0) / texture_size.xyxy;
     // applying a half-texel offset to the UV boundaries to prevent linear samples from the outside
     vec4 inner_rect = vec4(res.uv_rect.p0, res.uv_rect.p1);
--- a/gfx/wr/webrender/res/cs_clip_rectangle.glsl
+++ b/gfx/wr/webrender/res/cs_clip_rectangle.glsl
@@ -54,31 +54,32 @@ ClipData fetch_clip(ivec2 address) {
     clip.bottom_left = fetch_clip_corner(address, 2.0);
     clip.bottom_right = fetch_clip_corner(address, 3.0);
 
     return clip;
 }
 
 void main(void) {
     ClipMaskInstance cmi = fetch_clip_item();
-    ClipArea area = fetch_clip_area(cmi.render_task_address);
     Transform clip_transform = fetch_transform(cmi.clip_transform_id);
     Transform prim_transform = fetch_transform(cmi.prim_transform_id);
     ClipData clip = fetch_clip(cmi.clip_data_address);
 
     RectWithSize local_rect = clip.rect.rect;
     local_rect.p0 = cmi.local_pos;
 
     ClipVertexInfo vi = write_clip_tile_vertex(
         local_rect,
         prim_transform,
         clip_transform,
-        area,
         cmi.sub_rect,
-        cmi.snap_offsets
+        cmi.snap_offsets,
+        cmi.task_origin,
+        cmi.screen_origin,
+        cmi.device_pixel_scale
     );
 
     vLocalPos = vi.local_pos;
     vClipMode = clip.rect.mode.x;
 
     RectWithEndpoint clip_rect = to_rect_with_endpoint(local_rect);
 
     vec2 r_tl = clip.top_left.outer_inner_radius.xy;
--- a/gfx/wr/webrender/src/batch.rs
+++ b/gfx/wr/webrender/src/batch.rs
@@ -1,16 +1,15 @@
 /* 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/. */
 
-use api::{AlphaType, ClipMode, DeviceIntRect, DeviceIntPoint, DeviceIntSize, WorldRect};
-use api::{ExternalImageType, FilterOp, ImageRendering, LayoutRect, DeviceRect, DevicePixelScale};
-use api::{YuvColorSpace, YuvFormat, PictureRect, ColorDepth, LayoutPoint, DevicePoint, LayoutSize};
-use api::{PremultipliedColorF, RasterSpace};
+use api::{AlphaType, ClipMode, ExternalImageType, FilterOp, ImageRendering};
+use api::{YuvColorSpace, YuvFormat, ColorDepth, PremultipliedColorF, RasterSpace};
+use api::units::*;
 use clip::{ClipDataStore, ClipNodeFlags, ClipNodeRange, ClipItem, ClipStore, ClipNodeInstance};
 use clip_scroll_tree::{ClipScrollTree, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex, CoordinateSystemId};
 use glyph_rasterizer::GlyphFormat;
 use gpu_cache::{GpuBlockData, GpuCache, GpuCacheHandle, GpuCacheAddress};
 use gpu_types::{BrushFlags, BrushInstance, PrimitiveHeaders, ZBufferId, ZBufferIdGenerator};
 use gpu_types::{ClipMaskInstance, SplitCompositeInstance, SnapOffsets};
 use gpu_types::{PrimitiveInstanceData, RasterizationSpace, GlyphInstance};
 use gpu_types::{PrimitiveHeader, PrimitiveHeaderIndex, TransformPaletteId, TransformPalette};
@@ -2701,31 +2700,35 @@ impl ClipBatcher {
             primary_clips: ClipBatchList::new(),
             secondary_clips: ClipBatchList::new(),
             gpu_supports_fast_clears,
         }
     }
 
     pub fn add_clip_region(
         &mut self,
-        task_address: RenderTaskAddress,
         clip_data_address: GpuCacheAddress,
         local_pos: LayoutPoint,
         sub_rect: DeviceRect,
+        task_origin: DevicePoint,
+        screen_origin: DevicePoint,
+        device_pixel_scale: f32,
     ) {
         let instance = ClipMaskInstance {
-            render_task_address: task_address,
             clip_transform_id: TransformPaletteId::IDENTITY,
             prim_transform_id: TransformPaletteId::IDENTITY,
             clip_data_address,
             resource_address: GpuCacheAddress::invalid(),
             local_pos,
             tile_rect: LayoutRect::zero(),
             sub_rect,
             snap_offsets: SnapOffsets::empty(),
+            task_origin,
+            screen_origin,
+            device_pixel_scale,
         };
 
         self.primary_clips.rectangles.push(instance);
     }
 
     /// Where appropriate, draw a clip rectangle as a small series of tiles,
     /// instead of one large rectangle.
     fn add_tiled_clip_mask(
@@ -2827,29 +2830,30 @@ impl ClipBatcher {
             &mut self.primary_clips
         } else {
             &mut self.secondary_clips
         }
     }
 
     pub fn add(
         &mut self,
-        task_address: RenderTaskAddress,
         clip_node_range: ClipNodeRange,
         root_spatial_node_index: SpatialNodeIndex,
         resource_cache: &ResourceCache,
         gpu_cache: &GpuCache,
         clip_store: &ClipStore,
         clip_scroll_tree: &ClipScrollTree,
         transforms: &mut TransformPalette,
         clip_data_store: &ClipDataStore,
         actual_rect: DeviceIntRect,
         world_rect: &WorldRect,
         device_pixel_scale: DevicePixelScale,
         snap_offsets: SnapOffsets,
+        task_origin: DevicePoint,
+        screen_origin: DevicePoint,
     ) {
         let mut is_first_clip = true;
 
         for i in 0 .. clip_node_range.count {
             let clip_instance = clip_store.get_instance_from_range(&clip_node_range, i);
             let clip_node = &clip_data_store[clip_instance.handle];
 
             let clip_transform_id = transforms.get_id(
@@ -2860,28 +2864,30 @@ impl ClipBatcher {
 
             let prim_transform_id = transforms.get_id(
                 root_spatial_node_index,
                 ROOT_SPATIAL_NODE_INDEX,
                 clip_scroll_tree,
             );
 
             let instance = ClipMaskInstance {
-                render_task_address: task_address,
                 clip_transform_id,
                 prim_transform_id,
                 clip_data_address: GpuCacheAddress::invalid(),
                 resource_address: GpuCacheAddress::invalid(),
                 local_pos: clip_instance.local_pos,
                 tile_rect: LayoutRect::zero(),
                 sub_rect: DeviceRect::new(
                     DevicePoint::zero(),
                     actual_rect.size.to_f32(),
                 ),
                 snap_offsets,
+                task_origin,
+                screen_origin,
+                device_pixel_scale: device_pixel_scale.0,
             };
 
             let added_clip = match clip_node.item {
                 ClipItem::Image { image, size, .. } => {
                     let request = ImageRequest {
                         key: image,
                         rendering: ImageRendering::Auto,
                         tile: None,
--- a/gfx/wr/webrender/src/border.rs
+++ b/gfx/wr/webrender/src/border.rs
@@ -1,17 +1,15 @@
 /* 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/. */
 
-use api::{BorderRadius, BorderSide, BorderStyle, ColorF, ColorU, DeviceRect, DeviceSize};
-use api::{LayoutSideOffsets, LayoutSizeAu, LayoutPrimitiveInfo, LayoutToDeviceScale};
-use api::{DeviceVector2D, DevicePoint, LayoutRect, LayoutSize, DeviceIntSize};
-use api::{AuHelpers, LayoutPoint, LayoutPointAu, RepeatMode, TexelRect};
-use api::NormalBorder as ApiNormalBorder;
+use api::{BorderRadius, BorderSide, BorderStyle, ColorF, ColorU};
+use api::{LayoutPrimitiveInfo, NormalBorder as ApiNormalBorder, RepeatMode};
+use api::units::*;
 use ellipse::Ellipse;
 use euclid::vec2;
 use display_list_flattener::DisplayListFlattener;
 use gpu_types::{BorderInstance, BorderSegment, BrushFlags};
 use prim_store::{BorderSegmentInfo, BrushSegment, NinePatchDescriptor};
 use prim_store::{EdgeAaSegmentMask, ScrollNodeAndClipChain};
 use prim_store::borders::NormalBorderPrim;
 use util::{lerp, RectHelpers};
--- a/gfx/wr/webrender/src/capture.rs
+++ b/gfx/wr/webrender/src/capture.rs
@@ -1,20 +1,21 @@
 /* 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/. */
 
 use std::fs::File;
 use std::path::{Path, PathBuf};
 
-use api::{CaptureBits, ExternalImageData, ImageDescriptor, TexelRect};
+use api::{CaptureBits, ExternalImageData, ImageDescriptor};
+use api::units::TexelRect;
+#[cfg(feature = "png")]
+use api::units::DeviceIntSize;
 #[cfg(feature = "png")]
 use device::ReadPixelsFormat;
-#[cfg(feature = "png")]
-use api::DeviceIntSize;
 #[cfg(feature = "capture")]
 use print_tree::{PrintableTree, PrintTree};
 use ron;
 use serde;
 
 
 #[derive(Clone)]
 pub struct CaptureConfig {
--- a/gfx/wr/webrender/src/clip.rs
+++ b/gfx/wr/webrender/src/clip.rs
@@ -1,18 +1,15 @@
 /* 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/. */
 
-use api::{BorderRadius, ClipMode, ComplexClipRegion, DeviceIntRect, DevicePixelScale, ImageMask};
-use api::{ImageRendering, LayoutRect, LayoutSize, LayoutPoint, LayoutVector2D};
-use api::{BoxShadowClipMode, LayoutToWorldScale, PicturePixel, WorldPixel};
-use api::{PictureRect, LayoutPixel, WorldPoint, WorldSize, WorldRect, LayoutToWorldTransform};
-use api::{ClipIntern, ImageKey};
-use app_units::Au;
+use api::{BorderRadius, ClipIntern, ClipMode, ComplexClipRegion, ImageMask};
+use api::{BoxShadowClipMode, ImageKey, ImageRendering};
+use api::units::*;
 use border::{ensure_no_corner_overlap, BorderRadiusAu};
 use box_shadow::{BLUR_SAMPLE_SCALE, BoxShadowClipSource, BoxShadowCacheKey};
 use clip_scroll_tree::{ClipScrollTree, SpatialNodeIndex};
 use ellipse::Ellipse;
 use gpu_cache::{GpuCache, GpuCacheHandle, ToGpuBlocks};
 use gpu_types::{BoxShadowStretchMode};
 use image::{self, Repetition};
 use intern;
--- a/gfx/wr/webrender/src/debug_server.rs
+++ b/gfx/wr/webrender/src/debug_server.rs
@@ -1,14 +1,15 @@
 /* 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/. */
 
-use api::{ApiMsg, DebugCommand, DebugFlags, DeviceIntSize};
+use api::{ApiMsg, DebugCommand, DebugFlags};
 use api::channel::MsgSender;
+use api::units::DeviceIntSize;
 use print_tree::PrintTreePrinter;
 use std::sync::mpsc::{channel, Receiver};
 use std::sync::mpsc::Sender;
 use std::thread;
 use ws;
 use base64::encode;
 use image_loader;
 
--- a/gfx/wr/webrender/src/display_list_flattener.rs
+++ b/gfx/wr/webrender/src/display_list_flattener.rs
@@ -7,17 +7,16 @@ use api::{ClipId, ColorF, ComplexClipReg
 use api::{DisplayItemRef, ExtendMode, ExternalScrollId};
 use api::{FilterOp, FontInstanceKey, GlyphInstance, GlyphOptions, GradientStop};
 use api::{IframeDisplayItem, ImageKey, ImageRendering, ItemRange, ColorDepth};
 use api::{LayoutPrimitiveInfo, LineOrientation, LineStyle, NinePatchBorderSource, PipelineId};
 use api::{PropertyBinding, ReferenceFrame, ReferenceFrameKind, ScrollFrameDisplayItem, ScrollSensitivity};
 use api::{Shadow, SpaceAndClipInfo, SpatialId, SpecificDisplayItem, StackingContext, StickyFrameDisplayItem};
 use api::{ClipMode, PrimitiveKeyKind, TransformStyle, YuvColorSpace, YuvData, TempFilterData};
 use api::units::*;
-use app_units::Au;
 use clip::{ClipChainId, ClipRegion, ClipItemKey, ClipStore};
 use clip_scroll_tree::{ROOT_SPATIAL_NODE_INDEX, ClipScrollTree, SpatialNodeIndex};
 use frame_builder::{ChasePrimitive, FrameBuilder, FrameBuilderConfig};
 use glyph_rasterizer::FontInstance;
 use hit_test::{HitTestingItem, HitTestingScene};
 use image::simplify_repeated_primitive;
 use intern::Interner;
 use internal_types::{FastHashMap, FastHashSet};
--- a/gfx/wr/webrender/src/ellipse.rs
+++ b/gfx/wr/webrender/src/ellipse.rs
@@ -1,17 +1,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/. */
 
-use api::{LayoutPoint, LayoutVector2D};
+use api::units::*;
 use euclid::TypedSize2D;
 use std::f32::consts::FRAC_PI_2;
-#[cfg(test)]
-use api::LayoutSize;
+
 
 /// Number of steps to integrate arc length over.
 const STEP_COUNT: usize = 20;
 
 /// Represents an ellipse centred at a local space origin.
 #[derive(Debug, Clone)]
 pub struct Ellipse<U> {
     pub radius: TypedSize2D<f32, U>,
--- a/gfx/wr/webrender/src/glyph_cache.rs
+++ b/gfx/wr/webrender/src/glyph_cache.rs
@@ -1,43 +1,38 @@
 /* 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/. */
 
 #[cfg(feature = "pathfinder")]
-use api::DeviceIntPoint;
+use api::units::DeviceIntPoint;
 use glyph_rasterizer::{FontInstance, GlyphFormat, GlyphKey, GlyphRasterizer};
 use internal_types::FastHashMap;
 use render_task::RenderTaskCache;
 #[cfg(feature = "pathfinder")]
 use render_task::RenderTaskCacheKey;
 use resource_cache::ResourceClassCache;
 use std::sync::Arc;
 use texture_cache::{EvictionNotice, TextureCache};
 #[cfg(not(feature = "pathfinder"))]
 use texture_cache::TextureCacheHandle;
 
-#[cfg(feature = "pathfinder")]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 #[derive(Clone, Debug)]
 pub struct CachedGlyphInfo {
+    pub format: GlyphFormat,
+    #[cfg(not(feature = "pathfinder"))]
+    pub texture_cache_handle: TextureCacheHandle,
+    #[cfg(feature = "pathfinder")]
     pub render_task_cache_key: RenderTaskCacheKey,
-    pub format: GlyphFormat,
+    #[cfg(feature = "pathfinder")]
     pub origin: DeviceIntPoint,
 }
 
-#[cfg(not(feature = "pathfinder"))]
-#[cfg_attr(feature = "capture", derive(Serialize))]
-#[cfg_attr(feature = "replay", derive(Deserialize))]
-pub struct CachedGlyphInfo {
-    pub texture_cache_handle: TextureCacheHandle,
-    pub format: GlyphFormat,
-}
-
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub enum GlyphCacheEntry {
     // A glyph that has been successfully rasterized.
     Cached(CachedGlyphInfo),
     // A glyph that should not be rasterized (i.e. a space).
     Blank,
     // A glyph that has been submitted to the font backend for rasterization,
--- a/gfx/wr/webrender/src/glyph_rasterizer/mod.rs
+++ b/gfx/wr/webrender/src/glyph_rasterizer/mod.rs
@@ -1,18 +1,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/. */
 
-use api::{ColorU, DevicePoint};
 use api::{FontInstanceFlags, FontInstancePlatformOptions};
 use api::{FontKey, FontInstanceKey, FontRenderMode, FontTemplate, FontVariation};
-use api::{GlyphIndex, GlyphDimensions, SyntheticItalics};
-use api::{LayoutPoint, LayoutToWorldTransform, WorldPoint};
-use app_units::Au;
+use api::{ColorU, GlyphIndex, GlyphDimensions, SyntheticItalics};
+use api::units::*;
 use euclid::approxeq::ApproxEq;
 use internal_types::ResourceCacheError;
 use wr_malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
 use platform::font::FontContext;
 use rayon::ThreadPool;
 use std::cmp;
 use std::hash::{Hash, Hasher};
 use std::mem;
@@ -845,19 +843,19 @@ mod test_glyph_rasterizer {
         use std::fs::File;
         use std::io::Read;
         use texture_cache::TextureCache;
         use glyph_cache::GlyphCache;
         use gpu_cache::GpuCache;
         use render_task::{RenderTaskCache, RenderTaskTree, RenderTaskTreeCounters};
         use profiler::TextureCacheProfileCounters;
         use api::{FontKey, FontInstanceKey, FontTemplate, FontRenderMode,
-                  IdNamespace, ColorU, DevicePoint};
+                  IdNamespace, ColorU};
+        use api::units::{Au, DevicePoint};
         use render_backend::FrameId;
-        use app_units::Au;
         use thread_profiler::register_thread_with_profiler;
         use std::sync::Arc;
         use glyph_rasterizer::{FontInstance, BaseFontInstance, GlyphKey, GlyphRasterizer};
 
         let worker = ThreadPoolBuilder::new()
             .thread_name(|idx|{ format!("WRWorker#{}", idx) })
             .start_handler(move |idx| {
                 register_thread_with_profiler(format!("WRWorker#{}", idx));
--- a/gfx/wr/webrender/src/glyph_rasterizer/pathfinder.rs
+++ b/gfx/wr/webrender/src/glyph_rasterizer/pathfinder.rs
@@ -1,15 +1,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/. */
 
 //! Module only available when pathfinder is activated
 
-use api::{DeviceIntPoint, DeviceIntSize, DevicePixel, FontKey, FontTemplate, NativeFontHandle};
+use api::{FontKey, FontTemplate, NativeFontHandle};
+use api::units::{DeviceIntPoint, DeviceIntSize, DevicePixel};
 use euclid::{TypedPoint2D, TypedSize2D, TypedVector2D};
 use pathfinder_font_renderer;
 use pathfinder_partitioner::mesh::Mesh as PathfinderMesh;
 use pathfinder_path_utils::cubic_to_quadratic::CubicToQuadraticTransformer;
 use render_task::{RenderTask, RenderTaskTree, RenderTaskCache, RenderTaskCacheKey, RenderTaskCacheEntryHandle,
                   RenderTaskCacheKeyKind, RenderTaskId, RenderTaskLocation};
 use resource_cache::CacheItem;
 use std::ops::Deref;
--- a/gfx/wr/webrender/src/gpu_cache.rs
+++ b/gfx/wr/webrender/src/gpu_cache.rs
@@ -19,19 +19,20 @@
 //! data is not in the cache, the user provided closure
 //! will be invoked to build the data.
 //!
 //! After ```end_frame``` has occurred, callers can
 //! use the ```get_address``` API to get the allocated
 //! address in the GPU cache of a given resource slot
 //! for this frame.
 
-use api::{DebugFlags, DocumentId, PremultipliedColorF, TexelRect};
+use api::{DebugFlags, DocumentId, PremultipliedColorF};
 #[cfg(test)]
 use api::IdNamespace;
+use api::units::TexelRect;
 use euclid::{HomogeneousVector, TypedRect};
 use internal_types::{FastHashMap};
 use profiler::GpuCacheProfileCounters;
 use render_backend::{FrameStamp, FrameId};
 use renderer::MAX_VERTEX_TEXTURE_WIDTH;
 use std::{mem, u16, u32};
 use std::num::NonZeroU32;
 use std::ops::Add;
--- a/gfx/wr/webrender/src/gpu_glyph_renderer.rs
+++ b/gfx/wr/webrender/src/gpu_glyph_renderer.rs
@@ -1,16 +1,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/. */
 
 //! GPU glyph rasterization using Pathfinder.
 
-use api::{DeviceIntPoint, DeviceIntRect, DeviceIntSize, FontRenderMode};
-use api::{ImageFormat, TextureTarget};
+use api::{ImageFormat, FontRenderMode, TextureTarget};
+use api::units::*;
 use debug_colors;
 use device::{DrawTarget, Device, Texture, TextureFilter, VAO};
 use euclid::{Point2D, Size2D, Transform3D, TypedVector2D, Vector2D};
 use internal_types::RenderTargetInfo;
 use pathfinder_gfx_utils::ShelfBinPacker;
 use profiler::GpuProfileTag;
 use renderer::{self, ImageBufferKind, Renderer, RendererError, RendererStats};
 use renderer::{TextureSampler, VertexArrayKind, ShaderPrecacheFlags};
--- a/gfx/wr/webrender/src/gpu_types.rs
+++ b/gfx/wr/webrender/src/gpu_types.rs
@@ -1,18 +1,14 @@
 /* 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/. */
 
-use api::{
-    DeviceHomogeneousVector, DevicePoint, DeviceSize, DeviceRect,
-    LayoutRect, LayoutToWorldTransform,
-    PremultipliedColorF, LayoutToPictureTransform, PictureToLayoutTransform, PicturePixel,
-    WorldPixel, WorldToLayoutTransform, LayoutPoint, DeviceVector2D
-};
+use api::PremultipliedColorF;
+use api::units::*;
 use clip_scroll_tree::{ClipScrollTree, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex};
 use gpu_cache::{GpuCacheAddress, GpuDataRequest};
 use internal_types::FastHashMap;
 use prim_store::EdgeAaSegmentMask;
 use render_task::RenderTaskAddress;
 use std::i32;
 use util::{TransformedRectKind, MatrixHelpers};
 
@@ -132,25 +128,27 @@ pub struct BorderInstance {
 /// A clipping primitive drawn into the clipping mask.
 /// Could be an image or a rectangle, which defines the
 /// way `address` is treated.
 #[derive(Debug, Copy, Clone)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 #[repr(C)]
 pub struct ClipMaskInstance {
-    pub render_task_address: RenderTaskAddress,
     pub clip_transform_id: TransformPaletteId,
     pub prim_transform_id: TransformPaletteId,
     pub clip_data_address: GpuCacheAddress,
     pub resource_address: GpuCacheAddress,
     pub local_pos: LayoutPoint,
     pub tile_rect: LayoutRect,
     pub sub_rect: DeviceRect,
     pub snap_offsets: SnapOffsets,
+    pub task_origin: DevicePoint,
+    pub screen_origin: DevicePoint,
+    pub device_pixel_scale: f32,
 }
 
 /// A border corner dot or dash drawn into the clipping mask.
 #[derive(Debug, Copy, Clone)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 #[repr(C)]
 pub struct ClipMaskBorderCornerDotDash {
--- a/gfx/wr/webrender/src/hit_test.rs
+++ b/gfx/wr/webrender/src/hit_test.rs
@@ -1,14 +1,15 @@
 /* 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/. */
 
-use api::{BorderRadius, ClipMode, HitTestFlags, HitTestItem, HitTestResult, ItemTag, LayoutPoint};
-use api::{LayoutPrimitiveInfo, LayoutRect, PipelineId, WorldPoint};
+use api::{BorderRadius, ClipMode, HitTestFlags, HitTestItem, HitTestResult, ItemTag};
+use api::{LayoutPrimitiveInfo, PipelineId};
+use api::units::*;
 use clip::{ClipChainId, ClipDataStore, ClipNode, ClipItem, ClipStore};
 use clip::{rounded_rectangle_contains_point};
 use clip_scroll_tree::{SpatialNodeIndex, ClipScrollTree};
 use internal_types::FastHashMap;
 use std::{ops, u32};
 use std::sync::Arc;
 use util::{LayoutToWorldFastTransform, WorldToLayoutFastTransform};
 
--- a/gfx/wr/webrender/src/image.rs
+++ b/gfx/wr/webrender/src/image.rs
@@ -1,14 +1,14 @@
 /* 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/. */
 
-use api::{TileOffset, TileRange, LayoutRect, LayoutSize, LayoutPoint};
-use api::{DeviceIntSize, DeviceIntRect, TileSize};
+use api::TileSize;
+use api::units::*;
 use euclid::{point2, size2};
 use prim_store::EdgeAaSegmentMask;
 
 use std::i32;
 use std::ops::Range;
 
 /// If repetitions are far enough apart that only one is within
 /// the primitive rect, then we can simplify the parameters and
@@ -560,17 +560,16 @@ pub fn for_each_tile_in_range(
         }
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
     use std::collections::HashSet;
-    use api::LayoutRect;
     use euclid::rect;
 
     // this checks some additional invariants
     fn checked_for_each_tile(
         prim_rect: &LayoutRect,
         visible_rect: &LayoutRect,
         device_image_rect: &DeviceIntRect,
         device_tile_size: i32,
--- a/gfx/wr/webrender/src/internal_types.rs
+++ b/gfx/wr/webrender/src/internal_types.rs
@@ -1,15 +1,15 @@
 /* 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/. */
 
 use api::{DebugCommand, DocumentId, ExternalImageData, ExternalImageId};
-use api::{DeviceIntPoint, DeviceIntRect, DeviceIntSize};
-use api::{ImageFormat, WorldPixel, NotificationRequest};
+use api::{ImageFormat, NotificationRequest};
+use api::units::*;
 use device::TextureFilter;
 use renderer::PipelineInfo;
 use gpu_cache::GpuCacheUpdateList;
 use fxhash::FxHasher;
 use plane_split::BspSplitter;
 use profiler::BackendProfileCounters;
 use std::{usize, i32};
 use std::collections::{HashMap, HashSet};
--- a/gfx/wr/webrender/src/lib.rs
+++ b/gfx/wr/webrender/src/lib.rs
@@ -162,17 +162,16 @@ extern crate core_text;
 #[cfg(all(unix, not(target_os = "macos")))]
 extern crate freetype;
 #[cfg(all(unix, not(target_os = "macos")))]
 extern crate libc;
 
 #[cfg(target_os = "windows")]
 extern crate dwrote;
 
-extern crate app_units;
 extern crate bincode;
 extern crate byteorder;
 extern crate fxhash;
 extern crate gleam;
 extern crate num_traits;
 #[cfg(feature = "pathfinder")]
 extern crate pathfinder_font_renderer;
 #[cfg(feature = "pathfinder")]
--- a/gfx/wr/webrender/src/picture.rs
+++ b/gfx/wr/webrender/src/picture.rs
@@ -1,18 +1,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/. */
 
-use api::{FilterOp, MixBlendMode, PipelineId, PremultipliedColorF, PictureRect, PicturePoint, WorldPoint};
-use api::{DeviceIntRect, DeviceIntSize, DevicePoint, DeviceRect, DeviceSize};
-use api::{LayoutRect, PictureToRasterTransform, LayoutPixel, PropertyBinding, PropertyBindingId};
-use api::{DevicePixelScale, RasterRect, RasterSpace, ColorF, ImageKey, WorldSize, ClipMode, LayoutSize};
-use api::{PicturePixel, RasterPixel, WorldPixel, WorldRect, WorldVector2D, LayoutPoint};
-use api::{DebugFlags, DeviceHomogeneousVector, DeviceVector2D};
+use api::{FilterOp, MixBlendMode, PipelineId, PremultipliedColorF};
+use api::{PropertyBinding, PropertyBindingId};
+use api::{DebugFlags, RasterSpace, ColorF, ImageKey, ClipMode};
+use api::units::*;
 use box_shadow::{BLUR_SAMPLE_SCALE};
 use clip::{ClipChainId, ClipChainNode, ClipItem, ClipStore, ClipDataStore, ClipChainStack};
 use clip_scroll_tree::{ROOT_SPATIAL_NODE_INDEX, ClipScrollTree, SpatialNodeIndex, CoordinateSystemId, VisibleFace};
 use debug_colors;
 use euclid::{size2, vec3, TypedPoint2D, TypedScale, TypedSize2D};
 use euclid::approxeq::ApproxEq;
 use frame_builder::{FrameVisibilityContext, FrameVisibilityState};
 use intern::ItemUid;
--- a/gfx/wr/webrender/src/platform/macos/font.rs
+++ b/gfx/wr/webrender/src/platform/macos/font.rs
@@ -1,15 +1,15 @@
 /* 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/. */
 
 use api::{ColorU, FontKey, FontRenderMode, GlyphDimensions};
 use api::{FontInstanceFlags, FontVariation, NativeFontHandle};
-use app_units::Au;
+use api::units::Au;
 use core_foundation::array::{CFArray, CFArrayRef};
 use core_foundation::base::TCFType;
 use core_foundation::dictionary::CFDictionary;
 use core_foundation::number::{CFNumber, CFNumberRef};
 use core_foundation::string::{CFString, CFStringRef};
 use core_graphics::base::{kCGImageAlphaNoneSkipFirst, kCGImageAlphaPremultipliedFirst};
 use core_graphics::base::{kCGBitmapByteOrder32Little};
 use core_graphics::color_space::CGColorSpace;
--- a/gfx/wr/webrender/src/prim_store/borders.rs
+++ b/gfx/wr/webrender/src/prim_store/borders.rs
@@ -1,17 +1,14 @@
 /* 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/. */
 
-use api::{
-    AuHelpers, LayoutPrimitiveInfo, LayoutSideOffsets,
-    LayoutSideOffsetsAu, LayoutSize, NormalBorder, PremultipliedColorF,
-    Shadow, LayoutVector2D,
-};
+use api::{LayoutPrimitiveInfo, NormalBorder, PremultipliedColorF, Shadow};
+use api::units::*;
 use border::create_border_segments;
 use border::NormalBorderAu;
 use display_list_flattener::{CreateShadow, IsVisible};
 use frame_builder::{FrameBuildingState};
 use gpu_cache::GpuDataRequest;
 use intern;
 use prim_store::{
     BorderSegmentInfo, BrushSegment, NinePatchDescriptor, PrimKey,
--- a/gfx/wr/webrender/src/prim_store/gradient.rs
+++ b/gfx/wr/webrender/src/prim_store/gradient.rs
@@ -1,16 +1,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/. */
 
 use api::{
-    ColorF, ColorU,ExtendMode, GradientStop, LayoutPoint, LayoutSize,
-    LayoutPrimitiveInfo, PremultipliedColorF, LayoutVector2D, LineOrientation,
+    ColorF, ColorU, ExtendMode, GradientStop,
+    LayoutPrimitiveInfo, PremultipliedColorF, LineOrientation,
 };
+use api::units::{LayoutPoint, LayoutSize, LayoutVector2D};
 use display_list_flattener::IsVisible;
 use euclid::approxeq::ApproxEq;
 use frame_builder::FrameBuildingState;
 use gpu_cache::{GpuCacheHandle, GpuDataRequest};
 use intern::{Internable, InternDebug, Handle as InternHandle};
 use prim_store::{BrushSegment, GradientTileRange, VectorKey};
 use prim_store::{PrimitiveInstanceKind, PrimitiveOpacity, PrimitiveSceneData};
 use prim_store::{PrimKeyCommonData, PrimTemplateCommonData, PrimitiveStore};
--- a/gfx/wr/webrender/src/prim_store/image.rs
+++ b/gfx/wr/webrender/src/prim_store/image.rs
@@ -1,18 +1,18 @@
 /* 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/. */
 
 use api::{
-    AlphaType, ColorDepth, ColorF, ColorU, DeviceIntRect, DeviceIntSideOffsets,
-    DeviceIntSize, ImageRendering, LayoutRect, LayoutSize, LayoutPrimitiveInfo,
-    PremultipliedColorF, Shadow, TileOffset, YuvColorSpace, YuvFormat, LayoutVector2D,
+    AlphaType, ColorDepth, ColorF, ColorU,
+    ImageKey as ApiImageKey, ImageRendering, LayoutPrimitiveInfo,
+    PremultipliedColorF, Shadow, YuvColorSpace, YuvFormat,
 };
-use api::ImageKey as ApiImageKey;
+use api::units::*;
 use display_list_flattener::{CreateShadow, IsVisible};
 use frame_builder::FrameBuildingState;
 use gpu_cache::{GpuDataRequest};
 use intern::{Internable, InternDebug, Handle as InternHandle};
 use prim_store::{
     EdgeAaSegmentMask, OpacityBindingIndex, PrimitiveInstanceKind,
     PrimitiveOpacity, PrimitiveSceneData, PrimKey, PrimKeyCommonData,
     PrimTemplate, PrimTemplateCommonData, PrimitiveStore, SegmentInstanceIndex,
--- a/gfx/wr/webrender/src/prim_store/line_dec.rs
+++ b/gfx/wr/webrender/src/prim_store/line_dec.rs
@@ -1,17 +1,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/. */
 
 use api::{
-    ColorF, ColorU, LayoutPrimitiveInfo, LayoutSizeAu, LayoutVector2D,
+    ColorF, ColorU, LayoutPrimitiveInfo,
     LineOrientation, LineStyle, PremultipliedColorF, Shadow,
 };
-use app_units::Au;
+use api::units::{Au, LayoutSizeAu, LayoutVector2D};
 use display_list_flattener::{CreateShadow, IsVisible};
 use frame_builder::{FrameBuildingState};
 use gpu_cache::GpuDataRequest;
 use intern;
 use prim_store::{
     PrimKey, PrimKeyCommonData, PrimTemplate, PrimTemplateCommonData,
     InternablePrimitive, PrimitiveSceneData, PrimitiveStore,
 };
--- a/gfx/wr/webrender/src/prim_store/mod.rs
+++ b/gfx/wr/webrender/src/prim_store/mod.rs
@@ -1,16 +1,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/. */
 
 use api::{BorderRadius, ClipMode, ColorF};
-use api::{FilterOp, ImageRendering, TileOffset, RepeatMode, WorldPoint, WorldSize};
+use api::{FilterOp, ImageRendering, RepeatMode};
 use api::{PremultipliedColorF, PropertyBinding, Shadow, GradientStop};
-use api::{BoxShadowClipMode, LineStyle, LineOrientation, AuHelpers};
+use api::{BoxShadowClipMode, LineStyle, LineOrientation};
 use api::{LayoutPrimitiveInfo, PrimitiveKeyKind};
 use api::units::*;
 use border::{get_max_scale_for_border, build_border_instances};
 use border::BorderSegmentCacheKey;
 use clip::{ClipStore};
 use clip_scroll_tree::{ROOT_SPATIAL_NODE_INDEX, ClipScrollTree, SpatialNodeIndex, VisibleFace};
 use clip::{ClipDataStore, ClipNodeFlags, ClipChainId, ClipChainInstance, ClipItem};
 use debug_colors;
--- a/gfx/wr/webrender/src/prim_store/picture.rs
+++ b/gfx/wr/webrender/src/prim_store/picture.rs
@@ -1,18 +1,18 @@
 /* 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/. */
 
 use api::{
-    ColorU, FilterOp, LayoutSize, LayoutPrimitiveInfo, MixBlendMode,
-    PropertyBinding, PropertyBindingId, LayoutVector2D,
+    ColorU, FilterOp, LayoutPrimitiveInfo, MixBlendMode,
+    PropertyBinding, PropertyBindingId,
 };
+use api::units::{Au, LayoutSize, LayoutVector2D};
 use intern::ItemUid;
-use app_units::Au;
 use display_list_flattener::IsVisible;
 use intern::{Internable, InternDebug, Handle as InternHandle};
 use picture::PictureCompositeMode;
 use prim_store::{
     PrimKey, PrimKeyCommonData, PrimTemplate, PrimTemplateCommonData,
     PrimitiveInstanceKind, PrimitiveSceneData, PrimitiveStore, VectorKey,
     InternablePrimitive,
 };
--- a/gfx/wr/webrender/src/prim_store/text_run.rs
+++ b/gfx/wr/webrender/src/prim_store/text_run.rs
@@ -1,15 +1,14 @@
 /* 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/. */
 
-use api::{ColorF, DevicePixelScale, GlyphInstance, LayoutPrimitiveInfo};
-use api::{LayoutToWorldTransform, RasterSpace};
-use api::{LayoutVector2D, Shadow};
+use api::{ColorF, GlyphInstance, LayoutPrimitiveInfo, RasterSpace, Shadow};
+use api::units::{DevicePixelScale, LayoutToWorldTransform, LayoutVector2D};
 use display_list_flattener::{CreateShadow, IsVisible};
 use frame_builder::{FrameBuildingState, PictureContext};
 use glyph_rasterizer::{FontInstance, FontTransform, GlyphKey, FONT_SIZE_LIMIT};
 use gpu_cache::GpuCache;
 use intern;
 use prim_store::{PrimitiveOpacity, PrimitiveSceneData,  PrimitiveScratchBuffer};
 use prim_store::{PrimitiveStore, PrimKeyCommonData, PrimTemplateCommonData};
 use render_task::{RenderTaskTree};
--- a/gfx/wr/webrender/src/render_task.rs
+++ b/gfx/wr/webrender/src/render_task.rs
@@ -1,15 +1,15 @@
 /* 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/. */
 
-use api::{DeviceIntPoint, DeviceIntRect, DeviceIntSize, DeviceSize, DeviceIntSideOffsets};
-use api::{DevicePixelScale, ImageDescriptor, ImageFormat, LayoutPoint};
-use api::{LineStyle, LineOrientation, LayoutSize, DirtyRect, ClipMode};
+use api::{ImageDescriptor, ImageFormat};
+use api::{LineStyle, LineOrientation, ClipMode, DirtyRect};
+use api::units::*;
 #[cfg(feature = "pathfinder")]
 use api::FontRenderMode;
 use border::BorderSegmentCacheKey;
 use box_shadow::{BoxShadowCacheKey};
 use clip::{ClipDataStore, ClipItem, ClipStore, ClipNodeRange, ClipNodeFlags};
 use clip_scroll_tree::SpatialNodeIndex;
 use device::TextureFilter;
 #[cfg(feature = "pathfinder")]
@@ -29,18 +29,17 @@ use prim_store::line_dec::LineDecoration
 #[cfg(feature = "debugger")]
 use print_tree::{PrintTreePrinter};
 use render_backend::FrameId;
 use resource_cache::{CacheItem, ResourceCache};
 use std::{ops, mem, usize, f32, i32, u32};
 use texture_cache::{TextureCache, TextureCacheHandle, Eviction};
 use tiling::{RenderPass, RenderTargetIndex};
 use tiling::{RenderTargetKind};
-#[cfg(feature = "pathfinder")]
-use webrender_api::DevicePixel;
+
 
 const RENDER_TASK_SIZE_SANITY_CHECK: i32 = 16000;
 const FLOATS_PER_RENDER_TASK_INFO: usize = 8;
 pub const MAX_BLUR_STD_DEVIATION: f32 = 4.0;
 pub const MIN_DOWNSCALING_RT_SIZE: i32 = 8;
 
 fn render_task_sanity_check(size: &DeviceIntSize) {
     if size.width > RENDER_TASK_SIZE_SANITY_CHECK ||
@@ -275,17 +274,17 @@ pub struct CacheMaskTask {
 }
 
 #[derive(Debug)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub struct ClipRegionTask {
     pub clip_data_address: GpuCacheAddress,
     pub local_pos: LayoutPoint,
-    device_pixel_scale: DevicePixelScale,
+    pub device_pixel_scale: DevicePixelScale,
 }
 
 #[derive(Debug)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub struct TileBlit {
     pub target: CacheItem,
     pub src_offset: DeviceIntPoint,
--- a/gfx/wr/webrender/src/renderer.rs
+++ b/gfx/wr/webrender/src/renderer.rs
@@ -34,17 +34,17 @@
 //! up the scissor, are accepting already transformed coordinates, which we can get by
 //! calling `DrawTarget::to_framebuffer_rect`
 
 use api::{BlobImageHandler, ColorF, ColorU};
 use api::{DocumentId, Epoch, ExternalImageId};
 use api::{ExternalImageType, FontRenderMode, FrameMsg, ImageFormat, PipelineId};
 use api::{ImageRendering, Checkpoint, NotificationRequest};
 use api::{DebugCommand, MemoryReport, VoidPtrToSizeFn};
-use api::{RenderApiSender, RenderNotifier, TexelRect, TextureTarget};
+use api::{RenderApiSender, RenderNotifier, TextureTarget};
 use api::channel;
 use api::units::*;
 pub use api::DebugFlags;
 use api::channel::PayloadReceiverHelperMethods;
 use batch::{BatchKind, BatchTextures, BrushBatchKind, ClipBatchList};
 #[cfg(any(feature = "capture", feature = "replay"))]
 use capture::{CaptureConfig, ExternalCaptureImage, PlainExternalImage};
 use debug_colors;
@@ -584,28 +584,18 @@ pub(crate) mod desc {
             VertexAttribute {
                 name: "aPosition",
                 count: 2,
                 kind: VertexAttributeKind::F32,
             },
         ],
         instance_attributes: &[
             VertexAttribute {
-                name: "aClipRenderTaskAddress",
-                count: 1,
-                kind: VertexAttributeKind::I32,
-            },
-            VertexAttribute {
-                name: "aClipTransformId",
-                count: 1,
-                kind: VertexAttributeKind::I32,
-            },
-            VertexAttribute {
-                name: "aPrimTransformId",
-                count: 1,
+                name: "aTransformIds",
+                count: 2,
                 kind: VertexAttributeKind::I32,
             },
             VertexAttribute {
                 name: "aClipDataResourceAddress",
                 count: 4,
                 kind: VertexAttributeKind::U16,
             },
             VertexAttribute {
@@ -622,17 +612,27 @@ pub(crate) mod desc {
                 name: "aClipDeviceArea",
                 count: 4,
                 kind: VertexAttributeKind::F32,
             },
             VertexAttribute {
                 name: "aClipSnapOffsets",
                 count: 4,
                 kind: VertexAttributeKind::F32,
-            }
+            },
+            VertexAttribute {
+                name: "aClipOrigins",
+                count: 4,
+                kind: VertexAttributeKind::F32,
+            },
+            VertexAttribute {
+                name: "aDevicePixelScale",
+                count: 1,
+                kind: VertexAttributeKind::F32,
+            },
         ],
     };
 
     pub const GPU_CACHE_UPDATE: VertexDescriptor = VertexDescriptor {
         vertex_attributes: &[
             VertexAttribute {
                 name: "aPosition",
                 count: 2,
--- a/gfx/wr/webrender/src/resource_cache.rs
+++ b/gfx/wr/webrender/src/resource_cache.rs
@@ -1,23 +1,21 @@
 /* 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/. */
 
 use api::{AddFont, BlobImageResources, AsyncBlobImageRasterizer, ResourceUpdate};
 use api::{BlobImageDescriptor, BlobImageHandler, BlobImageRequest, RasterizedBlobImage};
-use api::{ClearCache, DeviceIntPoint, DeviceIntRect, DeviceIntSize};
-use api::{DebugFlags, FontInstanceKey, FontKey, FontTemplate, GlyphIndex};
+use api::{ClearCache, DebugFlags, FontInstanceKey, FontKey, FontTemplate, GlyphIndex};
 use api::{ExternalImageData, ExternalImageType, BlobImageResult, BlobImageParams};
 use api::{FontInstanceData, FontInstanceOptions, FontInstancePlatformOptions, FontVariation};
-use api::{GlyphDimensions, IdNamespace};
-use api::{ImageData, ImageDescriptor, ImageKey, ImageRendering, ImageDirtyRect, DirtyRect};
-use api::{BlobImageKey, BlobDirtyRect, MemoryReport, VoidPtrToSizeFn};
-use api::{TileOffset, TileSize, TileRange, BlobImageData, LayoutIntRect, LayoutIntSize};
-use app_units::Au;
+use api::{DirtyRect, GlyphDimensions, IdNamespace};
+use api::{ImageData, ImageDescriptor, ImageKey, ImageRendering, TileSize};
+use api::{BlobImageData, BlobImageKey, MemoryReport, VoidPtrToSizeFn};
+use api::units::*;
 #[cfg(feature = "capture")]
 use capture::ExternalCaptureImage;
 #[cfg(feature = "replay")]
 use capture::PlainExternalImage;
 #[cfg(any(feature = "replay", feature = "png"))]
 use capture::CaptureConfig;
 use device::TextureFilter;
 use euclid::{point2, size2};
--- a/gfx/wr/webrender/src/scene.rs
+++ b/gfx/wr/webrender/src/scene.rs
@@ -1,15 +1,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/. */
 
-use api::{BuiltDisplayList, ColorF, DynamicProperties, Epoch, LayoutSize};
-use api::{FilterOp, TempFilterData, FilterData, ComponentTransferFuncType, LayoutTransform};
+use api::{BuiltDisplayList, ColorF, DynamicProperties, Epoch};
+use api::{FilterOp, TempFilterData, FilterData, ComponentTransferFuncType};
 use api::{PipelineId, PropertyBinding, PropertyBindingId, ItemRange, MixBlendMode, StackingContext};
+use api::units::{LayoutSize, LayoutTransform};
 use internal_types::FastHashMap;
 use std::sync::Arc;
 
 /// Stores a map of the animated property bindings for the current display list. These
 /// can be used to animate the transform and/or opacity of a display list without
 /// re-submitting the display list itself.
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
--- a/gfx/wr/webrender/src/scene_builder.rs
+++ b/gfx/wr/webrender/src/scene_builder.rs
@@ -1,17 +1,18 @@
 /* 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/. */
 
 use api::{AsyncBlobImageRasterizer, BlobImageRequest, BlobImageParams, BlobImageResult};
 use api::{DocumentId, PipelineId, ApiMsg, FrameMsg, ResourceUpdate, ExternalEvent, Epoch};
-use api::{BuiltDisplayList, ColorF, LayoutSize, NotificationRequest, Checkpoint, IdNamespace};
+use api::{BuiltDisplayList, ColorF, NotificationRequest, Checkpoint, IdNamespace};
 use api::{ClipIntern, FilterDataIntern, MemoryReport, PrimitiveKeyKind};
 use api::channel::MsgSender;
+use api::units::LayoutSize;
 #[cfg(feature = "capture")]
 use capture::CaptureConfig;
 use frame_builder::{FrameBuilderConfig, FrameBuilder};
 use clip_scroll_tree::ClipScrollTree;
 use display_list_flattener::DisplayListFlattener;
 use hit_test::HitTestingSceneStats;
 use intern::{Internable, Interner, UpdateList};
 use internal_types::{FastHashMap, FastHashSet};
--- a/gfx/wr/webrender/src/segment.rs
+++ b/gfx/wr/webrender/src/segment.rs
@@ -1,14 +1,14 @@
 /* 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/. */
 
-use api::{BorderRadius, ClipMode, LayoutPoint, LayoutPointAu, LayoutRect, LayoutSize};
-use app_units::Au;
+use api::{BorderRadius, ClipMode};
+use api::units::*;
 use prim_store::EdgeAaSegmentMask;
 use std::{cmp, usize};
 use util::{extract_inner_rect_safe, RectHelpers};
 use smallvec::SmallVec;
 
 bitflags! {
     pub struct ItemFlags: u8 {
         const X_ACTIVE = 0x1;
@@ -628,17 +628,18 @@ fn emit_segment_if_needed(
         edge_flags: EdgeAaSegmentMask::empty(),
         region_x,
         region_y,
     })
 }
 
 #[cfg(test)]
 mod test {
-    use api::{BorderRadius, ClipMode, LayoutPoint, LayoutRect, LayoutSize};
+    use api::{BorderRadius, ClipMode};
+    use api::units::{LayoutPoint, LayoutRect, LayoutSize};
     use prim_store::EdgeAaSegmentMask;
     use super::{Segment, SegmentBuilder};
     use std::cmp;
 
     fn rect(x0: f32, y0: f32, x1: f32, y1: f32) -> LayoutRect {
         LayoutRect::new(
             LayoutPoint::new(x0, y0),
             LayoutSize::new(x1-x0, y1-y0),
--- a/gfx/wr/webrender/src/spatial_node.rs
+++ b/gfx/wr/webrender/src/spatial_node.rs
@@ -1,16 +1,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/. */
 
-use api::{ExternalScrollId, LayoutPixel, LayoutPoint, LayoutRect, LayoutSize, LayoutTransform};
-use api::{LayoutVector2D, PipelineId, PropertyBinding, ReferenceFrameKind, ScrollClamping, ScrollLocation};
+use api::{ExternalScrollId, PipelineId, PropertyBinding, ReferenceFrameKind, ScrollClamping, ScrollLocation};
 use api::{TransformStyle, ScrollSensitivity, StickyOffsetBounds};
+use api::units::*;
 use clip_scroll_tree::{CoordinateSystem, CoordinateSystemId, SpatialNodeIndex, TransformUpdateState};
 use euclid::SideOffsets2D;
 use gpu_types::TransformPalette;
 use scene::SceneProperties;
 use util::{LayoutFastTransform, LayoutToWorldFastTransform, ScaleOffset, TransformedRectKind};
 
 #[derive(Clone, Debug)]
 pub enum SpatialNodeType {
--- a/gfx/wr/webrender/src/texture_allocator.rs
+++ b/gfx/wr/webrender/src/texture_allocator.rs
@@ -1,13 +1,13 @@
 /* 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/. */
 
-use api::{DeviceIntPoint, DeviceIntRect, DeviceIntSize};
+use api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize};
 use util;
 
 //TODO: gather real-world statistics on the bin usage in order to assist the decision
 // on where to place the size thresholds.
 
 /// This is an optimization tweak to enable looking through all the free rectangles in a bin
 /// and choosing the smallest, as opposed to picking the first match.
 const FIND_SMALLEST_AREA: bool = false;
--- a/gfx/wr/webrender/src/texture_cache.rs
+++ b/gfx/wr/webrender/src/texture_cache.rs
@@ -1,15 +1,15 @@
 /* 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/. */
 
-use api::{DebugFlags, DeviceIntPoint, DeviceIntRect, DeviceIntSize};
-use api::{DirtyRect, ImageDirtyRect, DocumentId, ExternalImageType, ImageFormat};
-use api::{ImageDescriptor};
+use api::{DirtyRect, DocumentId, ExternalImageType, ImageFormat};
+use api::{DebugFlags, ImageDescriptor};
+use api::units::*;
 #[cfg(test)]
 use api::IdNamespace;
 use device::{TextureFilter, total_gpu_bytes_allocated};
 use freelist::{FreeList, FreeListHandle, UpsertResult, WeakFreeListHandle};
 use gpu_cache::{GpuCache, GpuCacheHandle};
 use gpu_types::{ImageSource, UvRectKind};
 use internal_types::{CacheTextureId, FastHashMap, LayerIndex, TextureUpdateList, TextureUpdateSource};
 use internal_types::{TextureSource, TextureCacheAllocInfo, TextureCacheUpdate};
--- a/gfx/wr/webrender/src/tiling.rs
+++ b/gfx/wr/webrender/src/tiling.rs
@@ -1,15 +1,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/. */
 
 use api::{ColorF, BorderStyle, MixBlendMode, PipelineId, PremultipliedColorF};
 use api::{DocumentLayer, FilterData, FilterOp, ImageFormat, LineOrientation};
 use api::units::*;
+#[cfg(feature = "pathfinder")]
+use api::FontRenderMode;
 use batch::{AlphaBatchBuilder, AlphaBatchContainer, ClipBatcher, resolve_image};
 use clip::ClipStore;
 use clip_scroll_tree::{ClipScrollTree};
 use debug_render::DebugItem;
 use device::{Texture};
 #[cfg(feature = "pathfinder")]
 use euclid::{TypedPoint2D, TypedVector2D};
 use frame_builder::FrameGlobalResources;
@@ -24,18 +26,17 @@ use prim_store::gradient::GRADIENT_FP_ST
 use prim_store::{PrimitiveStore, DeferredResolve, PrimitiveScratchBuffer};
 use profiler::FrameProfileCounters;
 use render_backend::{DataStores, FrameId};
 use render_task::{BlitSource, RenderTaskAddress, RenderTaskId, RenderTaskKind};
 use render_task::{BlurTask, ClearMode, GlyphTask, RenderTaskLocation, RenderTaskTree, ScalingTask};
 use resource_cache::ResourceCache;
 use std::{cmp, usize, f32, i32, mem};
 use texture_allocator::{ArrayAllocationTracker, FreeRectSlice};
-#[cfg(feature = "pathfinder")]
-use webrender_api::{DevicePixel, FontRenderMode};
+
 
 const STYLE_SOLID: i32 = ((BorderStyle::Solid as i32) << 8) | ((BorderStyle::Solid as i32) << 16);
 const STYLE_MASK: i32 = 0x00FF_FF00;
 
 /// According to apitrace, textures larger than 2048 break fast clear
 /// optimizations on some intel drivers. We sometimes need to go larger, but
 /// we try to avoid it. This can go away when proper tiling support lands,
 /// since we can then split large primitives across multiple textures.
@@ -630,16 +631,17 @@ impl RenderTarget for AlphaRenderTarget 
         ctx: &RenderTargetContext,
         gpu_cache: &mut GpuCache,
         render_tasks: &RenderTaskTree,
         clip_store: &ClipStore,
         transforms: &mut TransformPalette,
         _: &mut Vec<DeferredResolve>,
     ) {
         let task = &render_tasks[task_id];
+        let (target_rect, _) = task.get_target_rect();
 
         match task.clear_mode {
             ClearMode::Zero => {
                 self.zero_clears.push(task_id);
             }
             ClearMode::One => {
                 self.one_clears.push(task_id);
             }
@@ -671,44 +673,45 @@ impl RenderTarget for AlphaRenderTarget 
                 info.add_instances(
                     &mut self.horizontal_blurs,
                     BlurDirection::Horizontal,
                     render_tasks.get_task_address(task_id),
                     render_tasks.get_task_address(task.children[0]),
                 );
             }
             RenderTaskKind::CacheMask(ref task_info) => {
-                let task_address = render_tasks.get_task_address(task_id);
                 self.clip_batcher.add(
-                    task_address,
                     task_info.clip_node_range,
                     task_info.root_spatial_node_index,
                     ctx.resource_cache,
                     gpu_cache,
                     clip_store,
                     ctx.clip_scroll_tree,
                     transforms,
                     &ctx.data_stores.clip,
                     task_info.actual_rect,
                     &ctx.screen_world_rect,
                     task_info.device_pixel_scale,
                     task_info.snap_offsets,
+                    target_rect.origin.to_f32(),
+                    task_info.actual_rect.origin.to_f32(),
                 );
             }
             RenderTaskKind::ClipRegion(ref region_task) => {
-                let task_address = render_tasks.get_task_address(task_id);
                 let device_rect = DeviceRect::new(
                     DevicePoint::zero(),
-                    task.get_dynamic_size().to_f32(),
+                    target_rect.size.to_f32(),
                 );
                 self.clip_batcher.add_clip_region(
-                    task_address,
                     region_task.clip_data_address,
                     region_task.local_pos,
                     device_rect,
+                    target_rect.origin.to_f32(),
+                    DevicePoint::zero(),
+                    region_task.device_pixel_scale.0,
                 );
             }
             RenderTaskKind::Scaling(ref info) => {
                 info.add_instances(
                     &mut self.scalings,
                     render_tasks.get_task_address(task_id),
                     render_tasks.get_task_address(task.children[0]),
                 );
--- a/gfx/wr/webrender/src/util.rs
+++ b/gfx/wr/webrender/src/util.rs
@@ -1,14 +1,14 @@
 /* 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/. */
 
-use api::{BorderRadius, DeviceIntPoint, DeviceIntRect, DeviceIntSize, DevicePixelScale};
-use api::{LayoutPixel, DeviceRect, WorldPixel, RasterRect};
+use api::BorderRadius;
+use api::units::*;
 use euclid::{Point2D, Rect, Size2D, TypedPoint2D, TypedRect, TypedSize2D, Vector2D};
 use euclid::{TypedTransform2D, TypedTransform3D, TypedVector2D, TypedScale};
 use malloc_size_of::{MallocShallowSizeOf, MallocSizeOf, MallocSizeOfOps};
 use num_traits::Zero;
 use plane_split::{Clipper, Polygon};
 use std::{i32, f32, fmt, ptr};
 use std::borrow::Cow;
 use std::os::raw::c_void;
@@ -479,17 +479,16 @@ pub fn extract_inner_rect_safe<U>(
 ) -> Option<TypedRect<f32, U>> {
     // value of `k==1.0` is used for extraction of the corner rectangles
     // see `SEGMENT_CORNER_*` in `clip_shared.glsl`
     extract_inner_rect_impl(rect, radii, 1.0)
 }
 
 #[cfg(test)]
 pub mod test {
-    use api::{LayoutTransform, LayoutVector3D};
     use super::*;
     use euclid::{Point2D, Angle, Transform3D};
     use std::f32::consts::PI;
 
     #[test]
     fn inverse_project() {
         let m0 = Transform3D::identity();
         let p0 = Point2D::new(1.0, 2.0);
--- a/gfx/wr/webrender_api/src/api.rs
+++ b/gfx/wr/webrender_api/src/api.rs
@@ -1,15 +1,14 @@
 /* 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/. */
 
 extern crate serde_bytes;
 
-use app_units::Au;
 use channel::{self, MsgSender, Payload, PayloadSender, PayloadSenderHelperMethods};
 use std::cell::Cell;
 use std::fmt;
 use std::marker::PhantomData;
 use std::os::raw::c_void;
 use std::path::PathBuf;
 use std::sync::Arc;
 use std::u32;
@@ -117,17 +116,18 @@ impl Transaction {
         // proper times, but it wouldn't make things simpler.
     }
 
     /// Sets the root pipeline.
     ///
     /// # Examples
     ///
     /// ```
-    /// # use webrender_api::{DeviceIntSize, PipelineId, RenderApiSender, Transaction};
+    /// # use webrender_api::{PipelineId, RenderApiSender, Transaction};
+    /// # use webrender_api::units::{DeviceIntSize};
     /// # fn example() {
     /// let pipeline_id = PipelineId(0, 0);
     /// let mut txn = Transaction::new();
     /// txn.set_root_pipeline(pipeline_id);
     /// # }
     /// ```
     pub fn set_root_pipeline(&mut self, pipeline_id: PipelineId) {
         self.scene_ops.push(SceneMsg::SetRootPipeline(pipeline_id));
--- a/gfx/wr/webrender_api/src/lib.rs
+++ b/gfx/wr/webrender_api/src/lib.rs
@@ -52,10 +52,8 @@ pub mod units;
 
 pub use api::*;
 pub use color::*;
 pub use display_item::*;
 pub use display_list::*;
 pub use font::*;
 pub use gradient_builder::*;
 pub use image::*;
-//TODO: stop re-exporting this
-pub use units::*;
--- a/gfx/wr/webrender_api/src/units.rs
+++ b/gfx/wr/webrender_api/src/units.rs
@@ -7,17 +7,17 @@
 //! Physical pixels take into account the device pixel ratio and their dimensions tend
 //! to correspond to the allocated size of resources in memory, while logical pixels
 //! don't have the device pixel ratio applied which means they are agnostic to the usage
 //! of hidpi screens and the like.
 //!
 //! The terms "layer" and "stacking context" can be used interchangeably
 //! in the context of coordinate systems.
 
-use app_units::Au;
+pub use app_units::Au;
 use euclid::{Length, TypedRect, TypedScale, TypedSize2D, TypedTransform3D, TypedTranslation2D};
 use euclid::{TypedPoint2D, TypedPoint3D, TypedVector2D, TypedVector3D, TypedSideOffsets2D};
 use euclid::HomogeneousVector;
 // local imports
 use image::DirtyRect;
 
 /// Geometry in the coordinate system of the render target (screen or intermediate
 /// surface) in physical pixels.
--- a/gfx/wr/wrench/Cargo.toml
+++ b/gfx/wr/wrench/Cargo.toml
@@ -8,17 +8,16 @@ license = "MPL-2.0"
 [dependencies]
 base64 = "0.10"
 bincode = "1.0"
 byteorder = "1.0"
 env_logger = { version = "0.5", optional = true }
 euclid = "0.19"
 gleam = "0.6.2"
 glutin = "0.17"
-app_units = "0.7"
 image = "0.21"
 clap = { version = "2", features = ["yaml"] }
 lazy_static = "1"
 log = "0.4"
 yaml-rust = "0.4"
 serde_json = "1.0"
 ron = "0.1.5"
 time = "0.1"
--- a/gfx/wr/wrench/src/blob.rs
+++ b/gfx/wr/wrench/src/blob.rs
@@ -3,16 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // A very basic BlobImageRasterizer that can only render a checkerboard pattern.
 
 use std::collections::HashMap;
 use std::sync::Arc;
 use std::sync::Mutex;
 use webrender::api::*;
+use webrender::api::units::{BlobDirtyRect, BlobToDeviceTranslation, TileOffset};
 
 // Serialize/deserialize the blob.
 
 pub fn serialize_blob(color: ColorU) -> Arc<Vec<u8>> {
     Arc::new(vec![color.r, color.g, color.b, color.a])
 }
 
 fn deserialize_blob(blob: &[u8]) -> Result<ColorU, ()> {
--- a/gfx/wr/wrench/src/json_frame_writer.rs
+++ b/gfx/wr/wrench/src/json_frame_writer.rs
@@ -1,29 +1,30 @@
 /* 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 json code is largely unfinished; allow these to silence a bunch of warnings
 #![allow(unused_variables)]
 #![allow(dead_code)]
 
-use app_units::Au;
 use image::{save_buffer, ColorType};
 use premultiply::unpremultiply;
 use serde_json;
 use std::collections::HashMap;
 use std::io::Write;
 use std::path::{Path, PathBuf};
 use std::{fmt, fs};
 use super::CURRENT_FRAME_NUMBER;
 use time;
 use webrender;
 use webrender::api::*;
 use webrender::api::channel::Payload;
+use webrender::api::units::*;
+
 
 enum CachedFont {
     Native(NativeFontHandle),
     Raw(Option<Vec<u8>>, u32, Option<PathBuf>),
 }
 
 struct CachedFontInstance {
     font_key: FontKey,
--- a/gfx/wr/wrench/src/main.rs
+++ b/gfx/wr/wrench/src/main.rs
@@ -1,13 +1,12 @@
 /* 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/. */
 
-extern crate app_units;
 extern crate base64;
 extern crate bincode;
 extern crate byteorder;
 #[macro_use]
 extern crate clap;
 #[cfg(target_os = "macos")]
 extern crate core_foundation;
 #[cfg(target_os = "macos")]
@@ -75,16 +74,17 @@ use std::mem;
 use std::os::raw::c_void;
 use std::path::{Path, PathBuf};
 use std::process;
 use std::ptr;
 use std::rc::Rc;
 use std::sync::mpsc::{channel, Sender, Receiver};
 use webrender::DebugFlags;
 use webrender::api::*;
+use webrender::api::units::*;
 use winit::dpi::{LogicalPosition, LogicalSize};
 use winit::VirtualKeyCode;
 use wrench::{Wrench, WrenchThing};
 use yaml_frame_reader::YamlFrameReader;
 
 lazy_static! {
     static ref PLATFORM_DEFAULT_FACE_NAME: String = String::from("Arial");
 }
--- a/gfx/wr/wrench/src/png.rs
+++ b/gfx/wr/wrench/src/png.rs
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use {WindowWrapper, NotifierEvent};
 use image::png::PNGEncoder;
 use image::{self, ColorType, GenericImageView};
 use std::fs::File;
 use std::path::Path;
 use std::sync::mpsc::Receiver;
-use webrender::api::*;
+use webrender::api::units::*;
 use wrench::{Wrench, WrenchThing};
 use yaml_frame_reader::YamlFrameReader;
 
 pub enum ReadSurface {
     Screen,
     GpuCache,
 }
 
--- a/gfx/wr/wrench/src/rawtest.rs
+++ b/gfx/wr/wrench/src/rawtest.rs
@@ -4,16 +4,17 @@
 
 use {WindowWrapper, NotifierEvent};
 use blob;
 use euclid::{point2, size2, rect};
 use std::sync::Arc;
 use std::sync::atomic::{AtomicIsize, Ordering};
 use std::sync::mpsc::Receiver;
 use webrender::api::*;
+use webrender::api::units::*;
 use wrench::Wrench;
 
 pub struct RawtestHarness<'a> {
     wrench: &'a mut Wrench,
     rx: &'a Receiver<NotifierEvent>,
     window: &'a mut WindowWrapper,
 }
 
--- a/gfx/wr/wrench/src/reftest.rs
+++ b/gfx/wr/wrench/src/reftest.rs
@@ -12,19 +12,21 @@ use png::save_flipped;
 use std::cmp;
 use std::fmt::{Display, Error, Formatter};
 use std::fs::File;
 use std::io::{BufRead, BufReader};
 use std::path::{Path, PathBuf};
 use std::sync::mpsc::Receiver;
 use webrender::RenderResults;
 use webrender::api::*;
+use webrender::api::units::*;
 use wrench::{Wrench, WrenchThing};
 use yaml_frame_reader::YamlFrameReader;
 
+
 #[cfg(target_os = "windows")]
 const PLATFORM: &str = "win";
 #[cfg(target_os = "linux")]
 const PLATFORM: &str = "linux";
 #[cfg(target_os = "macos")]
 const PLATFORM: &str = "mac";
 #[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "windows")))]
 const PLATFORM: &str = "other";
--- a/gfx/wr/wrench/src/ron_frame_writer.rs
+++ b/gfx/wr/wrench/src/ron_frame_writer.rs
@@ -6,16 +6,17 @@ use ron;
 use std::collections::HashMap;
 use std::io::Write;
 use std::path::{Path, PathBuf};
 use std::{fmt, fs};
 use super::CURRENT_FRAME_NUMBER;
 use webrender;
 use webrender::api::*;
 use webrender::api::channel::Payload;
+use webrender::api::units::*;
 
 enum CachedFont {
     Native(NativeFontHandle),
     Raw(Option<Vec<u8>>, u32, Option<PathBuf>),
 }
 
 struct CachedImage {
     width: i32,
--- a/gfx/wr/wrench/src/scene.rs
+++ b/gfx/wr/wrench/src/scene.rs
@@ -1,16 +1,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/. */
 
 use std::collections::HashMap;
-use webrender::api::{BuiltDisplayList, ColorF, Epoch};
-use webrender::api::{LayoutSize, PipelineId};
-use webrender::api::{PropertyBinding, PropertyBindingId, LayoutTransform, DynamicProperties};
+use webrender::api::{BuiltDisplayList, ColorF, Epoch, PipelineId};
+use webrender::api::{PropertyBinding, PropertyBindingId, DynamicProperties};
+use webrender::api::units::{LayoutSize, LayoutTransform};
 
 /// Stores a map of the animated property bindings for the current display list. These
 /// can be used to animate the transform and/or opacity of a display list without
 /// re-submitting the display list itself.
 #[derive(Default)]
 pub struct SceneProperties {
     transform_properties: HashMap<PropertyBindingId, LayoutTransform>,
     float_properties: HashMap<PropertyBindingId, f32>,
--- a/gfx/wr/wrench/src/wrench.rs
+++ b/gfx/wr/wrench/src/wrench.rs
@@ -1,30 +1,30 @@
 /* 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/. */
 
 
-use app_units::Au;
 use blob;
 use crossbeam::sync::chase_lev;
 #[cfg(windows)]
 use dwrote;
 #[cfg(all(unix, not(target_os = "android")))]
 use font_loader::system_fonts;
 use winit::EventsLoopProxy;
 use json_frame_writer::JsonFrameWriter;
 use ron_frame_writer::RonFrameWriter;
 use std::collections::HashMap;
 use std::path::PathBuf;
 use std::sync::{Arc, Mutex};
 use std::sync::mpsc::Receiver;
 use time;
 use webrender;
 use webrender::api::*;
+use webrender::api::units::*;
 use webrender::{DebugFlags, RenderResults, ShaderPrecacheFlags};
 use yaml_frame_writer::YamlFrameWriterReceiver;
 use {WindowWrapper, NotifierEvent};
 
 // TODO(gw): This descriptor matches what we currently support for fonts
 //           but is quite a mess. We should at least document and
 //           use better types for things like the style and stretch.
 #[derive(Debug, Clone, Hash, PartialEq, Eq)]
--- a/gfx/wr/wrench/src/yaml_frame_reader.rs
+++ b/gfx/wr/wrench/src/yaml_frame_reader.rs
@@ -1,25 +1,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/. */
 
-use app_units::Au;
 use clap;
 use euclid::SideOffsets2D;
 use image;
 use image::GenericImageView;
 use parse_function::parse_function;
 use premultiply::premultiply;
 use std::collections::HashMap;
 use std::fs::File;
 use std::io::Read;
 use std::path::{Path, PathBuf};
 use std::usize;
 use webrender::api::*;
+use webrender::api::units::*;
 use wrench::{FontDescriptor, Wrench, WrenchThing};
 use yaml_helper::{StringEnum, YamlHelper, make_perspective};
 use yaml_rust::{Yaml, YamlLoader};
 use PLATFORM_DEFAULT_FACE_NAME;
 
 fn rsrc_path(item: &Yaml, aux_dir: &PathBuf) -> PathBuf {
     let filename = item.as_str().unwrap();
     let mut file = aux_dir.clone();
--- a/gfx/wr/wrench/src/yaml_frame_writer.rs
+++ b/gfx/wr/wrench/src/yaml_frame_writer.rs
@@ -1,29 +1,29 @@
 /* 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/. */
 
 extern crate yaml_rust;
 
-use app_units::Au;
 use euclid::{TypedPoint2D, TypedRect, TypedSize2D, TypedTransform3D, TypedVector2D};
 use image::{save_buffer, ColorType};
 use premultiply::unpremultiply;
 use scene::{Scene, SceneProperties};
 use std::collections::HashMap;
 use std::io::Write;
 use std::path::{Path, PathBuf};
 use std::{fmt, fs};
 use super::CURRENT_FRAME_NUMBER;
 use time;
 use webrender;
 use webrender::api::*;
 use webrender::api::SpecificDisplayItem as Sdi;
 use webrender::api::channel::Payload;
+use webrender::api::units::*;
 use yaml_helper::StringEnum;
 use yaml_rust::{Yaml, YamlEmitter};
 
 type Table = yaml_rust::yaml::Hash;
 
 fn array_elements_are_same<T: PartialEq>(v: &[T]) -> bool {
     if !v.is_empty() {
         let first = &v[0];
--- a/gfx/wr/wrench/src/yaml_helper.rs
+++ b/gfx/wr/wrench/src/yaml_helper.rs
@@ -1,18 +1,18 @@
 /* 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/. */
 
-use app_units::Au;
 use euclid::{Angle, TypedSize2D};
 use parse_function::parse_function;
 use std::f32;
 use std::str::FromStr;
 use webrender::api::*;
+use webrender::api::units::*;
 use yaml_rust::{Yaml, YamlLoader};
 
 pub trait YamlHelper {
     fn as_f32(&self) -> Option<f32>;
     fn as_force_f32(&self) -> Option<f32>;
     fn as_vec_f32(&self) -> Option<Vec<f32>>;
     fn as_vec_u32(&self) -> Option<Vec<u32>>;
     fn as_vec_u64(&self) -> Option<Vec<u64>>;
--- a/ipc/glue/moz.build
+++ b/ipc/glue/moz.build
@@ -184,22 +184,16 @@ if CONFIG['OS_ARCH'] == 'Darwin':
     SOURCES += [
         'GeckoChildProcessHost.cpp',
     ]
 else:
     UNIFIED_SOURCES += [
         'GeckoChildProcessHost.cpp',
     ]
 
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    # This is intended as a temporary hack to support building with VS2015.
-    # 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
-    SOURCES['BackgroundChildImpl.cpp'].flags += ['-wd4312']
-    SOURCES['BackgroundParentImpl.cpp'].flags += ['-wd4312']
-
 LOCAL_INCLUDES += [
     '/caps',
     '/dom/broadcastchannel',
     '/dom/indexedDB',
     '/dom/storage',
     '/media/webrtc/trunk',
     '/media/webrtc/trunk/webrtc',
     '/xpcom/build',
--- a/js/src/js-cxxflags.mozbuild
+++ b/js/src/js-cxxflags.mozbuild
@@ -2,32 +2,16 @@
 # vim: set filetype=python:
 # 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/.
 
 # ICU pkg-config flags
 CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
 
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    # C4805 warns mixing bool with other integral types in computation.
-    # But given the conversion from bool is specified, and this is a
-    # pattern widely used in code in js/src, suppress this warning here.
-    CXXFLAGS += ['-wd4805']
-    # C4661 ("no suitable definition provided for explicit template
-    # instantiation request") is emitted for all Parser methods that
-    # have a Parser<FullParseHandler> definition but no
-    # Parser<SyntaxParseHandler> definition, see bug 1167030.
-    CXXFLAGS += ['-wd4661']
-    # FIXME: unary minus operator applied to unsigned type (bug 1229189)
-    CXXFLAGS += ['-wd4146']
-    # FIXME: 'operation' : conversion from 'type1' to 'type2' of
-    # greater size (bug 1259304)
-    CXXFLAGS += ['-wd4312']
-
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     # Also disable strict-aliasing for GCC compiler, that is enabled by default
     # starting with version 7.1, see Bug 1363009
     CXXFLAGS += ['-fno-strict-aliasing']
     # Error on bad printf-like format strings
     CXXFLAGS += ['-Werror=format']
     # Ignore shadowed variable warnings as there are too many.
     CXXFLAGS += ['-Wno-shadow']
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -129,25 +129,19 @@ case "$target" in
         _WIN32_MSVC=1
 
         # Make sure compilers are valid
         CFLAGS="$CFLAGS -nologo"
         CXXFLAGS="$CXXFLAGS -TP -nologo"
         if test -z "$CLANG_CL"; then
             CPPFLAGS="$CPPFLAGS -utf-8"
         fi
-        # MSVC warning C4800 warns when a value is implicitly cast to bool,
-        # because this also forces narrowing to a single byte, which can be a
-        # perf hit.  But this matters so little in practice (and often we want
-        # that behavior) that it's better to turn it off.
         # _CRT_SECURE_NO_WARNINGS disables warnings about using MSVC-specific
         # secure CRT functions.
-        # MSVC warning C4595 warns non-member operator new or delete functions
-        # may not be declared inline, as of VS2015 Update 2.
-        CXXFLAGS="$CXXFLAGS -wd4800 -wd4595 -D_CRT_SECURE_NO_WARNINGS"
+        CXXFLAGS="$CXXFLAGS -D_CRT_SECURE_NO_WARNINGS"
         AC_LANG_SAVE
         AC_LANG_C
         AC_TRY_COMPILE([#include <stdio.h>],
             [ printf("Hello World\n"); ],,
             AC_MSG_ERROR([\$(CC) test failed.  You must have MS VC++ in your path to build.]) )
 
         AC_LANG_CPLUSPLUS
         AC_TRY_COMPILE([#include <new.h>],
@@ -158,34 +152,20 @@ case "$target" in
         changequote(,)
         _MSVC_VER_FILTER='s|.*[^!-~]([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*|\1|p'
         changequote([,])
 
         AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
         AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
         AC_DEFINE(_USE_MATH_DEFINES) # Otherwise MSVC's math.h doesn't #define M_PI.
 
-        # C5038: Enable initializer list order warnings
-        # The -w1#### flag treats warning C#### as if it was a warning level
-        # 1 warning, and thus enables it because we enable /W3 warnings. We
-        # don't use -we#### because it would enable warning C#### but treat
-        # it as an error, even in third-party code.
-        # https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level
-        CXXFLAGS="$CXXFLAGS -w15038"
-
         _CC_SUITE=14
         MSVC_C_RUNTIME_DLL=vcruntime140.dll
         MSVC_CXX_RUNTIME_DLL=msvcp140.dll
 
-        # C5026: move constructor was implicitly defined as deleted
-        CXXFLAGS="$CXXFLAGS -wd5026"
-
-        # C5027: move assignment operator was implicitly defined as deleted
-        CXXFLAGS="$CXXFLAGS -wd5027"
-
         # -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146)
         CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-"
 
         AC_SUBST(MSVC_C_RUNTIME_DLL)
         AC_SUBST(MSVC_CXX_RUNTIME_DLL)
 
         # Check linker version, except in lld builds
         case "$LINKER" in
@@ -619,29 +599,16 @@ case "$target" in
         dnl Disabled on ASan because it causes false-positive ODR violations.
         if test -z "$MOZ_ASAN"; then
             CFLAGS="$CFLAGS -Gw"
             CXXFLAGS="$CXXFLAGS -Gw"
         else
             # String tail merging doesn't play nice with ASan's ODR checker.
             LDFLAGS="$LDFLAGS -opt:nolldtailmerge"
         fi
-        # khuey says we can safely ignore MSVC warning C4251
-        # MSVC warning C4244 (implicit type conversion may lose data) warns
-        # and requires workarounds for perfectly valid code.  Also, GCC/clang
-        # don't warn about it by default. So for consistency/sanity, we turn
-        # it off on MSVC, too.
-        # MSVC warning C4267 warns for narrowing type conversions from size_t
-        # to 32-bit integer types on 64-bit platforms.  Since this is virtually
-        # the same thing as C4244, we disable C4267, too.
-        CFLAGS="$CFLAGS -wd4244 -wd4267"
-        CXXFLAGS="$CXXFLAGS -wd4244 -wd4267 -wd4251"
-        # Silence "warning C4065: switch statement contains 'default' but no
-        # 'case' labels".  See bug 1461304.
-        CXXFLAGS="$CXXFLAGS -wd4065"
         if test -n "$CLANG_CL"; then
             # XXX We should combine some of these with our generic GCC-style
             # warning checks.
             #
             # Suppress the clang-cl warning for the inline 'new' and 'delete' in mozalloc
             CXXFLAGS="$CXXFLAGS -Wno-inline-new-delete"
             # We use offsetof on non-POD objects all the time.
             # We also suppress this warning on other platforms.
@@ -697,19 +664,16 @@ case "$target" in
             CXXFLAGS="$CXXFLAGS -Wno-ignored-attributes"
             # __attribute__((unused)) really means "might be unused" and
             # we use it to avoid warnings about things that are unused
             # in some compilation units, but used in many others.  This
             # warning insists on complaining about the latter case, which
             # is annoying, and rather noisy.
             CXXFLAGS="$CXXFLAGS -Wno-used-but-marked-unused"
         fi
-        # make 'foo == bar;' error out
-        CFLAGS="$CFLAGS -we4553"
-        CXXFLAGS="$CXXFLAGS -we4553"
         LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib"
         MOZ_DEBUG_LDFLAGS='-DEBUG'
         WARNINGS_AS_ERRORS='-WX'
         MOZ_OPTIMIZE_FLAGS="-O2"
         MOZ_FIX_LINK_PATHS=
         LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE"
         if test -z "$DEVELOPER_OPTIONS"; then
             LDFLAGS="$LDFLAGS -RELEASE"
--- a/js/xpconnect/wrappers/moz.build
+++ b/js/xpconnect/wrappers/moz.build
@@ -16,22 +16,16 @@ UNIFIED_SOURCES += [
     'WrapperFactory.cpp',
 ]
 
 # XrayWrapper needs to be built separately becaue of template instantiations.
 SOURCES += [
     'XrayWrapper.cpp',
 ]
 
-# warning C4661 for FilteringWrapper
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    CXXFLAGS += [
-        '-wd4661', # no suitable definition provided for explicit template instantiation request
-    ]
-
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../../../dom/base',
     '../src',
     '/caps',
--- a/layout/base/moz.build
+++ b/layout/base/moz.build
@@ -160,15 +160,10 @@ IPDL_SOURCES += [
 
 FINAL_LIBRARY = 'xul'
 
 BROWSER_CHROME_MANIFESTS += ['tests/browser.ini']
 MARIONETTE_LAYOUT_MANIFESTS += ['tests/marionette/manifest.ini']
 MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
 MOCHITEST_CHROME_MANIFESTS += ['tests/chrome/chrome.ini']
 
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    # This is intended as a temporary hack to support building with VS2015.
-    # 'type cast': conversion from 'unsigned int' to 'void *' of greater size
-    CXXFLAGS += ['-wd4312']
-
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/layout/forms/nsImageControlFrame.cpp
+++ b/layout/forms/nsImageControlFrame.cpp
@@ -44,18 +44,18 @@ class nsImageControlFrame final : public
 #endif
 
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const override {
     return MakeFrameName(NS_LITERAL_STRING("ImageControl"), aResult);
   }
 #endif
 
-  virtual nsresult GetCursor(const nsPoint& aPoint,
-                             nsIFrame::Cursor& aCursor) override;
+  Maybe<Cursor> GetCursor(const nsPoint&) override;
+
   // nsIFormContromFrame
   virtual void SetFocus(bool aOn, bool aRepaint) override;
   virtual nsresult SetFormProperty(nsAtom* aName,
                                    const nsAString& aValue) override;
 };
 
 nsImageControlFrame::nsImageControlFrame(ComputedStyle* aStyle,
                                          nsPresContext* aPresContext)
@@ -147,25 +147,20 @@ nsresult nsImageControlFrame::HandleEven
       TranslateEventCoords(pt, *lastClickPoint);
     }
   }
   return nsImageFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
 }
 
 void nsImageControlFrame::SetFocus(bool aOn, bool aRepaint) {}
 
-nsresult nsImageControlFrame::GetCursor(const nsPoint& aPoint,
-                                        nsIFrame::Cursor& aCursor) {
-  // Use style defined cursor if one is provided, otherwise when
-  // the cursor style is "auto" we use the pointer cursor.
-  FillCursorInformationFromStyle(StyleUI(), aCursor);
-
-  if (StyleCursorKind::Auto == aCursor.mCursor) {
-    aCursor.mCursor = StyleCursorKind::Pointer;
+Maybe<nsIFrame::Cursor> nsImageControlFrame::GetCursor(const nsPoint&) {
+  StyleCursorKind kind = StyleUI()->mCursor;
+  if (kind == StyleCursorKind::Auto) {
+    kind = StyleCursorKind::Pointer;
   }
-
-  return NS_OK;
+  return Some(Cursor{kind, AllowCustomCursorImage::Yes});
 }
 
 nsresult nsImageControlFrame::SetFormProperty(nsAtom* aName,
                                               const nsAString& aValue) {
   return NS_OK;
 }
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -5130,32 +5130,30 @@ void nsIFrame::AssociateImage(const nsSt
   }
   mozilla::css::ImageLoader* loader =
       aPresContext->Document()->StyleImageLoader();
 
   // If this fails there's not much we can do ...
   loader->AssociateRequestToFrame(req, this, aImageLoaderFlags);
 }
 
-nsresult nsFrame::GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) {
-  FillCursorInformationFromStyle(StyleUI(), aCursor);
-  if (StyleCursorKind::Auto == aCursor.mCursor) {
+Maybe<nsIFrame::Cursor> nsIFrame::GetCursor(const nsPoint&) {
+  StyleCursorKind kind = StyleUI()->mCursor;
+  if (kind == StyleCursorKind::Auto) {
     // If this is editable, I-beam cursor is better for most elements.
-    aCursor.mCursor = (mContent && mContent->IsEditable())
-                          ? StyleCursorKind::Text
-                          : StyleCursorKind::Default;
-  }
-  if (StyleCursorKind::Text == aCursor.mCursor &&
-      GetWritingMode().IsVertical()) {
+    kind = (mContent && mContent->IsEditable()) ? StyleCursorKind::Text
+                                                : StyleCursorKind::Default;
+  }
+  if (kind == StyleCursorKind::Text && GetWritingMode().IsVertical()) {
     // Per CSS UI spec, UA may treat value 'text' as
     // 'vertical-text' for vertical text.
-    aCursor.mCursor = StyleCursorKind::VerticalText;
-  }
-
-  return NS_OK;
+    kind = StyleCursorKind::VerticalText;
+  }
+
+  return Some(Cursor{kind, AllowCustomCursorImage::Yes});
 }
 
 // Resize and incremental reflow
 
 /* virtual */
 void nsFrame::MarkIntrinsicISizesDirty() {
   // This version is meant only for what used to be box-to-block adaptors.
   // It should not be called by other derived classes.
@@ -9745,45 +9743,16 @@ uint8_t nsIFrame::VerticalAlignEnum() co
   const nsStyleCoord& verticalAlign = StyleDisplay()->mVerticalAlign;
   if (verticalAlign.GetUnit() == eStyleUnit_Enumerated) {
     return verticalAlign.GetIntValue();
   }
 
   return eInvalidVerticalAlign;
 }
 
-/* static */
-void nsFrame::FillCursorInformationFromStyle(const nsStyleUI* ui,
-                                             nsIFrame::Cursor& aCursor) {
-  aCursor.mCursor = ui->mCursor;
-  aCursor.mHaveHotspot = false;
-  aCursor.mLoading = false;
-  aCursor.mHotspotX = aCursor.mHotspotY = 0.0f;
-
-  for (const nsCursorImage& item : ui->mCursorImages) {
-    uint32_t status;
-    imgRequestProxy* req = item.GetImage();
-    if (!req || NS_FAILED(req->GetImageStatus(&status))) {
-      continue;
-    }
-    if (!(status & imgIRequest::STATUS_LOAD_COMPLETE)) {
-      // If we are falling back because any cursor before is loading,
-      // let the consumer know.
-      aCursor.mLoading = true;
-    } else if (!(status & imgIRequest::STATUS_ERROR)) {
-      // This is the one we want
-      req->GetImage(getter_AddRefs(aCursor.mContainer));
-      aCursor.mHaveHotspot = item.mHaveHotspot;
-      aCursor.mHotspotX = item.mHotspotX;
-      aCursor.mHotspotY = item.mHotspotY;
-      break;
-    }
-  }
-}
-
 NS_IMETHODIMP
 nsFrame::RefreshSizeCache(nsBoxLayoutState& aState) {
   // XXXbz this comment needs some rewriting to make sense in the
   // post-reflow-branch world.
 
   // Ok we need to compute our minimum, preferred, and maximum sizes.
   // 1) Maximum size. This is easy. Its infinite unless it is overloaded by CSS.
   // 2) Preferred size. This is a little harder. This is the size the
--- a/layout/generic/nsFrame.h
+++ b/layout/generic/nsFrame.h
@@ -172,17 +172,16 @@ class nsFrame : public nsBox {
   const nsFrameList& GetChildList(ChildListID aListID) const override;
   void GetChildLists(nsTArray<ChildList>* aLists) const override;
 
   nsresult HandleEvent(nsPresContext* aPresContext,
                        mozilla::WidgetGUIEvent* aEvent,
                        nsEventStatus* aEventStatus) override;
   nsresult GetContentForEvent(mozilla::WidgetEvent* aEvent,
                               nsIContent** aContent) override;
-  nsresult GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) override;
 
   nsresult GetPointFromOffset(int32_t inOffset, nsPoint* outPoint) override;
   nsresult GetCharacterRectsInRange(int32_t aInOffset, int32_t aLength,
                                     nsTArray<nsRect>& aOutRect) override;
 
   nsresult GetChildFrameContainingOffset(int32_t inContentOffset, bool inHint,
                                          int32_t* outFrameContentOffset,
                                          nsIFrame** outChildFrame) override;
@@ -650,19 +649,16 @@ class nsFrame : public nsBox {
   //  table supported) (enums for this are defined in nsIFrame.h)
   nsresult GetDataForTableSelection(const nsFrameSelection* aFrameSelection,
                                     nsIPresShell* aPresShell,
                                     mozilla::WidgetMouseEvent* aMouseEvent,
                                     nsIContent** aParentContent,
                                     int32_t* aContentOffset,
                                     mozilla::TableSelection* aTarget);
 
-  // Fills aCursor with the appropriate information from ui
-  static void FillCursorInformationFromStyle(const nsStyleUI* ui,
-                                             nsIFrame::Cursor& aCursor);
   NS_IMETHOD DoXULLayout(nsBoxLayoutState& aBoxLayoutState) override;
 
   nsBoxLayoutMetrics* BoxMetrics() const;
 
   // Fire DOM event. If no aContent argument use frame's mContent.
   void FireDOMEvent(const nsAString& aDOMEventName,
                     nsIContent* aContent = nullptr);
 
--- a/layout/generic/nsFrameSetFrame.cpp
+++ b/layout/generic/nsFrameSetFrame.cpp
@@ -82,18 +82,17 @@ class nsHTMLFramesetBorderFrame final : 
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const override;
 #endif
 
   virtual nsresult HandleEvent(nsPresContext* aPresContext,
                                WidgetGUIEvent* aEvent,
                                nsEventStatus* aEventStatus) override;
 
-  virtual nsresult GetCursor(const nsPoint& aPoint,
-                             nsIFrame::Cursor& aCursor) override;
+  Maybe<Cursor> GetCursor(const nsPoint&) override;
 
   virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
                                 const nsDisplayListSet& aLists) override;
 
   virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
                       const ReflowInput& aReflowInput,
                       nsReflowStatus& aStatus) override;
 
@@ -625,26 +624,23 @@ nsresult nsHTMLFramesetFrame::HandleEven
     }
     *aEventStatus = nsEventStatus_eConsumeNoDefault;
   } else {
     *aEventStatus = nsEventStatus_eIgnore;
   }
   return NS_OK;
 }
 
-nsresult nsHTMLFramesetFrame::GetCursor(const nsPoint& aPoint,
-                                        nsIFrame::Cursor& aCursor) {
-  aCursor.mLoading = false;
+Maybe<nsIFrame::Cursor> nsHTMLFramesetFrame::GetCursor(const nsPoint&) {
+  auto kind = StyleCursorKind::Default;
   if (mDragger) {
-    aCursor.mCursor = (mDragger->mVertical) ? StyleCursorKind::EwResize
-                                            : StyleCursorKind::NsResize;
-  } else {
-    aCursor.mCursor = StyleCursorKind::Default;
+    kind = mDragger->mVertical ? StyleCursorKind::EwResize
+                               : StyleCursorKind::NsResize;
   }
-  return NS_OK;
+  return Some(Cursor{kind, AllowCustomCursorImage::No});
 }
 
 void nsHTMLFramesetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
                                            const nsDisplayListSet& aLists) {
   BuildDisplayListForInline(aBuilder, aLists);
 
   if (mDragger && aBuilder->IsForEventDelivery()) {
     aLists.Content()->AppendToTop(
@@ -1461,26 +1457,22 @@ nsresult nsHTMLFramesetBorderFrame::Hand
     if (parentFrame) {
       parentFrame->StartMouseDrag(aPresContext, this, aEvent);
       *aEventStatus = nsEventStatus_eConsumeNoDefault;
     }
   }
   return NS_OK;
 }
 
-nsresult nsHTMLFramesetBorderFrame::GetCursor(const nsPoint& aPoint,
-                                              nsIFrame::Cursor& aCursor) {
-  aCursor.mLoading = false;
-  if (!mCanResize) {
-    aCursor.mCursor = StyleCursorKind::Default;
-  } else {
-    aCursor.mCursor =
-        (mVertical) ? StyleCursorKind::EwResize : StyleCursorKind::NsResize;
+Maybe<nsIFrame::Cursor> nsHTMLFramesetBorderFrame::GetCursor(const nsPoint&) {
+  auto kind = StyleCursorKind::Default;
+  if (mCanResize) {
+    kind = mVertical ? StyleCursorKind::EwResize : StyleCursorKind::NsResize;
   }
-  return NS_OK;
+  return Some(Cursor{kind, AllowCustomCursorImage::No});
 }
 
 #ifdef DEBUG_FRAME_DUMP
 nsresult nsHTMLFramesetBorderFrame::GetFrameName(nsAString& aResult) const {
   return MakeFrameName(NS_LITERAL_STRING("FramesetBorder"), aResult);
 }
 #endif
 
--- a/layout/generic/nsFrameSetFrame.h
+++ b/layout/generic/nsFrameSetFrame.h
@@ -83,18 +83,17 @@ class nsHTMLFramesetFrame final : public
 
   void GetSizeOfChildAt(int32_t aIndexInParent, mozilla::WritingMode aWM,
                         mozilla::LogicalSize& aSize, nsIntPoint& aCellIndex);
 
   virtual nsresult HandleEvent(nsPresContext* aPresContext,
                                mozilla::WidgetGUIEvent* aEvent,
                                nsEventStatus* aEventStatus) override;
 
-  virtual nsresult GetCursor(const nsPoint& aPoint,
-                             nsIFrame::Cursor& aCursor) override;
+  mozilla::Maybe<Cursor> GetCursor(const nsPoint&) override;
 
   virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
                                 const nsDisplayListSet& aLists) override;
 
   virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
                       const ReflowInput& aReflowInput,
                       nsReflowStatus& aStatus) override;
 
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -1987,32 +1987,38 @@ class nsIFrame : public nsQueryFrame {
 
   /**
    * Ensure that aImage gets notifed when the underlying image request loads
    * or animates.
    */
   void AssociateImage(const nsStyleImage& aImage, nsPresContext* aPresContext,
                       uint32_t aImageLoaderFlags);
 
-  /**
-   * This structure holds information about a cursor. mContainer represents a
-   * loaded image that should be preferred. If it is not possible to use it, or
-   * if it is null, mCursor should be used.
+  enum class AllowCustomCursorImage {
+    No,
+    Yes,
+  };
+
+  /**
+   * This structure holds information about a cursor. AllowCustomCursorImage
+   * is `No`, then no cursor image should be loaded from the style specified on
+   * `mStyle`, or the frame's style.
+   *
+   * The `mStyle` member is used for `<area>` elements.
    */
   struct MOZ_STACK_CLASS Cursor {
-    nsCOMPtr<imgIContainer> mContainer;
     mozilla::StyleCursorKind mCursor = mozilla::StyleCursorKind::Auto;
-    bool mHaveHotspot = false;
-    bool mLoading = false;
-    float mHotspotX = 0.0f, mHotspotY = 0.0f;
+    AllowCustomCursorImage mAllowCustomCursor = AllowCustomCursorImage::Yes;
+    RefPtr<mozilla::ComputedStyle> mStyle;
   };
+
   /**
    * Get the cursor for a given frame.
    */
-  virtual nsresult GetCursor(const nsPoint& aPoint, Cursor& aCursor) = 0;
+  virtual mozilla::Maybe<Cursor> GetCursor(const nsPoint&);
 
   /**
    * Get a point (in the frame's coordinate space) given an offset into
    * the content. This point should be on the baseline of text with
    * the correct horizontal offset
    */
   virtual nsresult GetPointFromOffset(int32_t inOffset, nsPoint* outPoint) = 0;
 
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -2298,39 +2298,36 @@ nsresult nsImageFrame::HandleEvent(nsPre
       }
     }
   }
 
   return nsAtomicContainerFrame::HandleEvent(aPresContext, aEvent,
                                              aEventStatus);
 }
 
-nsresult nsImageFrame::GetCursor(const nsPoint& aPoint,
-                                 nsIFrame::Cursor& aCursor) {
-  if (nsImageMap* map = GetImageMap()) {
-    nsIntPoint p;
-    TranslateEventCoords(aPoint, p);
-    nsCOMPtr<nsIContent> area = map->GetArea(p.x, p.y);
-    if (area) {
-      // Use the cursor from the style of the *area* element.
-      // XXX Using the image as the parent ComputedStyle isn't
-      // technically correct, but it's probably the right thing to do
-      // here, since it means that areas on which the cursor isn't
-      // specified will inherit the style from the image.
-      RefPtr<ComputedStyle> areaStyle =
-          PresShell()->StyleSet()->ResolveStyleFor(area->AsElement(),
-                                                   LazyComputeBehavior::Allow);
-      FillCursorInformationFromStyle(areaStyle->StyleUI(), aCursor);
-      if (StyleCursorKind::Auto == aCursor.mCursor) {
-        aCursor.mCursor = StyleCursorKind::Default;
-      }
-      return NS_OK;
-    }
+Maybe<nsIFrame::Cursor> nsImageFrame::GetCursor(const nsPoint& aPoint) {
+  nsImageMap* map = GetImageMap();
+  if (!map) {
+    return nsFrame::GetCursor(aPoint);
   }
-  return nsFrame::GetCursor(aPoint, aCursor);
+  nsIntPoint p;
+  TranslateEventCoords(aPoint, p);
+  nsCOMPtr<nsIContent> area = map->GetArea(p.x, p.y);
+  if (!area) {
+    return nsFrame::GetCursor(aPoint);
+  }
+
+  // Use the cursor from the style of the *area* element.
+  RefPtr<ComputedStyle> areaStyle = PresShell()->StyleSet()->ResolveStyleFor(
+      area->AsElement(), LazyComputeBehavior::Allow);
+  StyleCursorKind kind = areaStyle->StyleUI()->mCursor;
+  if (kind == StyleCursorKind::Auto) {
+    kind = StyleCursorKind::Default;
+  }
+  return Some(Cursor{kind, AllowCustomCursorImage::Yes, std::move(areaStyle)});
 }
 
 nsresult nsImageFrame::AttributeChanged(int32_t aNameSpaceID,
                                         nsAtom* aAttribute, int32_t aModType) {
   nsresult rv = nsAtomicContainerFrame::AttributeChanged(aNameSpaceID,
                                                          aAttribute, aModType);
   if (NS_FAILED(rv)) {
     return rv;
--- a/layout/generic/nsImageFrame.h
+++ b/layout/generic/nsImageFrame.h
@@ -89,18 +89,17 @@ class nsImageFrame : public nsAtomicCont
                       const ReflowInput& aReflowInput,
                       nsReflowStatus& aStatus) override;
 
   virtual nsresult GetContentForEvent(mozilla::WidgetEvent* aEvent,
                                       nsIContent** aContent) override;
   virtual nsresult HandleEvent(nsPresContext* aPresContext,
                                mozilla::WidgetGUIEvent* aEvent,
                                nsEventStatus* aEventStatus) override;
-  virtual nsresult GetCursor(const nsPoint& aPoint,
-                             nsIFrame::Cursor& aCursor) override;
+  mozilla::Maybe<Cursor> GetCursor(const nsPoint&) override;
   virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
                                     int32_t aModType) override;
 
   void OnVisibilityChange(
       Visibility aNewVisibility,
       const Maybe<OnNonvisible>& aNonvisibleAction = Nothing()) override;
 
   void ResponsiveContentDensityChanged();
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -1583,34 +1583,33 @@ bool nsPluginFrame::WantsToHandleWheelEv
 nsNPAPIPluginInstance* nsPluginFrame::GetPluginInstance() {
   if (!mInstanceOwner) {
     return nullptr;
   }
 
   return mInstanceOwner->GetInstance();
 }
 
-nsresult nsPluginFrame::GetCursor(const nsPoint& aPoint,
-                                  nsIFrame::Cursor& aCursor) {
+Maybe<nsIFrame::Cursor> nsPluginFrame::GetCursor(const nsPoint& aPoint) {
   if (!mInstanceOwner) {
-    return NS_ERROR_FAILURE;
+    return Nothing();
   }
 
   RefPtr<nsNPAPIPluginInstance> inst = mInstanceOwner->GetInstance();
   if (!inst) {
-    return NS_ERROR_FAILURE;
+    return Nothing();
   }
 
   bool useDOMCursor =
       static_cast<nsNPAPIPluginInstance*>(inst.get())->UsesDOMForCursor();
   if (!useDOMCursor) {
-    return NS_ERROR_FAILURE;
+    return Nothing();
   }
 
-  return nsFrame::GetCursor(aPoint, aCursor);
+  return nsFrame::GetCursor(aPoint);
 }
 
 void nsPluginFrame::SetIsDocumentActive(bool aIsActive) {
   if (mInstanceOwner) {
     mInstanceOwner->UpdateDocumentActiveState(aIsActive);
   }
 }
 
--- a/layout/generic/nsPluginFrame.h
+++ b/layout/generic/nsPluginFrame.h
@@ -101,18 +101,17 @@ class nsPluginFrame final : public nsFra
                            PostDestroyData& aPostDestroyData) override;
 
   virtual void DidSetComputedStyle(ComputedStyle* aOldComputedStyle) override;
 
   nsNPAPIPluginInstance* GetPluginInstance() override;
 
   virtual void SetIsDocumentActive(bool aIsActive) override;
 
-  virtual nsresult GetCursor(const nsPoint& aPoint,
-                             nsIFrame::Cursor& aCursor) override;
+  mozilla::Maybe<Cursor> GetCursor(const nsPoint&) override;
 
   // APIs used by nsRootPresContext to set up the widget position/size/clip
   // region.
   /**
    * Set the next widget configuration for the plugin to the desired
    * position of the plugin's widget, on the assumption that it is not visible
    * (clipped out or covered by opaque content).
    * This will only be called for plugins which have been registered
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -4589,31 +4589,27 @@ nsIFrame* NS_NewContinuingTextFrame(nsIP
   return new (aPresShell)
       nsContinuingTextFrame(aStyle, aPresShell->GetPresContext());
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsContinuingTextFrame)
 
 nsTextFrame::~nsTextFrame() {}
 
-nsresult nsTextFrame::GetCursor(const nsPoint& aPoint,
-                                nsIFrame::Cursor& aCursor) {
-  FillCursorInformationFromStyle(StyleUI(), aCursor);
-  if (StyleCursorKind::Auto == aCursor.mCursor) {
+Maybe<nsIFrame::Cursor> nsTextFrame::GetCursor(const nsPoint& aPoint) {
+  StyleCursorKind kind = StyleUI()->mCursor;
+  if (kind == StyleCursorKind::Auto) {
     if (!IsSelectable(nullptr)) {
-      aCursor.mCursor = StyleCursorKind::Default;
+      kind = StyleCursorKind::Default;
     } else {
-      aCursor.mCursor = GetWritingMode().IsVertical()
-                            ? StyleCursorKind::VerticalText
-                            : StyleCursorKind::Text;
-    }
-    return NS_OK;
-  } else {
-    return nsFrame::GetCursor(aPoint, aCursor);
-  }
+      kind = GetWritingMode().IsVertical() ? StyleCursorKind::VerticalText
+                                           : StyleCursorKind::Text;
+    }
+  }
+  return Some(Cursor{kind, AllowCustomCursorImage::Yes});
 }
 
 nsTextFrame* nsTextFrame::LastInFlow() const {
   nsTextFrame* lastInFlow = const_cast<nsTextFrame*>(this);
   while (lastInFlow->GetNextInFlow()) {
     lastInFlow = lastInFlow->GetNextInFlow();
   }
   MOZ_ASSERT(lastInFlow, "post-condition failed");
--- a/layout/generic/nsTextFrame.h
+++ b/layout/generic/nsTextFrame.h
@@ -74,17 +74,17 @@ class nsTextFrame : public nsFrame {
                         const nsDisplayListSet& aLists) final;
 
   void Init(nsIContent* aContent, nsContainerFrame* aParent,
             nsIFrame* aPrevInFlow) override;
 
   void DestroyFrom(nsIFrame* aDestructRoot,
                    PostDestroyData& aPostDestroyData) override;
 
-  nsresult GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) final;
+  mozilla::Maybe<Cursor> GetCursor(const nsPoint&) final;
 
   nsresult CharacterDataChanged(const CharacterDataChangeInfo&) final;
 
   nsTextFrame* GetPrevContinuation() const override { return nullptr; }
   nsTextFrame* GetNextContinuation() const final { return mNextContinuation; }
   void SetNextContinuation(nsIFrame* aNextContinuation) final {
     NS_ASSERTION(!aNextContinuation || Type() == aNextContinuation->Type(),
                  "setting a next continuation with incorrect type!");
--- a/layout/painting/moz.build
+++ b/layout/painting/moz.build
@@ -63,15 +63,10 @@ LOCAL_INCLUDES += [
     '/layout/tables',
     '/layout/xul',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    # This is intended as a temporary hack to support building with VS2015.
-    # 'type cast': conversion from 'unsigned int' to 'void *' of greater size
-    CXXFLAGS += ['-wd4312']
-
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/layout/style/ServoBindings.toml
+++ b/layout/style/ServoBindings.toml
@@ -444,16 +444,17 @@ cbindgen-types = [
     { gecko = "StylePerspective", servo = "values::computed::Perspective" },
     { gecko = "StyleGenericPerspective", servo = "values::generics::box_::Perspective" },
     { gecko = "StyleZIndex", servo = "values::computed::ZIndex" },
     { gecko = "StyleGenericZIndex", servo = "values::generics::position::ZIndex" },
     { gecko = "StyleTransformOrigin", servo = "values::computed::TransformOrigin" },
     { gecko = "StyleGenericBorderRadius", servo = "values::generics::border::BorderRadius" },
     { gecko = "StyleLetterSpacing", servo = "values::computed::text::LetterSpacing" },
     { gecko = "StyleGenericLineHeight", servo = "values::generics::text::LineHeight" },
+    { gecko = "StyleContain", servo = "values::computed::Contain" },
 ]
 
 mapped-generic-types = [
     { generic = true, gecko = "mozilla::RustCell", servo = "::std::cell::Cell" },
     { generic = false, gecko = "ServoNodeData", servo = "AtomicRefCell<ElementData>" },
     { generic = false, gecko = "mozilla::ServoWritingMode", servo = "::logical_geometry::WritingMode" },
     { generic = false, gecko = "mozilla::ServoCustomPropertiesMap", servo = "Option<::servo_arc::Arc<::custom_properties::CustomPropertiesMap>>" },
     { generic = false, gecko = "mozilla::ServoRuleNode", servo = "Option<::rule_tree::StrongRuleNode>" },
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -309,31 +309,16 @@ enum class StyleContent : uint8_t {
 // values here accidentally use it in their binary representation.)
 #define NS_STYLE_WRITING_MODE_SIDEWAYS_MASK 4
 
 #define NS_STYLE_WRITING_MODE_SIDEWAYS_RL \
   (NS_STYLE_WRITING_MODE_VERTICAL_RL | NS_STYLE_WRITING_MODE_SIDEWAYS_MASK)
 #define NS_STYLE_WRITING_MODE_SIDEWAYS_LR \
   (NS_STYLE_WRITING_MODE_VERTICAL_LR | NS_STYLE_WRITING_MODE_SIDEWAYS_MASK)
 
-// See nsStyleDisplay
-// If these are re-ordered, nsComputedDOMStyle::DoGetContain() must be updated.
-#define NS_STYLE_CONTAIN_NONE 0
-#define NS_STYLE_CONTAIN_SIZE 0x01
-#define NS_STYLE_CONTAIN_LAYOUT 0x02
-#define NS_STYLE_CONTAIN_PAINT 0x04
-#define NS_STYLE_CONTAIN_STRICT 0x08
-#define NS_STYLE_CONTAIN_CONTENT 0x10
-// NS_STYLE_CONTAIN_ALL_BITS does not correspond to a keyword.
-#define NS_STYLE_CONTAIN_ALL_BITS \
-  (NS_STYLE_CONTAIN_LAYOUT | NS_STYLE_CONTAIN_PAINT | NS_STYLE_CONTAIN_SIZE)
-// NS_STYLE_CONTAIN_CONTENT_BITS does not correspond to a keyword.
-#define NS_STYLE_CONTAIN_CONTENT_BITS \
-  (NS_STYLE_CONTAIN_LAYOUT | NS_STYLE_CONTAIN_PAINT)
-
 // Shared constants for all align/justify properties (nsStylePosition):
 #define NS_STYLE_ALIGN_AUTO 0
 #define NS_STYLE_ALIGN_NORMAL 1
 #define NS_STYLE_ALIGN_START 2
 #define NS_STYLE_ALIGN_END 3
 #define NS_STYLE_ALIGN_FLEX_START 4
 #define NS_STYLE_ALIGN_FLEX_END 5
 #define NS_STYLE_ALIGN_CENTER 6
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -2901,17 +2901,17 @@ bool StyleAnimation::operator==(const St
 }
 
 // --------------------
 // nsStyleDisplay
 //
 nsStyleDisplay::nsStyleDisplay(const Document& aDocument)
     : mDisplay(StyleDisplay::Inline),
       mOriginalDisplay(StyleDisplay::Inline),
-      mContain(NS_STYLE_CONTAIN_NONE),
+      mContain(StyleContain_NONE),
       mAppearance(StyleAppearance::None),
       mPosition(NS_STYLE_POSITION_STATIC),
       mFloat(StyleFloat::None),
       mOriginalFloat(StyleFloat::None),
       mBreakType(StyleClear::None),
       mBreakInside(StyleBreakWithin::Auto),
       mBreakBefore(StyleBreakBetween::Auto),
       mBreakAfter(StyleBreakBetween::Auto),
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -1854,17 +1854,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
   // mBinding->mOriginPrincipal.
   RefPtr<mozilla::css::URLValue> mBinding;
   mozilla::StyleDisplay mDisplay;
   mozilla::StyleDisplay mOriginalDisplay;  // saved mDisplay for
                                            //         position:absolute/fixed
                                            //         and float:left/right;
                                            //         otherwise equal to
                                            //         mDisplay
-  uint8_t mContain;                        // NS_STYLE_CONTAIN_*
+  mozilla::StyleContain mContain;
   mozilla::StyleAppearance mAppearance;
   uint8_t mPosition;  // NS_STYLE_POSITION_*
 
   mozilla::StyleFloat mFloat;
   // Save mFloat for position:absolute/fixed; otherwise equal to mFloat.
   mozilla::StyleFloat mOriginalFloat;
 
   mozilla::StyleClear mBreakType;
@@ -2111,41 +2111,42 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
   bool IsScrollableOverflow() const {
     // mOverflowX and mOverflowY always match when one of them is
     // Visible or MozHiddenUnscrollable.
     return mOverflowX != mozilla::StyleOverflow::Visible &&
            mOverflowX != mozilla::StyleOverflow::MozHiddenUnscrollable;
   }
 
   bool IsContainPaint() const {
-    return (NS_STYLE_CONTAIN_PAINT & mContain) &&
+    return (mContain & mozilla::StyleContain_PAINT) &&
            !IsInternalRubyDisplayType() && !IsInternalTableStyleExceptCell();
   }
 
   bool IsContainLayout() const {
     // Note: The spec for layout containment says it should
     // have no effect on non-atomic, inline-level boxes. We
     // don't check for these here because we don't know
     // what type of element is involved. Callers are
     // responsible for checking if the box in question is
     // non-atomic and inline-level, and creating an
     // exemption as necessary.
-    return (NS_STYLE_CONTAIN_LAYOUT & mContain) &&
+    return (mContain & mozilla::StyleContain_LAYOUT) &&
            !IsInternalRubyDisplayType() && !IsInternalTableStyleExceptCell();
   }
 
   bool IsContainSize() const {
     // Note: The spec for size containment says it should
     // have no effect on non-atomic, inline-level boxes. We
     // don't check for these here because we don't know
     // what type of element is involved. Callers are
     // responsible for checking if the box in question is
     // non-atomic and inline-level, and creating an
     // exemption as necessary.
-    return (NS_STYLE_CONTAIN_SIZE & mContain) && !IsInternalRubyDisplayType() &&
+    return (mContain & mozilla::StyleContain_SIZE) &&
+           !IsInternalRubyDisplayType() &&
            (mozilla::StyleDisplay::Table != mDisplay) && !IsInnerTableStyle();
   }
 
   /* Returns whether the element has the -moz-transform property
    * or a related property. */
   bool HasTransformStyle() const {
     return mSpecifiedTransform || mSpecifiedRotate || mSpecifiedTranslate ||
            mSpecifiedScale ||
--- a/layout/xul/nsSplitterFrame.cpp
+++ b/layout/xul/nsSplitterFrame.cpp
@@ -211,30 +211,16 @@ void nsSplitterFrame::DestroyFrom(nsIFra
     mInner->RemoveListener();
     mInner->Disconnect();
     mInner->Release();
     mInner = nullptr;
   }
   nsBoxFrame::DestroyFrom(aDestructRoot, aPostDestroyData);
 }
 
-nsresult nsSplitterFrame::GetCursor(const nsPoint& aPoint,
-                                    nsIFrame::Cursor& aCursor) {
-  return nsBoxFrame::GetCursor(aPoint, aCursor);
-
-  /*
-    if (IsXULHorizontal())
-      aCursor = NS_STYLE_CURSOR_N_RESIZE;
-    else
-      aCursor = NS_STYLE_CURSOR_W_RESIZE;
-
-    return NS_OK;
-  */
-}
-
 nsresult nsSplitterFrame::AttributeChanged(int32_t aNameSpaceID,
                                            nsAtom* aAttribute,
                                            int32_t aModType) {
   nsresult rv =
       nsBoxFrame::AttributeChanged(aNameSpaceID, aAttribute, aModType);
   if (aAttribute == nsGkAtoms::state) {
     mInner->UpdateState();
   }
--- a/layout/xul/nsSplitterFrame.h
+++ b/layout/xul/nsSplitterFrame.h
@@ -35,19 +35,16 @@ class nsSplitterFrame final : public nsB
 
   // nsIFrame overrides
   virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
                                     int32_t aModType) override;
 
   virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
                     nsIFrame* aPrevInFlow) override;
 
-  virtual nsresult GetCursor(const nsPoint& aPoint,
-                             nsIFrame::Cursor& aCursor) override;
-
   NS_IMETHOD DoXULLayout(nsBoxLayoutState& aBoxLayoutState) override;
 
   NS_IMETHOD HandlePress(nsPresContext* aPresContext,
                          mozilla::WidgetGUIEvent* aEvent,
                          nsEventStatus* aEventStatus) override;
 
   NS_IMETHOD HandleMultiplePress(nsPresContext* aPresContext,
                                  mozilla::WidgetGUIEvent* aEvent,
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -2214,40 +2214,38 @@ nscoord nsTreeBodyFrame::CalcHorzWidth(c
   }
 
   // If no horz scrolling periphery is present, then just return our width
   if (width == 0) width = mRect.width;
 
   return width;
 }
 
-nsresult nsTreeBodyFrame::GetCursor(const nsPoint& aPoint,
-                                    nsIFrame::Cursor& aCursor) {
+Maybe<nsIFrame::Cursor> nsTreeBodyFrame::GetCursor(const nsPoint& aPoint) {
   // Check the GetScriptHandlingObject so we don't end up running code when
   // the document is a zombie.
   bool dummy;
   if (mView && GetContent()->GetComposedDoc()->GetScriptHandlingObject(dummy)) {
     int32_t row;
     nsTreeColumn* col;
     nsCSSAnonBoxPseudoStaticAtom* child;
     GetCellAt(aPoint.x, aPoint.y, &row, &col, &child);
 
     if (child) {
       // Our scratch array is already prefilled.
-      ComputedStyle* childContext = GetPseudoComputedStyle(child);
-
-      FillCursorInformationFromStyle(childContext->StyleUI(), aCursor);
-      if (aCursor.mCursor == StyleCursorKind::Auto)
-        aCursor.mCursor = StyleCursorKind::Default;
-
-      return NS_OK;
+      RefPtr<ComputedStyle> childContext = GetPseudoComputedStyle(child);
+      StyleCursorKind kind = childContext->StyleUI()->mCursor;
+      if (kind == StyleCursorKind::Auto) {
+        kind = StyleCursorKind::Default;
+      }
+      return Some(
+          Cursor{kind, AllowCustomCursorImage::Yes, std::move(childContext)});
     }
   }
-
-  return nsLeafBoxFrame::GetCursor(aPoint, aCursor);
+  return nsLeafBoxFrame::GetCursor(aPoint);
 }
 
 static uint32_t GetDropEffect(WidgetGUIEvent* aEvent) {
   NS_ASSERTION(aEvent->mClass == eDragEventClass, "wrong event type");
   WidgetDragEvent* dragEvent = aEvent->AsDragEvent();
   nsContentUtils::SetDataTransferInEvent(dragEvent);
 
   uint32_t action = 0;
--- a/layout/xul/tree/nsTreeBodyFrame.h
+++ b/layout/xul/tree/nsTreeBodyFrame.h
@@ -151,18 +151,17 @@ class nsTreeBodyFrame final : public nsL
   }
 
   // Overridden from nsIFrame to cache our pres context.
   virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
                     nsIFrame* aPrevInFlow) override;
   virtual void DestroyFrom(nsIFrame* aDestructRoot,
                            PostDestroyData& aPostDestroyData) override;
 
-  virtual nsresult GetCursor(const nsPoint& aPoint,
-                             nsIFrame::Cursor& aCursor) override;
+  mozilla::Maybe<Cursor> GetCursor(const nsPoint&) override;
 
   virtual nsresult HandleEvent(nsPresContext* aPresContext,
                                mozilla::WidgetGUIEvent* aEvent,
                                nsEventStatus* aEventStatus) override;
 
   virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
                                 const nsDisplayListSet& aLists) override;
 
--- a/media/webrtc/signaling/gtest/moz.build
+++ b/media/webrtc/signaling/gtest/moz.build
@@ -36,17 +36,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'uiki
 
     # See Bug 1372950, mediapipeline tests seem to cause crashes on Windows
     if CONFIG['OS_TARGET'] != 'WINNT':
         SOURCES += [
             'mediapipeline_unittest.cpp',
         ]
 
     FINAL_LIBRARY = 'xul-gtest'
-
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    # This is intended as a temporary workaround to enable warning free building
-    # with VS2015.
-    # reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
-    CXXFLAGS += ['-wd4312']
-
-    # Disable warning for decorated name length exceeded, name was truncated
-    CXXFLAGS += ['-wd4503']
--- a/media/webrtc/trunk/gtest/moz.build
+++ b/media/webrtc/trunk/gtest/moz.build
@@ -476,15 +476,9 @@ if CONFIG['OS_TARGET'] in ['Darwin', 'Li
     if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         CXXFLAGS += [
             '-Wno-inconsistent-missing-override',
             '-Wno-overloaded-virtual',
         ]
         if CONFIG['CC_TYPE'] == 'clang':
             CXXFLAGS += ['-Wno-comma']
 
-    if CONFIG['CC_TYPE'] == 'clang-cl':
-        # This is intended as a temporary workaround to enable warning free building
-        # with VS2015.
-        # reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
-        CXXFLAGS += ['-wd4312']
-
     GeckoProgram('webrtc-gtest', linkage=None)
--- a/memory/build/moz.build
+++ b/memory/build/moz.build
@@ -41,18 +41,15 @@ Library('memory')
 if CONFIG['OS_TARGET'] == 'Android' and CONFIG['CC_TYPE'] == 'clang':
     CXXFLAGS += [
         '-Wno-tautological-pointer-compare',
     ]
 
 if CONFIG['MOZ_BUILD_APP'] != 'memory':
     FINAL_LIBRARY = 'mozglue'
 
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    CXXFLAGS += ['-wd4273'] # inconsistent dll linkage (bug 558163)
-
 if CONFIG['MOZ_REPLACE_MALLOC_STATIC']:
     DEFINES['MOZ_REPLACE_MALLOC_STATIC'] = True
 
 DisableStlWrapping()
 
 if CONFIG['CC_TYPE'] == 'clang-cl':
     AllowCompilerWarnings()  # workaround for bug 1090497
--- a/mobile/android/themes/core/aboutReader.css
+++ b/mobile/android/themes/core/aboutReader.css
@@ -31,50 +31,19 @@ body.dark {
 body.sans-serif {
   font-family: sans-serif;
 }
 
 body.serif {
   font-family: serif;
 }
 
-.container.font-size1 {
-  font-size: 10px;
-}
-
-.container.font-size2 {
-  font-size: 12px;
-}
-
-.container.font-size3 {
-  font-size: 14px;
-}
-
-.container.font-size4  {
-  font-size: 16px;
-}
-
-.container.font-size5 {
-  font-size: 18px;
-}
-
-.container.font-size6 {
-  font-size: 20px;
-}
-
-.container.font-size7 {
-  font-size: 22px;
-}
-
-.container.font-size8 {
-  font-size: 24px;
-}
-
-.container.font-size9 {
-  font-size: 26px;
+.container {
+  --font-size: 12;
+  font-size: var(--font-size);
 }
 
 /* Override some controls and content styles based on color scheme */
 
 body.light > .container > .header > .domain {
   color: #ee7600;
   border-bottom-color: #d0d0d0; 
 }
--- a/netwerk/ipc/NeckoChannelParams.ipdlh
+++ b/netwerk/ipc/NeckoChannelParams.ipdlh
@@ -12,17 +12,16 @@ include BlobTypes;
 include ClientIPCTypes;
 include URIParams;
 include IPCServiceWorkerDescriptor;
 include IPCStream;
 include PBackgroundSharedTypes;
 include DOMTypes;
 
 using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
-using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
 using RequestHeaderTuples from "mozilla/net/PHttpChannelParams.h";
 using struct nsHttpAtom from "nsHttp.h";
 using class mozilla::net::nsHttpResponseHead from "nsHttpResponseHead.h";
 using class mozilla::TimeStamp from "mozilla/TimeStamp.h";
 using nsILoadInfo::CrossOriginOpenerPolicy from "ipc/IPCMessageUtils.h";
 
 namespace mozilla {
 namespace net {
@@ -203,33 +202,21 @@ struct ChildLoadInfoForwarderArgs
   // a redirect.
   OptionalIPCServiceWorkerDescriptor controller;
 };
 
 //-----------------------------------------------------------------------------
 // HTTP IPDL structs
 //-----------------------------------------------------------------------------
 
-union OptionalHttpResponseHead
-{
-  void_t;
-  nsHttpResponseHead;
-};
-
 struct CorsPreflightArgs
 {
   nsCString[]   unsafeHeaders;
 };
 
-union OptionalCorsPreflightArgs
-{
-  void_t;
-  CorsPreflightArgs;
-};
-
 struct HttpChannelOpenArgs
 {
   URIParams                   uri;
   // - TODO: bug 571161: unclear if any HTTP channel clients ever
   // set originalURI != uri (about:credits?); also not clear if
   // chrome channel would ever need to know.  Get rid of next arg?
   URIParams?                  original;
   URIParams?                  doc;
@@ -253,21 +240,21 @@ struct HttpChannelOpenArgs
   nsCString                   entityID;
   bool                        chooseApplicationCache;
   nsCString                   appCacheClientID;
   bool                        allowSpdy;
   bool                        allowAltSvc;
   bool                        beConservative;
   uint32_t                    tlsFlags;
   LoadInfoArgs?               loadInfo;
-  OptionalHttpResponseHead    synthesizedResponseHead;
+  nsHttpResponseHead?         synthesizedResponseHead;
   nsCString                   synthesizedSecurityInfoSerialization;
   uint32_t                    cacheKey;
   uint64_t                    requestContextID;
-  OptionalCorsPreflightArgs   preflightArgs;
+  CorsPreflightArgs?          preflightArgs;
   uint32_t                    initialRwin;
   bool                        blockAuthPrompt;
   bool                        suspendAfterSynthesizeResponse;
   bool                        allowStaleCacheContent;
   nsCString                   contentTypeHint;
   uint32_t                    corsMode;
   uint32_t                    redirectMode;
   uint64_t                    channelId;
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -2208,17 +2208,17 @@ HttpChannelChild::OnRedirectVerifyCallba
         NS_DISPATCH_NORMAL);
 
     return NS_OK;
   }
 
   RequestHeaderTuples emptyHeaders;
   RequestHeaderTuples* headerTuples = &emptyHeaders;
   nsLoadFlags loadFlags = 0;
-  OptionalCorsPreflightArgs corsPreflightArgs = mozilla::void_t();
+  Maybe<CorsPreflightArgs> corsPreflightArgs;
 
   nsCOMPtr<nsIHttpChannelChild> newHttpChannelChild =
       do_QueryInterface(mRedirectChannelChild);
   if (newHttpChannelChild && NS_SUCCEEDED(result)) {
     rv = newHttpChannelChild->AddCookiesToRequest();
     MOZ_ASSERT(NS_SUCCEEDED(rv));
     rv = newHttpChannelChild->GetClientSetRequestHeaders(&headerTuples);
     MOZ_ASSERT(NS_SUCCEEDED(rv));
@@ -2670,31 +2670,30 @@ nsresult HttpChannelChild::ContinueAsync
 
   AutoIPCStream autoStream(openArgs.uploadStream());
   if (mUploadStream) {
     autoStream.Serialize(mUploadStream, ContentChild::GetSingleton());
     autoStream.TakeOptionalValue();
   }
 
   if (mResponseHead) {
-    openArgs.synthesizedResponseHead() = *mResponseHead;
+    openArgs.synthesizedResponseHead() = Some(*mResponseHead);
     openArgs.suspendAfterSynthesizeResponse() =
         mSuspendParentAfterSynthesizeResponse;
   } else {
-    openArgs.synthesizedResponseHead() = mozilla::void_t();
     openArgs.suspendAfterSynthesizeResponse() = false;
   }
 
   nsCOMPtr<nsISerializable> secInfoSer = do_QueryInterface(mSecurityInfo);
   if (secInfoSer) {
     NS_SerializeToString(secInfoSer,
                          openArgs.synthesizedSecurityInfoSerialization());
   }
 
-  OptionalCorsPreflightArgs optionalCorsPreflightArgs;
+  Maybe<CorsPreflightArgs> optionalCorsPreflightArgs;
   GetClientSetCorsPreflightParameters(optionalCorsPreflightArgs);
 
   // NB: This call forces us to cache mTopWindowURI if we haven't already.
   nsCOMPtr<nsIURI> uri;
   GetTopWindowURI(mURI, getter_AddRefs(uri));
 
   SerializeURI(mTopWindowURI, openArgs.topWindowURI());
 
@@ -3338,23 +3337,23 @@ NS_IMETHODIMP HttpChannelChild::AddCooki
 
 NS_IMETHODIMP HttpChannelChild::GetClientSetRequestHeaders(
     RequestHeaderTuples** aRequestHeaders) {
   *aRequestHeaders = &mClientSetRequestHeaders;
   return NS_OK;
 }
 
 void HttpChannelChild::GetClientSetCorsPreflightParameters(
-    OptionalCorsPreflightArgs& aArgs) {
+    Maybe<CorsPreflightArgs>& aArgs) {
   if (mRequireCORSPreflight) {
     CorsPreflightArgs args;
     args.unsafeHeaders() = mUnsafeHeaders;
-    aArgs = args;
+    aArgs.emplace(args);
   } else {
-    aArgs = mozilla::void_t();
+    aArgs = Nothing();
   }
 }
 
 NS_IMETHODIMP
 HttpChannelChild::RemoveCorsPreflightCacheEntry(nsIURI* aURI,
                                                 nsIPrincipal* aPrincipal) {
   URIParams uri;
   SerializeURI(aURI, uri);
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -391,20 +391,20 @@ bool HttpChannelParent::DoAsyncOpen(
     const nsCString& requestMethod, const Maybe<IPCStream>& uploadStream,
     const bool& uploadStreamHasHeaders, const int16_t& priority,
     const uint32_t& classOfService, const uint8_t& redirectionLimit,
     const bool& allowSTS, const uint32_t& thirdPartyFlags,
     const bool& doResumeAt, const uint64_t& startPos, const nsCString& entityID,
     const bool& chooseApplicationCache, const nsCString& appCacheClientID,
     const bool& allowSpdy, const bool& allowAltSvc, const bool& beConservative,
     const uint32_t& tlsFlags, const Maybe<LoadInfoArgs>& aLoadInfoArgs,
-    const OptionalHttpResponseHead& aSynthesizedResponseHead,
+    const Maybe<nsHttpResponseHead>& aSynthesizedResponseHead,
     const nsCString& aSecurityInfoSerialization, const uint32_t& aCacheKey,
     const uint64_t& aRequestContextID,
-    const OptionalCorsPreflightArgs& aCorsPreflightArgs,
+    const Maybe<CorsPreflightArgs>& aCorsPreflightArgs,
     const uint32_t& aInitialRwin, const bool& aBlockAuthPrompt,
     const bool& aSuspendAfterSynthesizeResponse,
     const bool& aAllowStaleCacheContent, const nsCString& aContentTypeHint,
     const uint32_t& aCorsMode, const uint32_t& aRedirectMode,
     const uint64_t& aChannelId, const nsString& aIntegrityMetadata,
     const uint64_t& aContentWindowId,
     const nsTArray<PreferredAlternativeDataTypeParams>&
         aPreferredAlternativeTypes,
@@ -512,19 +512,18 @@ bool HttpChannelParent::DoAsyncOpen(
     }
   }
 
   RefPtr<HttpChannelParentListener> parentListener =
       new HttpChannelParentListener(this);
 
   httpChannel->SetRequestMethod(nsDependentCString(requestMethod.get()));
 
-  if (aCorsPreflightArgs.type() ==
-      OptionalCorsPreflightArgs::TCorsPreflightArgs) {
-    const CorsPreflightArgs& args = aCorsPreflightArgs.get_CorsPreflightArgs();
+  if (aCorsPreflightArgs.isSome()) {
+    const CorsPreflightArgs& args = aCorsPreflightArgs.ref();
     httpChannel->SetCorsPreflightParameters(args.unsafeHeaders());
   }
 
   nsCOMPtr<nsIInputStream> stream = DeserializeIPCStream(uploadStream);
   if (stream) {
     int64_t length;
     if (InputStreamLengthHelper::GetSyncLength(stream, &length)) {
       httpChannel->InternalSetUploadStreamLength(length >= 0 ? length : 0);
@@ -541,20 +540,18 @@ bool HttpChannelParent::DoAsyncOpen(
         self->TryInvokeAsyncOpen(NS_OK);
       });
     }
 
     httpChannel->InternalSetUploadStream(stream);
     httpChannel->SetUploadStreamHasHeaders(uploadStreamHasHeaders);
   }
 
-  if (aSynthesizedResponseHead.type() ==
-      OptionalHttpResponseHead::TnsHttpResponseHead) {
-    parentListener->SetupInterception(
-        aSynthesizedResponseHead.get_nsHttpResponseHead());
+  if (aSynthesizedResponseHead.isSome()) {
+    parentListener->SetupInterception(aSynthesizedResponseHead.ref());
     mWillSynthesizeResponse = true;
     httpChannelImpl->SetCouldBeSynthesized();
 
     if (!aSecurityInfoSerialization.IsEmpty()) {
       nsCOMPtr<nsISupports> secInfo;
       rv = NS_DeserializeObject(aSecurityInfoSerialization,
                                 getter_AddRefs(secInfo));
       MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv),
@@ -824,17 +821,17 @@ mozilla::ipc::IPCResult HttpChannelParen
 }
 
 mozilla::ipc::IPCResult HttpChannelParent::RecvRedirect2Verify(
     const nsresult& aResult, const RequestHeaderTuples& changedHeaders,
     const ChildLoadInfoForwarderArgs& aLoadInfoForwarder,
     const uint32_t& loadFlags, const uint32_t& referrerPolicy,
     const Maybe<URIParams>& aReferrerURI,
     const Maybe<URIParams>& aAPIRedirectURI,
-    const OptionalCorsPreflightArgs& aCorsPreflightArgs,
+    const Maybe<CorsPreflightArgs>& aCorsPreflightArgs,
     const bool& aChooseAppcache) {
   LOG(("HttpChannelParent::RecvRedirect2Verify [this=%p result=%" PRIx32 "]\n",
        this, static_cast<uint32_t>(aResult)));
 
   // Result from the child.  If something fails here, we might overwrite a
   // success with a further failure.
   nsresult result = aResult;
 
@@ -865,23 +862,21 @@ mozilla::ipc::IPCResult HttpChannelParen
       }
 
       // A successfully redirected channel must have the LOAD_REPLACE flag.
       MOZ_ASSERT(loadFlags & nsIChannel::LOAD_REPLACE);
       if (loadFlags & nsIChannel::LOAD_REPLACE) {
         newHttpChannel->SetLoadFlags(loadFlags);
       }
 
-      if (aCorsPreflightArgs.type() ==
-          OptionalCorsPreflightArgs::TCorsPreflightArgs) {
+      if (aCorsPreflightArgs.isSome()) {
         nsCOMPtr<nsIHttpChannelInternal> newInternalChannel =
             do_QueryInterface(newHttpChannel);
         MOZ_RELEASE_ASSERT(newInternalChannel);
-        const CorsPreflightArgs& args =
-            aCorsPreflightArgs.get_CorsPreflightArgs();
+        const CorsPreflightArgs& args = aCorsPreflightArgs.ref();
         newInternalChannel->SetCorsPreflightParameters(args.unsafeHeaders());
       }
 
       nsCOMPtr<nsIURI> referrerUri = DeserializeURI(aReferrerURI);
       rv = newHttpChannel->SetReferrerWithPolicy(referrerUri, referrerPolicy);
       MOZ_ASSERT(NS_SUCCEEDED(rv));
 
       nsCOMPtr<nsIApplicationCacheChannel> appCacheChannel =
--- a/netwerk/protocol/http/HttpChannelParent.h
+++ b/netwerk/protocol/http/HttpChannelParent.h
@@ -149,20 +149,20 @@ class HttpChannelParent final : public n
       const bool& uploadStreamHasHeaders, const int16_t& priority,
       const uint32_t& classOfService, const uint8_t& redirectionLimit,
       const bool& allowSTS, const uint32_t& thirdPartyFlags,
       const bool& doResumeAt, const uint64_t& startPos,
       const nsCString& entityID, const bool& chooseApplicationCache,
       const nsCString& appCacheClientID, const bool& allowSpdy,
       const bool& allowAltSvc, const bool& beConservative,
       const uint32_t& tlsFlags, const Maybe<LoadInfoArgs>& aLoadInfoArgs,
-      const OptionalHttpResponseHead& aSynthesizedResponseHead,
+      const Maybe<nsHttpResponseHead>& aSynthesizedResponseHead,
       const nsCString& aSecurityInfoSerialization, const uint32_t& aCacheKey,
       const uint64_t& aRequestContextID,
-      const OptionalCorsPreflightArgs& aCorsPreflightArgs,
+      const Maybe<CorsPreflightArgs>& aCorsPreflightArgs,
       const uint32_t& aInitialRwin, const bool& aBlockAuthPrompt,
       const bool& aSuspendAfterSynthesizeResponse,
       const bool& aAllowStaleCacheContent, const nsCString& aContentTypeHint,
       const uint32_t& aCorsMode, const uint32_t& aRedirectMode,
       const uint64_t& aChannelId, const nsString& aIntegrityMetadata,
       const uint64_t& aContentWindowId,
       const nsTArray<PreferredAlternativeDataTypeParams>&
           aPreferredAlternativeTypes,
@@ -186,17 +186,17 @@ class HttpChannelParent final : public n
   virtual mozilla::ipc::IPCResult RecvResume() override;
   virtual mozilla::ipc::IPCResult RecvCancel(const nsresult& status) override;
   virtual mozilla::ipc::IPCResult RecvRedirect2Verify(
       const nsresult& result, const RequestHeaderTuples& changedHeaders,
       const ChildLoadInfoForwarderArgs& aLoadInfoForwarder,
       const uint32_t& loadFlags, const uint32_t& referrerPolicy,
       const Maybe<URIParams>& aReferrerURI,
       const Maybe<URIParams>& apiRedirectUri,
-      const OptionalCorsPreflightArgs& aCorsPreflightArgs,
+      const Maybe<CorsPreflightArgs>& aCorsPreflightArgs,
       const bool& aChooseAppcache) override;
   virtual mozilla::ipc::IPCResult RecvDocumentChannelCleanup(
       const bool& clearCacheEntry) override;
   virtual mozilla::ipc::IPCResult RecvMarkOfflineCacheEntryAsForeign() override;
   virtual mozilla::ipc::IPCResult RecvDivertOnDataAvailable(
       const nsCString& data, const uint64_t& offset,
       const uint32_t& count) override;
   virtual mozilla::ipc::IPCResult RecvDivertOnStopRequest(
--- a/netwerk/protocol/http/PHttpChannel.ipdl
+++ b/netwerk/protocol/http/PHttpChannel.ipdl
@@ -41,17 +41,17 @@ parent:
 
   async Cancel(nsresult status);
 
   // Reports approval/veto of redirect by child process redirect observers
   async Redirect2Verify(nsresult result, RequestHeaderTuples changedHeaders,
                         ChildLoadInfoForwarderArgs loadInfoForwarder,
                         uint32_t loadFlags, uint32_t referrerPolicy,
                         URIParams? referrerUri, URIParams? apiRedirectTo,
-                        OptionalCorsPreflightArgs corsPreflightArgs,
+                        CorsPreflightArgs? corsPreflightArgs,
                         bool chooseAppcache);
 
   // Sent to the parent in order signal that the child side listeners have been
   // set up and the parent side of the channel can be opened.
   async CrossProcessRedirectDone(nsresult result);
 
   // For document loads we keep this protocol open after child's
   // OnStopRequest, and send this msg (instead of __delete__) to allow
--- a/netwerk/protocol/http/nsIHttpChannelChild.idl
+++ b/netwerk/protocol/http/nsIHttpChannelChild.idl
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 4; 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
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 [ptr] native RequestHeaderTuples(mozilla::net::RequestHeaderTuples);
-[ref] native OptionalCorsPreflightArgsRef(mozilla::net::OptionalCorsPreflightArgs);
+[ref] native MaybeCorsPreflightArgsRef(mozilla::Maybe<mozilla::net::CorsPreflightArgs>);
 
 interface nsIPrincipal;
 interface nsIURI;
 
 [uuid(d02b96ed-2789-4f42-a25c-7abe63de7c18)]
 interface nsIHttpChannelChild : nsISupports
 {
   [must_use] void addCookiesToRequest();
@@ -22,15 +22,15 @@ interface nsIHttpChannelChild : nsISuppo
   void forceIntercepted(in boolean postRedirectChannelShouldIntercept,
                         in boolean postRedirectChannelShouldUpgrade);
 
   // Headers that the channel client has set via SetRequestHeader.
   [must_use] readonly attribute RequestHeaderTuples clientSetRequestHeaders;
 
   // Headers that the channel client has set via SetRequestHeader.
   [notxpcom, nostdcall]
-  void GetClientSetCorsPreflightParameters(in OptionalCorsPreflightArgsRef args);
+  void GetClientSetCorsPreflightParameters(in MaybeCorsPreflightArgsRef args);
 
   // This method is called by nsCORSListenerProxy if we need to remove
   // an entry from the CORS preflight cache in the parent process.
   [must_use]
   void removeCorsPreflightCacheEntry(in nsIURI aURI, in nsIPrincipal aRequestingPrincipal);
 };
--- a/netwerk/protocol/websocket/PWebSocket.ipdl
+++ b/netwerk/protocol/websocket/PWebSocket.ipdl
@@ -12,27 +12,20 @@ include IPCStream;
 include URIParams;
 include NeckoChannelParams;
 
 include protocol PFileDescriptorSet; //FIXME: bug #792908
 include protocol PChildToParentStream; //FIXME: bug #792908
 include protocol PParentToChildStream; //FIXME: bug #792908
 
 using class IPC::SerializedLoadContext from "SerializedLoadContext.h";
-using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
 
 namespace mozilla {
 namespace net {
 
-union OptionalTransportProvider
-{
-  PTransportProvider;
-  void_t;
-};
-
 async protocol PWebSocket
 {
   manager PNecko;
 
 parent:
   // Forwarded methods corresponding to methods on nsIWebSocketChannel
   async AsyncOpen(URIParams? aURI,
                   nsCString aOrigin,
@@ -40,17 +33,17 @@ parent:
                   nsCString aProtocol,
                   bool aSecure,
                   // ping values only meaningful if client set them
                   uint32_t aPingInterval,
                   bool aClientSetPingInterval,
                   uint32_t aPingTimeout,
                   bool aClientSetPingTimeout,
                   LoadInfoArgs? aLoadInfoArgs,
-                  OptionalTransportProvider aProvider,
+                  PTransportProvider? aProvider,
                   nsCString aNegotiatedExtensions);
   async Close(uint16_t code, nsCString reason);
   async SendMsg(nsCString aMsg);
   async SendBinaryMsg(nsCString aMsg);
   async SendBinaryStream(IPCStream aStream, uint32_t aLength);
 
   async DeleteSelf();
 
--- a/netwerk/protocol/websocket/WebSocketChannelChild.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannelChild.cpp
@@ -441,32 +441,32 @@ WebSocketChannelChild::AsyncOpen(nsIURI*
     return NS_ERROR_FAILURE;
   }
 
   // Corresponding release in DeallocPWebSocket
   AddIPDLReference();
 
   Maybe<URIParams> uri;
   Maybe<LoadInfoArgs> loadInfoArgs;
-  OptionalTransportProvider transportProvider;
+  Maybe<PTransportProviderChild*> transportProvider;
 
   if (!mIsServerSide) {
     uri.emplace(URIParams());
     SerializeURI(aURI, uri.ref());
     nsresult rv = LoadInfoToLoadInfoArgs(mLoadInfo, &loadInfoArgs);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    transportProvider = void_t();
+    transportProvider = Nothing();
   } else {
     MOZ_ASSERT(mServerTransportProvider);
     PTransportProviderChild* ipcChild;
     nsresult rv = mServerTransportProvider->GetIPCChild(&ipcChild);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    transportProvider = ipcChild;
+    transportProvider = Some(ipcChild);
   }
 
   // This must be called before sending constructor message.
   SetupNeckoTarget();
 
   gNeckoChild->SendPWebSocketConstructor(
       this, tabChild, IPC::SerializedLoadContext(this), mSerial);
   if (!SendAsyncOpen(uri, nsCString(aOrigin), aInnerWindowID, mProtocol,
--- a/netwerk/protocol/websocket/WebSocketChannelParent.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannelParent.cpp
@@ -48,17 +48,17 @@ mozilla::ipc::IPCResult WebSocketChannel
 }
 
 mozilla::ipc::IPCResult WebSocketChannelParent::RecvAsyncOpen(
     const Maybe<URIParams>& aURI, const nsCString& aOrigin,
     const uint64_t& aInnerWindowID, const nsCString& aProtocol,
     const bool& aSecure, const uint32_t& aPingInterval,
     const bool& aClientSetPingInterval, const uint32_t& aPingTimeout,
     const bool& aClientSetPingTimeout, const Maybe<LoadInfoArgs>& aLoadInfoArgs,
-    const OptionalTransportProvider& aTransportProvider,
+    const Maybe<PTransportProviderParent*>& aTransportProvider,
     const nsCString& aNegotiatedExtensions) {
   LOG(("WebSocketChannelParent::RecvAsyncOpen() %p\n", this));
 
   nsresult rv;
   nsCOMPtr<nsIURI> uri;
   nsCOMPtr<nsILoadInfo> loadInfo;
 
   rv = LoadInfoArgsToLoadInfo(aLoadInfoArgs, getter_AddRefs(loadInfo));
@@ -86,20 +86,19 @@ mozilla::ipc::IPCResult WebSocketChannel
   }
 
   rv = mChannel->SetNotificationCallbacks(this);
   if (NS_FAILED(rv)) goto fail;
 
   rv = mChannel->SetProtocol(aProtocol);
   if (NS_FAILED(rv)) goto fail;
 
-  if (aTransportProvider.type() != OptionalTransportProvider::Tvoid_t) {
+  if (aTransportProvider.isSome()) {
     RefPtr<TransportProviderParent> provider =
-        static_cast<TransportProviderParent*>(
-            aTransportProvider.get_PTransportProviderParent());
+        static_cast<TransportProviderParent*>(aTransportProvider.value());
     rv = mChannel->SetServerParameters(provider, aNegotiatedExtensions);
     if (NS_FAILED(rv)) {
       goto fail;
     }
   } else {
     uri = DeserializeURI(aURI);
     if (!uri) {
       rv = NS_ERROR_FAILURE;
--- a/netwerk/protocol/websocket/WebSocketChannelParent.h
+++ b/netwerk/protocol/websocket/WebSocketChannelParent.h
@@ -40,17 +40,17 @@ class WebSocketChannelParent : public PW
  private:
   mozilla::ipc::IPCResult RecvAsyncOpen(
       const Maybe<URIParams>& aURI, const nsCString& aOrigin,
       const uint64_t& aInnerWindowID, const nsCString& aProtocol,
       const bool& aSecure, const uint32_t& aPingInterval,
       const bool& aClientSetPingInterval, const uint32_t& aPingTimeout,
       const bool& aClientSetPingTimeout,
       const Maybe<LoadInfoArgs>& aLoadInfoArgs,
-      const OptionalTransportProvider& aTransportProvider,
+      const Maybe<PTransportProviderParent*>& aTransportProvider,
       const nsCString& aNegotiatedExtensions);
   mozilla::ipc::IPCResult RecvClose(const uint16_t& code,
                                     const nsCString& reason);
   mozilla::ipc::IPCResult RecvSendMsg(const nsCString& aMsg);
   mozilla::ipc::IPCResult RecvSendBinaryMsg(const nsCString& aMsg);
   mozilla::ipc::IPCResult RecvSendBinaryStream(const IPCStream& aStream,
                                                const uint32_t& aLength);
   mozilla::ipc::IPCResult RecvDeleteSelf();
--- a/old-configure.in
+++ b/old-configure.in
@@ -163,44 +163,19 @@ case "$target" in
         AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
         AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
         AC_DEFINE(_USE_MATH_DEFINES) # Otherwise MSVC's math.h doesn't #define M_PI.
 
         _CC_SUITE=14
         MSVC_C_RUNTIME_DLL=vcruntime140.dll
         MSVC_CXX_RUNTIME_DLL=msvcp140.dll
 
-        # C5038: Enable initializer list order warnings
-        # The -w1#### flag treats warning C#### as if it was a warning level
-        # 1 warning, and thus enables it because we enable /W3 warnings. We
-        # don't use -we#### because it would enable warning C#### but treat
-        # it as an error, even in third-party code.
-        # https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level
-        CXXFLAGS="$CXXFLAGS -w15038"
-
-        # C5026: move constructor was implicitly defined as deleted
-        CXXFLAGS="$CXXFLAGS -wd5026"
-
-        # C5027: move assignment operator was implicitly defined as deleted
-        CXXFLAGS="$CXXFLAGS -wd5027"
-
         # -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146)
         CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-"
 
-        # https://connect.microsoft.com/VisualStudio/feedback/details/888527/warnings-on-dbghelp-h
-        # for dbghelp.h, imagehlp.h, and shobj.h
-        # C4091: 'typedef ': ignored on left of '' when no variable is declared
-        CFLAGS="$CFLAGS -wd4091"
-        CXXFLAGS="$CXXFLAGS -wd4091"
-
-        # This is intended as a temporary hack to support building with VS2015.
-        # 'noexcept' used with no exception handling mode specified;
-        # termination on exception is not guaranteed. Specify /EHsc
-        CXXFLAGS="$CXXFLAGS -wd4577"
-
         if test -n "$WIN_UCRT_REDIST_DIR"; then
           if test ! -d "$WIN_UCRT_REDIST_DIR"; then
             AC_MSG_ERROR([Invalid Windows UCRT Redist directory: ${WIN_UCRT_REDIST_DIR}])
           fi
           WIN_UCRT_REDIST_DIR=`cd "$WIN_UCRT_REDIST_DIR" && pwd -W`
         fi
 
         AC_SUBST(MSVC_C_RUNTIME_DLL)
@@ -762,35 +737,16 @@ case "$target" in
         dnl Disabled on ASan because it causes false-positive ODR violations.
         if test -z "$MOZ_ASAN"; then
             CFLAGS="$CFLAGS -Gw"
             CXXFLAGS="$CXXFLAGS -Gw"
         else
             # String tail merging doesn't play nice with ASan's ODR checker.
             LDFLAGS="$LDFLAGS -opt:nolldtailmerge"
         fi
-        # khuey says we can safely ignore MSVC warning C4251
-        # MSVC warning C4244 (implicit type conversion may lose data) warns
-        # and requires workarounds for perfectly valid code.  Also, GCC/clang
-        # don't warn about it by default. So for consistency/sanity, we turn
-        # it off on MSVC, too.
-        # MSVC warning C4267 warns for narrowing type conversions from size_t
-        # to 32-bit integer types on 64-bit platforms.  Since this is virtually
-        # the same thing as C4244, we disable C4267, too.
-        # MSVC warning C4800 warns when a value is implicitly cast to bool,
-        # because this also forces narrowing to a single byte, which can be a
-        # perf hit.  But this matters so little in practice (and often we want
-        # that behavior) that it's better to turn it off.
-        # MSVC warning C4595 warns non-member operator new or delete functions
-        # may not be declared inline, as of VS2015 Update 2.
-        CFLAGS="$CFLAGS -wd4244 -wd4267"
-        CXXFLAGS="$CXXFLAGS -wd4251 -wd4244 -wd4267 -wd4800 -wd4595"
-        # Silence "warning C4065: switch statement contains 'default' but no
-        # 'case' labels".  See bug 1461304.
-        CXXFLAGS="$CXXFLAGS -wd4065"
         if test -n "$CLANG_CL"; then
             # XXX We should combine some of these with our generic GCC-style
             # warning checks.
             #
             # Suppress the clang-cl warning for the inline 'new' and 'delete' in mozalloc
             CXXFLAGS="$CXXFLAGS -Wno-inline-new-delete"
             # We use offsetof on non-POD objects all the time.
             # We also suppress this warning on other platforms.
@@ -846,19 +802,16 @@ case "$target" in
             CXXFLAGS="$CXXFLAGS -Wno-ignored-attributes"
             # __attribute__((unused)) really means "might be unused" and
             # we use it to avoid warnings about things that are unused
             # in some compilation units, but used in many others.  This
             # warning insists on complaining about the latter case, which
             # is annoying, and rather noisy.
             CXXFLAGS="$CXXFLAGS -Wno-used-but-marked-unused"
         fi
-        # make 'foo == bar;' error out
-        CFLAGS="$CFLAGS -we4553"
-        CXXFLAGS="$CXXFLAGS -we4553"
         # Silence VS2017 15.5+ TR1 deprecation warnings hit by older gtest versions
         CXXFLAGS="$CXXFLAGS -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING"
         LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib secur32.lib"
         MOZ_DEBUG_LDFLAGS='-DEBUG'
         WARNINGS_AS_ERRORS='-WX'
         # Use a higher optimization level for clang-cl, so we can come closer
         # to MSVC's performance numbers (see bug 1443590).
         if test -n "$CLANG_CL"; then
--- a/security/sandbox/moz.build
+++ b/security/sandbox/moz.build
@@ -167,15 +167,10 @@ elif CONFIG['OS_ARCH'] == 'WINNT':
     LOCAL_INCLUDES += ['/security/sandbox/chromium']
     LOCAL_INCLUDES += ['/nsprpub']
 
     DisableStlWrapping()
 
     # Suppress warnings in third-party code.
     if CONFIG['CC_TYPE'] == 'clang-cl':
         CXXFLAGS += [
-            '-wd4275', # non dll-interface class exception used as base for dll-interface class
-            '-wd4717', # recursive on all control paths, function will cause runtime stack overflow
             '-Wno-deprecated-declarations', # 'GetVersionExW': was declared deprecated
-            '-wd4302', # 'reinterpret_cast': truncation from 'LPCSTR' to 'WORD'
-            '-wd4311', # 'reinterpret_cast': pointer truncation from 'LPOVERLAPPED' to 'DWORD'
-            '-wd4312', # 'reinterpret_cast': conversion from 'DWORD' to 'LPOVERLAPPED' of greater size
         ]
--- a/servo/components/style/cbindgen.toml
+++ b/servo/components/style/cbindgen.toml
@@ -98,16 +98,17 @@ include = [
   "BorderImageSlice",
   "BorderSpacing",
   "BorderRadius",
   "NonNegativeLengthOrNumberRect",
   "Perspective",
   "ZIndex",
   "TransformOrigin",
   "WordBreak",
+  "Contain",
 ]
 item_types = ["enums", "structs", "typedefs"]
 
 [export.body]
 "CSSPixelLength" = """
   inline nscoord ToAppUnits() const;
   inline bool IsZero() const;
 """
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -2746,17 +2746,17 @@ fn static_assert() {
                           animation-name animation-delay animation-duration
                           animation-direction animation-fill-mode animation-play-state
                           animation-iteration-count animation-timing-function
                           clear transition-duration transition-delay
                           transition-timing-function transition-property
                           transform-style
                           rotate scroll-snap-points-x scroll-snap-points-y
                           scroll-snap-coordinate -moz-binding will-change
-                          offset-path shape-outside contain touch-action
+                          offset-path shape-outside touch-action
                           translate scale""" %>
 <%self:impl_trait style_struct_name="Box" skip_longhands="${skip_box_longhands}">
     #[inline]
     pub fn generate_combined_transform(&mut self) {
         unsafe { bindings::Gecko_StyleDisplay_GenerateCombinedTransform(&mut self.gecko) };
     }
 
     #[inline]
@@ -3166,101 +3166,16 @@ fn static_assert() {
         T::AnimateableFeatures {
             features: custom_idents.into_boxed_slice(),
             bits: WillChangeBits::from_bits_truncate(self.gecko.mWillChangeBitField),
         }
     }
 
     <% impl_shape_source("shape_outside", "mShapeOutside") %>
 
-    pub fn set_contain(&mut self, v: longhands::contain::computed_value::T) {
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_NONE;
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_STRICT;
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT;
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_SIZE;
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_LAYOUT;
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_PAINT;
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_ALL_BITS;
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT_BITS;
-        use crate::properties::longhands::contain::SpecifiedValue;
-
-        if v.is_empty() {
-            self.gecko.mContain = NS_STYLE_CONTAIN_NONE as u8;
-            return;
-        }
-
-        if v.contains(SpecifiedValue::STRICT) {
-            self.gecko.mContain = (NS_STYLE_CONTAIN_STRICT | NS_STYLE_CONTAIN_ALL_BITS) as u8;
-            return;
-        }
-        if v.contains(SpecifiedValue::CONTENT) {
-            self.gecko.mContain = (NS_STYLE_CONTAIN_CONTENT | NS_STYLE_CONTAIN_CONTENT_BITS) as u8;
-            return;
-        }
-
-        let mut bitfield = 0;
-        if v.contains(SpecifiedValue::LAYOUT) {
-            bitfield |= NS_STYLE_CONTAIN_LAYOUT;
-        }
-        if v.contains(SpecifiedValue::PAINT) {
-            bitfield |= NS_STYLE_CONTAIN_PAINT;
-        }
-        if v.contains(SpecifiedValue::SIZE) {
-            bitfield |= NS_STYLE_CONTAIN_SIZE;
-        }
-
-        self.gecko.mContain = bitfield as u8;
-    }
-
-    pub fn clone_contain(&self) -> longhands::contain::computed_value::T {
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_STRICT;
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT;
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_SIZE;
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_LAYOUT;
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_PAINT;
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_ALL_BITS;
-        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT_BITS;
-        use crate::properties::longhands::contain::{self, SpecifiedValue};
-
-        let mut servo_flags = contain::computed_value::T::empty();
-        let gecko_flags = self.gecko.mContain;
-
-        if gecko_flags & (NS_STYLE_CONTAIN_STRICT as u8) != 0 {
-            debug_assert_eq!(
-                gecko_flags & (NS_STYLE_CONTAIN_ALL_BITS as u8),
-                NS_STYLE_CONTAIN_ALL_BITS as u8,
-                "When strict is specified, ALL_BITS should be specified as well"
-            );
-            servo_flags.insert(SpecifiedValue::STRICT | SpecifiedValue::STRICT_BITS);
-            return servo_flags;
-        }
-        if gecko_flags & (NS_STYLE_CONTAIN_CONTENT as u8) != 0 {
-            debug_assert_eq!(
-                gecko_flags & (NS_STYLE_CONTAIN_CONTENT_BITS as u8),
-                NS_STYLE_CONTAIN_CONTENT_BITS as u8,
-                "When content is specified, CONTENT_BITS should be specified as well"
-            );
-            servo_flags.insert(SpecifiedValue::CONTENT | SpecifiedValue::CONTENT_BITS);
-            return servo_flags;
-        }
-        if gecko_flags & (NS_STYLE_CONTAIN_LAYOUT as u8) != 0 {
-            servo_flags.insert(SpecifiedValue::LAYOUT);
-        }
-        if gecko_flags & (NS_STYLE_CONTAIN_PAINT as u8) != 0 {
-            servo_flags.insert(SpecifiedValue::PAINT);
-        }
-        if gecko_flags & (NS_STYLE_CONTAIN_SIZE as u8) != 0 {
-            servo_flags.insert(SpecifiedValue::SIZE);
-        }
-
-        return servo_flags;
-    }
-
-    ${impl_simple_copy("contain", "mContain")}
-
     ${impl_simple_type_with_conversion("touch_action")}
 
     pub fn set_offset_path(&mut self, v: longhands::offset_path::computed_value::T) {
         use crate::gecko_bindings::bindings::{Gecko_NewStyleMotion, Gecko_SetStyleMotion};
         use crate::gecko_bindings::structs::StyleShapeSourceType;
         use crate::values::generics::basic_shape::FillRule;
         use crate::values::specified::OffsetPath;
 
--- a/servo/components/style/values/specified/box.rs
+++ b/servo/components/style/values/specified/box.rs
@@ -748,28 +748,31 @@ pub fn assert_touch_action_matches() {
         NS_STYLE_TOUCH_ACTION_PAN_Y => TouchAction::TOUCH_ACTION_PAN_Y,
         NS_STYLE_TOUCH_ACTION_MANIPULATION => TouchAction::TOUCH_ACTION_MANIPULATION,
     }
 }
 
 bitflags! {
     #[derive(MallocSizeOf, SpecifiedValueInfo, ToComputedValue)]
     #[value_info(other_values = "none,strict,content,size,layout,paint")]
+    #[repr(C)]
     /// Constants for contain: https://drafts.csswg.org/css-contain/#contain-property
     pub struct Contain: u8 {
+        /// `none` variant, just for convenience.
+        const NONE = 0;
         /// 'size' variant, turns on size containment
-        const SIZE = 0x01;
+        const SIZE = 1 << 0;
         /// `layout` variant, turns on layout containment
-        const LAYOUT = 0x02;
+        const LAYOUT = 1 << 1;
         /// `paint` variant, turns on paint containment
-        const PAINT = 0x04;
+        const PAINT = 1 << 2;
         /// `strict` variant, turns on all types of containment
-        const STRICT = 0x08;
+        const STRICT = 1 << 3;
         /// 'content' variant, turns on layout and paint containment
-        const CONTENT = 0x10;
+        const CONTENT = 1 << 4;
         /// variant with all the bits that contain: strict turns on
         const STRICT_BITS = Contain::LAYOUT.bits | Contain::PAINT.bits | Contain::SIZE.bits;
         /// variant with all the bits that contain: content turns on
         const CONTENT_BITS = Contain::LAYOUT.bits | Contain::PAINT.bits;
     }
 }
 
 impl ToCss for Contain {
--- a/testing/geckodriver/src/capabilities.rs
+++ b/testing/geckodriver/src/capabilities.rs
@@ -343,17 +343,17 @@ impl FirefoxOptions {
         if let Some(profile_json) = options.get("profile") {
             let profile_base64 = profile_json.as_str().ok_or(WebDriverError::new(
                 ErrorStatus::UnknownError,
                 "Profile is not a string"
             ))?;
             let profile_zip = &*base64::decode(profile_base64)?;
 
             // Create an emtpy profile directory
-            let profile = Profile::new(None)?;
+            let profile = Profile::new()?;
             unzip_buffer(
                 profile_zip,
                 profile
                     .temp_dir
                     .as_ref()
                     .expect("Profile doesn't have a path")
                     .path()
             )?;
--- a/testing/geckodriver/src/marionette.rs
+++ b/testing/geckodriver/src/marionette.rs
@@ -140,17 +140,17 @@ impl MarionetteHandler {
              'moz:firefoxOptions.binary' capability provided, and \
              no binary flag set on the command line",
         ))?;
 
         let is_custom_profile = options.profile.is_some();
 
         let mut profile = match options.profile {
             Some(x) => x,
-            None => Profile::new(None)?,
+            None => Profile::new()?,
         };
 
         self.set_prefs(port, &mut profile, is_custom_profile, options.prefs)
             .map_err(|e| {
                 WebDriverError::new(
                     ErrorStatus::SessionNotCreated,
                     format!("Failed to set preferences: {}", e),
                 )
@@ -1518,17 +1518,17 @@ mod tests {
     use mozprofile::preferences::PrefValue;
     use mozprofile::profile::Profile;
 
     // This is not a pretty test, mostly due to the nature of
     // mozprofile's and MarionetteHandler's APIs, but we have had
     // several regressions related to marionette.log.level.
     #[test]
     fn test_marionette_log_level() {
-        let mut profile = Profile::new(None).unwrap();
+        let mut profile = Profile::new().unwrap();
         let handler = MarionetteHandler::new(MarionetteSettings::default());
         handler.set_prefs(2828, &mut profile, false, vec![]).ok();
         let user_prefs = profile.user_prefs().unwrap();
 
         let pref = user_prefs.get("marionette.log.level").unwrap();
         let value = match pref.value {
             PrefValue::String(ref s) => s,
             _ => panic!(),
--- a/testing/mozbase/rust/mozprofile/src/profile.rs
+++ b/testing/mozbase/rust/mozprofile/src/profile.rs
@@ -11,28 +11,31 @@ use tempdir::TempDir;
 pub struct Profile {
     pub path: PathBuf,
     pub temp_dir: Option<TempDir>,
     prefs: Option<PrefFile>,
     user_prefs: Option<PrefFile>,
 }
 
 impl Profile {
-    pub fn new(opt_path: Option<&Path>) -> IoResult<Profile> {
-        let mut temp_dir = None;
-        let path = match opt_path {
-            Some(p) => p.to_path_buf(),
-            None => {
-                let dir = TempDir::new("rust_mozprofile")?;
-                let temp_path = dir.path().to_path_buf();
-                temp_dir = Some(dir);
-                temp_path
-            }
-        };
+    pub fn new() -> IoResult<Profile> {
+        let dir = TempDir::new("rust_mozprofile")?;
+        let path = dir.path().to_path_buf();
+        let temp_dir = Some(dir);
+        Ok(Profile {
+            path,
+            temp_dir,
+            prefs: None,
+            user_prefs: None,
+        })
+    }
 
+     pub fn new_from_path(p: &Path) -> IoResult<Profile> {
+        let path = p.to_path_buf();
+        let temp_dir = None;
         Ok(Profile {
             path,
             temp_dir,
             prefs: None,
             user_prefs: None,
         })
     }
 
--- a/toolkit/components/protobuf/moz.build
+++ b/toolkit/components/protobuf/moz.build
@@ -135,20 +135,16 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
             '-Wno-comma',
             '-Wno-null-conversion',
             '-Wno-unused-local-typedef',
         ]
 elif CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += [
         '-Wno-macro-redefined',  # 'WIN32_LEAN_AND_MEAN' : macro redefinition
         '-Wno-sign-compare',
-        '-wd4065',  # switch statement contains 'default' but no 'case' labels
-        '-wd4099',  # mismatched class/struct tags
-        '-wd4305',  # double to float truncation
-        '-wd4506',  # no definition for inline function (protobuf issue #240)
     ]
 
 if CONFIG['OS_TARGET'] == 'WINNT':
     DEFINES['NOGDI'] = True  # wingdi.h defines ERROR as 0 and conflicts with logging.h
 
 if CONFIG['MOZ_USE_PTHREADS']:
     DEFINES['HAVE_PTHREAD'] = True
 
--- a/toolkit/crashreporter/crashreporter.mozbuild
+++ b/toolkit/crashreporter/crashreporter.mozbuild
@@ -8,22 +8,16 @@ LOCAL_INCLUDES += [
     '/toolkit/crashreporter/breakpad-client',
     '/toolkit/crashreporter/google-breakpad/src',
 ]
 
 # Suppress warnings in third-party code.
 if CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += [
         '-Wno-macro-redefined',
-        '-wd4146', # negative unsigned
-        '-wd4334', # 32-bit shift to 64 bits
-        '-wd4804', # unsafe use of type 'bool'
-    ]
-    CFLAGS += [
-        '-wd4312', # conversion to greater size
     ]
 elif CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-unused-local-typedefs',
         '-Wno-shadow',
         '-Wno-deprecated-declarations',
         '-Wno-bool-compare',
         '-Wno-unused-but-set-variable',
--- a/toolkit/crashreporter/test/moz.build
+++ b/toolkit/crashreporter/test/moz.build
@@ -50,12 +50,8 @@ DEFINES['SHARED_LIBRARY'] = '%s%s%s' % (
 )
 
 TEST_HARNESS_FILES.xpcshell.toolkit.crashreporter.test.unit += ['CrashTestUtils.jsm']
 TEST_HARNESS_FILES.xpcshell.toolkit.crashreporter.test.unit_ipc += ['CrashTestUtils.jsm']
 
 include('/toolkit/crashreporter/crashreporter.mozbuild')
 
 NO_PGO = True
-
-# Temporary workaround for an issue in upstream breakpad
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    CXXFLAGS += ['-wd4334']
--- a/toolkit/locales/en-US/chrome/global/intl.properties
+++ b/toolkit/locales/en-US/chrome/global/intl.properties
@@ -19,17 +19,17 @@
 # For example, the Breton [br] locale might consider including French and
 # British English in their list, since those languages are commonly spoken in
 # the same area as Breton:
 # intl.accept_languages=br, fr-FR, fr, en-GB, en
 intl.accept_languages=en-US, en
 
 # LOCALIZATION NOTE (font.language.group):
 # This preference controls the initial setting of the language drop-down menu
-# in the Content > Fonts & Colors > Advanced preference panel.
+# in the Fonts and Colors > Advanced preference panel.
 #
 # Set it to the value of one of the menuitems in the "selectLangs" menulist in
 # http://dxr.mozilla.org/mozilla-central/source/browser/components/preferences/fonts.xul
 font.language.group=x-western
 
 # LOCALIZATION NOTE (intl.charset.detector):
 # This preference controls the initial setting for the character encoding
 # detector. Valid values are ja_parallel_state_machine for Japanese, ruprob
--- a/widget/windows/moz.build
+++ b/widget/windows/moz.build
@@ -156,12 +156,8 @@ OS_LIBS += [
     'rpcrt4',
 ]
 
 if CONFIG['CC_TYPE'] == 'clang-cl':
     SOURCES += [
         'ToastNotification.cpp',
         'ToastNotificationHandler.cpp',
     ]
-    # C5038: Suppress initializer list order warnings from wrl.h
-    SOURCES['ToastNotification.cpp'].flags += ['-wd5038']
-    SOURCES['ToastNotificationHandler.cpp'].flags += ['-wd5038']
-    SOURCES['WindowsUIUtils.cpp'].flags += ['-wd5038']
--- a/xpcom/io/moz.build
+++ b/xpcom/io/moz.build
@@ -145,14 +145,8 @@ FINAL_LIBRARY = 'xul'
 
 if CONFIG['OS_ARCH'] == 'Linux' and 'lib64' in CONFIG['libdir']:
     DEFINES['HAVE_USR_LIB64_DIR'] = True
 
 LOCAL_INCLUDES += [
     '!..',
     '../build',
 ]
-
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    # This is intended as a temporary hack to support building with VS2015.
-    # '_snwprintf' : format string '%s' requires an argument of type 'wchar_t *',
-    # but variadic argument 3 has type 'char16ptr_t'
-    CXXFLAGS += ['-wd4477']