Commit graph

115 commits

Author SHA1 Message Date
Thomas Buckley-Houston 2985774859 Automate releases 2018-01-28 16:08:19 +08:00
Thomas Buckley-Houston 6f0a732145 Adds Go built binaries to .gitignore 2018-01-24 16:50:09 +08:00
Thomas Buckley-Houston 9a82182a9a Don't use --new-instance, -P when launching FF 2018-01-24 10:59:57 +08:00
Thomas Buckley-Houston 318f5c3c34 First draft of integration tests 2018-01-23 20:04:23 +08:00
Thomas Buckley-Houston b387f66c69 Launch and install webextension from client
This means that Browsh can now be entirely run just by running the CLI
binary. The client launches Firefox as a subprocess, then connects to it
via the Marionette protocol, installs the webextension and finally
triggers a new tab with, currently, the Google homepage in it.

I was trying to set this up for automated testing as well by installing
the built webextension as a temporary addon, because otherwise you need
to sign the extension everytime with a unique semantic version. However
for some reason I can't quite recreate the environment that MDN's
`web-ext` creates. The extension installs fine but fails to load the
`content.js` script, I can't find a backtrace or any other details about
the failure. So for now, we're just going to have to use `web-ext` as
seperate process and have the client connect to that. Which is what one
should do during development anyway, so it's not a huge loss.
2018-01-21 11:56:05 +08:00
Thomas Buckley-Houston ef5c683591 Back and stop button 2018-01-17 15:52:52 +08:00
Thomas Buckley-Houston 4177bff127 First draft of mouse down/up/click support 2018-01-17 11:00:37 +08:00
Thomas Buckley-Houston 3fc70e6718 Basic z-layer detection for clobbered characters 2018-01-15 12:06:05 +08:00
Thomas Buckley-Houston 64431be7c3 First pass at supporting wide UTF8 chars like 中文 2018-01-14 22:29:08 +08:00
Thomas Buckley-Houston 97a36b68b4 First drafy of UI: tabs and URL bar 2018-01-12 21:58:32 +08:00
Thomas Buckley-Houston ad59dc3ce4 Basic up/down scrolling 2018-01-11 12:22:27 +08:00
Thomas Buckley-Houston d2aaa33963 Refactored webext background script 2018-01-10 22:54:51 +08:00
Thomas Buckley-Houston 27e0b2ddc6 First working draft of Golang interfacer
After weighing up the options it seems that Golang's termbox-go TTY
library has better support for terminals, and it's cross-platform out of
the box. So this commit is the first working version where the
interfacer launches a websocket server, makes a connection to the
webextension and listens to STDIN from the CLI, sending all input to the
webextenstion.
2018-01-07 11:21:29 +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