haikuwebkit/LayoutTests/highlight/highlight-interfaces-expect...

20 lines
1.0 KiB
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
Tests the interfaces of the highlight API, which include Highlight, HighlightRegister, and extensions to the CSS namespace.
Add disabled highlight API skeleton https://bugs.webkit.org/show_bug.cgi?id=204809 Reviewed by Ryosuke Niwa. Source/WebCore: Beginning implementation of https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/highlight/explainer.md Spec not written yet, starting from the explainer for now. Test: highlight/highlight-interfaces.html * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Modules/highlight/HighlightMap.cpp: Added. (WebCore::HighlightMap::addHighlightGroup): (WebCore::HighlightMap::addFromMapLike): (WebCore::HighlightMap::remove): (WebCore::HighlightMap::namedItem const): (WebCore::HighlightMap::setNamedItem): (WebCore::HighlightMap::deleteNamedProperty): (WebCore::HighlightMap::set): * Modules/highlight/HighlightMap.h: Added. (WebCore::HighlightMap::create): (WebCore::HighlightMap::synchronizeBackingMap): (WebCore::HighlightMap::backingMap): (WebCore::HighlightMap::clear): * Modules/highlight/HighlightMap.idl: Added. * Modules/highlight/HighlightRangeGroup.cpp: Added. (WebCore::HighlightRangeGroup::HighlightRangeGroup): (WebCore::HighlightRangeGroup::create): (WebCore::HighlightRangeGroup::addRange): (WebCore::HighlightRangeGroup::removeRange): (WebCore::HighlightRangeGroup::Iterator::Iterator): (WebCore::HighlightRangeGroup::Iterator::next): * Modules/highlight/HighlightRangeGroup.h: Added. (WebCore::HighlightRangeGroup::createIterator): * Modules/highlight/HighlightRangeGroup.idl: Added. * 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::highlightMap): * dom/Document.h: * dom/Range.idl: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setHighlightAPIEnabled): (WebCore::RuntimeEnabledFeatures::highlightAPIEnabled const): Source/WebKit: * Shared/WebPreferences.yaml: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetHighlightAPIEnabled): (WKPreferencesGetHighlightAPIEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: Source/WebKitLegacy/mac: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences highlightAPIEnabled]): (-[WebPreferences setHighlightAPIEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Tools: * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): LayoutTests: * highlight/highlight-interfaces-expected.txt: Added. * highlight/highlight-interfaces.html: Added. Canonical link: https://commits.webkit.org/218055@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-04 05:48:46 +00:00
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Testing Highlight:
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 Highlight instanceof Function is true
PASS typeof Highlight is "function"
PASS new Highlight(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2})) instanceof Highlight is true
PASS HighlightRegister instanceof Function is true
PASS typeof HighlightRegister is "function"
PASS new HighlightRegister() instanceof HighlightRegister is true
PASS new HighlightRegister().set("foo-styling",new Highlight(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2}))) is defined.
Add disabled highlight API skeleton https://bugs.webkit.org/show_bug.cgi?id=204809 Reviewed by Ryosuke Niwa. Source/WebCore: Beginning implementation of https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/highlight/explainer.md Spec not written yet, starting from the explainer for now. Test: highlight/highlight-interfaces.html * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Modules/highlight/HighlightMap.cpp: Added. (WebCore::HighlightMap::addHighlightGroup): (WebCore::HighlightMap::addFromMapLike): (WebCore::HighlightMap::remove): (WebCore::HighlightMap::namedItem const): (WebCore::HighlightMap::setNamedItem): (WebCore::HighlightMap::deleteNamedProperty): (WebCore::HighlightMap::set): * Modules/highlight/HighlightMap.h: Added. (WebCore::HighlightMap::create): (WebCore::HighlightMap::synchronizeBackingMap): (WebCore::HighlightMap::backingMap): (WebCore::HighlightMap::clear): * Modules/highlight/HighlightMap.idl: Added. * Modules/highlight/HighlightRangeGroup.cpp: Added. (WebCore::HighlightRangeGroup::HighlightRangeGroup): (WebCore::HighlightRangeGroup::create): (WebCore::HighlightRangeGroup::addRange): (WebCore::HighlightRangeGroup::removeRange): (WebCore::HighlightRangeGroup::Iterator::Iterator): (WebCore::HighlightRangeGroup::Iterator::next): * Modules/highlight/HighlightRangeGroup.h: Added. (WebCore::HighlightRangeGroup::createIterator): * Modules/highlight/HighlightRangeGroup.idl: Added. * 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::highlightMap): * dom/Document.h: * dom/Range.idl: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setHighlightAPIEnabled): (WebCore::RuntimeEnabledFeatures::highlightAPIEnabled const): Source/WebKit: * Shared/WebPreferences.yaml: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetHighlightAPIEnabled): (WKPreferencesGetHighlightAPIEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: Source/WebKitLegacy/mac: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences highlightAPIEnabled]): (-[WebPreferences setHighlightAPIEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Tools: * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): LayoutTests: * highlight/highlight-interfaces-expected.txt: Added. * highlight/highlight-interfaces.html: Added. Canonical link: https://commits.webkit.org/218055@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-04 05:48:46 +00:00
PASS CSS.highlights is defined.
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 CSS.highlights.set("foo-styling",new Highlight(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2}))) is CSS.highlights
Add disabled highlight API skeleton https://bugs.webkit.org/show_bug.cgi?id=204809 Reviewed by Ryosuke Niwa. Source/WebCore: Beginning implementation of https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/highlight/explainer.md Spec not written yet, starting from the explainer for now. Test: highlight/highlight-interfaces.html * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Modules/highlight/HighlightMap.cpp: Added. (WebCore::HighlightMap::addHighlightGroup): (WebCore::HighlightMap::addFromMapLike): (WebCore::HighlightMap::remove): (WebCore::HighlightMap::namedItem const): (WebCore::HighlightMap::setNamedItem): (WebCore::HighlightMap::deleteNamedProperty): (WebCore::HighlightMap::set): * Modules/highlight/HighlightMap.h: Added. (WebCore::HighlightMap::create): (WebCore::HighlightMap::synchronizeBackingMap): (WebCore::HighlightMap::backingMap): (WebCore::HighlightMap::clear): * Modules/highlight/HighlightMap.idl: Added. * Modules/highlight/HighlightRangeGroup.cpp: Added. (WebCore::HighlightRangeGroup::HighlightRangeGroup): (WebCore::HighlightRangeGroup::create): (WebCore::HighlightRangeGroup::addRange): (WebCore::HighlightRangeGroup::removeRange): (WebCore::HighlightRangeGroup::Iterator::Iterator): (WebCore::HighlightRangeGroup::Iterator::next): * Modules/highlight/HighlightRangeGroup.h: Added. (WebCore::HighlightRangeGroup::createIterator): * Modules/highlight/HighlightRangeGroup.idl: Added. * 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::highlightMap): * dom/Document.h: * dom/Range.idl: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setHighlightAPIEnabled): (WebCore::RuntimeEnabledFeatures::highlightAPIEnabled const): Source/WebKit: * Shared/WebPreferences.yaml: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetHighlightAPIEnabled): (WKPreferencesGetHighlightAPIEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: Source/WebKitLegacy/mac: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences highlightAPIEnabled]): (-[WebPreferences setHighlightAPIEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Tools: * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): LayoutTests: * highlight/highlight-interfaces-expected.txt: Added. * highlight/highlight-interfaces.html: Added. Canonical link: https://commits.webkit.org/218055@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-04 05:48:46 +00:00
PASS successfullyParsed is true
TEST COMPLETE