ChavezArquitectos / curvycorners

Automatically exported from code.google.com/p/curvycorners
0 stars 0 forks source link

Permission denied error on IE7 with Google AdSense ads #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use curvycorners.js and have Google AdSense ads on same page
2. View page with IE7 specifically (Not an issue with IE8, did not test
with IE6)
3.

What is the expected output? What do you see instead?
Expecting rounded corners.  Instead you get a permission denied error message

What version of the product are you using? On what operating system?
On/around line 1358 in 2.05pre12 (earlier versions fail as well)

Please provide any additional information below.
THe problem seems to be some security issue with IE7.  Since AdSense is
loading it's own stylesheets in an iframe, it seems curvy corners is trying
to read those stylesheets as well and this is causing the permission denied
error.

A fix seems to be wrapping the following section in a try/catch block:

          if (document.styleSheets[t].imports) {
            for (i = 0; i < document.styleSheets[t].imports.length; ++i)
              for (j = 0; j <
document.styleSheets[t].imports[i].rules.length; ++j)
                procIEStyles(document.styleSheets[t].imports[i].rules[j]);
          }
          for (i = 0; i < document.styleSheets[t].rules.length; ++i)
            procIEStyles(document.styleSheets[t].rules[i]);

Original issue reported on code.google.com by andrew.c...@gtempaccount.com on 6 Sep 2009 at 9:08

GoogleCodeExporter commented 8 years ago
Thank you for suggesting this fix, now incorporated in r150.

Original comment by c.1%smit...@gtempaccount.com on 14 Oct 2009 at 12:07

GoogleCodeExporter commented 8 years ago
Thank you. Fix works perfectly!

Original comment by AndrewPG...@gmail.com on 6 Jan 2010 at 4:24

GoogleCodeExporter commented 8 years ago
I ran into this issue with the version available on the curvy corners web site. 
I
found this bug report and tried r150 and the error went away in IE7.

However, I grabbed r152 and tried that as well and it appears the error is back 
in
that release. 

Original comment by dali...@gmail.com on 19 Mar 2010 at 4:24

GoogleCodeExporter commented 8 years ago
#3, I'm surprised. The fix introduced in r150 has not been reversed and 
survives in the 
latest revision, r155. If you can produce an online example linked to r155 that 
exhibits this problem I will re-investigate.

Original comment by c.1%smit...@gtempaccount.com on 20 Mar 2010 at 9:41

GoogleCodeExporter commented 8 years ago
#3, I'm surprised. The fix introduced in r150 has not been reversed and 
survives in the 
latest revision, r155. If you can produce an online example linked to r155 that 
exhibits this problem I will re-investigate.

Original comment by c.1%smit...@gtempaccount.com on 20 Mar 2010 at 9:42