B2G/gecko/browser/devtools/highlighter/highlighter.jsm
/**
   * Don't listen to page events while inspecting with the mouse.
   */
Don't listen to page events while inspecting with the mouse.
Don ' t listen to page events while inspecting with the mouse .
function Highlighter_brieflyIgnorePageEvents()
  {
     Side effect, zoom levels are not updated during this short period.
     It's very unlikely this would happen, but just in case, we call
     computeZoomFactor() when reattaching the events.
    if (this.pageEventsMuter) {
      this.chromeWin.clearTimeout(this.pageEventsMuter);
    } else {
      this.detachPageListeners();
    }
    this.pageEventsMuter =
      this.chromeWin.setTimeout(function() {
        this.attachPageListeners();
         Just in case the zoom level changed while ignoring the paint events
        this.computeZoomFactor();
        this.pageEventsMuter = null;
      }.bind(this), 500);
  }
function Highlighter_brieflyIgnorePageEvents ( ) { if ( this . pageEventsMuter ) { this . chromeWin . clearTimeout ( this . pageEventsMuter ) ; } else { this . detachPageListeners ( ) ; } this . pageEventsMuter = this . chromeWin . setTimeout ( function ( ) { this . attachPageListeners ( ) ; this . computeZoomFactor ( ) ; this . pageEventsMuter = null ; } . bind ( this ) , 500 ) ; }
Don't listen to page events while inspecting with the mouse.
Don ' t listen to page events while inspecting with the mouse .
// The goal is to keep smooth animations while inspecting. // CSS Transitions might be interrupted because of a MozAfterPaint // event that would triger an invalidateSize() call. // So we don't listen to events that would trigger an invalidateSize() // call. // // Side effect, zoom levels are not updated during this short period. // It's very unlikely this would happen, but just in case, we call // computeZoomFactor() when reattaching the events. // Just in case the zoom level changed while ignoring the paint events