Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: lib/aardvark.js

Issue 29322778: Issue 2816 - Partial fix for EHH button in inspector tool, preview functionality still broken (Closed)
Left Patch Set: Unified code paths Created July 29, 2015, 12:23 p.m.
Right Patch Set: Preemptively fixed some nits and compatibility info Created July 29, 2015, 12:41 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « chrome/content/frameScript.js ('k') | lib/inspectorObserver.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This Source Code is subject to the terms of the Mozilla Public License 2 * This Source Code is subject to the terms of the Mozilla Public License
3 * version 2.0 (the "License"). You can obtain a copy of the License at 3 * version 2.0 (the "License"). You can obtain a copy of the License at
4 * http://mozilla.org/MPL/2.0/. 4 * http://mozilla.org/MPL/2.0/.
5 */ 5 */
6 6
7 let {Prefs} = require("prefs"); 7 let {Prefs} = require("prefs");
8 8
9 // Make sure to stop selection when we are uninstalled 9 // Make sure to stop selection when we are uninstalled
10 onShutdown.add(() => Aardvark.quit()); 10 onShutdown.add(() => Aardvark.quit());
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 if (!elem) 572 if (!elem)
573 return false; 573 return false;
574 574
575 this.browser.selectedBrowser.messageManager.sendAsyncMessage( 575 this.browser.selectedBrowser.messageManager.sendAsyncMessage(
576 "ElemHideHelper:GetNodeInfo", 576 "ElemHideHelper:GetNodeInfo",
577 null, 577 null,
578 { 578 {
579 element: elem, 579 element: elem,
580 callback: (nodeData, host) => 580 callback: (nodeData, host) =>
581 { 581 {
582 this.window.openDialog("chrome://elemhidehelper/content/composer.xul", "_blank", 582 this.window.openDialog("chrome://elemhidehelper/content/composer.xul",
583 "chrome,centerscreen,resizable,dialog=no", node Data, host); 583 "_blank", "chrome,centerscreen,resizable,dialog=no", nodeData,
584 host);
584 this.quit(); 585 this.quit();
585 } 586 }
586 } 587 }
587 ); 588 );
588 return false; 589 return false;
589 }, 590 },
590 591
591 blinkElement: function(elem) 592 blinkElement: function(elem)
592 { 593 {
593 if (!elem) 594 if (!elem)
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 // Show help box 758 // Show help box
758 helpBox.showPopup(this.browser, -1, -1, "tooltip", "topleft", "topleft"); 759 helpBox.showPopup(this.browser, -1, -1, "tooltip", "topleft", "topleft");
759 return true; 760 return true;
760 } 761 }
761 } 762 }
762 763
763 // Makes sure event handlers like Aardvark.onKeyPress always have the correct 764 // Makes sure event handlers like Aardvark.onKeyPress always have the correct
764 // this pointer set. 765 // this pointer set.
765 for (let method of ["onMouseClick", "onMouseScroll", "onKeyPress", "onPageHide", "onMouseMove", "onAfterPaint", "quit"]) 766 for (let method of ["onMouseClick", "onMouseScroll", "onKeyPress", "onPageHide", "onMouseMove", "onAfterPaint", "quit"])
766 Aardvark[method] = Aardvark[method].bind(Aardvark); 767 Aardvark[method] = Aardvark[method].bind(Aardvark);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld