Other sites' data stays private, and less memory again
A safety fix and a memory release. A web page could read what another website sent back to it, with your sign-in attached: a script on any page could ask another site you are signed in to for your data and read the reply. Floati now follows the rule every browser uses: a page reads another site's reply only when that site says it may, never with your sign-in unless the site names the page exactly, and a request a plain form could not send is asked about first and not sent when the other site says no. On memory, the same 33 randomly picked popular sites now use 4,524 MB in Floati against 10,377 MB in the reference browser on the same Mac (56 percent less, down from 5,777 MB in 0.1.377), and the average site settles at 137 MB. Found and fixed on the way: a picture inside a folded section (an accordion) stayed invisible when the section opened, and a drawing surface on a page could draw a picture as black after Floati had shrunk it to save memory. Measured and tested on a Mac; the Windows build passes the same engine tests.
A page can no longer read another site's replies
When a page's script asks another website for something, the browser has to decide whether the page may read the reply. The rule is old and simple: only when the other site says so, in a header on its reply, and never with your cookies unless the site names the asking page exactly and says cookies are fine. Floati checked this for one kind of live update only. For ordinary requests it handed every reply to the page, so a page you visited could ask a site you are signed in to (your mail, your bank's web app) for a page of your data and read it. Floati now applies the rule to every request a script makes: it says which page is asking, hands over the reply only when the other site allows it, shows only the reply headers the site allows, and for a request a plain web form could not make (deleting something, sending data in a special format, adding its own headers) it first asks the other site and sends nothing if the answer is no. Requests for the page's own site are unchanged, and pictures and other media from other sites still load as before. Tested with two local sites: before, the page read the other site's private reply; now the read fails, a reply the other site allows still works, and a refused delete never reaches the other site.
Less memory on the same random sites
The same 33 sites as in 0.1.377, picked at random from a public list of the most visited websites, opened again in Floati on the same Mac at twice the pixel density, each three times (the middle result is shown, because some sites change a lot from one visit to the next). Floati used 4,524 MB in total, against 10,377 MB for the reference browser and 5,777 MB for 0.1.377, and less than the reference browser on 28 of the 33. The average site now settles at 137 MB. The biggest single change is on pages that have a drawing surface (a canvas): Floati used to keep every picture on such a page fully decoded, in case a script drew it, so a scheduling site kept 120 MB of pictures nobody could see. The drawing surface now decodes a picture again from its file when a script draws it, so those pages give back their hidden pictures too: 328 -> 210 MB. Pictures inside a box with no size (a folded section) now count as hidden as well. Floati still uses more than the reference browser on five sites, two of them by a lot: a government site and a maths software site, where a large video still and big photos are kept at more pixels than the screen shows. Those, and the compiled code of scripts that never run, are next.
Two picture bugs found on the way
A picture inside a folded section, the kind that opens when you tap its heading, stayed invisible after the section opened. While the section was folded the picture was laid out zero pixels tall, and to save work Floati reuses the page's layout when only a size changes; the reused layout kept the picture's width at zero too, so it opened as a blank strip. The picture's own proportions are now kept, so it opens at the right size. The second bug: Floati keeps a picture shown small at fewer pixels to save memory, and when such a picture came back after being hidden, a script drawing it onto a canvas was handed the small copy as if it were the whole picture and drew black where the rest should be. A canvas now always draws the full picture from its file.