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

Side by Side Diff: lib/aardvark.js

Issue 29322778: Issue 2816 - Partial fix for EHH button in inspector tool, preview functionality still broken (Closed)
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:
View unified diff | Download patch
« no previous file with comments | « chrome/content/frameScript.js ('k') | lib/inspectorObserver.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 this.boxElem = null; 565 this.boxElem = null;
566 E = id => null; 566 E = id => null;
567 return false; 567 return false;
568 }, 568 },
569 569
570 select: function(elem) 570 select: function(elem)
571 { 571 {
572 if (!elem) 572 if (!elem)
573 return false; 573 return false;
574 574
575 this.window.openDialog("chrome://elemhidehelper/content/composer.xul", "_bla nk", 575 this.browser.selectedBrowser.messageManager.sendAsyncMessage(
576 "chrome,centerscreen,resizable,dialog=no", elem); 576 "ElemHideHelper:GetNodeInfo",
577 this.quit(); 577 null,
578 {
579 element: elem,
580 callback: (nodeData, host) =>
581 {
582 this.window.openDialog("chrome://elemhidehelper/content/composer.xul",
583 "_blank", "chrome,centerscreen,resizable,dialog=no", nodeData,
584 host);
585 this.quit();
586 }
587 }
588 );
578 return false; 589 return false;
579 }, 590 },
580 591
581 blinkElement: function(elem) 592 blinkElement: function(elem)
582 { 593 {
583 if (!elem) 594 if (!elem)
584 return false; 595 return false;
585 596
586 if ("blinkTimer" in this) 597 if ("blinkTimer" in this)
587 this.stopBlinking(); 598 this.stopBlinking();
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 // Show help box 758 // Show help box
748 helpBox.showPopup(this.browser, -1, -1, "tooltip", "topleft", "topleft"); 759 helpBox.showPopup(this.browser, -1, -1, "tooltip", "topleft", "topleft");
749 return true; 760 return true;
750 } 761 }
751 } 762 }
752 763
753 // Makes sure event handlers like Aardvark.onKeyPress always have the correct 764 // Makes sure event handlers like Aardvark.onKeyPress always have the correct
754 // this pointer set. 765 // this pointer set.
755 for (let method of ["onMouseClick", "onMouseScroll", "onKeyPress", "onPageHide", "onMouseMove", "onAfterPaint", "quit"]) 766 for (let method of ["onMouseClick", "onMouseScroll", "onKeyPress", "onPageHide", "onMouseMove", "onAfterPaint", "quit"])
756 Aardvark[method] = Aardvark[method].bind(Aardvark); 767 Aardvark[method] = Aardvark[method].bind(Aardvark);
OLDNEW
« no previous file with comments | « chrome/content/frameScript.js ('k') | lib/inspectorObserver.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld