[webkit-reviews] review canceled: [Bug 135639] CSS: Refactor :visited handling in SelectorChecker : [Attachment 237046] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 24 10:09:12 PDT 2014


Yusuke Suzuki <utatane.tea at gmail.com> has canceled Yusuke Suzuki
<utatane.tea at gmail.com>'s request for review:
Bug 135639: CSS: Refactor :visited handling in SelectorChecker
https://bugs.webkit.org/show_bug.cgi?id=135639

Attachment 237046: Patch
https://bugs.webkit.org/attachment.cgi?id=237046&action=review

------- Additional Comments from Yusuke Suzuki <utatane.tea at gmail.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=237046&action=review


WIP

> Source/WebCore/css/SelectorChecker.cpp:-131
> -SelectorChecker::SelectorChecker(Document& document, Mode mode)

Move mode from SelectorChecker to Context. It makes context layout more similar
to CSS JIT Context.

> Source/WebCore/css/SelectorChecker.cpp:172
> +static SelectorChecker::SelectorCheckingContext walkToParentElement(const
SelectorChecker::SelectorCheckingContext& context)

Not to forget to check current element `isLink` when walking to the parent
node, extracted it to this function.

> Source/WebCore/css/SelectorChecker.cpp:237
> +	   if (relation != CSSSelector::Descendant && relation !=
CSSSelector::Child)

Don't check `isLink` here.

> Source/WebCore/css/SelectorChecker.cpp:248
> +	   for (; nextContext.element; nextContext =
walkToParentElement(nextContext)) {

Use `walkToParentElement` in descendant traversing.

> Source/WebCore/css/SelectorChecker.cpp:705
> +		   return eleemnt->isLink();

When `:-webkit-any(:visited)` case, treat it as `:-webkit-any(:-any-link)`. It
keeps consistent between selector matching behavior and linkMatchType.

> Source/WebCore/css/SelectorChecker.h:-58
> -	   SelectorCheckingContext(const CSSSelector* selector, Element*
element, VisitedMatchType visitedMatchType)

Hide VisitedMatchType from public API.


More information about the webkit-reviews mailing list