Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8852bc5adfdbc818376a780dc93ffac266e2e268
https://github.com/WebKit/WebKit/commit/8852bc5adfdbc818376a780dc93ffac266e2e268
Author: Gerald Squelart <[email protected]>
Date: 2024-06-01 (Sat, 01 Jun 2024)
Changed paths:
A
LayoutTests/fast/attachment/attachment-icon-update-after-type-change-expected.html
A LayoutTests/fast/attachment/attachment-icon-update-after-type-change.html
M LayoutTests/fast/attachment/resources/attachment-test-utils.js
M LayoutTests/platform/mac-wk1/TestExpectations
M Source/WebCore/html/HTMLAttachmentElement.cpp
M Source/WebCore/html/HTMLAttachmentElement.h
M Source/WebCore/rendering/AttachmentLayout.mm
M Source/WebCore/rendering/mac/RenderThemeMac.mm
Log Message:
-----------
Request attachment icon again if needed
https://bugs.webkit.org/show_bug.cgi?id=274951
rdar://128175175
Reviewed by Aditya Keerthi.
The attachment icon was only requested once, during the first
layout&painting.
But if the title and/or type attributes are changed, the icon
should be requested again to match these attributes.
In particular, this fixes an issue when sharing a document from
Keynote or other iWork app, where the attachment is initially
created with a generic "application/octet-stream" type, and later
updated to the proper type like "com.apple.iwork.keynote.sffkey".
*
LayoutTests/fast/attachment/attachment-icon-update-after-type-change-expected.html:
Added.
* LayoutTests/fast/attachment/attachment-icon-update-after-type-change.html:
Added.
* LayoutTests/fast/attachment/resources/attachment-test-utils.js:
(takeScreenshot):
(takeScreenshotWhenAttachmentsSettled):
* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/WebCore/html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::ensureWideLayoutShadowTree):
(WebCore::HTMLAttachmentElement::setFile):
(WebCore::HTMLAttachmentElement::attributeChanged):
(WebCore::HTMLAttachmentElement::updateAttributes):
(WebCore::HTMLAttachmentElement::setNeedsIconRequest):
(WebCore::HTMLAttachmentElement::requestWideLayoutIconIfNeeded):
(WebCore::HTMLAttachmentElement::requestIconIfNeededWithSize):
(WebCore::HTMLAttachmentElement::setNeedsWideLayoutIconRequest): Deleted.
(WebCore::HTMLAttachmentElement::requestIconWithSize): Deleted.
* Source/WebCore/html/HTMLAttachmentElement.h:
* Source/WebCore/rendering/AttachmentLayout.mm:
(WebCore::AttachmentLayout::AttachmentLayout):
* Source/WebCore/rendering/mac/RenderThemeMac.mm:
(WebCore::paintAttachmentIcon):
Canonical link: https://commits.webkit.org/279620@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes