Ticket #14429: almost-not-quite.diff

File almost-not-quite.diff, 1.4 KB (added by mikeperry, 4 years ago)

Attempted fix for resizing issue. Uses incorrect element for geometry.

  • src/chrome/content/content-sizer.js

    diff --git a/src/chrome/content/content-sizer.js b/src/chrome/content/content-sizer.js
    index 4238108..6da7a73 100644
    a b let pinger = function (timeout_ms, onTimeout) { 
    2929    // received during the wait interval, then fire onTimeout().
    3030    setTimeout(function () {
    3131      if (pingCount === thisPing) {
    32         onTimeout();
     32        if (!onTimeout()) {
     33          // If the onTimeout function failed to perform it's task successfully,
     34          // simulate another ping.
     35          ping();
     36        }
    3337      }
    3438    }, timeout_ms);
    3539  };
    let pinger = function (timeout_ms, onTimeout) { 
    4044let shrinkwrap = function (window) {
    4145  let gBrowser = window.gBrowser,
    4246      container = gBrowser.parentElement,
    43       deltaWidth = gBrowser.clientWidth - container.clientWidth,
    44       deltaHeight = gBrowser.clientHeight - container.clientHeight;
     47      deltaWidth = gBrowser.clientWidth - window.outerWidth,
     48      deltaHeight = gBrowser.clientHeight - window.outerHeight;
    4549  if (deltaWidth !== 0 || deltaHeight !== 0) {
    4650    window.resizeBy(deltaWidth, deltaHeight);
     51    torbutton_eclog(4, "Resized by: "+deltaWidth+"x"+deltaHeight);
     52    return false;
    4753  }
     54  torbutton_eclog(4, "No resize needed!");
     55  return true;
    4856};
    4957
    5058// __updateDimensions(gBrowser, xStep, yStep)__.