[webkit-reviews] review granted: [Bug 134826] Anchor, Area and Link elements should respond to :enabled selector if they have an href attribute : [Attachment 238734] Patch (w/ updated code for Anchor element)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 28 16:23:12 PDT 2014


Darin Adler <darin at apple.com> has granted Bruno Abinader
<bruno.d at partner.samsung.com>'s request for review:
Bug 134826: Anchor, Area and Link elements should respond to :enabled selector
if they have an href attribute
https://bugs.webkit.org/show_bug.cgi?id=134826

Attachment 238734: Patch (w/ updated code for Anchor element)
https://bugs.webkit.org/attachment.cgi?id=238734&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=238734&action=review


Hope nobody shipped a browser between when we changed this and reverted the
change!

> Source/WebCore/css/SelectorCheckerTestFunctions.h:68
> -    bool isEnabled = false;
>      if (is<HTMLFormControlElement>(element) ||
is<HTMLOptionElement>(element) || is<HTMLOptGroupElement>(element))
> -	   isEnabled = !element->isDisabledFormControl();
> -    else if (element->isLink())
> -	   isEnabled = is<HTMLAnchorElement>(element) ||
is<HTMLAreaElement>(element);
> -    return isEnabled;
> +	   return !element->isDisabledFormControl();
> +    return false;

This now seems like it would be clearer with && than with if.


More information about the webkit-reviews mailing list