haikuwebkit/LayoutTests/highlight/highlight-world-leak-expect...

11 lines
231 B
Plaintext
Raw Permalink Normal View History

Paint highlights specified in CSS Highlight API https://bugs.webkit.org/show_bug.cgi?id=205318 Reviewed by Ryosuke Niwa. LayoutTests/imported/w3c: * web-platform-tests/css/css-highlight-api/highlight-text-across-elements-expected.html: Added. * web-platform-tests/css/css-highlight-api/highlight-text-across-elements.html: Added. * web-platform-tests/css/css-highlight-api/highlight-text-expected.html: Added. * web-platform-tests/css/css-highlight-api/highlight-text.html: Added. Source/WebCore: Render highlights when present, similar to the way we render selection. Tests: imported/w3c/web-platform-tests/css/css-highlight-api/highlight-text-across-elements.html imported/w3c/web-platform-tests/css/css-highlight-api/highlight-text.html * Modules/highlight/HighlightMap.h: (WebCore::HighlightMap::map const): Add a getter for the internal HashMap. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::selectionState): (WebCore::InlineTextBox::verifySelectionState const): (WebCore::InlineTextBox::paint): (WebCore::InlineTextBox::clampedStartEndForState const): (WebCore::InlineTextBox::selectionStartEnd const): (WebCore::InlineTextBox::highlightStartEnd const): (WebCore::InlineTextBox::resolveStyleForMarkedText): Use the highlight name from the HighlightRangeGroup to obtain the style from the renderer. (WebCore::InlineTextBox::collectMarkedTextsForHighlights const): Render the highlights when painting text. Determine if a highlight is present in the current RenderObject, and add additional MarkedText to be rendered when painting * rendering/InlineTextBox.h: * rendering/MarkedText.cpp: (WebCore::subdivide): * rendering/MarkedText.h: (WebCore::MarkedText::operator== const): Expand MarkedText to take a style name. * rendering/SelectionRangeData.cpp: (WebCore::SelectionRangeData::setContext): (WebCore::SelectionRangeData::selectionStateForRenderer): (WebCore::SelectionRangeData::set): * rendering/SelectionRangeData.h: Leverage SelectionRangeData for highlights. Tools: Expand MarkedText to take a style name. * TestWebKitAPI/Tests/WebCore/MarkedText.cpp: (WebCore::operator<<): Canonical link: https://commits.webkit.org/218737@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-21 01:33:10 +00:00
Tests that using Highlight does not cause the document to get leaked.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS Document did not leak
PASS successfullyParsed is true
TEST COMPLETE