Spannable: Add StrikethroughSpan
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / controller / text-controller-impl-model-updater.cpp
index cb21ed9..91d7eaa 100644 (file)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
+#include <dali/public-api/math/math-utils.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/text/bidirectional-support.h>
@@ -404,13 +405,13 @@ bool ControllerImplModelUpdater::Update(Controller::Impl& impl, OperationsMask o
           impl.mModel->mLogicalModel->mBackgroundColorRuns.PushBack(backgroundColorRun);
 
           Vector4 backgroundColor = impl.mModel->mVisualModel->GetBackgroundColor();
-          if(backgroundColor.a == 0) // There is no text background color.
+          if(Dali::EqualsZero(backgroundColor.a)) // There is no text background color.
           {
             // Try use the control's background color.
             if(nullptr != impl.mEditableControlInterface)
             {
               impl.mEditableControlInterface->GetControlBackgroundColor(backgroundColor);
-              if(backgroundColor.a == 0) // There is no control background color.
+              if(Dali::EqualsZero(backgroundColor.a)) // There is no control background color.
               {
                 // Determines black or white color according to text color.
                 // Based on W3C Recommendations (https://www.w3.org/TR/WCAG20/)
@@ -584,7 +585,8 @@ bool ControllerImplModelUpdater::Update(Controller::Impl& impl, OperationsMask o
     //Mark-up processor case
     if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled() ||
        impl.mModel->mLogicalModel->mUnderlineRunsUpdated ||
-       impl.mModel->mLogicalModel->mCharacterSpacingRunsUpdated)
+       impl.mModel->mLogicalModel->mCharacterSpacingRunsUpdated ||
+       impl.mModel->mLogicalModel->mStrikethroughRunsUpdated)
     {
       impl.CopyUnderlinedFromLogicalToVisualModels(true);
       impl.CopyStrikethroughFromLogicalToVisualModels();