Bug 264702
| Summary: | Handle empty title attribute tooltips | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | akeerthi, annevk, karlcow, mike, webkit-bug-importer |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
Hi Team,
While going through Blink's commit, I came across another potential merge and to fix the bugs.
Blink Commit: https://chromium.googlesource.com/chromium/blink/+/a57f7f4625cd5d699a41154c67436ae423f7a5e1
WebKit Source: https://searchfox.org/wubkat/rev/6e975c79b0d4766d80b0421a6dedeae64ca84b63/Source/WebCore/rendering/HitTestResult.cpp#281
Test Case: https://jsfiddle.net/2fsd1La3/
^ hover on 'PageTitle' and you will get tooltip while if you hover on 'span element..', in STP182, you will get parent's tooltip. While Chrome Canary 121 and Firefox Nightly 121 does not show parent's tooltip.
Just wanted to raise and fix it.
Thanks!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
Web-Spec: https://html.spec.whatwg.org/#the-title-attribute
The advisory information of an element is the value that the following algorithm returns, with the algorithm being aborted once a value is returned. When the algorithm returns the empty string, then there is no advisory information.
If the element has a title attribute, then return its value.
If the element has a parent element, then return the parent element's advisory information.
Return the empty string.
Ahmad Saleem
@Aditya - do we have any 'test mechanism' for 'tooltips' like Blink / Chromium in WebKit?
The attached test from PR or from source.chromium.org does not work 1-1 in WebKit and also I checked WPT, if we have any similar test (which we might be failing etc.).
In local testing, this PR does fix the issue in Test Case from Comment 0.
Radar WebKit Bug Importer
<rdar://problem/118619793>
Ahmad Saleem
PR - https://github.com/WebKit/WebKit/pull/22403
Manage to make test. Yuppee!!
EWS
Committed 272667@main (e7d1f5b567cb): <https://commits.webkit.org/272667@main>
Reviewed commits have been landed. Closing PR #22403 and removing active labels.