[Webkit-unassigned] [Bug 132319] CSS JIT: optimize direct / indirect adjacent's traversal backtracking

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 30 05:24:06 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=132319





--- Comment #4 from Yusuke Suzuki <utatane.tea at gmail.com>  2014-04-30 05:24:27 PST ---
(From update of attachment 230473)
View in context: https://bugs.webkit.org/attachment.cgi?id=230473&action=review

Add aditional notes

>> Source/WebCore/cssjit/SelectorCompiler.cpp:615
>> +    if (fragment.tagNameMatchedBacktrackingStartHeightFromDescendant == (fragment.heightFromDescendant + 1))
> 
> When `tagNameMatchedBacktrackingStartHeightFromDescendant` == `heightFromDescendant` + 1, the descendant backtracking starts with the parent of the current element. So we can use the current element and the backtracking action is JumpToDescendantTreeWalkerEntryPoint.

NOTE:
If `hasDescendantRelationOnTheRight` is true and there's no child fragment on the right, the backtracking element register is not effective. So we should ensure that fragment doesn't use the backtracking element register.

Such a fragment fulfills the following conditions.
1. tagNameMatchedBacktrackingStartHeightFromDescendant is always 1 (tagNames.size(), that contains only descendant fragment)
2. heightFromDescendant is always 0
(-- See computeBacktrackingHeightFromDescendant implementation)

Therefore such a fragment's action always becomes JumpToDescendantTreeWalkerEntryPoint.
So we can ensure that the backtracking element register is not used.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list