[webkit-changes] [WebKit/WebKit] a380cf: [text-box-trim] Fix imported/w3c/web-platform-test...
Alan Baradlay
noreply at github.com
Fri Aug 2 10:12:04 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a380cf4fde0930d7e4c1f772f25f9a3c4d48a46f
https://github.com/WebKit/WebKit/commit/a380cf4fde0930d7e4c1f772f25f9a3c4d48a46f
Author: Alan Baradlay <zalan at apple.com>
Date: 2024-08-02 (Fri, 02 Aug 2024)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLayoutState.h
M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/LineLayoutResult.h
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h
Log Message:
-----------
[text-box-trim] Fix imported/w3c/web-platform-tests/css/css-inline/text-box-trim/text-box-trim-initial-letter-start-001.html
https://bugs.webkit.org/show_bug.cgi?id=277523
Reviewed by Antti Koivisto.
WebKit's initial letter implementation is based on creating a dedicated float box with a special pseudo type.
It makes the initial letter box disconnected from the first line box where it belongs.
This patch ensures that changes we make to the first line box is reflected in the position of the initial letter box.
(even if it means that this fake float box ends up overlapping some _before_ content).
1. Use the LineLayoutResult strut to store the trimmed value
2. Transfer this value to InlineLayoutState so that the integration layer can access to it
3. Adjust the float box geometry with the trimmed value
* LayoutTests/TestExpectations:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::updateInlineLayoutStateWithLineLayoutResult):
* Source/WebCore/layout/formattingContexts/inline/InlineLayoutState.h:
(WebCore::Layout::InlineLayoutState::setFirstLineStartTrimForInitialLetter):
(WebCore::Layout::InlineLayoutState::firstLineStartTrimForInitialLetter const):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
(WebCore::Layout::LineBoxBuilder::LineBoxBuilder):
(WebCore::Layout::LineBoxBuilder::applyTextBoxTrimIfNeeded const):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::layoutInlineContent):
* Source/WebCore/layout/formattingContexts/inline/LineLayoutResult.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::layout):
(WebCore::LayoutIntegration::LineLayout::updateRenderTreePositions):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h:
Canonical link: https://commits.webkit.org/281759@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