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

Delta Between Two Patch Sets: include.preload.js

Issue 5562887569408000: Issue 1770 - Don't use shadow DOM on docs.google.com, fixing printing there (Closed)
Left Patch Set: Created Jan. 10, 2015, 11:53 a.m.
Right Patch Set: Wrapped long line Created Jan. 13, 2015, 12:32 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 | « no previous file | 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 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 function init(document) 155 function init(document)
156 { 156 {
157 // Use Shadow DOM if available to don't mess with web pages that rely on 157 // Use Shadow DOM if available to don't mess with web pages that rely on
158 // the order of their own <style> tags (#309). 158 // the order of their own <style> tags (#309).
159 // 159 //
160 // However, creating a shadow root breaks running CSS transitions. So we 160 // However, creating a shadow root breaks running CSS transitions. So we
161 // have to create the shadow root before transistions might start (#452). 161 // have to create the shadow root before transistions might start (#452).
162 // 162 //
163 // Also, we can't use shadow DOM on Google Docs, since it breaks printing ther e (#1770). 163 // Also, we can't use shadow DOM on Google Docs, since it breaks printing
Wladimir Palant 2015/01/13 07:30:27 Nit: Please wrap that long comment and keep line l
Sebastian Noack 2015/01/13 12:32:21 Done.
164 // there (#1770).
164 var shadow = null; 165 var shadow = null;
165 if ("createShadowRoot" in document.documentElement && document.domain != "docs .google.com") 166 if ("createShadowRoot" in document.documentElement && document.domain != "docs .google.com")
166 { 167 {
167 shadow = document.documentElement.createShadowRoot(); 168 shadow = document.documentElement.createShadowRoot();
168 shadow.appendChild(document.createElement("shadow")); 169 shadow.appendChild(document.createElement("shadow"));
169 } 170 }
170 171
171 // Sets the currently used CSS rules for elemhide filters 172 // Sets the currently used CSS rules for elemhide filters
172 var setElemhideCSSRules = function(selectors) 173 var setElemhideCSSRules = function(selectors)
173 { 174 {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 }, true); 242 }, true);
242 243
243 ext.backgroundPage.sendMessage({type: "get-selectors"}, setElemhideCSSRules); 244 ext.backgroundPage.sendMessage({type: "get-selectors"}, setElemhideCSSRules);
244 } 245 }
245 246
246 if (document instanceof HTMLDocument) 247 if (document instanceof HTMLDocument)
247 { 248 {
248 checkSitekey(); 249 checkSitekey();
249 init(document); 250 init(document);
250 } 251 }
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld