Commit 241d1953 authored by henry's avatar henry Committed by Pier Angelo Vendrame
Browse files

fixup! BB 32308: Use direct browser sizing for letterboxing.

TB 44214: Separate out the essential --letterboxing-width and
--letterboxing-height rules into their own .letterboxing block, to have
the property values set on.
parent 23812589
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -341,7 +341,7 @@ class _RFPHelper {
    // If not already cached on the document object, traverse the CSSOM and
    // find the rule applying the default letterboxing styles to browsers
    // preemptively in order to beat race conditions on tab/window creation
    return (document._letterboxingMarginsRule ||= (() => {
    return (document._letterboxingDefaultRule ||= (() => {
      const LETTERBOX_CSS_SELECTOR = ".letterboxing";
      const LETTERBOX_CSS_URL =
        "chrome://global/content/resistfingerprinting/letterboxing.css";
+9 −2
Original line number Diff line number Diff line
@@ -7,7 +7,16 @@
 * RFPHelper.sys.mjs (LETTERBOX_CSS_SELECTOR and LETTERBOX_CSS_URL,
 * respectively), where --letterboxing-width & --letterboxing-height are
 * actually set.
 * Keep this block first and separate to the rules that do not necessarily
 * require --letterboxing-width or --letterboxing-height.
 */
.letterboxing {
  .browserContainer:not(.responsive-mode) > .browserStack:not(.exclude-letterboxing) > browser {
    width: var(--letterboxing-width) !important;
    height: var(--letterboxing-height) !important;
  }
}

.letterboxing {
  --letterboxing-bgcolor: var(--tabpanel-background-color);
  --letterboxing-border-radius: 8px;
@@ -32,8 +41,6 @@
    border-radius: var(--letterboxing-border-radius);
    border-top-left-radius: var(--letterboxing-border-top-radius);
    border-top-right-radius: var(--letterboxing-border-top-radius);
    width: var(--letterboxing-width) !important;
    height: var(--letterboxing-height) !important;
  }
}