[Webkit-unassigned] [Bug 138557] Attribute text in HTMLAnchorElement should behave as per specification

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 14 17:26:16 PST 2014


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

--- Comment #17 from Darin Adler <darin at apple.com> ---
Comment on attachment 241564
  --> https://bugs.webkit.org/attachment.cgi?id=241564
Patch-Updated-Review5

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

> Source/WebCore/bindings/objc/PublicDOMInterfaces.h:355
> - at property (readonly, copy) NSString *text WEBKIT_AVAILABLE_MAC(10_5);
> + at property (copy) NSString *text WEBKIT_AVAILABLE_MAC(10_5);

This change won’t be needed if you make the change to the IDL I suggest below.

We should not make the change. If do we make this change, then this incorrectly claims that apps can set the text attribute when compiled against the version of WebKit on OS X 10.5, which is not true.

> Source/WebCore/html/HTMLAnchorElement.cpp:507
> -    return innerText();
> +    return textContent();

Which of the tests cover this change? Or do innerText and textContent behave identically?

> Source/WebCore/html/HTMLAnchorElement.idl:59
> -    readonly attribute DOMString text;
> +    [SetterRaisesException] attribute DOMString text;

The conservative way to keep compatibility with Objective-C API would be to write this:

    #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
        readonly attribute DOMString text;
    #else
        [SetterRaisesException] attribute DOMString text;
    #endif

We could even merge this with the #if statement above that seems to be doing something similar for other attributes.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141115/bc383fe2/attachment-0002.html>


More information about the webkit-unassigned mailing list