Bug 135077 - _WKActivatedElementInfo.title should fallback to innerText if the link doesn't have title attribute.
Summary: _WKActivatedElementInfo.title should fallback to innerText if the link doesn'...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-18 16:04 PDT by Yongjun Zhang
Modified: 2014-07-18 18:32 PDT (History)
5 users (show)

See Also:


Attachments
Fallback to link element's innerHTML if its title attribute is empty. (1.66 KB, patch)
2014-07-18 16:12 PDT, Yongjun Zhang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yongjun Zhang 2014-07-18 16:04:35 PDT
Often, a link might not have title attribute.  In that case, we should use the link element's innerText as a fallback.
Comment 1 Yongjun Zhang 2014-07-18 16:06:12 PDT
<rdar://17373799>
Comment 2 Yongjun Zhang 2014-07-18 16:12:38 PDT
Created attachment 235155 [details]
Fallback to link element's innerHTML if its title attribute is empty.
Comment 3 Yongjun Zhang 2014-07-18 16:13:56 PDT
(In reply to comment #2)
> Created an attachment (id=235155) [details]
> Fallback to link element's innerHTML if its title attribute is empty.
typo, it should be innerText.
Comment 4 mitz 2014-07-18 16:41:16 PDT
Comment on attachment 235155 [details]
Fallback to link element's innerHTML if its title attribute is empty.

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

> Source/WebKit2/ChangeLog:6
> +        When populate InteractionInformationAtPosition's title value, use a link element's innerText if it

typo: populate->populating
Comment 5 WebKit Commit Bot 2014-07-18 17:22:19 PDT
Comment on attachment 235155 [details]
Fallback to link element's innerHTML if its title attribute is empty.

Clearing flags on attachment: 235155

Committed r171253: <http://trac.webkit.org/changeset/171253>
Comment 6 WebKit Commit Bot 2014-07-18 17:22:22 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Alexey Proskuryakov 2014-07-18 18:27:45 PDT
Isn't this kind of business logic something that should be in the client? WebKit's job is to provide all the necessary information, not to lie about what the title is.
Comment 8 mitz 2014-07-18 18:32:13 PDT
(In reply to comment #7)
> Isn't this kind of business logic something that should be in the client? WebKit's job is to provide all the necessary information, not to lie about what the title is.

WebKit uses the title internally for its built-in Add to Reading List action. I do think we’ll need to review _WKActivatedElementInfo’s properties and their names if we make it a public class.