Changeset 171253 in webkit


Ignore:
Timestamp:
Jul 18, 2014 5:21:56 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

_WKActivatedElementInfo.title should fallback to innerText if the link doesn't have title attribute.
https://bugs.webkit.org/show_bug.cgi?id=135077

When populate InteractionInformationAtPosition's title value, use a link element's innerText if it
doesn't have title attribute.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-07-18
Reviewed by Dan Bernstein.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPositionInformation):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r171252 r171253  
     12014-07-18  Yongjun Zhang  <yongjun_zhang@apple.com>
     2
     3        _WKActivatedElementInfo.title should fallback to innerText if the link doesn't have title attribute.
     4        https://bugs.webkit.org/show_bug.cgi?id=135077
     5
     6        When populate InteractionInformationAtPosition's title value, use a link element's innerText if it
     7        doesn't have title attribute.
     8
     9        Reviewed by Dan Bernstein.
     10
     11        * WebProcess/WebPage/ios/WebPageIOS.mm:
     12        (WebKit::WebPage::getPositionInformation):
     13
    1142014-07-18  Andy Estes  <aestes@apple.com>
    215
  • trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm

    r171225 r171253  
    18651865                info.url = [(NSURL *)linkElement->document().completeURL(stripLeadingAndTrailingHTMLSpaces(linkElement->getAttribute(HTMLNames::hrefAttr))) absoluteString];
    18661866            info.title = element->fastGetAttribute(HTMLNames::titleAttr).string();
     1867            if (linkElement && info.title.isEmpty())
     1868                info.title = element->innerText();
    18671869            if (element->renderer())
    18681870                info.bounds = element->renderer()->absoluteBoundingBoxRect(true);
Note: See TracChangeset for help on using the changeset viewer.