| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
| |
this is exactly why I shimmed in unsafeAddr, but the compiler isn't
cooperating... :(
well, it seems to work with auto.
|
|
|
|
|
|
|
|
| |
* fix clip for image
* switch back img's display to inline
* fix image width calculation without specified width/height
I'm not 100% sure if this is correct, but it certainly looks better.
|
| |
|
| |
|
|
|
|
| |
doing it manually is too error prone
|
| |
|
|
|
|
| |
did I ever test this?
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only for SVG in image tags for now. Plus it comes with NanoSVG's
limitations, i.e. no text. Still, better than nothing.
I've gone through open tickets and PRs at upstream to check for known
security issues. As a recurring theme I found that parseTransform
fails to check the result of parseTransformArgs, so I fixed and
refactored that part. (Probably not a security issue, but still UB.)
Also, I've added a fix for an OOB read in parseColorRGB.
Future directions:
* replace nanosvgrast with our own rasterizer in canvas (will have to be
extended somewhat...)
* add text rendering (with unifont, which canvas already includes)
|
| |
|
|
|
|
| |
this broke saveImage
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Overflow pretty much requires scrollbars, but those wouldn't work in
dump mode, plus of course they would be a pain to implement. So as a
simple alternative:
* overflow: hidden, clip works as per spec.
* overflow: auto, overlay, scroll invert the intrinsic minimum size
clamping logic instead of adding a scrollbar.
What this concretely means, is that this
<pre style="overflow: scroll; height: 1em">
test
test
test
</pre>
will, instead of creating a scroll container, just override the
specified height.
This hack works surprisingly well, because CSS pretty much requires
setting height on scroll containers, so authors aren't incentivized to
set height on the parent container too (because the contents are already
sized appropriately).
One issue left is how to deal with overflow: hidden ancestors. For now,
I've made it so that it can spill for overflow-x, and always clips
on overflow-y, because it's much less likely to bleed into other
text horizontally than vertically. But there is definitely room
for improvement, e.g. we could track space requested by scrolling
children and expand parent boxes based on that.
|
|
|
|
|
|
|
|
| |
Inspired by Dillo. (Just the movement mechanism; Dillo doesn't hide the
context menu on double click, but we still do.)
Also, we now disable highlighting of menu items when the mouse is
hovering outside.
|
|
|
|
|
|
|
| |
I didn't get it right :(
true is the default return value, and true + continue should resolve
to false.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a bit tricky, but it seems to work. It optimizes selectors in
the line of "div :hover" (note the space.)
Previously such selectors would add a hover dependency to pretty much
every element, and trigger a re-style for all elements that changed
their hover status. After this patch, when :hover and friends would
return false, they first try to match the element *without* pseudo
selectors, and only add their dependencies if the element would match
like that.
(Notably, it only does this for when :hover is false. Probably it would
help somewhat if we checked for the opposite with true too, but I'm not
sure how much.
For now, I'll keep it like this, and maybe try to further optimize it
later.)
|
| |
|
|
|
|
|
| |
Always override Expires with Max-Age, but never the other way (as per
spec.)
|
|
|
|
|
| |
Now we use the node index to optimize next/subsequent sibling
combinators.
|
|
|
|
|
|
| |
This is roughly what w3m does.
Gecko instead adds enough space for roughly 4 digits and cuts off
afterwards, but I believe this is a better solution.
|
|
|
|
|
|
| |
I want to use it in the UA sheet, so the loop won't cut it.
(Also fix a parsing bug that prevented "of" from working.)
|
| |
|
| |
|
|
|
|
|
| |
Whether this works or not still depends on many variables, but it
should be enough in most cases.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Necessary for flex. Previously we just used the actual height, but that
didn't account for boxes that size themselves depending on the available
height (mainly just images for now).
This also irons out intrinsic min width calculation somewhat, squashing
several bugs.
I hope it works well. It is a significant change in size calculation,
so maybe there are still new bugs lurking.
|
|
|
|
| |
Lets us skip a couple pointless multiplications/divisions during layout.
|
|
|
|
| |
Only glibc starts from the file's beginning with "a+".
|
| |
|
|
|
|
|
| |
The test case attached is undefined in CSS 2.1, but css-sizing-3
wants us to just ignore the width property (I think).
|
|
|
|
|
|
|
| |
this is necessary too, now that I think of it
(well, table caption sizing is still half-broken, but that's a problem
for another day...)
|
| |
|
| |
|
|
|
|
|
| |
judging from the symlink, I probably meant to do this but forgot to
finish it
|
|
|
|
|
| |
If the contents are larger than the specified cell height, then it is
simply ignored.
|
| |
|
|
|
|
| |
it should put it after the old items, not before them.
|
|
|
|
| |
Uses an additional lower-case map for O(1) case-insensitive comparisons.
|
|
|
|
| |
makes it easier to hide them
|
|
|
|
|
| |
now I sort of understand how it works. basically maxh and maxw represent
the inner area occupied by the widget at any time.
|
|
|
|
|
|
|
|
| |
* correct action on M-b
* add external.bookmark option
* move openFileExpand functionality into unquote
* add menu items
* update docs
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Finally it's done. It's basically w3mbookmark, but using Markdown
instead of HTML and in POSIX shell instead of C.
As a bonus, it can also (sort of) import w3mbookmark's output. Well,
at least it worked on my bookmark file, but there is a known issue with
bracket escaping... if it goes wrong, it's simple enough to edit it
manually :P
|
|
|
|
|
|
|
|
| |
Both are quite useful.
readFile and writeFile got a small makeover in error handling; in
particular, readFile now returns null instead of the empty string when
the file is missing and writeFile throws a TypeError on I/O errors.
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented using proprietary selectors -cha-first-node and
-cha-last-node, modeled after -moz-first-node and -moz-last-node.
I think they are compatible.
That does mean this is more limited than w3m's trimming, e.g. it can't
really deal with nesting or empty tags. I think this is fine, as it's
mainly meant for unstyled documents in the first place (which are
unlikely to have e.g. MAIN tags).
|
| |
|
| |
|
|
|
|
| |
Since text is the fallback, just make it the default.
|
|
|
|
| |
file:/// is the standard serialization.
|
|
|
|
|
|
|
|
| |
Cookie jar separation is already enough to mitigate tracking issues
in this case. (Also, the fact that third-party-cookie controlled this
made things even more confusing.)
Also, add the previously missing host-only flag.
|