editor/reftests/caret_on_presshell_reinit.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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.

     1 <!DOCTYPE html>
     2 <html>
     3   <body>
     4     <div>
     5       <iframe src="data:text/html,<body contenteditable>foo</body>"></iframe>
     6     </div>
     7     <script type="text/javascript">
     8       onload = function() {
     9         var div = document.querySelector("div");
    10         div.style.position = "absolute";
    11         document.body.clientWidth;
    12         var iframe = document.querySelector("iframe");
    13         var win = iframe.contentWindow;
    14         var body = win.document.body;
    15         iframe.focus();
    16         body.focus();
    17         var sel = win.getSelection();
    18         sel.collapse(body.firstChild, 0);
    19       };
    20     </script>
    21   </body>
    22 </html>

mercurial