MarkerSubrange.SubdivideGrammarAndSelectionOverlap{Frontmost, FrontmostWithLongestEff...
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Dec 2017 19:59:35 +0000 (19:59 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Dec 2017 19:59:35 +0000 (19:59 +0000)
commit85c8cdbe5efa954732b24bb1fa1399fe7bd618c6
treeb2aa7f91ba571f981817fd9b636841e51947ae61
parent45e9384d667b46d74754e48cc1923f9baf34b596
MarkerSubrange.SubdivideGrammarAndSelectionOverlap{Frontmost, FrontmostWithLongestEffectiveRange} are failing
https://bugs.webkit.org/show_bug.cgi?id=181014

Reviewed by Simon Fraser.

Source/WebCore:

Fixes an issue in the subdivision algorithm where the returned subranges may not be paint order
or reverse paint order when using the default overlap strategy (OverlapStrategy::None) and
either OverlapStrategy::Frontmost or OverlapStrategy::FrontmostWithLongestEffectiveRange, respectively.

Currently we compute the overlapping subranges up to some point p_i on the line by sweeping from the
start of the line through all the unclosed subranges. The unclosed subranges are sorted along the line.
That is, they are not sorted by paint order or reverse paint order. Therefore we must take care to
ensure that we return the computed overlapping subranges with respect to paint order/reverse paint order.

* rendering/MarkerSubrange.cpp:
(WebCore::subdivide):

Tools:

Adds a new test to ensure we compute overlapping subranges in paint order for the default
overlap strategy. Enable tests MarkerSubrange.SubdivideGrammarAndSelectionOverlap{Frontmost, FrontmostWithLongestEffectiveRange}
now that they pass.

* TestWebKitAPI/Tests/WebCore/MarkerSubrange.cpp:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/MarkerSubrange.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/MarkerSubrange.cpp