Fix behaviour when PreeditStyle is REVERSE 15/260515/7
authorBowon Ryu <bowon.ryu@samsung.com>
Mon, 28 Jun 2021 05:31:57 +0000 (14:31 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Thu, 1 Jul 2021 03:24:04 +0000 (12:24 +0900)
commit6217e54055ab9eb0bd2863cc4eb1e51621045792
treeed012d7b2136e7fa19211fd078d6f42dd02a8b2a
parente172c89c895d46d430b2cf0a0dbceeea0ae09b29
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
automated-tests/src/dali-toolkit-internal/utc-Dali-TextEditor-internal.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-TextField-internal.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