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

Side by Side Diff: include.preload.js

Issue 5852174588313600: Issue 2602 - Don't use shadow DOM on mail.google.com, fixing an issue with the feedback form there (Closed)
Patch Set: Created June 3, 2015, 9:29 a.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 | « no previous file | no next file » | 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 file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 var shadow = null; 188 var shadow = null;
189 var style = null; 189 var style = null;
190 var observer = null; 190 var observer = null;
191 191
192 // Use Shadow DOM if available to don't mess with web pages that rely on 192 // Use Shadow DOM if available to don't mess with web pages that rely on
193 // the order of their own <style> tags (#309). 193 // the order of their own <style> tags (#309).
194 // 194 //
195 // However, creating a shadow root breaks running CSS transitions. So we 195 // However, creating a shadow root breaks running CSS transitions. So we
196 // have to create the shadow root before transistions might start (#452). 196 // have to create the shadow root before transistions might start (#452).
197 // 197 //
198 // Also, we can't use shadow DOM on Google Docs, since it breaks printing 198 // Also, we can't use shadow DOM on Google Docs since it breaks printing
199 // there (#1770). 199 // there (#1770), and Google Mail since the feedback from breaks the layout
200 if ("createShadowRoot" in document.documentElement && document.domain != "docs .google.com") 200 // there when using shadow DOM (#2602).
201 if ("createShadowRoot" in document.documentElement && document.domain != "docs .google.com"
Thomas Greiner 2015/06/03 14:24:25 Let's stop hitting the 80 characters limit here e.
Sebastian Noack 2015/06/03 15:33:07 Done.
202 && document.domain != "mail .google.com")
201 { 203 {
202 shadow = document.documentElement.createShadowRoot(); 204 shadow = document.documentElement.createShadowRoot();
203 shadow.appendChild(document.createElement("shadow")); 205 shadow.appendChild(document.createElement("shadow"));
204 } 206 }
205 207
206 var updateStylesheet = function(reinject) 208 var updateStylesheet = function(reinject)
207 { 209 {
208 ext.backgroundPage.sendMessage({type: "get-selectors"}, function(selectors) 210 ext.backgroundPage.sendMessage({type: "get-selectors"}, function(selectors)
209 { 211 {
210 if (observer) 212 if (observer)
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 }, true); 297 }, true);
296 298
297 return updateStylesheet; 299 return updateStylesheet;
298 } 300 }
299 301
300 if (document instanceof HTMLDocument) 302 if (document instanceof HTMLDocument)
301 { 303 {
302 checkSitekey(); 304 checkSitekey();
303 window.updateStylesheet = init(document); 305 window.updateStylesheet = init(document);
304 } 306 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld