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

Delta Between Two Patch Sets: safari/ext/content.js

Issue 5464830253203456: Refactored the abstraction layer to address prerendered pages on Safari caused by leaky abstraction (Closed)
Left Patch Set: Rebased and addressed comments Created April 7, 2014, 1:14 p.m.
Right Patch Set: Addressed comments Created April 11, 2014, 2:47 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 | « safari/ext/common.js ('k') | safari/ext/popup.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 file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 )) 102 ))
103 { 103 {
104 event.preventDefault(); 104 event.preventDefault();
105 105
106 // Safari doesn't dispatch an "error" event when preventing an element 106 // Safari doesn't dispatch an "error" event when preventing an element
107 // from loading by cancelling the "beforeload" event. So we have to 107 // from loading by cancelling the "beforeload" event. So we have to
108 // dispatch it manually. Otherwise element collapsing wouldn't work. 108 // dispatch it manually. Otherwise element collapsing wouldn't work.
109 if (type != "sub_frame") 109 if (type != "sub_frame")
110 { 110 {
111 var evt = document.createEvent("Event"); 111 var evt = document.createEvent("Event");
112 evt.initEvent(type == "error"); 112 evt.initEvent("error");
113 event.target.dispatchEvent(evt); 113 event.target.dispatchEvent(evt);
114 } 114 }
115 } 115 }
116 }, true); 116 }, true);
117 117
118 118
119 /* Context menus */ 119 /* Context menus */
120 120
121 document.addEventListener("contextmenu", function(event) 121 document.addEventListener("contextmenu", function(event)
122 { 122 {
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 messageProxy.handleResponse(event.message); 396 messageProxy.handleResponse(event.message);
397 break; 397 break;
398 case "proxyCallback": 398 case "proxyCallback":
399 backgroundPageProxy.handleCallback(event.message); 399 backgroundPageProxy.handleCallback(event.message);
400 break; 400 break;
401 } 401 }
402 } 402 }
403 } 403 }
404 }); 404 });
405 })(); 405 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld