| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introducing 3 matching failure statuses,
NotMatchedAndRestartFromClosestLaterSibling
NotMatchedAndRestartFromClosestDescendant
NotMatchedGlobally
When NotMatchedGlobally appears, stop selector matching completely since
the succeeding selector never matches.
It is raised when
Child combinator cannot find the candidate element
Descendant combinator cannot find the candidate element
When NotMatchedAndRestartFromClosestDescendant appears, the selector
matching does backtracking and restarts from the closest Descendant
combinator.
It is raised when
NextSibling combinator cannot find the candidate element.
LaterSibling combinator cannot find the candidate element.
Child combinator doesn't match on the found element.
When NotMatchedAndRestartFromClosestLaterSibling appears, the selector
matching does backtracking and restarts from the closest LaterSibling
combinator.
It is raised when
NextSibling combinator doesn't match on the found element.
For example, when the selector "d1 d2 a" is provided and we cannot *find*
an appropriate ancestor node for "d1", this selector matching raises
NotMatchedGlobally since even if "d2" is moved to more upper node, the
candidates for "d1" becomes less than before and d1 .
The next example is siblings. When the selector "b1 + b2 ~ d1 a" is
providied and we cannot *find* an appropriate brother node for b1,
the selector matching raises NotMatchedAndRestartFromClosestDescendant.
The selectors ("b1 + b2 ~") doesn't match and matching restart from "d1".
The additional example is child and sibling. When the selector
"b1 + c1 > b2 ~ d1 a" is provided and the selector "b1" doesn't match on
the element, this "b1" raises NotMatchedAndRestartFromClosestLaterSibling.
However since the selector "c1" raises
NotMatchedAndRestartFromClosestDescendant. So the selector
"b1 + c1 > b2 ~ " doesn't match and restart matching from "d1".
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
See http://dev.w3.org/csswg/css2/visudet.html#propdef-height
This is necessary but not sufficient for #2029.
A bug fix in the previous commit "broke" Acid 2 because that bug was hiding
this one. This makes Acid 2 pass again.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
`line-height`, and the infrastructure needed for derived properties to
work.
Eventually I would like this to be used for text decorations, like
WebKit does with `-webkit-text-decorations-in-effect`.
|
| | |
|
| | |
|
|/
|
|
| |
src/components/style/properties.rs.mako
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
There were two problems here: (1) we did not process style sheets with an
unexpected `rel` attribute but a correct MIME type; (2) we did not
consider `none` a valid value for the `background` property.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
26% improvement in style recalc on the rainbow page.
|
|
|
|
|
| |
If the cache is hit, then we can only compute inherited properties. This
is a WebKit optimization.
|
|
|
|
|
| |
No improvement on the rainbow page, but necessary for some other
optimizations we want to do.
|
|
|
|
|
| |
This doesn't make much of a difference in performance, but will be
necessary for style struct sharing.
|
|
|
|
|
| |
… instead of None meaning "any namespace"
(where it could be the null namespace.)
|
|
|
|
| |
… and not "any namespace" or use the default namespace declaration.
|
|\
| |
| |
| | |
Rename *.rc to *.rs in components directory, and do some relevant changes in Makefile.in
|
| | |
|
|/
|
|
| |
PR, will make partial reflow.
|
| |
|
| |
|
|
|
|
| |
17% improvement in selector matching on the rainbow page.
|
|\
| |
| |
| |
| |
| |
| |
| | |
hash.
31% win on selector matching.
r? @larsbergstrom
|
| |
| |
| |
| |
| |
| | |
hash.
31% win on selector matching.
|
|/
|
|
| |
125% win on selector matching (!)
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Lower-case attribute names when parsing selectors rather than when
matching. This avoid one allocation in matching code.
|
| |
|
|
|
|
|
|
| |
table.
40% improvement in selector matching performance on the rainbow page.
|
|
|
|
|
|
| |
In order to support line-break by new-line character,
Fist, calculate new-line character's position.(fn flush_clump_to_list)
Second, split box(which includes new-line character) and do line-break.(fn scan_for_lines)
|
| |
|
|
|
|
|
|
|
|
| |
The old code was used by both layout and script, but was erroneously
borrowing for the layout case (which causes parallelism
problems). script now uses only `value_ref()` or `get_attribute()`, and
layout now has its own unsafe version that dances around the borrows of
`@mut Attr`.
|
| |
|