[webkit-changes] [WebKit/WebKit] dabfee: Narrow attachment sends load event when its icon i...

Gerald Squelart noreply at github.com
Thu Oct 19 03:43:16 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dabfeeb4daebcc58cea4207a19bf6a330a39ae2e
      https://github.com/WebKit/WebKit/commit/dabfeeb4daebcc58cea4207a19bf6a330a39ae2e
  Author: Gerald Squelart <g_squelart at apple.com>
  Date:   2023-10-19 (Thu, 19 Oct 2023)

  Changed paths:
    M LayoutTests/fast/attachment/attachment-icon-from-file-extension-expected.html
    M LayoutTests/fast/attachment/attachment-icon-from-file-extension.html
    M LayoutTests/platform/mac-wk1/TestExpectations
    M LayoutTests/platform/mac-wk2/TestExpectations
    M Source/WebCore/html/HTMLAttachmentElement.cpp
    M Source/WebCore/html/HTMLAttachmentElement.h

  Log Message:
  -----------
  Narrow attachment sends load event when its icon is set, test listens
https://bugs.webkit.org/show_bug.cgi?id=262978
rdar://116764174

Reviewed by Aditya Keerthi.

Some tests like attachment-icon-from-file-extension.html fail with an image
error because the attachment icon is not set yet, especially when the icon
request is done is a separate process.

Similar to https://commits.webkit.org/266144@main where the wide-layout
attachment would dispatch a load event when its image element was set,
narrow attachments now dispatch the same load event when its icon image gets
set. This can be listened to in tests, so that they know when the attachment
is stable and a screenshot may be taken.

This patch also fixes attachment-icon-from-file-extension.html as a proof of
concept. More tests will be fixed in subsequent patches.
A downside to this fix is that "reftest-wait" seems to prevent painting the
attachement on wk1, so for now this test is skipped there, to be investigated
in https://bugs.webkit.org/show_bug.cgi?id=263367.

* LayoutTests/fast/attachment/attachment-icon-from-file-extension-expected.html:
* LayoutTests/fast/attachment/attachment-icon-from-file-extension.html:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::updateIconForNarrowLayout):
(WebCore::HTMLAttachmentElement::requestIconWithSize):
(WebCore::HTMLAttachmentElement::requestIconWithSize const): Deleted.
* Source/WebCore/html/HTMLAttachmentElement.h:

Canonical link: https://commits.webkit.org/269512@main




More information about the webkit-changes mailing list