Skip to content
  • Tom Ritter's avatar
    Bug 1407366 - Part 3: Implementing the window letterboxing. r=johannh · eed36e85
    Tom Ritter authored
    This patch implements the window letterboxing. The implementation
    is based on adding margins around the browser element to round the
    content viewport size. Whenever the browser content is resized, the
    RFPHelper will adjust margins around it. But it won't add any margins
    for an empty browser or a browser loads a content with the system
    principal.
    
    The letterboxing is hidden behind a hidden pref
    "privacy.resistFingerprinting.letterboxing." By default, it will use
    stepping size 200x100 to round content window. And we can customize
    the set of dimensions used for deciding the size of the rounded
    content viewport by the pref
    "privacy.resistFingerprinting.letterboxing.dimensions". This pref
    should be formated as 'width1xheight1, width2xheight2, ...'. We will
    find the dimensions which can fit into the real content size and have
    the smallest margins to be the rounded content viewport size. For example
    , given the set "400x200, 500x300, 800x500" and the real content size
    "600x300", we would round the content size into 500x300.
    
    --HG--
    extra : rebase_source : a5bcb64934177f8518ef4bca922d7e3330bbd3ca
    eed36e85