| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This isn't great, but neither was passing around a pointer that pointed
to a single object.
|
|
|
|
|
|
|
|
|
| |
Supposedly they aren't broken in refc after 2.0.0, so we can do this now
that 1.6.14 is dropped.
I've confirmed lent to work as advertised; it indeed reduces copies.
sink doesn't seem to help much, but I guess it will be useful once we
switch to ORC.
|
|
|
|
|
| |
We now compute styles on-demand, which is both more efficient and
simpler than the convoluted tree diffing logic we previously used.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.)
|
| |
|
|
|
|
|
| |
Now we use the node index to optimize next/subsequent sibling
combinators.
|
|
|
|
|
|
| |
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.)
|
|
|
|
| |
Uses an additional lower-case map for O(1) case-insensitive comparisons.
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
Fixed a bug that would lead to styles unnecessarily being recalculated
if the root element had a :hover dependency.
|
|
|
|
|
|
| |
Turns out the generics weren't really needed in the first place.
Also, StyledNode is now 16 bytes smaller.
|
| |
|
|
|
|
| |
it's effectively a dupe, except html wouldn't work in XML
|
| |
|
| |
|
|
|
|
| |
this way, we do not refer to nodes of previous cascade passes
|
|
|
|
|
|
|
|
|
| |
* factor out skipWhitespace
* remove streams dependency
(cssparser could never stream without blocking the event loop, so we
were just passing a StringStream in all cases, which made the whole
streaming pointless.)
|
|
|
|
|
|
| |
* separate params with ; (semicolon) instead of , (colon)
* reduce screaming snake case use
* wrap long lines
|
|
|
|
| |
just for consistency
|
|
|
|
|
| |
it's inefficient and pointless to treat them differently, so just derive
a new enum from TagType with a macro
|
| |
|
|
|
|
|
|
|
|
| |
* Update chame to the latest version
* Get rid of nodeType usage
* Add atoms
* Re-implement DOM attributes
* document.write
|
| |
|
|
|
|
| |
Also case-sensitive, but for now that is the same as normal matching...
|
| |
|
|
|
|
| |
Operation "modularize Chawan somewhat" part 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Import punycode, as it has been removed from stdlib.
* Fix some syntax errors
* Apparently you can no longer compare distinct pointers with nil.
Add explicit comparisons with typeof(nil) instead.
* htmlparser: rename _ to other, as semantics of _ have changed.
(Quite a shame, it looked better with _. Oh well.)
* Explicitly specify mm:refc, as the browser OOMs with orc for
some reason.
Confirmed to compile & run on 2.0.0, 1.6.14, 1.6.12, 1.6.10 and 1.6.8.
(<1.6.8 it's broken & wontfix.)
|
|
|
|
|
|
| |
Instead of grouping all of them into TAG_UNKNOWN, match their tag
names.
To-do: this implementation is not very efficient.
|
| |
|
|
|
|
| |
pretty slow for some reason
|
|
|
|
| |
I say "support", but :visited is never matched.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|