Wykres commitów

10 Commity (79bd148a60edda31ecfec527976017c4218647bf)

Autor SHA1 Wiadomość Data
Thomas Buckley-Houston d66d3e26a0 JS prettier formatting 2018-07-11 17:28:56 +08:00
Thomas Buckley-Houston f6308f0f7b Version 1.2.0 2018-07-08 16:01:39 +08:00
Thomas Buckley-Houston dd4a29f04a Send 'sub-frames' rather than the whole DOM
Firstly, this improves performance on a larger pages. But it also
prevents browser crashes a very large pages by setting a limit to how
much work is done per frame.

Also includes:
  * Thread safe cell map for simultaneously reading and writing to the
    buffered frame of TTY cells.
  * Improved webext tests so that they programmaticlly build DOM rects
    based off simple text strings.
2018-05-05 16:43:10 +08:00
Thomas Buckley-Houston ba5ce3c58b Move frame building from webext to CLI
This offloads significant CPU load from the browser. However it's become
clear that the previous feature of parsing the entire DOM needs to have
an upper limit imposed. For instance large Wikipedia pages still cause
problematic CPU load.

This commit does not fix the broken UI so integration tests fail.
2018-04-22 22:59:00 +08:00
Thomas Buckley-Houston c0f5fcca69 Compose frames of whole DOM, for faster scrolling
Instead of mirroring the browser's viewport, as if we had a camera over
the browser, the entire DOM is now sent in the frame. This means that
the CLI itself can scroll without having to wait for updates from the
webextension screenshotter.
2018-04-18 21:11:04 +08:00
Thomas Buckley-Houston 5b6cc89770 Refactored webext classes to be more SRP
The biggest refactor is separating out the DocumentBuilder from the DOM
Manager.

I also made consistent use of the mixin pattern I'd only half
implemented.
2018-04-09 18:36:46 +08:00
Thomas Buckley-Houston 8cf3de33c3 Move integration tests to Golang CLI client
After moving to Tcell and implementing its screen diff updates, we can
no longer watch STDOUT to get frames during integration tests. Instead
we need to use Tcell's SimulationScreen and which has a GetContents()
method. This is actually also a much more robust way of being able to
see what Browsh actually outputs during testing.
2018-02-17 14:10:39 +08:00
Thomas Buckley-Houston 318f5c3c34 First draft of integration tests 2018-01-23 20:04:23 +08:00
Thomas Buckley-Houston be2b961cfe Sample text colour using monochar block font trick
Using JS's `getComputedStyle()` for every character is too CPU
intensive, so instead I'm experimenting with using a custom font
to take the canvas snapshot. The font is made up of only the unicode
block character, which basically fills the entire space given to a
monospace glyph. This also means that we can fairly reliably work out
the visibility (whether it's obscured or hidden with CSS) of text.
2018-01-01 22:10:10 +08:00
Thomas Buckley-Houston d00361f87d First draft of rewrite to Webextension and Rust
This proves that frames can be generated on Firefox using the canvas and
a Tree Walker to examine text nodes. Already with little optimisation
frames don't ever take longer than 200ms to render.

Chrome has a MediaStream of the viewport, hopefully that will prove
performant as well.

This doesn't have functioning text colour detection or text occlusion
support. But early research suggests this will possible by comparing 2
screenshots: one with and the other without rendered text.
2018-01-01 21:50:30 +08:00