| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handling text/plain as ANSI colored text was problematic for two
reasons:
* You couldn't actually look at the real source of HTML pages or text
files that used ANSI colors in the source. In general, I only want
ANSI colors when piping something into my pager, not when viewing any
random file.
* More importantly, it introduced a separate rendering mode for
plaintext documents, which resulted in the problem that only some
buffers had DOMs. This made it impossible to add functionality
that would operate on the buffer's DOM, to e.g. implement w3m's
MARK_URL. Also, it locked us into the horribly inefficient line-based
rendering model of entire documents.
Now we solve the problem in two separate parts:
* text/x-ansi is used automatically for documents received through
stdin. A text/x-ansi handler ansi2html converts ANSI formatting to
HTML. text/x-ansi is also used for .ans, .asc file extensions.
* text/plain is a separate input mode in buffer, which places all text
in a single <plaintext> tag. Crucially, this does not invoke the HTML
parser; that would eat NUL characters, which we should avoid.
One blind spot still remains: copiousoutput used to display ANSI colors,
and now it doesn't. To solve this, users can put the x-ansioutput
extension field to their mailcap entries, which behaves like
x-htmloutput except it first pipes the output into ansi2html.
|
|
|
|
|
|
|
|
|
|
|
| |
The -cha-ansi color type now sets ANSI colors in CSS.
Also, color correction etc. has been improved a bit:
* don't completely reset output state in processFormat for new colors
* defaultColor is now separated from ANSI color type 0
* bright ANSI colors are no longer replaced with bold + dark variant
* replaced ANSI color map to match xterm defaults
|
|
|
|
|
|
| |
* fix accidental dependency on previously chosen bgcolor (ouch)
* also draw empty background boxes for bgcolor-is-canvas boxes
* remove unused variable
|
|
|
|
|
|
| |
This is required by the standard. (Without this, lots of websites have
incorrect background colors, because they set the body height to 100%
of the viewport.)
|
|
|
|
|
| |
When an absolute block is a descendant of an inline box, its positioned
ancestor must be set to that box.
|
|
|
|
| |
Pointless; it just returned a default zero-initialized object.
|
| |
|
|
|
|
|
| |
Avoid computing e.g. charwidth data for http which does not need it
at all.
|
|
|
|
|
|
|
|
|
|
|
| |
We now have real inline boxes.
* Fix nesting of inline boxes
* Represent inline boxes with a hierarchical RootInlineFragment ->
InlineFragment tree
* Get rid of inline padding hack
* Get rid of ComputedFormat
* Paint inline box backgrounds properly
|
|
|
|
| |
This can happen e.g. if the word is fully outside the canvas.
|
|
|
|
|
| |
The reasoning for using early returns was wrong, and they should be
unnecessary anyway.
|
|
|
|
|
|
|
| |
* No more zero width FormatCells messing up buffer display (yay!)
* Assert on setText width a zero-length string
* Remove unnecessary FormatCell added to every line on paintBackground
start
|
|
|
|
|
|
|
|
|
| |
* Blocks are now positioned before their text contents would be
layouted
* Untangle calcAvailableSpaceSizes's results from BlockBox
* Move a couple of objects from box -> engine
* Use Size in a few more places
* Set display to block if float is not none
|
|
|
|
|
| |
Viewport at this point is basically just the layout state, so it
makes no sense to store it in buffer.
|
| |
|
| |
|
|
|
|
|
|
| |
* rename module (window -> winattrs, to avoid conflict with env/window)
* do not use result
* remove unused cell_ratio
|
|
|
|
|
|
|
|
|
|
| |
* ips -> io/
* loader related stuff -> loader/
* tempfile -> extern/
* buffer, forkserver -> server/
* lineedit, window -> display/
* cell -> types/
* opt -> types/
|
|
|
|
| |
Operation "modularize Chawan somewhat" part 2
|
|
|
|
|
| |
Instead of directly appending nodes to the DOM, use a DOMBuilder
interface.
|
|
|
|
|
|
|
| |
Replaces the weird CSS implementation we have had until now with a
searchable popup menu similar to that of w3m. (The previous
implementation broke on websites that do not expect <select> to
expand on click, had no separate search, and was ugly.)
|
|
|
|
| |
Obviously we can't calculate rounding error without rounding.
|
|
|
|
| |
Reduces ugly rendering caused by rounding errors.
|
|
|
|
|
| |
This reverts commit c13a4cf4e144f7ab36167ebbb1333f7faeed11b3.
Clearly it's broken. Needs a fix.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Fix margin-top being used instead of margin-bottom.
Content width resolving makes somewhat more sense now.
min-width, max-width doesn't completely break width calculation anymore.
Finally, position: absolute is no longer implemented as a horribly
broken hack.
|
| |
|
|
|
|
|
| |
I'm not sure if it was actually causing other issues, but better safe
than sorry: formatting is no longer inserted for negative x coordinates.
|
| |
|
|
|
|
|
| |
Also, a hack for inline box background-color. It doesn't work very
well, but good enough for now.
|
|
|
|
|
|
| |
This makes it possible to e.g. click on this:
<a href=x style="display: inline-block; width: 5em; height: 5em;
background-color: red"></a>
|
|
|
|
| |
We need to check if y >= 0, or it fails.
|
|
|
|
|
|
|
|
| |
Table layout: weight calculation is no longer broken. We use
maxContentWidth for this, which the first pass of a non-specified
table cell layout overrides.
pre-wrap: just a minor fix - include it in whitespacepre, now that
we have a distinction between pre and wrapping white-space
|
|
|
|
| |
Layout should only depend on cascading.
|
| |
|
| |
|
| |
|
|
|
|
| |
Gets rid of weird underline effects. Also fixes nx calculation, I think.
|
| |
|
|
|
|
| |
It sounds like a good idea, but in fact looks terrible in lists.
|
|
|
|
| |
padwidth could be negative because we didn't ensure cx <= x.
|
|
|
|
| |
It kind of works, I guess?
|
|
|
|
|
| |
More specifically, inline block white-space is no longer incorrectly
determined by its computed values, but rather by its parent's values.
|
| |
|
|
|
|
| |
Only as a POC for now.
|
| |
|
| |
|
| |
|