[webkit-changes] [WebKit/WebKit] c25019: [IFC][Ruby] Perform nested ruby layouts from IFC

Antti Koivisto noreply at github.com
Tue Aug 20 09:17:22 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c25019a482079a9eebb41a9f0e312d487828dc32
      https://github.com/WebKit/WebKit/commit/c25019a482079a9eebb41a9f0e312d487828dc32
  Author: Antti Koivisto <antti at apple.com>
  Date:   2024-08-20 (Tue, 20 Aug 2024)

  Changed paths:
    M LayoutTests/fast/ruby/floating-ruby-text-expected.txt
    M LayoutTests/fast/ruby/positioned-ruby-text-expected.txt
    M Source/WebCore/layout/LayoutState.cpp
    M Source/WebCore/layout/LayoutState.h
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h
    M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h
    M Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.cpp
    M Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.h
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
    M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  -----------
  [IFC][Ruby] Perform nested ruby layouts from IFC
https://bugs.webkit.org/show_bug.cgi?id=278307
rdar://134239864

Reviewed by Alan Baradlay.

Move nested ruby layouts to IFC. Handle also the case where we relayout because of
a constraints change.

* Source/WebCore/layout/LayoutState.cpp:
(WebCore::Layout::LayoutState::LayoutState):
(WebCore::Layout::LayoutState::layoutWithFormattingContextForBox):

Add optional width constraint argument.

* Source/WebCore/layout/LayoutState.h:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutWithFormattingContextForBox):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h:
(WebCore::Layout::InlineFormattingContext::layoutWithFormattingContextForBox):
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::handleInlineLevelBox):

Include an opaque inline item for annotation boxes.

* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::candidateContentForLine):

Ensure opaque box has a layout.

Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::processRubyBase):
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp:
(WebCore::Layout::annotationMarginBoxVisualRect):
(WebCore::Layout::annotationOverlapCheck):
(WebCore::Layout::RubyFormattingContext::annotationBoxLogicalWidth):
(WebCore::Layout::RubyFormattingContext::baseEndAdditionalLogicalWidth):
(WebCore::Layout::RubyFormattingContext::applyRubyAlignOnBaseContent):
(WebCore::Layout::RubyFormattingContext::applyRubyAlign):
(WebCore::Layout::RubyFormattingContext::applyRubyAlignOnAnnotationBox):
(WebCore::Layout::RubyFormattingContext::placeAnnotationBox):
(WebCore::Layout::RubyFormattingContext::sizeAnnotationBox):

Layout again if the annotation box size changed.

(WebCore::Layout::RubyFormattingContext::overhangForAnnotationBefore):
(WebCore::Layout::RubyFormattingContext::overhangForAnnotationAfter):
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h:
* Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.cpp:
(WebCore::LayoutIntegration::layoutWithFormattingContextForBox):
* Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::updateRenderTreePositions):
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutModernLines):

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



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


More information about the webkit-changes mailing list