B2G/gecko/browser/devtools/responsivedesign/responsivedesign.jsm
/**
   * When a preset is selected, apply it.
   */
When a preset is selected, apply it.
When a preset is selected apply it .
function RUI_presetSelected() {
    if (this.menulist.selectedItem.getAttribute("ispreset") === "true") {
      this.selectedItem = this.menulist.selectedItem;
      this.rotateValue = false;
      let selectedPreset = this.menuitems.get(this.selectedItem);
      this.loadPreset(selectedPreset);
      this.currentPresetKey = selectedPreset.key;
      this.saveCurrentPreset();
      if (selectedPreset == this.customPreset) {
        this.addbutton.hidden = false;
        this.removebutton.hidden = true;
      } else {
        this.addbutton.hidden = true;
        this.removebutton.hidden = false;
      }
    }
  }
function RUI_presetSelected ( ) { if ( this . menulist . selectedItem . getAttribute ( "ispreset" ) === "true" ) { this . selectedItem = this . menulist . selectedItem ; this . rotateValue = false ; let selectedPreset = this . menuitems . get ( this . selectedItem ) ; this . loadPreset ( selectedPreset ) ; this . currentPresetKey = selectedPreset . key ; this . saveCurrentPreset ( ) ; if ( selectedPreset == this . customPreset ) { this . addbutton . hidden = false ; this . removebutton . hidden = true ; } else { this . addbutton . hidden = true ; this . removebutton . hidden = false ; } } }
When a preset is selected, apply it.
When a preset is selected apply it .
// Update the buttons hidden status according to the new selected preset