Bug 223518 - [macOS] Context menu should account for image overlay content
Summary: [macOS] Context menu should account for image overlay content
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-19 09:21 PDT by Wenson Hsieh
Modified: 2021-03-22 12:06 PDT (History)
11 users (show)

See Also:


Attachments
Patch (10.42 KB, patch)
2021-03-19 13:32 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (10.44 KB, patch)
2021-03-19 14:54 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2021-03-19 09:21:35 PDT
<rdar://problem/75505210>
Comment 1 Wenson Hsieh 2021-03-19 13:32:50 PDT
Created attachment 423767 [details]
Patch
Comment 2 Devin Rousso 2021-03-19 13:46:49 PDT
Comment on attachment 423767 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=423767&action=review

r=me

> Source/WebCore/html/HTMLElement.cpp:1240
> +    if (auto host = node.shadowHost(); is<HTMLElement>(host) && downcast<HTMLElement>(*host).hasImageOverlay())
> +        return makeRefPtr(downcast<HTMLElement>(*host));

NIT: Can we avoid the double dereference-`downcast`?
Comment 3 Wenson Hsieh 2021-03-19 13:53:16 PDT
Comment on attachment 423767 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=423767&action=review

>> Source/WebCore/html/HTMLElement.cpp:1240
>> +        return makeRefPtr(downcast<HTMLElement>(*host));
> 
> NIT: Can we avoid the double dereference-`downcast`?

Yes, fixed!
Comment 4 Wenson Hsieh 2021-03-19 14:54:12 PDT
Created attachment 423783 [details]
Patch
Comment 5 EWS 2021-03-22 12:06:07 PDT
Committed r274772: <https://commits.webkit.org/r274772>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 423783 [details].