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 | <!-- |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=199692 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Scrolled page for bug 199692 tests</title> |
michael@0 | 8 | <style type="text/css"> |
michael@0 | 9 | /* Disable default margins/padding/borders so (0, 0) gets a div. */ |
michael@0 | 10 | * { margin: 0; padding: 0; border: 0; } |
michael@0 | 11 | </style> |
michael@0 | 12 | <script type="application/javascript"> |
michael@0 | 13 | function $(id) { return document.getElementById(id); } |
michael@0 | 14 | |
michael@0 | 15 | function runTests() |
michael@0 | 16 | { |
michael@0 | 17 | var is = window.parent.is; |
michael@0 | 18 | |
michael@0 | 19 | is(document.elementFromPoint(0, 0), $("down"), |
michael@0 | 20 | "document.elementFromPoint not respecting scrolling?"); |
michael@0 | 21 | is(document.elementFromPoint(200, 200), null, |
michael@0 | 22 | "should have returned null for a not-visible point"); |
michael@0 | 23 | is(document.elementFromPoint(3, -5), null, |
michael@0 | 24 | "should have returned null for a not-visible point"); |
michael@0 | 25 | } |
michael@0 | 26 | </script> |
michael@0 | 27 | </head> |
michael@0 | 28 | <!-- This page is loaded in a 200px-square iframe scrolled to #down. --> |
michael@0 | 29 | <body> |
michael@0 | 30 | <div style="height: 150px; background: lightblue;">first</div> |
michael@0 | 31 | <div id="down" style="height: 250px; background: lightgreen;">second</div> |
michael@0 | 32 | </body> |
michael@0 | 33 | </html> |
michael@0 | 34 |