Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fa3dfaa18b666d7d0407ee145666bde979ec9ee1
      
https://github.com/WebKit/WebKit/commit/fa3dfaa18b666d7d0407ee145666bde979ec9ee1
  Author: Gerald Squelart <[email protected]>
  Date:   2025-11-27 (Thu, 27 Nov 2025)

  Changed paths:
    A 
LayoutTests/fast/attachment/cocoa/wide-attachment-text-align-center-expected.html
    A 
LayoutTests/fast/attachment/cocoa/wide-attachment-text-align-center-rtl-expected.html
    A 
LayoutTests/fast/attachment/cocoa/wide-attachment-text-align-center-rtl.html
    A LayoutTests/fast/attachment/cocoa/wide-attachment-text-align-center.html
    M Source/WebCore/html/shadow/attachmentElementShadow.css

  Log Message:
  -----------
  Attachment text should override any external text alignment
https://bugs.webkit.org/show_bug.cgi?id=303159
rdar://113227073

Reviewed by Tim Horton.

If an attachment is placed inside container element with a set
`text-align` style, it impacts the alignment of all texts inside the
attachments. E.g., if an attachment is inside a centered paragraph, its
title would become centered (inside the information area) as well.

But we want to keep control of the styling inside the attachment brick.
So this patch adds an explicit `text-align: start` to ensure all texts
are left/right aligned according to the general text `direction`.

The added `direction: inherit` ensures the direction inside the shadow
tree comes from the containing document.

* 
LayoutTests/fast/attachment/cocoa/wide-attachment-text-align-center-expected.html:
 Added.
* 
LayoutTests/fast/attachment/cocoa/wide-attachment-text-align-center-rtl-expected.html:
 Added.
* LayoutTests/fast/attachment/cocoa/wide-attachment-text-align-center-rtl.html: 
Added.
* LayoutTests/fast/attachment/cocoa/wide-attachment-text-align-center.html: 
Added.
* Source/WebCore/html/shadow/attachmentElementShadow.css:
(div#attachment-container):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to