haikuwebkit/LayoutTests/highlight/highlight-map-and-group-exp...

14 lines
510 B
Plaintext
Raw Permalink Normal View History

Rename HighlightMap to HighlightRegister and HighlightRangeGroup to Highlight to match current spec https://bugs.webkit.org/show_bug.cgi?id=217919 Reviewed by Ryosuke Niwa. No new tests, no new behavior, rename only. https://drafts.csswg.org/css-highlight-api-1/ * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Modules/highlight/Highlight.cpp: Renamed from Source/WebCore/Modules/highlight/HighlightRangeGroup.cpp. (WebCore::Highlight::Highlight): (WebCore::Highlight::create): (WebCore::Highlight::initializeSetLike): (WebCore::Highlight::removeFromSetLike): (WebCore::Highlight::clearFromSetLike): (WebCore::Highlight::addToSetLike): * Modules/highlight/Highlight.h: Renamed from Source/WebCore/Modules/highlight/HighlightRangeGroup.h. * Modules/highlight/Highlight.idl: Renamed from Source/WebCore/Modules/highlight/HighlightRangeGroup.idl. * Modules/highlight/HighlightRegister.cpp: Renamed from Source/WebCore/Modules/highlight/HighlightMap.cpp. (WebCore::HighlightRegister::initializeMapLike): (WebCore::HighlightRegister::setFromMapLike): (WebCore::HighlightRegister::clear): (WebCore::HighlightRegister::remove): * Modules/highlight/HighlightRegister.h: Renamed from Source/WebCore/Modules/highlight/HighlightMap.h. (WebCore::HighlightRegister::create): (WebCore::HighlightRegister::map const): * Modules/highlight/HighlightRegister.idl: Renamed from Source/WebCore/Modules/highlight/HighlightMap.idl. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/WebCoreBuiltinNames.h: * css/DOMCSSNamespace.cpp: (WebCore::DOMCSSNamespace::highlights): * css/DOMCSSNamespace.h: * css/DOMCSSNamespace.idl: * dom/Document.cpp: (WebCore::Document::commonTeardown): (WebCore::Document::highlightRegister): (WebCore::Document::updateHighlightPositions): (WebCore::Document::highlightMap): Deleted. * dom/Document.h: * rendering/HighlightData.cpp: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::collectMarkedTextsForHighlights const): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::calculateHighlightColor const): * rendering/SelectionRangeData.cpp: Canonical link: https://commits.webkit.org/230717@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268774 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-20 23:58:03 +00:00
PASS highlight1.size is 1
PASS highlight2.size is 2
PASS highlight3.size is 3
Fill HighlightRangeGroup and HighlightMap with values from JavaScript https://bugs.webkit.org/show_bug.cgi?id=204934 Source/WebCore: rdar://problem/57686335 Reviewed by Simon Fraser. Fillout HighlightMap and HighlightRangeGroup with the information that we're passed from the JavaScript side. Make sure that the javascript objects are filled out correctly. Test: highlight/highlight-map-and-group.html * Modules/highlight/HighlightMap.cpp: (WebCore::HighlightMap::synchronizeBackingMap): (WebCore::HighlightMap::setFromMapLike): (WebCore::HighlightMap::clear): (WebCore::HighlightMap::remove): (WebCore::HighlightMap::getGroupForStyle): (WebCore::HighlightMap::addHighlightGroup): Deleted. (WebCore::HighlightMap::namedItem const): Deleted. (WebCore::HighlightMap::setNamedItem): Deleted. (WebCore::HighlightMap::deleteNamedProperty): Deleted. * Modules/highlight/HighlightMap.h: (WebCore::HighlightMap::backingMap): (WebCore::HighlightMap::synchronizeBackingMap): Deleted. (WebCore::HighlightMap::clear): Deleted. * Modules/highlight/HighlightMap.idl: * Modules/highlight/HighlightRangeGroup.cpp: (WebCore::HighlightRangeGroup::HighlightRangeGroup): (WebCore::HighlightRangeGroup::initializeSetLike): (WebCore::HighlightRangeGroup::removeFromSetLike): (WebCore::HighlightRangeGroup::clearFromSetLike): (WebCore::HighlightRangeGroup::addToSetLike): (WebCore::HighlightRangeGroup::addRange): Deleted. (WebCore::HighlightRangeGroup::removeRange): Deleted. (WebCore::HighlightRangeGroup::Iterator::Iterator): Deleted. (WebCore::HighlightRangeGroup::Iterator::next): Deleted. * Modules/highlight/HighlightRangeGroup.h: (WebCore::HighlightRangeGroup::ranges const): (): Deleted. (WebCore::HighlightRangeGroup::createIterator): Deleted. * Modules/highlight/HighlightRangeGroup.idl: * dom/StaticRange.cpp: (WebCore::StaticRange::operator== const): * dom/StaticRange.h: LayoutTests: Reviewed by Simon Fraser. * highlight/highlight-map-and-group-expected.txt: Added. * highlight/highlight-map-and-group.html: Added. Canonical link: https://commits.webkit.org/218254@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-10 00:53:23 +00:00
PASS CSS.highlights.size is 3
PASS CSS.highlights.has("example-highlight1") is true
PASS CSS.highlights.has("example-highlight2") is true
PASS CSS.highlights.has("example-highlight3") is true
PASS CSS.highlights.get("example-highlight1").entries().next().value[0].startOffset is 1
PASS CSS.highlights.get("example-highlight1").entries().next().value[0].endOffset is 2
PASS successfullyParsed is true
TEST COMPLETE
One two three...