Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <style> |
michael@0 | 5 | #b { |
michael@0 | 6 | -moz-binding: url("file_bug591198_xbl.xml#xbltest"); |
michael@0 | 7 | } |
michael@0 | 8 | span { |
michael@0 | 9 | white-space: nowrap; |
michael@0 | 10 | } |
michael@0 | 11 | </style> |
michael@0 | 12 | <script> |
michael@0 | 13 | function sendResults() { |
michael@0 | 14 | var res = { |
michael@0 | 15 | widths: [] |
michael@0 | 16 | }; |
michael@0 | 17 | |
michael@0 | 18 | ps = document.getElementsByTagName('span'); |
michael@0 | 19 | for (var i = 0; i < ps.length; i++) { |
michael@0 | 20 | res.widths.push(ps[i].offsetWidth); |
michael@0 | 21 | } |
michael@0 | 22 | |
michael@0 | 23 | try { |
michael@0 | 24 | res.anonChildCount = |
michael@0 | 25 | SpecialPowers.wrap(document).getAnonymousNodes(document.getElementById('b')).length; |
michael@0 | 26 | } |
michael@0 | 27 | catch (ex) {} |
michael@0 | 28 | |
michael@0 | 29 | parent.postMessage(JSON.stringify(res), "*"); |
michael@0 | 30 | } |
michael@0 | 31 | </script> |
michael@0 | 32 | </head> |
michael@0 | 33 | <body onload="sendResults();"> |
michael@0 | 34 | <div><span id=b>long long text here</span></div> |
michael@0 | 35 | <div><span>long long text here</span></div> |
michael@0 | 36 | <div><span>PASS</span></div> |
michael@0 | 37 | </body> |
michael@0 | 38 | </html> |