[webkit-reviews] review granted: [Bug 195802] Prefer null namespace 'href' over 'xlink:href' on SVG elements : [Attachment 378144] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 5 23:26:37 PDT 2019


youenn fablet <youennf at gmail.com> has granted Said Abou-Hallawa
<sabouhallawa at apple.com>'s request for review:
Bug 195802: Prefer null namespace 'href' over 'xlink:href' on SVG elements
https://bugs.webkit.org/show_bug.cgi?id=195802

Attachment 378144: Patch

https://bugs.webkit.org/attachment.cgi?id=378144&action=review




--- Comment #15 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 378144
  --> https://bugs.webkit.org/attachment.cgi?id=378144
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=378144&action=review

> Source/WebCore/svg/SVGURIReference.cpp:55
> +	       m_href->setBaseValInternal(value);

We could write this if/else it as a ternary maybe.

> Source/WebCore/svg/SVGURIReference.cpp:58
> +    if (name.matches(XLinkNames::hrefAttr)) {

We should either use 'else if' or return inside the next if check.

> Source/WebCore/svg/SVGURIReference.cpp:59
> +	   if (contextElement->getAttribute(SVGNames::hrefAttr).isNull())

Can we use contextElement->hasAttribute(SVGNames::hrefAttr)?


More information about the webkit-reviews mailing list