Title: [171253] trunk/Source/WebKit2
Revision
171253
Author
[email protected]
Date
2014-07-18 17:21:56 -0700 (Fri, 18 Jul 2014)

Log 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 <[email protected]> on 2014-07-18
Reviewed by Dan Bernstein.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (171252 => 171253)


--- trunk/Source/WebKit2/ChangeLog	2014-07-19 00:19:26 UTC (rev 171252)
+++ trunk/Source/WebKit2/ChangeLog	2014-07-19 00:21:56 UTC (rev 171253)
@@ -1,3 +1,16 @@
+2014-07-18  Yongjun Zhang  <[email protected]>
+
+        _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.
+
+        Reviewed by Dan Bernstein.
+
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::getPositionInformation):
+
 2014-07-18  Andy Estes  <[email protected]>
 
         [iOS] Tapping "Allow Website" on a restricted page does not bring up the keypad

Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (171252 => 171253)


--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2014-07-19 00:19:26 UTC (rev 171252)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2014-07-19 00:21:56 UTC (rev 171253)
@@ -1864,6 +1864,8 @@
             if (linkElement)
                 info.url = "" *)linkElement->document().completeURL(stripLeadingAndTrailingHTMLSpaces(linkElement->getAttribute(HTMLNames::hrefAttr))) absoluteString];
             info.title = element->fastGetAttribute(HTMLNames::titleAttr).string();
+            if (linkElement && info.title.isEmpty())
+                info.title = element->innerText();
             if (element->renderer())
                 info.bounds = element->renderer()->absoluteBoundingBoxRect(true);
         }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to