[webkit-changes] [WebKit/WebKit] e7d1f5: Handle empty title attribute tooltips
Ahmad Saleem
noreply at github.com
Thu Jan 4 18:49:39 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e7d1f5b567cb04f64825384d926dd722450663df
https://github.com/WebKit/WebKit/commit/e7d1f5b567cb04f64825384d926dd722450663df
Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
Date: 2024-01-04 (Thu, 04 Jan 2024)
Changed paths:
A LayoutTests/fast/html/a-tooltip-null-expected.txt
A LayoutTests/fast/html/a-tooltip-null.html
M Source/WebCore/rendering/HitTestResult.cpp
Log Message:
-----------
Handle empty title attribute tooltips
https://bugs.webkit.org/show_bug.cgi?id=264702
rdar://problem/118619793
Reviewed by Ryosuke Niwa and Aditya Keerthi.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
Merge: https://chromium.googlesource.com/chromium/blink/+/a57f7f4625cd5d699a41154c67436ae423f7a5e1
The spec [1] tells us that if an element has a title attribute, its value
should be returned as its tooltip/advisory information:
[1] https://html.spec.whatwg.org/#the-title-attribute
Align with how other browsers behave for `<foo title>` and return the
empty string rather than consult the parent element.
NOTE - the tests are modified to work with WebKit Test Infrastructure.
* Source/WebCore/rendering/HitTestResult.cpp:
(HitTestResult::title):
* LayoutTests/fast/html/a-tooltip-null.html: Add Test Case
* LayoutTests/fast/html/a-tooltip-null-expected.txt: Add Test Case Expectation
Canonical link: https://commits.webkit.org/272667@main
More information about the webkit-changes
mailing list