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

Unified Diff: include.preload.js

Issue 5562887569408000: Issue 1770 - Don't use shadow DOM on docs.google.com, fixing printing there (Closed)
Patch Set: Created Jan. 10, 2015, 11:53 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.preload.js
===================================================================
--- a/include.preload.js
+++ b/include.preload.js
@@ -154,12 +154,15 @@
function init(document)
{
- // use Shadow DOM if available to don't mess with web pages that
- // rely on the order of their own <style> tags (#309). However we
- // must not create the shadow root in the response callback passed
- // to sendMessage(), otherwise Chrome breaks some websites (#450).
+ // Use Shadow DOM if available to don't mess with web pages that rely on
+ // the order of their own <style> tags (#309).
+ //
+ // However, creating a shadow root breaks running CSS transitions. So we
+ // have to create the shadow root before transistions might start (#452).
+ //
+ // Also, we can't use shadow DOM on Google Docs, since it breaks printing there (#1770).
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.
var shadow = null;
- if ("createShadowRoot" in document.documentElement)
+ if ("createShadowRoot" in document.documentElement && document.domain != "docs.google.com")
{
shadow = document.documentElement.createShadowRoot();
shadow.appendChild(document.createElement("shadow"));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld