[webkit-changes] [WebKit/WebKit] 2f8e7b: Generating text fragments fails when the selected ...
megangardner
noreply at github.com
Thu Feb 20 15:05:47 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2f8e7b5a5c9c9fd5e681639acccd5d0bdf4cc7e0
https://github.com/WebKit/WebKit/commit/2f8e7b5a5c9c9fd5e681639acccd5d0bdf4cc7e0
Author: Megan Gardner <megan_gardner at apple.com>
Date: 2025-02-20 (Thu, 20 Feb 2025)
Changed paths:
A LayoutTests/http/tests/scroll-to-text-fragment/generation-start-and-end-across-block-boundaries-expected.txt
A LayoutTests/http/tests/scroll-to-text-fragment/generation-start-and-end-across-block-boundaries.html
M Source/WebCore/dom/FragmentDirectiveGenerator.cpp
Log Message:
-----------
Generating text fragments fails when the selected text starts and ends in different blocks.
https://bugs.webkit.org/show_bug.cgi?id=288052
rdar://137761701
Reviewed by Wenson Hsieh.
When generating links, we did not test to ensure that the beginning and end of the selected range
were within the same block. The full range does not need to exist in the same block, but each
element of the directive needs to be contained in one block, therefore we need to check that when
deciding if we should make a start and end directive, or just a start. If we decide to make a start
and end, the rest of the checks to keep the directive in the block come into play and give us a
correctly functioning directive.
* LayoutTests/http/tests/scroll-to-text-fragment/generation-start-and-end-across-block-boundaries-expected.txt: Added.
* LayoutTests/http/tests/scroll-to-text-fragment/generation-start-and-end-across-block-boundaries.html: Added.
* Source/WebCore/dom/FragmentDirectiveGenerator.cpp:
(WebCore::FragmentDirectiveGenerator::generateFragmentDirective):
Canonical link: https://commits.webkit.org/290748@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