Restart selector matching from an appropriate selector
Introducing 3 matching failure statuses,
+ NotMatchedGlobally
+ NotMatchedAndRestartFromClosestDescendant
+ NotMatchedAndRestartFromClosestLaterSibling
When NotMatchedGlobally appears, stop selector matching completely since
the succeeding selector never matches.
It is raised when
+ Child selector cannot find the candidate element
+ Descendant selector cannot find the candidate element
When NotMatchedAndRestartFromClosestDescendant appears, the selector
matching does backtracking and restarts from the closest Descendant
selector.
It is raised when
+ NextSibling selector cannot find the candidate element.
+ LaterSibling selector cannot find the candidate element.
+ Child selector doesn't match on the found element.
When NotMatchedAndRestartFromClosestLaterSibling appears, the selector
matching does backtracking and restarts from the closest LaterSibling
selector.
It is raised when
+ NextSibling selector 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".
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".
Until we land a fix for #1926, set the default number of threads for parallel layout to 1 to avoid races, a double-borrow, and task failure resulting in all cores spinning indefinitely.
r? @metajack
`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`.
Fix#2027
@jdm
This change will decrease the generics for `Document::create_collection`.
Do you have any good idea to avoid this?
Or don't we have to consider it now?