Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4c57d1225001777959b1a09df099fdfb0ddb030d
      
https://github.com/WebKit/WebKit/commit/4c57d1225001777959b1a09df099fdfb0ddb030d
  Author: Alan Baradlay <[email protected]>
  Date:   2025-09-05 (Fri, 05 Sep 2025)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp
    M Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.cpp
    M Source/WebCore/layout/layouttree/LayoutBox.h
    M Source/WebCore/rendering/RenderElementInlines.h

  Log Message:
  -----------
  Failing text-indent WPT tests
https://bugs.webkit.org/show_bug.cgi?id=240837

Reviewed by Antti Koivisto.

This change ensures that we apply text-indent on anonymous flex (and grid) 
item's first line
even when the item is not the first child.

https://drafts.csswg.org/css-text/#text-indent-property
"...
For example, the first line of an anonymous block box is only affected if it is 
the first child of its parent element."

While flex and grid items are block containers they are not block boxes as they 
don't participate in BFC.
'text-indent' first child rule applies to block boxes only.

* LayoutTests/TestExpectations:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp:
(WebCore::Layout::InlineFormattingUtils::computedTextIndent const):
* Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.cpp:
(WebCore::LayoutIntegration::BoxTreeUpdater::build):
* Source/WebCore/layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isAnonymousTextIndentCandidateForIntegration const):
(WebCore::Layout::Box::setIsAnonymousTextIndentCandidateForIntegration):
(WebCore::Layout::Box::isFirstChildForIntegration const): Deleted.
(WebCore::Layout::Box::setIsFirstChildForIntegration): Deleted.
* Source/WebCore/rendering/RenderElementInlines.h:
(WebCore::RenderElement::isBlockLevelBox const):

Canonical link: https://commits.webkit.org/299625@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

Reply via email to