Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: c38822c4ed1cacacccbaf4c04dbd02047ad5ebed https://github.com/WebKit/WebKit/commit/c38822c4ed1cacacccbaf4c04dbd02047ad5ebed Author: Alan Baradlay <za...@apple.com> Date: 2023-06-07 (Wed, 07 Jun 2023)
Changed paths: A LayoutTests/fast/inline/overflow-truncate-with-self-painting-layer-expected.html A LayoutTests/fast/inline/overflow-truncate-with-self-painting-layer.html A LayoutTests/fast/inline/overflow-truncate-with-self-painting-layer2-expected.html A LayoutTests/fast/inline/overflow-truncate-with-self-painting-layer2.html M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp M Source/WebCore/rendering/RenderLayer.cpp M Source/WebCore/rendering/RenderLayer.h Log Message: ----------- Inline-level elements with self-painting layer renders overlapping ellipsis. https://bugs.webkit.org/show_bug.cgi?id=257811 <rdar://problem/110408920> Reviewed by Simon Fraser. "text-overflow: ellipsis" visually replaces partially overflowing content with "..." We achieve this by 1. skipping partially overflowing content at paint time (text content gets partially truncated, while inline level boxes are skipped completely) 2. paint "..." starting from where the truncated inline content ends ("overflow: hidden" takes care of clipping the remaining, fully overflowing content) This patch ensures that such truncated boxes don't get painted even when they are on self-painting layers. * LayoutTests/fast/inline/overflow-truncate-with-self-painting-layer-expected.html: Added. * LayoutTests/fast/inline/overflow-truncate-with-self-painting-layer.html: Added. * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::updateRenderTreePositions): At this point we finished with inline layout and start transferring geometry/state information over to the render tree. Let's update the associated RenderLayers here. * Source/WebCore/rendering/RenderLayer.cpp: (WebCore::RenderLayer::computeHasVisibleContent const): * Source/WebCore/rendering/RenderLayer.h: (WebCore::RenderLayer::setIsHiddenByOverflowTruncation): Canonical link: https://commits.webkit.org/264973@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes