[webkit-changes] [WebKit/WebKit] 23b973: Some Scroll To Text Fragment URLs do not find exis...

megangardner noreply at github.com
Mon Mar 6 18:08:31 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 23b973250328701b81c10e39b82a9d6d9cdd231f
      https://github.com/WebKit/WebKit/commit/23b973250328701b81c10e39b82a9d6d9cdd231f
  Author: Megan Gardner <megan_gardner at apple.com>
  Date:   2023-03-06 (Mon, 06 Mar 2023)

  Changed paths:
    A LayoutTests/http/tests/scroll-to-text-fragment/start-text-fancy-quote-expected.html
    A LayoutTests/http/tests/scroll-to-text-fragment/start-text-fancy-quote.html
    A LayoutTests/platform/glib/http/tests/scroll-to-text-fragment/start-text-fancy-quote-expected.html
    A LayoutTests/platform/wincairo/http/tests/scroll-to-text-fragment/start-text-fancy-quote-expected.html
    M Source/WebCore/dom/FragmentDirectiveRangeFinder.cpp

  Log Message:
  -----------
  Some Scroll To Text Fragment URLs do not find existing text on the page.
https://bugs.webkit.org/show_bug.cgi?id=253118
rdar://103416130

Reviewed by Aditya Keerthi.

We were carefully folding the quotes for the text to make sure that we would match
against all kinds of fancy quotes, but failed to fold the input quotes,
so if you had a query string with a fancy quote, it would fail to find matching
quotes on the page. Easily fixed by folding the quotes on the input string.

* LayoutTests/http/tests/scroll-to-text-fragment/start-text-fancy-quote-expected.html: Added.
* LayoutTests/http/tests/scroll-to-text-fragment/start-text-fancy-quote.html: Added.
* Source/WebCore/dom/FragmentDirectiveRangeFinder.cpp:
(WebCore::FragmentDirectiveRangeFinder::findRangeFromNodeList):

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




More information about the webkit-changes mailing list