Skip to content

Follow up fixes to "Refactor RenderThemeMac::iconForAttachment" #46225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

igower
Copy link
Contributor

@igower igower commented Jun 2, 2025

db8cba4

Follow up fixes to "Refactor RenderThemeMac::iconForAttachment"
https://bugs.webkit.org/show_bug.cgi?id=293919
rdar://152453766

Reviewed by NOBODY (OOPS!).

Updated syntax as according to comments on the last commit. Reverted "auto size = image.size" back to "auto size = [image size]" as this caused a compilation error. I did not implement the change of "convertPlatformImageToBitmap() to accept a RenderThemeCocoa::IconAndSize" as iconAndSize does not contain the same value as iconSize. (Previous Commit: 295710@main)

* Source/WebCore/rendering/mac/RenderThemeMac.mm:
(WebCore::RenderThemeMac::iconForAttachment):
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::iconForAttachment):

db8cba4

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@igower igower requested a review from cdumez as a code owner June 2, 2025 22:17
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 2, 2025
@igower igower force-pushed the eng/Follow-up-fixes-to-Refactor-RenderThemeMac-iconForAttachment branch from 4b510ed to 7358164 Compare June 2, 2025 23:16
@igower igower force-pushed the eng/Follow-up-fixes-to-Refactor-RenderThemeMac-iconForAttachment branch from 7358164 to c2a1e91 Compare June 2, 2025 23:18
@@ -418,9 +418,7 @@ static bool exceedsRenderTreeSizeSizeThreshold(uint64_t thresholdSize, uint64_t
#else
auto iconAndSize = RenderThemeMac::iconForAttachment(fileName, contentType, title);
#endif
auto icon = iconAndSize.icon;
size = iconAndSize.size;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

size is an out parameter, is this really safe to delete?

@pxlcoder
Copy link
Member

pxlcoder commented Jun 2, 2025

Also, when doing a follow-up it's nice to reference the commit identifier (in this case, 295710@main) rather than the title (which is not unique, and less easy to search for).

https://bugs.webkit.org/show_bug.cgi?id=293919
rdar://152453766

Reviewed by NOBODY (OOPS!).

Updated syntax as according to comments on the last commit. Reverted "auto size = image.size" back to "auto size = [image size]" as this caused a compilation error. I did not implement the change of "convertPlatformImageToBitmap() to accept a RenderThemeCocoa::IconAndSize" as iconAndSize does not contain the same value as iconSize. (Previous Commit: 295710@main)

* Source/WebCore/rendering/mac/RenderThemeMac.mm:
(WebCore::RenderThemeMac::iconForAttachment):
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::iconForAttachment):
@igower igower force-pushed the eng/Follow-up-fixes-to-Refactor-RenderThemeMac-iconForAttachment branch from c2a1e91 to db8cba4 Compare June 5, 2025 00:19
@igower igower requested a review from pxlcoder June 5, 2025 23:00
@igower igower added safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks and removed merging-blocked Applied to prevent a change from being merged labels Jun 26, 2025
@webkit-ews-buildbot
Copy link
Collaborator

@igower does not have committer permissions according to https://raw.githubusercontent.com/WebKit/WebKit/main/metadata/contributors.json.

If you do have committer permissions, please ensure that your GitHub username is added to contributors.json.

Rejecting db8cba4 from merge queue.

Safe-Merge-Queue: Build #61511.

@webkit-ews-buildbot webkit-ews-buildbot added merging-blocked Applied to prevent a change from being merged and removed safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks labels Jun 26, 2025
@webkit-ews-buildbot
Copy link
Collaborator

Safe-Merge-Queue: Build #61511.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merging-blocked Applied to prevent a change from being merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants