* Expand the apply() and apply_cached() templates. Their two invocations each were different enough that this improves readability IMO.
* Create computed::Context from inherited and cascaded values rather than computed value, as much as possible.
* Centralize this creation rather than making it per-property, making 'needed_for_context' not needed anymore.
* Pass a context to cascade_with_cached_declarations() rather than duplicate the creation code.
@pcwalton r? Does this hurt the optimization introduced in 0fa0940ce9?
This is mostly about nicer-looking code. The only thing that was wrong ([`apply_cached(priority)` instead of `apply_cached(needed_for_context)`](https://github.com/mozilla/servo/pull/1644#discussion_r9772133)) could be fixed with a much shorted diff.
* Expand the apply() and apply_cached() templates.
Their two invocations each were different enough
that this improves readability IMO.
* Create computed::Context from inherited and cascaded values
rather than computed value, as much as possible.
* Centralize this creation rather than making it per-property,
making 'needed_for_context' not needed anymore.
* Pass a context to cascade_with_cached_declarations() rather than
duplicate the creation code.
This roughly implements the same cache found in Blink. 50% improvement
on the rainbow page, but at the cost of reducing parallel gains down to
nothing. I added a new page, `perf-rainbow-hard.html`, which disables
the optimizations in both Blink and Servo.
We probably leak some threads and resources, e.g. when the script task crashes and doesn't get a chance to send layout data back to layout to be deallocated.
Not tested with iframes yet.
We probably leak some threads and resources, e.g. when the script task crashes
and doesn't get a chance to send layout data back to layout to be deallocated.
Not tested with iframes yet.
When I was doing my earlier PR for @mut-removal in windowing, I failed to add/commit/fetch/merge/push the changes in my Android-targeting copy of the repo and only just noticed.
r? @metajack
Here is an attempt to fix Issue#506.
I couldn't figure out how to do variadic arguments to `console.log`, but I did test calling `console.log('foo', 'bar', 'baz')` and it prints the first argument and doesn't error out, which is nice.
window.console is not a web standards. I did the popular functions, but not some of the newer ones documented [on MDN](https://developer.mozilla.org/en-US/docs/Web/API/console).
This PR will allow more pages to load properly, where developers have left in window.console calls.