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

Delta Between Two Patch Sets: lib/aardvark.js

Issue 29323439: Issue 2877 - Element Hiding Helper causes tab to crash when selecting some elements (Closed)
Left Patch Set: Created Aug. 10, 2015, 9:22 p.m.
Right Patch Set: Removed extra newline Created Aug. 11, 2015, 1:56 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') | no next file » | 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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 ); 605 );
606 606
607 if (!response.nodeData) 607 if (!response.nodeData)
608 return; 608 return;
609 609
610 this.window.openDialog("chrome://elemhidehelper/content/composer.xul", 610 this.window.openDialog("chrome://elemhidehelper/content/composer.xul",
611 "_blank", "chrome,centerscreen,resizable,dialog=no", response); 611 "_blank", "chrome,centerscreen,resizable,dialog=no", response);
612 this.quit(); 612 this.quit();
613 }; 613 };
614 614
615
saroyanm 2015/08/11 13:50:14 Nit: please remove new line here.
Wladimir Palant 2015/08/11 13:57:06 Done.
616 this.browser.selectedBrowser.messageManager.addMessageListener( 615 this.browser.selectedBrowser.messageManager.addMessageListener(
617 "ElemHideHelper:GetNodeInfo:Response", 616 "ElemHideHelper:GetNodeInfo:Response",
618 callback 617 callback
619 ); 618 );
620 this.browser.selectedBrowser.messageManager.sendAsyncMessage( 619 this.browser.selectedBrowser.messageManager.sendAsyncMessage(
621 "ElemHideHelper:GetNodeInfo", 620 "ElemHideHelper:GetNodeInfo",
622 messageId, 621 messageId,
623 { 622 {
624 element: elem 623 element: elem
625 } 624 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 // Show help box 795 // Show help box
797 helpBox.showPopup(this.browser, -1, -1, "tooltip", "topleft", "topleft"); 796 helpBox.showPopup(this.browser, -1, -1, "tooltip", "topleft", "topleft");
798 return true; 797 return true;
799 } 798 }
800 } 799 }
801 800
802 // Makes sure event handlers like Aardvark.onKeyPress always have the correct 801 // Makes sure event handlers like Aardvark.onKeyPress always have the correct
803 // this pointer set. 802 // this pointer set.
804 for (let method of ["onMouseClick", "onMouseScroll", "onKeyPress", "onPageHide", "onMouseMove", "onAfterPaint", "quit"]) 803 for (let method of ["onMouseClick", "onMouseScroll", "onKeyPress", "onPageHide", "onMouseMove", "onAfterPaint", "quit"])
805 Aardvark[method] = Aardvark[method].bind(Aardvark); 804 Aardvark[method] = Aardvark[method].bind(Aardvark);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld