Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ee150aed9da80fa92ec8a7c8aa24fedd46998392
      
https://github.com/WebKit/WebKit/commit/ee150aed9da80fa92ec8a7c8aa24fedd46998392
  Author: Gerald Squelart <[email protected]>
  Date:   2023-07-06 (Thu, 06 Jul 2023)

  Changed paths:
    M 
LayoutTests/fast/attachment/mac/wide-attachment-image-controls-basic-expected.txt
    M 
LayoutTests/platform/ios-wk2/fast/attachment/cocoa/wide-attachment-rendering-expected.txt
    M 
LayoutTests/platform/mac-wk2/fast/attachment/cocoa/wide-attachment-rendering-expected.txt
    M Source/WebCore/html/HTMLAttachmentElement.cpp
    M Source/WebCore/html/HTMLAttachmentElement.h
    M Source/WebCore/rendering/RenderAttachment.cpp

  Log Message:
  -----------
  Correctly compute baseline of wide-layout attachments
https://bugs.webkit.org/show_bug.cgi?id=258868
rdar://problem/111771870

Reviewed by Dean Jackson.

Previously it was falling back on the narrow/legacy renderer's baseline 
computation, which
happened to look okay.
This is fixed by doing a proper computation using a designated inner element, 
in this case
the image element because it has the same height&baseline in all attachments 
(so that
attachments on the same line will be aligned regardless of their contents).

Also, because it was going through the legacy layout path, 
HTMLAttachmentElement::requestIconWithSize
triggered its debug-assertion that it should only be used with a narrow/legacy 
attachment; in release
it didn't crash but probably did an extra unnecessary icon request.

* 
LayoutTests/fast/attachment/mac/wide-attachment-image-controls-basic-expected.txt:
* 
LayoutTests/platform/ios-wk2/fast/attachment/cocoa/wide-attachment-rendering-expected.txt:
* 
LayoutTests/platform/mac-wk2/fast/attachment/cocoa/wide-attachment-rendering-expected.txt:
* Source/WebCore/html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::wideLayoutImageElement const):
* Source/WebCore/html/HTMLAttachmentElement.h:
* Source/WebCore/rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::baselinePosition const):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to