Cleanup: Remove AlternativeTextInfo and use Variant to represent alternative text...
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 16:31:46 +0000 (16:31 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 16:31:46 +0000 (16:31 +0000)
commit766cbd842dcf60d87712d46b6f2dc76ff475513d
tree27816470457cacb9cb350e123b31b243a28bbaa4
parent5cea34866552035311571cb813e942772fdb3903
Cleanup: Remove AlternativeTextInfo and use Variant to represent alternative text info details
https://bugs.webkit.org/show_bug.cgi?id=174604

Reviewed by Darin Adler.

Remove struct AlternativeTextInfo and represent the alternative text info as instance variables
using Variant to hold either an autocorrection replacement string or the alternative dictation
context.

Not functionality changed. So, no new tests.

* editing/AlternativeTextController.cpp: Remove header Event.h as it is ultimately included by TextEvent.h.
(WebCore::AlternativeTextController::show): Update code as needed.
(WebCore::AlternativeTextController::timerFired): Ditto.
(WebCore::AlternativeTextController::alternativeTextClient): Substitute nullptr for 0.
(WebCore::AlternativeTextController::respondToMarkerAtEndOfWord): Update code as needed.
(WebCore::AutocorrectionAlternativeDetails::create): Deleted.
(WebCore::AutocorrectionAlternativeDetails::replacementString): Deleted.
(WebCore::AutocorrectionAlternativeDetails::AutocorrectionAlternativeDetails): Deleted.
(WebCore::DictationAlternativeDetails::create): Deleted.
(WebCore::DictationAlternativeDetails::dictationContext): Deleted.
(WebCore::DictationAlternativeDetails::DictationAlternativeDetails): Deleted.
* editing/AlternativeTextController.h: Remove header Range.h and forward declare Range. Include header
Position.h and wtf/Variant.h. Sort forward declarations.
(WebCore::AlternativeTextDetails::~AlternativeTextDetails): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@219613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/AlternativeTextController.cpp
Source/WebCore/editing/AlternativeTextController.h