[webkit-changes] [WebKit/WebKit] 128b2c: [IFC][Integration] Do not mutate root box's geomet...

Alan Baradlay noreply at github.com
Sun Nov 6 05:58:52 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 128b2cb838691029a10355e0f99f7884eb55a617
      https://github.com/WebKit/WebKit/commit/128b2cb838691029a10355e0f99f7884eb55a617
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2022-11-06 (Sun, 06 Nov 2022)

  Changed paths:
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h
    M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  -----------
  [IFC][Integration] Do not mutate root box's geometry with logical values
https://bugs.webkit.org/show_bug.cgi?id=247249

Reviewed by Antti Koivisto.

BoxGeometry should contain values based off of the coordinate space the box itself is in (and not the coordinate space it creates for its descendant).

In case of a formatting context root box (e.g. IFC root), the box's geometry may be different from what it establishes for the formatting context.
e.g. "writing-mode: vertical-lr" on box flips the width/height (top/left) values for the participating descendant boxes. This flipped geometry
should not be cached on the BoxGeometry instead we introduce m_inlineContentConstraints. This ensures that when a box both participates in a formatting context
and establishes a new formatting context for its descendants, we don't mutate the original geometry.

* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::updateListMarkerDimensions):
(WebCore::LayoutIntegration::LineLayout::layout):
(WebCore::LayoutIntegration::LineLayout::constructContent):
(WebCore::LayoutIntegration::LineLayout::updateInlineContentConstraints):
(WebCore::LayoutIntegration::LineLayout::prepareFloatingState):
(WebCore::LayoutIntegration::LineLayout::updateFormattingRootGeometryAndInvalidate): Deleted.
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h:
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutModernLines):

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




More information about the webkit-changes mailing list