Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Implement full search for text directives for Scroll to Text Fragment…
… spec. https://bugs.webkit.org/show_bug.cgi?id=243511 rdar://89301977 Reviewed by Ryosuke Niwa. Add full search algorithm as specified in the spec here: https://wicg.github.io/scroll-to-text-fragment/ To properly search for text fragments from the directives that we have parsed out of the URL. Currently these have been tested against some examples, but in the near future we will import that WPT tests and ensure that all of those pass as well as address the last few edge case FIXMEs left in this implementation. Source/WebCore/dom/FragmentDirectiveParser.cpp: Fix an error in parsing the fragment directive that wasn't caught until I finished coding the search algorithm. * Source/WebCore/dom/BoundaryPoint.h: (WebCore::operator!=): * Source/WebCore/dom/FragmentDirectiveParser.cpp: (WebCore::FragmentDirectiveParser::parseFragmentDirective): * Source/WebCore/dom/FragmentDirectiveRangeFinder.cpp: (WebCore::FragmentDirectiveRangeFinder::isSearchInvisible): (WebCore::FragmentDirectiveRangeFinder::isNonSearchableSubtree): (WebCore::FragmentDirectiveRangeFinder::nearestBlockAncestor): (WebCore::FragmentDirectiveRangeFinder::getBoundaryPointAtIndex): (WebCore::FragmentDirectiveRangeFinder::indexIsWordBoundary): (WebCore::FragmentDirectiveRangeFinder::isVisibleTextNode): (WebCore::FragmentDirectiveRangeFinder::findRangeFromNodeList): (WebCore::FragmentDirectiveRangeFinder::rangeOfStringInRange): (WebCore::FragmentDirectiveRangeFinder::advanceRangeStartToNextNonWhitespace): (WebCore::FragmentDirectiveRangeFinder::rangesForFragments): (WebCore::FragmentDirectiveRangeFinder::rangeForFragment): (WebCore::FragmentDirectiveRangeFinder::collapseIfRootsDiffer): Deleted. (WebCore::FragmentDirectiveRangeFinder::rangeOfString): Deleted. * Source/WebCore/dom/FragmentDirectiveRangeFinder.h: * Source/WebCore/rendering/style/RenderStyle.h: (WebCore::RenderStyle::isDisplayBlockLevel const): Canonical link: https://commits.webkit.org/253383@main
- Loading branch information