If nodes in ShadowDOM has title attribute, tooltip should be displayed correctly. However, the current behavior of tooltip is very weird. For example. 1) tooltip of host element is displayed 2) if another tooltip is shown, the tooltip for ShadowDOM is displayed on the previous tooltip. I believe hittest is not correctly implemented for ShadowDOM. Also, this is very related to deprecatedShadowAncestorNode() bug (Bug 91821), as far as I see EventHandler code.
Do you have any repro? It will help to let someone fix this.
Created attachment 185644 [details] Patch
The patch contains repro. I think we have two approaches for this issue. 1) If hit test result is in UA, we use host element instead. 2) If hit test result is in a shadow tree and there is no information for tooltip, we use host element recursively. I chose (1) approach for this patch, since this won't change behavior much. But it might worth considering adopting (2) approach.
Comment on attachment 185644 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=185644&action=review > Source/WebCore/rendering/HitTestResult.h:141 > void setToNonShadowAncestor(); Can we just get rid of this one by replacing with new one? Feels like having this is just wrong.
(In reply to comment #4) > (From update of attachment 185644 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=185644&action=review > > > Source/WebCore/rendering/HitTestResult.h:141 > > void setToNonShadowAncestor(); > > Can we just get rid of this one by replacing with new one? > Feels like having this is just wrong. The other calling is in if(allowShadowContent), so I think we have to have another method, which set nodes in document treescope.
Created attachment 185670 [details] Patch
Comment on attachment 185670 [details] Patch Clearing review flag on patches from before 2014. If this patch is still relevant, please reset the r? flag.
*** This bug has been marked as a duplicate of bug 157705 ***