[Tizen] Fix behaviour when PreeditStyle is REVERSE 62/265562/2 accepted/tizen/6.0/unified/20211026.160138 submit/tizen_6.0/20211026.003623
authorBowon Ryu <bowon.ryu@samsung.com>
Mon, 28 Jun 2021 05:31:57 +0000 (14:31 +0900)
committerjoogab yun <joogab.yun@samsung.com>
Fri, 22 Oct 2021 05:24:13 +0000 (05:24 +0000)
commitce6e26a1cb672068039343bb9acee782e2ecd704
tree76ac78493bb41919ce775ddf3495b8d75fd8a74d
parent9d603676dc714372786e41365a98fd332577f28d
[Tizen] Fix behaviour when PreeditStyle is REVERSE

In REVERSE case, TextColor uses text's background color.
but in most cases, there is no text's background color
and the the default alpha value is 0.
So in this case, the text is not visible. (text color's alpah value becomes 0)

To solve this, if there is no text's background, the control's color is used.
And if there is no control's color, set white or black according to the contrast.
In this case, the color is determined based on W3C recommendations.
(https://www.w3.org/TR/WCAG20/)

Change-Id: I251ec3283d761e08bb8214f4e53b0da05ad9ba4f
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Controller.cpp
dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp
dali-toolkit/internal/controls/text-controls/text-editor-impl.h
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.h
dali-toolkit/internal/text/text-controller-impl.cpp
dali-toolkit/internal/text/text-editable-control-interface.h