<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Link preview doesn't work on XHTML pages with Content-Type header as `application/xhtml+xml`"
   href="https://bugs.webkit.org/show_bug.cgi?id=150740#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Link preview doesn't work on XHTML pages with Content-Type header as `application/xhtml+xml`"
   href="https://bugs.webkit.org/show_bug.cgi?id=150740">bug 150740</a>
              from <span class="vcard"><a class="email" href="mailto:bdakin&#64;apple.com" title="Beth Dakin &lt;bdakin&#64;apple.com&gt;"> <span class="fn">Beth Dakin</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=150740#c7">comment #7</a>)
<span class="quote">&gt; (In reply to <a href="show_bug.cgi?id=150740#c6">comment #6</a>)
&gt; &gt; Is it really correct to just check the tag name, or is this one of those
&gt; &gt; cases where XML namespaces should be taken into account?
&gt; 
&gt; I was planning to comment on that but had lost track of this bug. Thanks for
&gt; drawing my attention back here! As Dan implies, this new code is incorrect
&gt; in the presence of non-HTML elements that happen to have the same local name
&gt; as HTML elements.
&gt; 
&gt; This clickableElementName field is apparently a copy of the DOM nodeName
&gt; attribute, shipped across processes. We can’t use nodeName alone to check if
&gt; something is a particular HTML element.
&gt; 
&gt; If our intent is to use this attribute to check if something is a particular
&gt; HTML element, then I suggest we replace this code:
&gt; 
&gt;     info.clickableElementName = hitNode-&gt;nodeName();
&gt; 
&gt; With something more like this:
&gt; 
&gt;     if (is&lt;HTMLElement&gt;(*hitNode))
&gt;         info.clickableElementName =
&gt; downcast&lt;HTMLElement&gt;(*hitNode).localName();
&gt; 
&gt; This will always be lowercase, and so there will be no need to fold case on
&gt; the UI process side.
&gt; 
&gt; If it happens that we want to use this for SVG elements as well, and there
&gt; is also no practical concern about collision between HTML and SVG local
&gt; names (I think there are very few such collisions), then it could instead be
&gt; this:
&gt; 
&gt;     if (is&lt;HTMLElement&gt;(*hitNode) || is&lt;SVGElement&gt;(*hitNode))
&gt;         info.clickableElementName = downcast&lt;Element&gt;(*hitNode).localName();</span >

Thanks Darin and Dan! I will fix this.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>