Merge "Add ApplyCustomFragmentPrefix" into devel/master
authorSeungho BAEK <sbsh.baek@samsung.com>
Wed, 21 Jul 2021 06:30:00 +0000 (06:30 +0000)
committerGerrit Code Review <gerrit@review>
Wed, 21 Jul 2021 06:30:00 +0000 (06:30 +0000)
177 files changed:
automated-tests/src/dali-toolkit-internal/CMakeLists.txt
automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/dbus-wrapper.cpp
automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/toolkit-text-utils.cpp
automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/toolkit-text-utils.h
automated-tests/src/dali-toolkit-internal/utc-Dali-Accessibility-Controls-BridgeUp.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Accessibility-Controls.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Accessibility-Text.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-BidirectionalSupport.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-LogicalModel.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Controller.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Cursor.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Ellipsis.cpp [new file with mode: 0755]
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Hyphen-Wrapping.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Layout.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Shaping.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-ViewModel.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-TextEditor-internal.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-TextField-internal.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-TextLabel-internal.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-VisualModel.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-VisualUrl.cpp
automated-tests/src/dali-toolkit/CMakeLists.txt
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gesture-generator.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gesture-generator.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-reflection.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-reflection.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp
automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp
automated-tests/src/dali-toolkit/utc-Dali-Image.cpp
automated-tests/src/dali-toolkit/utc-Dali-ImageUrl.cpp [new file with mode: 0644]
automated-tests/src/dali-toolkit/utc-Dali-ImageVisual.cpp
automated-tests/src/dali-toolkit/utc-Dali-KeyboardFocusManager.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
automated-tests/src/dali-toolkit/utc-Dali-Transition.cpp
automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp
dali-toolkit/dali-toolkit.h
dali-toolkit/devel-api/controls/accessible-impl.cpp
dali-toolkit/devel-api/controls/accessible-impl.h
dali-toolkit/devel-api/controls/control-devel.cpp
dali-toolkit/devel-api/controls/control-devel.h
dali-toolkit/devel-api/controls/text-controls/text-editor-devel.cpp
dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h
dali-toolkit/devel-api/controls/text-controls/text-field-devel.cpp
dali-toolkit/devel-api/controls/text-controls/text-field-devel.h
dali-toolkit/devel-api/controls/text-controls/text-label-devel.h
dali-toolkit/devel-api/controls/web-view/web-context.cpp
dali-toolkit/devel-api/controls/web-view/web-context.h
dali-toolkit/devel-api/controls/web-view/web-view.cpp
dali-toolkit/devel-api/controls/web-view/web-view.h
dali-toolkit/devel-api/focus-manager/keyboard-focus-manager-devel.cpp
dali-toolkit/devel-api/focus-manager/keyboard-focus-manager-devel.h
dali-toolkit/devel-api/text/text-enumerations-devel.h
dali-toolkit/devel-api/text/text-utils-devel.cpp
dali-toolkit/internal/controls/buttons/button-impl.cpp
dali-toolkit/internal/controls/buttons/check-box-button-impl.cpp
dali-toolkit/internal/controls/buttons/push-button-impl.cpp
dali-toolkit/internal/controls/buttons/radio-button-impl.cpp
dali-toolkit/internal/controls/buttons/toggle-button-impl.cpp
dali-toolkit/internal/controls/canvas-view/canvas-view-impl.cpp
dali-toolkit/internal/controls/control/control-data-impl.cpp
dali-toolkit/internal/controls/control/control-data-impl.h
dali-toolkit/internal/controls/image-view/image-view-impl.cpp
dali-toolkit/internal/controls/progress-bar/progress-bar-impl.cpp
dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp
dali-toolkit/internal/controls/slider/slider-impl.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/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/controls/text-controls/text-label-impl.h
dali-toolkit/internal/controls/web-view/web-view-impl.cpp
dali-toolkit/internal/controls/web-view/web-view-impl.h
dali-toolkit/internal/file.list
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h
dali-toolkit/internal/graphics/shaders/color-visual-shader.frag
dali-toolkit/internal/graphics/shaders/gradient-visual-shader.frag
dali-toolkit/internal/graphics/shaders/image-visual-shader.frag
dali-toolkit/internal/image-loader/image-url-impl.cpp [new file with mode: 0644]
dali-toolkit/internal/image-loader/image-url-impl.h [new file with mode: 0644]
dali-toolkit/internal/text/bidirectional-line-info-run.h
dali-toolkit/internal/text/bidirectional-support.cpp
dali-toolkit/internal/text/bidirectional-support.h
dali-toolkit/internal/text/input-filter.cpp [new file with mode: 0644]
dali-toolkit/internal/text/input-filter.h [new file with mode: 0644]
dali-toolkit/internal/text/layouts/layout-engine.cpp
dali-toolkit/internal/text/layouts/layout-engine.h
dali-toolkit/internal/text/line-run.h
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp
dali-toolkit/internal/text/rendering/text-typesetter.cpp
dali-toolkit/internal/text/rendering/text-typesetter.h
dali-toolkit/internal/text/rendering/view-model.cpp
dali-toolkit/internal/text/rendering/view-model.h
dali-toolkit/internal/text/text-controller-event-handler.cpp
dali-toolkit/internal/text/text-controller-impl-event-handler.cpp
dali-toolkit/internal/text/text-controller-impl.cpp
dali-toolkit/internal/text/text-controller-impl.h
dali-toolkit/internal/text/text-controller-relayouter.cpp
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/text/text-controller.h
dali-toolkit/internal/text/text-editable-control-interface.h
dali-toolkit/internal/text/text-enumerations-impl.cpp
dali-toolkit/internal/text/text-enumerations-impl.h
dali-toolkit/internal/text/text-model-interface.h
dali-toolkit/internal/text/text-model.cpp
dali-toolkit/internal/text/text-model.h
dali-toolkit/internal/text/text-view-interface.h
dali-toolkit/internal/text/text-view.cpp
dali-toolkit/internal/text/text-view.h
dali-toolkit/internal/text/visual-model-impl.cpp
dali-toolkit/internal/text/visual-model-impl.h
dali-toolkit/internal/transition/fade-impl.cpp
dali-toolkit/internal/visuals/text/text-visual.cpp
dali-toolkit/internal/visuals/texture-manager-impl.cpp
dali-toolkit/internal/visuals/texture-manager-impl.h
dali-toolkit/internal/visuals/visual-url.cpp
dali-toolkit/internal/visuals/visual-url.h
dali-toolkit/po/ar.po
dali-toolkit/po/az.po
dali-toolkit/po/bg.po
dali-toolkit/po/bn_BD.po
dali-toolkit/po/ca.po
dali-toolkit/po/cs.po
dali-toolkit/po/da.po
dali-toolkit/po/de.po
dali-toolkit/po/el_GR.po
dali-toolkit/po/en.po
dali-toolkit/po/en_US.po
dali-toolkit/po/es_ES.po
dali-toolkit/po/es_US.po
dali-toolkit/po/et.po
dali-toolkit/po/eu.po
dali-toolkit/po/fa.po
dali-toolkit/po/fi.po
dali-toolkit/po/fr.po
dali-toolkit/po/fr_CA.po
dali-toolkit/po/gl.po
dali-toolkit/po/hr.po
dali-toolkit/po/hu.po
dali-toolkit/po/hy.po
dali-toolkit/po/is.po
dali-toolkit/po/it_IT.po
dali-toolkit/po/ka.po
dali-toolkit/po/kk.po
dali-toolkit/po/ko_KR.po
dali-toolkit/po/lt.po
dali-toolkit/po/lv.po
dali-toolkit/po/mn_MN.po
dali-toolkit/po/nb.po
dali-toolkit/po/nl.po
dali-toolkit/po/pl.po
dali-toolkit/po/pt_BR.po
dali-toolkit/po/pt_PT.po
dali-toolkit/po/ro.po
dali-toolkit/po/ru_RU.po
dali-toolkit/po/sk.po
dali-toolkit/po/sl.po
dali-toolkit/po/sr.po
dali-toolkit/po/sv.po
dali-toolkit/po/tr_TR.po
dali-toolkit/po/uk.po
dali-toolkit/po/ur.po
dali-toolkit/po/uz.po
dali-toolkit/po/vi.po
dali-toolkit/po/zh_CN.po
dali-toolkit/public-api/controls/text-controls/input-filter-properties.h [new file with mode: 0644]
dali-toolkit/public-api/dali-toolkit-version.cpp
dali-toolkit/public-api/file.list
dali-toolkit/public-api/image-loader/image-url.cpp [new file with mode: 0644]
dali-toolkit/public-api/image-loader/image-url.h [new file with mode: 0644]
dali-toolkit/public-api/image-loader/image.cpp
dali-toolkit/public-api/image-loader/image.h
packaging/dali-toolkit.spec

index 0a65397..d50921c 100755 (executable)
@@ -37,6 +37,7 @@ SET(TC_SOURCES
  utc-Dali-VisualModel.cpp
  utc-Dali-VisualUrl.cpp
  utc-Dali-Text-Hyphen-Wrapping.cpp
+ utc-Dali-Text-Ellipsis.cpp
 )
 
 IF(ELDBUS_AVAILABLE)
index d59df19..9011f2f 100644 (file)
@@ -666,9 +666,11 @@ struct DefaultDBusWrapper : public DBusWrapper {
       DBUS_DEBUG( "registering interface %p (%d)", v, fallback ? 1 : 0 );
       destructors.push_back([=]() {
         DBUS_DEBUG( "unregistering interface %p", v );
+        {
+          std::lock_guard< std::mutex > lock( globalEntriesMutex );
+          globalEntries.erase( v );
+        }
         eldbus_service_interface_unregister( v );
-        std::lock_guard< std::mutex > lock( globalEntriesMutex );
-        globalEntries.erase( v );
       });
     }
   }
index 6028e02..64a8473 100755 (executable)
@@ -102,7 +102,9 @@ void CreateTextModel( const std::string& text,
                       ModelPtr& textModel,
                       MetricsPtr& metrics,
                       bool markupProcessorEnabled,
-                      LineWrap::Mode wrapMode )
+                      LineWrap::Mode wrapMode,
+                      bool ellipsisEnabled,
+                      DevelText::EllipsisPosition::Type ellipsisPosition)
 {
   textModel = Model::New(); ///< Pointer to the text's model.
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
@@ -133,6 +135,12 @@ void CreateTextModel( const std::string& text,
     utf8 = reinterpret_cast<const uint8_t*>( text.c_str() );
   }
 
+  //Ellipsis
+  textModel-> mElideEnabled = ellipsisEnabled;
+  textModel-> mVisualModel->SetTextElideEnabled(ellipsisEnabled);
+  textModel-> mEllipsisPosition = ellipsisPosition;
+  textModel-> mVisualModel->SetEllipsisPosition(ellipsisPosition);
+
   // 1) Convert to utf32
   Vector<Character>& utf32Characters = logicalModel->mText;
   utf32Characters.Resize( textSize );
@@ -323,7 +331,6 @@ void CreateTextModel( const std::string& text,
   // Set the layout parameters.
   textModel->mHorizontalAlignment = Text::HorizontalAlignment::BEGIN;
   textModel->mIgnoreSpacesAfterText = true;
-  textModel->mMatchSystemLanguageDirection = false;
   Layout::Parameters layoutParameters( textArea,
                                        textModel );
 
@@ -344,7 +351,8 @@ void CreateTextModel( const std::string& text,
   layoutEngine.LayoutText( layoutParameters,
                            layoutSize,
                            false,
-                           isAutoScroll );
+                           isAutoScroll,
+                           ellipsisPosition);
 
   if( options.align )
   {
@@ -385,7 +393,7 @@ void ConfigureTextLabel( ControllerPtr controller )
   controller->SetTextElideEnabled( true );
 
   // Disable match system language direction
-  controller->SetMatchSystemLanguageDirection(false);
+  controller->SetMatchLayoutDirection(DevelText::MatchLayoutDirection::CONTENTS);
 }
 
 void ConfigureTextField( ControllerPtr controller )
@@ -417,7 +425,7 @@ void ConfigureTextField( ControllerPtr controller )
   controller->SetTextElideEnabled( false );
 
   // Disable match system language direction
-  controller->SetMatchSystemLanguageDirection(false);
+  controller->SetMatchLayoutDirection(DevelText::MatchLayoutDirection::CONTENTS);
 }
 
 void ConfigureTextEditor( ControllerPtr controller )
@@ -449,7 +457,7 @@ void ConfigureTextEditor( ControllerPtr controller )
   controller->SetTextElideEnabled( false );
 
   // Disable match system language direction
-  controller->SetMatchSystemLanguageDirection(false);
+  controller->SetMatchLayoutDirection(DevelText::MatchLayoutDirection::CONTENTS);
 }
 
 } // namespace Text
index 6e30bbb..ccfbe98 100644 (file)
@@ -56,6 +56,9 @@ struct LayoutOptions
  * @param[out] textModel Pointer to a text model instance.
  * @param[out] metrics Pointer to a wrapper around FontClient used to get metrics.
  * @param[in] markupProcessorEnabled Enable markup processor to use markup text.
+ * @param[in] wrapMode Line wrap mode.
+ * @param[in] ellipsisEnabled Whether the ellipsis layout option is enabled.
+ * @param[in] ellipsisPosition Where is the location the text elide.
  */
 void CreateTextModel( const std::string& text,
                       const Size& textArea,
@@ -65,7 +68,9 @@ void CreateTextModel( const std::string& text,
                       ModelPtr& textModel,
                       MetricsPtr& metrics,
                       bool markupProcessorEnabled,
-                      LineWrap::Mode wrapMode );
+                      LineWrap::Mode wrapMode,
+                      bool ellipsisEnabled,
+                      DevelText::EllipsisPosition::Type ellipsisPosition);
 
 /**
  * @brief Configures the text @p controller similarly to the one configured by the text-label.
index 808cc7a..a6b682e 100644 (file)
@@ -712,7 +712,7 @@ int UtcDaliAccessibilityGetExtents(void)
   auto a = Dali::Accessibility::Accessible::Get( control );
   auto a_component = dynamic_cast<Dali::Accessibility::Component*>( a );
 
-  auto extents = a_component->GetExtents(Dali::Accessibility::CoordType::SCREEN);
+  auto extents = a_component->GetExtents(Dali::Accessibility::CoordinateType::SCREEN);
   DALI_TEST_EQUALS( extents.x, 5.0f, TEST_LOCATION );
   DALI_TEST_EQUALS( extents.y, 5.0f, TEST_LOCATION );
   DALI_TEST_EQUALS( extents.height, 10.0f, TEST_LOCATION );
@@ -728,7 +728,7 @@ int UtcDaliAccessibilityGetExtents(void)
   application.SendNotification();
   application.Render( 1 );
 
-  extents = a_component->GetExtents(Dali::Accessibility::CoordType::SCREEN);
+  extents = a_component->GetExtents(Dali::Accessibility::CoordinateType::SCREEN);
   DALI_TEST_EQUALS( extents.x, 10.0f, TEST_LOCATION );
   DALI_TEST_EQUALS( extents.y, 10.0f, TEST_LOCATION );
   DALI_TEST_EQUALS( extents.height, 10.0f, TEST_LOCATION );
@@ -1050,4 +1050,4 @@ int UtcDaliAccessibilityScrollToChildNonScrollable(void)
 
   Dali::Accessibility::TestEnableSC( false );
   END_TEST;
-}
\ No newline at end of file
+}
index dabd012..9243a0b 100644 (file)
@@ -540,9 +540,9 @@ int UtcDaliAccessibilityTextField(void)
   auto text = dynamic_cast< Dali::Accessibility::Text* >( accessible );
   DALI_TEST_CHECK( text );
   DALI_TEST_EQUALS( text->GetText( 0, 10 ), "", TEST_LOCATION );
-  DALI_TEST_EQUALS( text->SetCaretOffset(100), false, TEST_LOCATION );
-  DALI_TEST_EQUALS( text->SetCaretOffset(2), true, TEST_LOCATION );
-  DALI_TEST_EQUALS( text->GetCaretOffset(), 2, TEST_LOCATION );
+  DALI_TEST_EQUALS( text->SetCursorOffset(100), false, TEST_LOCATION );
+  DALI_TEST_EQUALS( text->SetCursorOffset(2), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( text->GetCursorOffset(), 2, TEST_LOCATION );
 
   auto editabletext = dynamic_cast< Dali::Accessibility::EditableText* >( accessible );
   DALI_TEST_CHECK( editabletext );
@@ -552,11 +552,11 @@ int UtcDaliAccessibilityTextField(void)
   DALI_TEST_EQUALS( editabletext->CutText( 1, 3 ), true, TEST_LOCATION );
   DALI_TEST_EQUALS( text->GetText( 0, 1 ), "t", TEST_LOCATION );
 
-  auto range = text->GetSelection( 1 );
+  auto range = text->GetRangeOfSelection( 1 );
   DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( range.content, "", TEST_LOCATION );
-  DALI_TEST_EQUALS( text->SetSelection( 1, 0, 1 ), false, TEST_LOCATION );
+  DALI_TEST_EQUALS( text->SetRangeOfSelection( 1, 0, 1 ), false, TEST_LOCATION );
   DALI_TEST_EQUALS( text->RemoveSelection( 1 ), false, TEST_LOCATION );
 
   DALI_TEST_EQUALS(editabletext->SetTextContents("adef"), true, TEST_LOCATION);
@@ -596,9 +596,9 @@ int UtcDaliAccessibilityTextEditor(void)
   auto text = dynamic_cast< Dali::Accessibility::Text* >( accessible );
   DALI_TEST_CHECK( text );
   DALI_TEST_EQUALS( text->GetText( 0, 10 ), "", TEST_LOCATION );
-  DALI_TEST_EQUALS( text->SetCaretOffset(100), false, TEST_LOCATION );
-  DALI_TEST_EQUALS( text->SetCaretOffset(2), true, TEST_LOCATION );
-  DALI_TEST_EQUALS( text->GetCaretOffset(), 2, TEST_LOCATION );
+  DALI_TEST_EQUALS( text->SetCursorOffset(100), false, TEST_LOCATION );
+  DALI_TEST_EQUALS( text->SetCursorOffset(2), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( text->GetCursorOffset(), 2, TEST_LOCATION );
 
   auto editabletext = dynamic_cast< Dali::Accessibility::EditableText* >( accessible );
   DALI_TEST_CHECK( editabletext );
@@ -608,11 +608,11 @@ int UtcDaliAccessibilityTextEditor(void)
   DALI_TEST_EQUALS( editabletext->CutText( 1, 3 ), true, TEST_LOCATION );
   DALI_TEST_EQUALS( text->GetText( 0, 1 ), "t", TEST_LOCATION );
 
-  auto range = text->GetSelection( 1 );
+  auto range = text->GetRangeOfSelection( 1 );
   DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( range.content, "", TEST_LOCATION );
-  DALI_TEST_EQUALS( text->SetSelection( 1, 0, 1 ), false, TEST_LOCATION );
+  DALI_TEST_EQUALS( text->SetRangeOfSelection( 1, 0, 1 ), false, TEST_LOCATION );
   DALI_TEST_EQUALS( text->RemoveSelection( 1 ), false, TEST_LOCATION );
 
   DALI_TEST_EQUALS(editabletext->SetTextContents("adef"), true, TEST_LOCATION);
@@ -650,14 +650,14 @@ int UtcDaliAccessibilityTextLabel(void)
   DALI_TEST_CHECK( text );
   DALI_TEST_EQUALS( text->GetText( 0, 10 ), "", TEST_LOCATION );
   DALI_TEST_EQUALS( text->GetText( 0, 4 ), "test", TEST_LOCATION );
-  DALI_TEST_EQUALS( text->SetCaretOffset(0), false, TEST_LOCATION );
-  DALI_TEST_EQUALS( text->GetCaretOffset(), 0, TEST_LOCATION );
+  DALI_TEST_EQUALS( text->SetCursorOffset(0), false, TEST_LOCATION );
+  DALI_TEST_EQUALS( text->GetCursorOffset(), 0, TEST_LOCATION );
 
-  auto range = text->GetSelection( 1 );
+  auto range = text->GetRangeOfSelection( 1 );
   DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( range.content, "", TEST_LOCATION );
-  DALI_TEST_EQUALS( text->SetSelection( 1, 0, 1 ), false, TEST_LOCATION );
+  DALI_TEST_EQUALS( text->SetRangeOfSelection( 1, 0, 1 ), false, TEST_LOCATION );
   DALI_TEST_EQUALS( text->RemoveSelection( 1 ), false, TEST_LOCATION );
 
   Dali::Accessibility::TestEnableSC( false );
index 7bc4fe1..6b77f00 100644 (file)
@@ -141,7 +141,7 @@ int utcDaliAccessibilityTextEditorGetTextAtOffset(void)
   END_TEST;
 }
 
-int utcDaliAccessibilityTextEditorGetSetSelection(void)
+int utcDaliAccessibilityTextEditorGetSetRangeOfSelection(void)
 {
   ToolkitTestApplication application;
 
@@ -151,14 +151,14 @@ int utcDaliAccessibilityTextEditorGetSetSelection(void)
   DALI_TEST_CHECK( x );
   if( x )
   {
-    auto range = x->GetSelection( 0 );
+    auto range = x->GetRangeOfSelection( 0 );
     DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
     DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
     DALI_TEST_EQUALS( range.content, "", TEST_LOCATION );
 
-    x->SetSelection( 0, 4, 9 );
+    x->SetRangeOfSelection( 0, 4, 9 );
     editor.SetProperty( Toolkit::TextEditor::Property::TEXT, "exemplary_text" );
-    range = x->GetSelection( 0 );
+    range = x->GetRangeOfSelection( 0 );
 
     DALI_TEST_EQUALS( range.startOffset, 4, TEST_LOCATION );
     DALI_TEST_EQUALS( range.endOffset, 9, TEST_LOCATION );
@@ -178,17 +178,17 @@ int utcDaliAccessibilityTextEditorRemoveSelection(void)
   DALI_TEST_CHECK( x );
   if( x )
   {
-    auto range = x->GetSelection( 0 );
+    auto range = x->GetRangeOfSelection( 0 );
     DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
     DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
 
-    x->SetSelection( 0, 4, 9 );
-    range = x->GetSelection( 0 );
+    x->SetRangeOfSelection( 0, 4, 9 );
+    range = x->GetRangeOfSelection( 0 );
     DALI_TEST_EQUALS( range.startOffset, 4, TEST_LOCATION );
     DALI_TEST_EQUALS( range.endOffset, 9, TEST_LOCATION );
 
     x->RemoveSelection( 0 );
-    range = x->GetSelection( 0 );
+    range = x->GetRangeOfSelection( 0 );
     DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
     DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
   }
@@ -299,7 +299,7 @@ int utcDaliAccessibilityTextFieldGetTextAtOffset(void)
   END_TEST;
 }
 
-int utcDaliAccessibilityTextFieldGetSetSelection(void)
+int utcDaliAccessibilityTextFieldGetSetRangeOfSelection(void)
 {
   ToolkitTestApplication application;
 
@@ -309,14 +309,14 @@ int utcDaliAccessibilityTextFieldGetSetSelection(void)
   DALI_TEST_CHECK( x );
   if( x )
   {
-    auto range = x->GetSelection( 0 );
+    auto range = x->GetRangeOfSelection( 0 );
     DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
     DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
     DALI_TEST_EQUALS( range.content, "", TEST_LOCATION );
 
-    x->SetSelection( 0, 4, 9 );
+    x->SetRangeOfSelection( 0, 4, 9 );
     field.SetProperty( Toolkit::TextEditor::Property::TEXT, "exemplary_text" );
-    range = x->GetSelection( 0 );
+    range = x->GetRangeOfSelection( 0 );
 
     DALI_TEST_EQUALS( range.startOffset, 4, TEST_LOCATION );
     DALI_TEST_EQUALS( range.endOffset, 9, TEST_LOCATION );
@@ -336,17 +336,17 @@ int utcDaliAccessibilityTextFieldRemoveSelection(void)
   DALI_TEST_CHECK( x );
   if( x )
   {
-    auto range = x->GetSelection( 0 );
+    auto range = x->GetRangeOfSelection( 0 );
     DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
     DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
 
-    x->SetSelection( 0, 4, 9 );
-    range = x->GetSelection( 0 );
+    x->SetRangeOfSelection( 0, 4, 9 );
+    range = x->GetRangeOfSelection( 0 );
     DALI_TEST_EQUALS( range.startOffset, 4, TEST_LOCATION );
     DALI_TEST_EQUALS( range.endOffset, 9, TEST_LOCATION );
 
     x->RemoveSelection( 0 );
-    range = x->GetSelection( 0 );
+    range = x->GetRangeOfSelection( 0 );
     DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
     DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
   }
@@ -467,17 +467,17 @@ int utcDaliAccessibilityTextLabelRemoveSelection( void )
   DALI_TEST_CHECK( x );
   if( x )
   {
-    auto range = x->GetSelection( 0 );
+    auto range = x->GetRangeOfSelection( 0 );
     DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
     DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
 
-    x->SetSelection( 0, 4, 9 );
-    range = x->GetSelection( 0 );
+    x->SetRangeOfSelection( 0, 4, 9 );
+    range = x->GetRangeOfSelection( 0 );
     DALI_TEST_EQUALS( range.startOffset, 4, TEST_LOCATION );
     DALI_TEST_EQUALS( range.endOffset, 9, TEST_LOCATION );
 
     x->RemoveSelection( 0 );
-    range = x->GetSelection( 0 );
+    range = x->GetRangeOfSelection( 0 );
     DALI_TEST_EQUALS( range.startOffset, 0, TEST_LOCATION );
     DALI_TEST_EQUALS( range.endOffset, 0, TEST_LOCATION );
   }
index de772f3..84ecd2d 100644 (file)
@@ -112,7 +112,9 @@ bool SetBidirectionalInfoTest( const SetBidirectionalInfoData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
@@ -198,7 +200,9 @@ bool GetMirroredTextTest( const GetMirroredTextData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
@@ -275,7 +279,9 @@ bool GetCharactersDirectionTest( const GetCharactersDirectionData& data )
                    textModel,
                    metrics,
                    data.markupProcessorEnabled,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
index 8515172..a95b707 100755 (executable)
@@ -119,7 +119,9 @@ bool CreateParagraphTest( const CreateParagraphData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
@@ -182,7 +184,9 @@ bool FindParagraphTest( const FindParagraphData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
@@ -234,7 +238,9 @@ bool FetchBidirectionalLineInfoTest( const FetchBidirectionalLineInfoData& data
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
@@ -281,7 +287,9 @@ bool GetLogicalCharacterIndexTest( const GetLogicalCharacterIndexData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
@@ -345,7 +353,9 @@ bool GetLogicalCursorIndexTest( const GetLogicalCursorIndexData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
index 1d394e6..bb3ed33 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -386,6 +386,50 @@ int UtcDaliTextControllerImfPreeditStyle(void)
   END_TEST;
 }
 
+int UtcDaliTextControllerImfPreeditStyleReverse(void)
+{
+  tet_infoline(" UtcDaliTextControllerImfPreeditStyleReverse");
+  ToolkitTestApplication application;
+
+  // Creates a text controller.
+  ControllerPtr controller = Controller::New();
+
+  std::string text;
+  InputMethodContext::EventData imfEvent;
+
+  DALI_TEST_CHECK(controller);
+
+  // Configures the text controller similarly to the text-field.
+  ConfigureTextField(controller);
+
+  InputMethodContext inputMethodContext = InputMethodContext::New();
+
+  // Send PRE_EDIT event
+  imfEvent = InputMethodContext::EventData(InputMethodContext::PRE_EDIT, "Reverse", 0, 7);
+  controller->OnInputMethodContextEvent(inputMethodContext, imfEvent);
+
+  // For coverage, mEditableControlInterface is required.
+  // Creates a temporary text-field to use mEditableControlInterface.
+  TextField field = TextField::New();
+  Toolkit::Internal::TextField& fieldImpl = GetImpl(field);
+  ControllerPtr fieldController = fieldImpl.GetTextController();
+  Controller::Impl& fieldControllerImpl = Controller::Impl::GetImplementation(*fieldController.Get());
+  Controller::Impl& controllerImpl = Controller::Impl::GetImplementation(*controller.Get());
+
+  // For coverage, mEditableControlInterface is required.
+  controllerImpl.mEditableControlInterface = fieldControllerImpl.mEditableControlInterface;
+
+  // Set the preedit style as REVERSE
+  inputMethodContext.SetPreeditStyle(InputMethodContext::PreeditStyle::REVERSE);
+  controller->GetNaturalSize();
+
+  controller->GetText(text);
+  DALI_TEST_EQUALS("Reverse", text, TEST_LOCATION);
+
+  tet_result(TET_PASS);
+  END_TEST;
+}
+
 int UtcDaliTextControllerTextPopupButtonTouched(void)
 {
   tet_infoline(" UtcDaliTextControllerTextPopupButtonTouched");
index 78d7cf8..377f976 100755 (executable)
@@ -112,7 +112,9 @@ bool GetClosestLineTest( const GetClosestLineData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
@@ -159,7 +161,9 @@ bool GetClosestCursorIndexTest( const GetClosestCursorIndexData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
@@ -210,7 +214,9 @@ bool GetCursorPositionTest( const GetCursorPositionData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
@@ -264,7 +270,9 @@ bool FindSelectionIndicesTest( const FindSelectionIndicesData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Ellipsis.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Ellipsis.cpp
new file mode 100755 (executable)
index 0000000..e5b8a88
--- /dev/null
@@ -0,0 +1,1848 @@
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <iostream>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <dali-toolkit-test-suite-utils.h>
+#include <dali-toolkit/dali-toolkit.h>
+#include <toolkit-text-utils.h>
+#include <dali-toolkit/internal/text/font-description-run.h>
+#include <dali-toolkit/internal/text/rendering/text-typesetter.h>
+#include <dali-toolkit/internal/text/rendering/view-model.h>
+#include <dali-toolkit/internal/text/text-controller.h>
+#include <dali-toolkit/internal/text/text-view.h>
+
+
+using namespace Dali;
+using namespace Toolkit;
+using namespace Text;
+
+
+namespace
+{
+
+  const std::string DEFAULT_FONT_DIR( "/resources/fonts" );
+
+  struct ElideData
+  {
+    std::string                                                description;
+    std::string                                                text;
+    bool                                                       isMultiLines;
+    DevelText::LineWrap::Mode                                  lineWrapMode;
+    DevelText::EllipsisPosition::Type                          ellipsisPosition;
+    bool                                                       isMarkup;
+    Vector2                                                    size;
+    unsigned int                                               numberOfLines;
+    unsigned int                                               numberOfGlyphs;
+    float*                                                     positions;
+  };
+
+
+  bool ElideTestViewModel( const ElideData& data )
+  {
+    std::cout << "  testing : " << data.description << std::endl;
+
+    // Load some fonts.
+    TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
+    fontClient.SetDpi( 93u, 93u );
+
+    char* pathNamePtr = get_current_dir_name();
+    const std::string pathName( pathNamePtr );
+    free( pathNamePtr );
+
+    fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansRegular.ttf" );
+    fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansHebrewRegular.ttf" );
+    fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansArabicRegular.ttf" );
+
+    // Creates a text controller.
+    ControllerPtr controller = Controller::New();
+
+    // Tests the rendering controller has been created.
+    TypesetterPtr typesetter = Typesetter::New( controller->GetTextModel() );
+    DALI_TEST_CHECK(typesetter);
+
+    // Tests the view model has been created.
+    ViewModel* model = typesetter->GetViewModel();
+    DALI_TEST_CHECK(model);
+
+    // Configures the text controller similarly to the text-label.
+    ConfigureTextLabel( controller );
+
+    // Sets a text and relais-out.
+    controller->SetMarkupProcessorEnabled( data.isMarkup );
+
+    controller->SetMultiLineEnabled( data.isMultiLines );
+    controller->SetLineWrapMode( (Text::LineWrap::Mode)(data.lineWrapMode) );
+    controller->SetEllipsisPosition( data.ellipsisPosition );
+
+    controller->SetText( data.text );
+    controller->Relayout( data.size );
+
+    // Elide the glyphs.
+    model->ElideGlyphs();
+
+    if( data.numberOfLines != model->GetNumberOfLines() )
+    {
+      std::cout << "  different number of lines : " << model->GetNumberOfLines() << ", expected : " << data.numberOfLines << std::endl;
+      return false;
+    }
+
+    Length numberOfGlyphs = model->GetNumberOfGlyphs();
+
+    if( data.numberOfGlyphs != numberOfGlyphs )
+    {
+      std::cout << "  different number of glyphs : " << numberOfGlyphs << ", expected : " << data.numberOfGlyphs << std::endl;
+      return false;
+    }
+
+    const Vector2* const layoutBuffer              = model->GetLayout();
+    const Length         numberOfLines             = model->GetNumberOfLines();
+    const GlyphIndex     startIndexOfGlyphs        = model->GetStartIndexOfElidedGlyphs();
+    const GlyphIndex     endIndexOfGlyphs          = model->GetEndIndexOfElidedGlyphs();
+    const GlyphIndex     firstMiddleIndexOfGlyphs  = model->GetFirstMiddleIndexOfElidedGlyphs();
+
+
+    if( numberOfLines != 0u )
+    {
+      Length   elidedLineIndex    = 0u;
+      for(Length lineIndex=0u; lineIndex < numberOfLines; lineIndex++)
+      {
+          const LineRun& tempLine         = *( model->GetLines() + elidedLineIndex);
+          if(tempLine.ellipsis)
+          {
+            elidedLineIndex = lineIndex;
+            break;
+          }
+      }
+      const LineRun& elidedLine                   = *( model->GetLines() + elidedLineIndex);
+      Length         numberOfLineGlyphs           = 0u;
+      Length         numberOfLineGlyphsSecondHalf = 0u;
+
+      switch(data.ellipsisPosition)
+      {
+        case DevelText::EllipsisPosition::START:
+        {
+          numberOfLineGlyphs = elidedLine.glyphRun.numberOfGlyphs - ( startIndexOfGlyphs - elidedLine.glyphRun.glyphIndex);
+          break;
+        }
+        case DevelText::EllipsisPosition::MIDDLE:
+        {
+          numberOfLineGlyphs = firstMiddleIndexOfGlyphs - elidedLine.glyphRun.glyphIndex +1u ;
+          break;
+        }
+        case DevelText::EllipsisPosition::END:
+        default:
+        {
+          numberOfLineGlyphs = endIndexOfGlyphs - elidedLine.glyphRun.glyphIndex + 1u;
+          break;
+        }
+      }
+
+      unsigned int index = 0u;
+      for( ; index < numberOfLineGlyphs; ++index )
+      {
+        if( *( data.positions + index ) != floor(elidedLine.alignmentOffset + ( *( layoutBuffer + index ) ).x ) )
+        {
+          std::cout << "  different layout :";
+          for( unsigned int i = 0; i < numberOfLineGlyphs; ++i )
+          {
+            std::cout << " " << floor( elidedLine.alignmentOffset + ( *( layoutBuffer + i ) ).x );
+          }
+          std::cout << std::endl;
+          std::cout << "          expected :";
+          for( unsigned int i = 0; i < numberOfLineGlyphs; ++i )
+          {
+            std::cout << " " << *( data.positions + i );
+          }
+          std::cout << std::endl;
+          return false;
+        }
+      }
+
+
+      for( ; index < numberOfLineGlyphsSecondHalf; ++index )
+      {
+        if( *( data.positions + index ) != floor(elidedLine.alignmentOffset + ( *( layoutBuffer + index ) ).x ) )
+        {
+          std::cout << "  different layout :";
+          for( unsigned int i = 0; i < numberOfLineGlyphsSecondHalf; ++i )
+          {
+            std::cout << " " << floor( elidedLine.alignmentOffset + ( *( layoutBuffer + i ) ).x );
+          }
+          std::cout << std::endl;
+          std::cout << "          expected :";
+          for( unsigned int i = 0; i < numberOfLineGlyphsSecondHalf; ++i )
+          {
+            std::cout << " " << *( data.positions + i );
+          }
+          std::cout << std::endl;
+          return false;
+        }
+      }
+
+    }
+
+    return true;
+  }
+
+  bool ElideTestTextView( const ElideData& data )
+  {
+    std::cout << "  testing : " << data.description << std::endl;
+
+    // Load some fonts.
+    TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
+    fontClient.SetDpi( 93u, 93u );
+
+    char* pathNamePtr = get_current_dir_name();
+    const std::string pathName( pathNamePtr );
+    free( pathNamePtr );
+
+    fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansRegular.ttf" );
+    fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansHebrewRegular.ttf" );
+    fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansArabicRegular.ttf" );
+
+    // Creates a text controller.
+    ControllerPtr controller = Controller::New();
+
+    if(data.isMultiLines)
+    {
+       // Configures the text controller similarly to the text-editor.
+       ConfigureTextEditor( controller );
+       controller->SetVerticalScrollEnabled( false );
+    }
+    else
+    {
+      // Configures the text controller similarly to the text-field.
+      ConfigureTextField( controller );
+    }
+
+    controller->SetDefaultFontFamily("TizenSansRegular");
+    controller->SetDefaultFontSize(12.0f, Text::Controller::POINT_SIZE);
+
+    controller->SetMultiLineEnabled( data.isMultiLines );
+    controller->SetLineWrapMode( (Text::LineWrap::Mode)(data.lineWrapMode) );
+
+    // Sets a text and relais-out.
+    controller->SetMarkupProcessorEnabled( data.isMarkup );
+
+    controller->SetTextElideEnabled( true );
+    controller->SetEllipsisPosition( data.ellipsisPosition );
+
+    controller->SetText( data.text );
+    controller->Relayout( data.size );
+
+    // Get view to elide the glyphs.
+    Text::ViewInterface& view = controller->GetView();
+
+    Length numberOfGlyphs = view.GetNumberOfGlyphs();
+
+    if(numberOfGlyphs == 0u)
+    {
+      return data.numberOfGlyphs == 0u;
+    }
+
+    Vector<GlyphInfo> glyphs;
+    glyphs.Resize(numberOfGlyphs);
+
+    Vector<Vector2> positions;
+    positions.Resize(numberOfGlyphs);
+
+    float alignmentOffset = 0u;
+    numberOfGlyphs = view.GetGlyphs(glyphs.Begin(),
+                                    positions.Begin(),
+                                    alignmentOffset,
+                                    0u,
+                                    numberOfGlyphs);
+
+    glyphs.Resize(numberOfGlyphs);
+    positions.Resize(numberOfGlyphs);
+
+
+    if( data.numberOfGlyphs != numberOfGlyphs )
+    {
+      std::cout << "  different number of glyphs : " << numberOfGlyphs << ", expected : " << data.numberOfGlyphs << std::endl;
+      return false;
+    }
+
+    // Tests the text model has been created.
+    const ModelInterface* textModel  = controller->GetTextModel();
+    DALI_TEST_CHECK(textModel);
+
+    if( data.numberOfLines != textModel->GetNumberOfLines() )
+    {
+      std::cout << "  different number of lines : " << textModel->GetNumberOfLines() << ", expected : " << data.numberOfLines << std::endl;
+      return false;
+    }
+
+    const Length     numberOfLines             = textModel->GetNumberOfLines();
+    const GlyphIndex startIndexOfGlyphs        = textModel->GetStartIndexOfElidedGlyphs();
+    const GlyphIndex endIndexOfGlyphs          = textModel->GetEndIndexOfElidedGlyphs();
+    const GlyphIndex firstMiddleIndexOfGlyphs  = textModel->GetFirstMiddleIndexOfElidedGlyphs();
+    const GlyphIndex secondMiddleIndexOfGlyphs = textModel->GetSecondMiddleIndexOfElidedGlyphs();
+
+    if( numberOfLines != 0u )
+    {
+      Length   elidedLineIndex    = 0u;
+      for(Length lineIndex=0u; lineIndex < numberOfLines; lineIndex++)
+      {
+          const LineRun& tempLine         = *( textModel->GetLines() + lineIndex);
+          if(tempLine.ellipsis)
+          {
+            elidedLineIndex = lineIndex;
+            break;
+          }
+      }
+      const LineRun& elidedLine         = *( textModel->GetLines() + elidedLineIndex);
+
+      Length         numberOfLineGlyphs           = 0u;
+      Length         numberOfLineGlyphsSecondHalf = 0u;
+
+      switch(data.ellipsisPosition)
+      {
+        case DevelText::EllipsisPosition::START:
+        {
+          numberOfLineGlyphs = elidedLine.glyphRun.numberOfGlyphs - ( startIndexOfGlyphs - elidedLine.glyphRun.glyphIndex);
+          break;
+        }
+        case DevelText::EllipsisPosition::MIDDLE:
+        {
+          numberOfLineGlyphs = firstMiddleIndexOfGlyphs == elidedLine.glyphRun.glyphIndex ? 0u : (firstMiddleIndexOfGlyphs - elidedLine.glyphRun.glyphIndex +1u);
+
+          if(elidedLine.isSplitToTwoHalves)
+          {
+            numberOfLineGlyphsSecondHalf = (elidedLine.glyphRunSecondHalf.glyphIndex + elidedLine.glyphRunSecondHalf.numberOfGlyphs) - secondMiddleIndexOfGlyphs ;
+
+          }
+          break;
+        }
+        case DevelText::EllipsisPosition::END:
+        default:
+        {
+          numberOfLineGlyphs = endIndexOfGlyphs - elidedLine.glyphRun.glyphIndex + 1u;
+          break;
+        }
+      }
+
+
+      unsigned int index = 0u;
+      for(  ; index < numberOfLineGlyphs; ++index )
+      {
+
+        if( *( data.positions + index ) != floor( elidedLine.alignmentOffset + positions[index].x ))
+        {
+          std::cout << "  different layout :";
+          for( unsigned int i = 0; i < numberOfLineGlyphs; ++i )
+          {
+            std::cout << " " << floor( elidedLine.alignmentOffset + positions[i].x );
+          }
+          std::cout << std::endl;
+          std::cout << "          expected :";
+          for( unsigned int i = 0; i < numberOfLineGlyphs; ++i )
+          {
+            std::cout << " " << *( data.positions + i );
+          }
+          std::cout << std::endl;
+          return false;
+        }
+      }
+
+      for( ; index < numberOfLineGlyphsSecondHalf; ++index )
+      {
+        if( *( data.positions + index ) != floor( elidedLine.alignmentOffset + positions[index].x ))
+        {
+          std::cout << "  different layout :";
+          for( unsigned int i = 0; i < numberOfLineGlyphsSecondHalf; ++i )
+          {
+            std::cout << " " << floor( elidedLine.alignmentOffset + positions[i].x );
+          }
+          std::cout << std::endl;
+          std::cout << "          expected :";
+          for( unsigned int i = 0; i < numberOfLineGlyphsSecondHalf; ++i )
+          {
+            std::cout << " " << *( data.positions + i );
+          }
+          std::cout << std::endl;
+          return false;
+        }
+      }
+    }
+
+    return true;
+  }
+
+}
+
+int UtcDaliTextLabelElideTextLocation(void)
+{
+  tet_infoline(" UtcDaliTextLabelElideTextLocation ");
+
+  Size textSize00( 100.f, 100.f );
+
+  Size  textSize01( 120.0f, 50.0f );
+  float positions01[] = { 0.f, 11.f, 23.f, 32.f, 42.f, 52.f, 62.f, 73.f, 83.f, 95.f };
+
+  Size  textSize02( 120.0f, 50.0f );
+  float positions02[] = { 0.f, 11.f, 23.f, 32.f, 42.f, 52.f, 62.f, 73.f, 83.f, 93.f, 103.f, 112.f, 0.f, 10.f, 22.f, 31.f, 41.f, 51.f, 61.f, 72.f, 82.f, 94.f };
+
+  Size  textSize03( 120.0f, 60.0f );
+  float positions03[] = { 0.f, 12.f, 21.f, 26.f, 30.f, 39.f, 45.f, 57.f, 61.f, 0.f, 10.f, 19.f, 29.f, 39.f, 46.f, 50.f, 66.f, 76.f, 85.f, 0.f, 15.f, 25.f, 30.f, 38.f, 48.f, 64.f, 73.f, 79.f, 93.f };
+
+  Size  textSize04( 120.0f, 60.0f );
+  float positions04[] = { 0.f, 12.f, 21.f, 26.f, 30.f, 39.f, 45.f, 57.f, 61.f, 67.f, 77.f, 86.f, 96.f, 106.f, 113.f, 0.f, 15.f, 25.f, 34.f, 39.f, 55.f, 65.f, 69.f, 78.f, 88.f, 104.f, 112.f, 0.f, 12.f, 21.f, 26.f, 30.f, 39.f, 45.f, 57.f, 61.f, 67.f, 77.f, 86.f, 98.f };
+
+  Size  textSize05( 110.0f, 60.0f );
+  float positions05[] = { 0.f, 12.f, 21.f, 26.f, 30.f, 39.f, 45.f, 57.f, 61.f, 67.f, 77.f, 0.f, 10.f, 20.f, 26.f, 31.f, 46.f, 56.f, 65.f, 70.f, 86.f, 96.f, 0.f, 8.f, 18.f, 34.f, 43.f, 49.f, 61.f, 71.f, 75.f, 81.f };
+
+  Size  textSize06( 110.0f, 60.0f );
+  float positions06[] = { 0.f, 12.f, 21.f, 26.f, 30.f, 39.f, 45.f, 57.f, 61.f, 0.f, 10.f, 19.f, 29.f, 39.f, 46.f, 50.f, 66.f, 76.f, 85.f, 0.f, 15.f, 25.f, 30.f, 38.f, 48.f, 64.f, 73.f, 81.f };
+
+  Size  textSize07( 120.0f, 50.0f );
+  float positions07[] = { 6.0f, 23.0f, 32.0f, 42.0f, 53.0f, 63.0f, 73.0f, 83.0f, 93.0f, 104.0f, 113.0f } ;
+
+  Size  textSize08( 120.0f, 50.0f );
+  float positions08[] = { 5.0f, 22.0f, 31.0f, 41.0f, 51.0f, 62.0f, 72.0f, 82.0f, 92.0f, 102.0f, 112.0f };
+
+  Size  textSize09( 120.0f, 60.0f );
+  float positions09[] = { 9.0f, 25.0f, 30.0f, 38.0f, 48.0f, 64.0f, 73.0f, 79.0f, 91.0f, 101.0f, 105.0f, 110.0f, 118.0f };
+
+  Size  textSize10( 120.0f, 60.0f );
+  float positions10[] = { 8.0f, 25.0f, 34.0f, 39.0f, 55.0f, 65.0f, 69.0f, 78.0f, 88.0f, 104.0f, 112.0f };
+
+  Size  textSize11( 100.0f, 60.0f );
+  float positions11[] = { 5.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 67.0f, 77.0f };
+
+  Size  textSize12( 100.0f, 60.0f );
+  float positions12[] = { 5.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f };
+
+  Size  textSize13( 120.0f, 60.0f );
+  float positions13[] = { 118.0f, 111.0f, 96.0f, 88.0f, 79.0f, 73.0f, 62.0f, 57.0f, 52.0f, 43.0f, 35.0f, 29.0f, 19.0f, 6.0f };
+
+  Size  textSize14( 120.0f, 60.0f );
+  float positions14[] = { 114.0f, 108.0f, 93.0f, 85.0f, 76.0f, 70.0f, 59.0f, 54.0f, 49.0f, 40.0f, 32.0f, 27.0f, 112.0f, 103.0f, 93.0f, 88.0f, 86.0f, 79.0f, 76.0f, 66.0f, 57.0f, 52.0f, 42.0f, 35.0f, 32.0f, 27.0f, 140.0f, 128.0f, 123.0f, 119.0f, 116.0f, 106.0f, 102.0f, 87.0f, 79.0f, 70.0f, 67.0f, 61.0f, 55.0f, 50.0f, 38.0f };
+
+  Size  textSize15( 110.0f, 60.0f );
+  float positions15[] = { 107.0f, 100.0f, 86.0f, 77.0f, 68.0f, 62.0f, 52.0f, 46.0f, 42.0f, 33.0f, 24.0f, 18.0f, 8.0f, 0.0f, 95.0f, 90.0f, 87.0f, 81.0f, 78.0f, 67.0f, 59.0f, 54.0f, 44.0f, 37.0f, 33.0f, 27.0f, 24.0f, 12.0f, 7.0f, 2.0f, 0.0f, 93.0f, 89.0f, 75.0f, 66.0f, 57.0f, 55.0f, 49.0f, 43.0f, 37.0f, 28.0f, 15.0f };
+
+  Size  textSize16( 110.0f, 60.0f );
+  float positions16[] = { 104.0f, 98.0f, 83.0f, 75.0f, 66.0f, 60.0f, 49.0f, 44.0f, 39.0f, 30.0f, 22.0f, 17.0f, 102.0f, 93.0f, 83.0f, 78.0f, 76.0f, 69.0f, 66.0f, 56.0f, 47.0f, 42.0f, 32.0f, 25.0f, 22.0f, 17.0f, 116.0f, 104.0f, 99.0f, 94.0f, 91.0f, 82.0f, 78.0f, 63.0f, 54.0f, 45.0f, 43.0f, 37.0f, 23.0f };
+
+  Size  textSize17( 110.0f, 60.0f );
+  float positions17[] = { 104.0f, 98.0f, 83.0f, 75.0f, 66.0f, 60.0f, 49.0f, 44.0f, 39.0f, 30.0f, 22.0f, 17.0f, 102.0f, 93.0f, 83.0f, 78.0f, 76.0f, 69.0f, 66.0f, 56.0f, 47.0f, 42.0f, 32.0f, 25.0f, 22.0f, 17.0f, 116.0f, 104.0f, 99.0f, 94.0f, 91.0f, 82.0f, 78.0f, 63.0f, 54.0f, 45.0f, 43.0f, 37.0f, 23.0f };
+
+  Size  textSize18( 120.0f, 60.0f );
+  float positions18[] = { 96.0f, 84.0f, 75.0f, 73.0f, 66.0f, 61.0f, 55.0f, 46.0f, 32.0f, 29.0f, 17.0f, 10.0f, 3.0f };
+
+  Size  textSize19( 120.0f, 60.0f );
+  float positions19[] = { 102.0f, 89.0f, 84.0f, 82.0f, 75.0f, 72.0f, 62.0f, 53.0f, 48.0f, 38.0f, 31.0f, 28.0f, 23.0f, };
+
+  Size  textSize20( 110.0f, 60.0f );
+  float positions20[] = { 89.0f, 81.0f, 78.0f, 67.0f, 59.0f, 54.0f, 44.0f, 37.0f, 33.0f, 27.0f, 24.0f, 12.0f, 7.0f, 2.0f, 0.0f };
+
+  Size  textSize21( 110.0f, 60.0f );
+  float positions21[] = { 92.0f, 79.0f, 74.0f, 72.0f, 65.0f, 62.0f, 52.0f, 43.0f, 38.0f, 28.0f, 21.0f, 18.0f, 13.0f };
+
+  Size  textSize22( 110.0f, 60.0f );
+  float positions22[] = {  92.0f, 79.0f, 74.0f, 72.0f, 65.0f, 62.0f, 52.0f, 43.0f, 38.0f, 28.0f, 21.0f, 18.0f, 13.0f };
+
+  Size  textSize23( 120.0f, 50.0f );
+  float positions23[] = { 0.0f, 11.0f, 22.0f, 33.0f, 46.0f };
+
+  Size  textSize24( 120.0f, 50.0f );
+  float positions24[] = { 0.0f, 11.0f, 23.0f, 32.0f, 42.0f, 52.0f, 62.0f, 73.0f, 83.0f, 95.0f };
+
+  Size  textSize25( 120.0f, 60.0f );
+  float positions25[] = { 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 0.0f, 10.0f, 19.0f, 29.0f, 39.0f, 46.0f, 50.0f, 68.0f };
+
+  Size  textSize26( 120.0f, 60.0f );
+  float positions26[] = { 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 67.0f, 77.0f, 86.0f, 96.0f, 106.0f, 113.0f, 0.0f, 15.0f, 25.0f, 34.0f, 39.0f, 55.0f, 65.0f, 69.0f, 78.0f, 90.0f };
+
+  Size  textSize27( 110.0f, 60.0f );
+  float positions27[] = { 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 67.0f, 77.0f, 0.0f, 10.0f, 20.0f, 26.0f, 31.0f, 46.0f, 56.0f, 65.0f, 72.0f };
+
+  Size  textSize28( 110.0f, 60.0f );
+  float positions28[] = { 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 0.0f, 10.0f, 19.0f, 29.0f, 39.0f, 46.0f, 50.0f, 68.0f };
+
+  Size  textSize29( 120.0f, 60.0f );
+  float positions29[] = { 116.0f, 109.0f, 94.0f, 86.0f, 77.0f, 71.0f, 60.0f };
+
+  Size  textSize30( 120.0f, 60.0f );
+  float positions30[] = { 114.0f, 108.0f, 93.0f, 85.0f, 76.0f, 70.0f, 59.0f, 54.0f, 49.0f, 40.0f, 32.0f, 27.0f, 112.0f, 103.0f, 93.0f, 88.0f, 86.0f, 79.0f, 76.0f, 66.0f, 57.0f, 52.0f, 33.0f };
+
+  Size  textSize31( 110.0f, 60.0f );
+  float positions31[] = { 107.0f, 100.0f, 86.0f, 77.0f, 68.0f, 62.0f, 52.0f, 46.0f, 42.0f, 33.0f, 24.0f, 18.0f, 8.0f, 0.0f, 95.0f, 90.0f, 87.0f, 81.0f, 78.0f, 67.0f, 59.0f, 54.0f, 44.0f, 37.0f, 33.0f, 27.0f, 24.0f, 9.0f};
+
+  Size  textSize32( 110.0f, 60.0f );
+  float positions32[] = {  104.0f, 98.0f, 83.0f, 75.0f, 66.0f, 60.0f, 49.0f, 44.0f, 39.0f, 30.0f, 22.0f, 17.0f, 102.0f, 93.0f, 83.0f, 78.0f, 76.0f, 69.0f, 66.0f, 56.0f, 47.0f, 42.0f, 23.0f };
+
+  Size  textSize33( 110.0f, 60.0f );
+  float positions33[] = { 104.0f, 98.0f, 83.0f, 75.0f, 66.0f, 60.0f, 49.0f, 44.0f, 39.0f, 30.0f, 22.0f, 17.0f, 102.0f, 93.0f, 83.0f, 78.0f, 76.0f, 69.0f, 66.0f, 56.0f, 47.0f, 42.0f, 23.0f };
+
+  Size  textSize34( 120.0f, 30.0f );
+  float positions34[] = { 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 67.0f, 77.0f, 86.0f, 98.0f };
+
+  Size  textSize35( 120.0f, 30.0f );
+  float positions35[] = { 2.0f, 20.0f, 29.0f, 39.0f, 44.0f, 60.0f, 69.0f, 74.0f, 83.0f, 92.0f, 108.0f };
+
+  Size  textSize36( 120.0f, 30.0f );
+  float positions36[] = { 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f };
+
+  struct ElideData data[] =
+  {
+    {
+      "void text",
+      "",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize00,
+      0u,
+      0u,
+      nullptr
+    },
+
+    {
+      "void text",
+      "",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize00,
+      0u,
+      0u,
+      nullptr
+    },
+
+    {
+      "void text",
+      "",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize00,
+      0u,
+      0u,
+      nullptr
+    },
+
+   //END LTR cases
+    {
+      "EllipsisPosition: TextLabel: Basic case SingleLine LTR END",
+      "A0123456789 B0123456789 C0123456789 D0123456789 ",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize01,
+      1u,
+      10u,
+      positions01
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Basic case Mulitlines LineWrap-WORD LTR END",
+      "A0123456789 B0123456789 C0123456789 D0123456789 ",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize02,
+      2u,
+      22u,
+      positions02
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-WORD LTR END",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize03,
+      3u,
+      29u,
+      positions03
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-CHARACTER LTR END",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::CHARACTER,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize04,
+      3u,
+      40u,
+      positions04
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-HYPHAN LTR END",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::HYPHENATION,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize05,
+      3u,
+      32u,
+      positions05
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-MIXED LTR END",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::MIXED,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize06,
+      3u,
+      28u,
+      positions06
+    },
+
+   //START LTR cases
+    {
+      "EllipsisPosition: TextLabel: Basic case SingleLine LTR START",
+      "A0123456789 B0123456789 C0123456789 D0123456789 ",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize07,
+      1u,
+      11u,
+      positions07
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Basic case Mulitlines LineWrap-WORD LTR START",
+      "A0123456789 B0123456789 C0123456789 D0123456789 ",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize08,
+      2u,
+      23u,
+      positions08
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-WORD LTR START",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize09,
+      3u,
+      33u,
+      positions09
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-CHARACTER LTR START",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::CHARACTER,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize10,
+      3u,
+      37u,
+      positions10
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-HYPHAN LTR START",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::HYPHENATION,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize11,
+      3u,
+      25u,
+      positions11
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-MIXED LTR START",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::MIXED,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize12,
+      3u,
+      25u,
+      positions12
+    },
+
+  //END RTL cases
+    {
+      "EllipsisPosition: TextLabel: SingleLine RTL END",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize13,
+      1u,
+      14u,
+      positions13
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-WORD RTL END",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize14,
+      3u,
+      41u,
+      positions14
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-CHARACTER RTL END",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::CHARACTER,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize15,
+      3u,
+      42u,
+      positions15
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-HYPHENATION RTL END",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::HYPHENATION,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize16,
+      3u,
+      39u,
+      positions16
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-MIXED RTL END",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::MIXED,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize17,
+      3u,
+      39u,
+      positions17
+    },
+
+   //START RTL cases
+    {
+      "EllipsisPosition: TextLabel: SingleLine RTL START",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize18,
+      1u,
+      13u,
+      positions18
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-WORD RTL START",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize19,
+      3u,
+      33u,
+      positions19
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-CHARACTER RTL START",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::CHARACTER,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize20,
+      3u,
+      30u,
+      positions20
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-HYPHENATION RTL START",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::HYPHENATION,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize21,
+      3u,
+      33u,
+      positions21
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-MIXED RTL START",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::MIXED,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize22,
+      3u,
+      33u,
+      positions22
+    },
+
+  //MIDDLE LTR cases
+    {
+      "EllipsisPosition: TextLabel: Basic case SingleLine LTR MIDDLE",
+      "ABCDEFGHIJKLMNPQRSTUVWXYZ abcdefghijklmnpqrstuvwxyz",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize23,
+      1u,
+      10u,
+      positions23
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Basic case Mulitlines LineWrap-WORD LTR MIDDLE",
+      "A0123456789 B0123456789 C0123456789 D0123456789 ",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize24,
+      2u,
+      22u,
+      positions24
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-WORD LTR MIDDLE",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Goodbye" ,
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize25,
+      3u,
+      24u,
+      positions25
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-CHARACTER LTR MIDDLE",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Goodbye" ,
+      true,
+      DevelText::LineWrap::CHARACTER,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize26,
+      3u,
+      36u,
+      positions26
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-HYPHAN LTR MIDDLE",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Goodbye" ,
+      true,
+      DevelText::LineWrap::HYPHENATION,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize27,
+      3u,
+      27u,
+      positions27
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-MIXED LTR MIDDLE",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Goodbye" ,
+      true,
+      DevelText::LineWrap::MIXED,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize28,
+      3u,
+      24u,
+      positions28
+    },
+
+//MIDDLE RTL cases
+    {
+      "EllipsisPosition: TextLabel: SingleLine RTL MIDDLE",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize29,
+      1u,
+      12u,
+      positions29
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-WORD RTL MIDDLE",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize30,
+      3u,
+      31u,
+      positions30
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-CHARACTER RTL MIDDLE",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::CHARACTER,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize31,
+      3u,
+      30u,
+      positions31
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-HYPHENATION RTL MIDDLE",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::HYPHENATION,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize32,
+      3u,
+      31u,
+      positions32
+    },
+
+    {
+      "EllipsisPosition: TextLabel: Mulitlines LineWrap-MIXED RTL MIDDLE",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::MIXED,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize33,
+      3u,
+      31u,
+      positions33
+    },
+
+    {
+      "EllipsisPosition: TextLabel: One-Line for Mulitlines LineWrap-WORD LTR END",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize34,
+      1u,
+      13u,
+      positions34
+    },
+
+    {
+      "EllipsisPosition: TextLabel: One-Line for Mulitlines LineWrap-WORD LTR START",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize35,
+      1u,
+      11u,
+      positions35
+    },
+
+    {
+      "EllipsisPosition: TextLabel: One-Line for Mulitlines LineWrap-WORD LTR MIDDLE",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize36,
+      1u,
+      12u,
+      positions36
+    },
+
+  };
+  const unsigned int numberOfTests = 39u;
+
+  for( unsigned int index = 0u; index < numberOfTests; ++index )
+  {
+    ToolkitTestApplication application;
+    if( !ElideTestViewModel( data[index] ) )
+    {
+      tet_result(TET_FAIL);
+    }
+  }
+
+  tet_result(TET_PASS);
+  END_TEST;
+}
+
+
+int UtcDaliTextFieldlElideTextLocation(void)
+{
+  tet_infoline(" UtcDaliTextFieldlElideTextLocation ");
+
+  Size textSize00( 100.f, 100.f );
+
+  Size  textSize01( 120.0f, 50.0f );
+  float positions01[] = { 0.0f, 11.0f, 23.0f, 32.0f, 42.0f, 52.0f, 62.0f, 73.0f, 83.0f, 95.0f };
+
+  Size  textSize02( 120.0f, 50.0f );
+  float positions02[] = { 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 67.0f, 77.0f, 86.0f, 98.0f };
+
+  Size  textSize03( 120.0f, 50.0f );
+  float positions03[] = { 118.0f, 111.0f, 97.0f, 89.0f, 80.0f, 74.0f, 63.0f, 58.0f, 53.0f, 44.0f, 35.0f, 29.0f, 20.0f, 7.0f };
+
+  Size  textSize04( 120.0f, 50.0f );
+  float positions04[] = { 6.0f, 23.0f, 32.0f, 42.0f, 53.0f, 63.0f, 73.0f, 83.0f, 93.0f, 104.0f, 113.0f };
+
+  Size  textSize05( 120.0f, 50.0f );
+  float positions05[] = { 2.0f, 20.0f, 29.0f, 39.0f, 44.0f, 60.0f, 69.0f, 74.0f, 83.0f, 92.0f, 108.0f };
+
+  Size  textSize06( 120.0f, 50.0f );
+  float positions06[] = { 99.0f, 87.0f, 78.0f, 76.0f, 69.0f, 64.0f, 58.0f, 49.0f, 35.0f, 32.0f, 20.0f, 13.0f, 6.0f };
+
+  Size  textSize07( 120.0f, 50.0f );
+  float positions07[] = { 0.0f, 11.0f, 23.0f, 32.0f, 42.0f, 57.0f, 73.0f };
+
+  Size  textSize08( 120.0f, 50.0f );
+  float positions08[] = { 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 67.0f, 77.0f, 86.0f, 98.0f };
+
+  Size  textSize09( 120.0f, 50.0f );
+  float positions09[] = { 118.0f, 111.0f, 97.0f, 89.0f, 80.0f, 74.0f, 63.0f, 58.0f, 53.0f, 44.0f, 35.0f, 29.0f, 20.0f, 7.0f };
+
+  Size  textSize10( 120.0f, 50.0f );
+  float positions10[] = { 118.0f, 113.0f, 107.0f, 102.0f, 97.0f, 92.0f, 87.0f, 82.0f, 79.0f, 72.0f, 57.0f, 49.0f, 40.0f, 34.0f, 23.0f, 11.0f };
+
+  Size  textSize11( 120.0f, 50.0f );
+  float positions11[] = { 95.0f, 78.0f, 75.0f, 64.0f, 56.0f, 49.0f, 44.0f, 39.0f, 34.0f, 29.0f, 23.0f, 18.0f, 13.0f, 8.0f, 3.0f };
+
+  Size  textSize12( 120.0f, 50.0f );
+  float positions12[] = { 113.0f, 108.0f, 103.0f, 98.0f, 93.0f, 88.0f, 83.0f, 78.0f, 74.0f, 67.0f };
+
+  struct ElideData data[] =
+  {
+    {
+      "void text",
+      "",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize00,
+      0u,
+      0u,
+      nullptr
+    },
+
+    {
+      "void text",
+      "",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize00,
+      0u,
+      0u,
+      nullptr
+    },
+
+    {
+      "void text",
+      "",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize00,
+      0u,
+      0u,
+      nullptr
+    },
+
+    {
+      "EllipsisPosition: TextField: Basic case SingleLine LTR END",
+      "A0123456789 B0123456789 C0123456789 D0123456789 ",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize01,
+      1u,
+      10u,
+      positions01
+    },
+
+    {
+      "EllipsisPosition: TextField: SingleLine LTR END",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize02,
+      1u,
+      13u,
+      positions02
+    },
+
+    {
+      "EllipsisPosition: TextField: SingleLine RTL END",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize03,
+      1u,
+      14u,
+      positions03
+    },
+
+    {
+      "EllipsisPosition: TextField: Basic case SingleLine LTR START",
+      "A0123456789 B0123456789 C0123456789 D0123456789 ",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize04,
+      1u,
+      11u,
+      positions04
+    },
+
+    {
+      "EllipsisPosition: TextField: SingleLine LTR START",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize05,
+      1u,
+      11u,
+      positions05
+    },
+
+    {
+      "EllipsisPosition: TextField: SingleLine RTL START",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize06,
+      1u,
+      13u,
+      positions06
+    },
+
+    {
+      "EllipsisPosition: TextField: Basic case SingleLine LTR MIDDLE",
+      "A0123456789 B0123456789 C0123456789 D0123456789 ",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize07,
+      1u,
+      11u,
+      positions07
+    },
+
+    {
+      "EllipsisPosition: TextField: SingleLine LTR MIDDLE",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Goodbye" ,
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize08,
+      1u,
+      13u,
+      positions08
+    },
+
+    {
+      "EllipsisPosition: TextField: SingleLine RTL MIDDLE",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize09,
+      1u,
+      12u,
+      positions09
+    },
+
+    {
+      "EllipsisPosition: TextField: Head and Tail whitespaces RTL END",
+      "        السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة         ",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize10,
+      1u,
+      16u,
+      positions10
+    },
+
+    {
+      "EllipsisPosition: TextField: Head and Tail whitespaces RTL START",
+      "        السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة         ",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize11,
+      1u,
+      15u,
+      positions11
+    },
+
+    {
+      "EllipsisPosition: TextField: Head and Tail whitespaces RTL MIDDLE",
+      "        السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة         ",
+      false,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize12,
+      1u,
+      20u,
+      positions12
+    },
+
+  };
+
+  const unsigned int numberOfTests = 15u;
+
+  for( unsigned int index = 0u; index < numberOfTests; ++index )
+  {
+    ToolkitTestApplication application;
+    if( !ElideTestTextView( data[index] ) )
+    {
+      tet_result(TET_FAIL);
+    }
+  }
+  tet_result(TET_PASS);
+  END_TEST;
+
+}
+
+
+int UtcDaliTextEditorElideTextLocation(void)
+{
+  tet_infoline(" UtcDaliTextEditorElideTextLocation ");
+
+  Size textSize00( 100.f, 100.f );
+
+  Size  textSize01( 120.0f, 50.0f );
+  float positions01[] = { 0.0f, 11.0f, 23.0f, 32.0f, 42.0f, 52.0f, 62.0f, 73.0f, 83.0f, 93.0f, 103.0f, 112.0f, 0.0f, 10.0f, 22.0f, 31.0f, 41.0f, 51.0f, 61.0f, 72.0f, 82.0f, 94.0f };
+
+  Size  textSize02( 120.0f, 60.0f );
+  float positions02[] = { 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 0.0f, 10.0f, 19.0f, 29.0f, 39.0f, 46.0f, 50.0f, 66.0f, 76.0f, 85.0f, 0.0f, 15.0f, 25.0f, 30.0f, 38.0f, 48.0f, 64.0f, 73.0f, 79.0f, 93.0f };
+
+  Size  textSize03( 120.0f, 60.0f );
+  float positions03[] = { 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 67.0f, 77.0f, 86.0f, 96.0f, 106.0f, 113.0f, 0.0f, 15.0f, 25.0f, 34.0f, 39.0f, 55.0f, 65.0f, 69.0f, 78.0f, 88.0f, 104.0f, 112.0f, 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 67.0f, 77.0f, 86.0f, 98.0f };
+
+  Size  textSize04( 110.0f, 60.0f );
+  float positions04[] = { 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 67.0f, 77.0f, 0.0f, 10.0f, 20.0f, 26.0f, 31.0f, 46.0f, 56.0f, 65.0f, 70.0f, 86.0f, 96.0f, 0.0f, 8.0f, 18.0f, 34.0f, 43.0f, 49.0f, 61.0f, 71.0f, 75.0f, 81.0f };
+
+  Size  textSize05( 110.0f, 60.0f );
+  float positions05[] = { 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 0.0f, 10.0f, 19.0f, 29.0f, 39.0f, 46.0f, 50.0f, 66.0f, 76.0f, 85.0f, 0.0f, 15.0f, 25.0f, 30.0f, 38.0f, 48.0f, 64.0f, 73.0f, 81.0f };
+
+  Size  textSize06( 120.0f, 50.0f );
+  float positions06[] = { 5.0f, 22.0f, 31.0f, 41.0f, 51.0f, 62.0f, 72.0f, 82.0f, 92.0f, 102.0f, 112.0f };
+
+  Size  textSize07( 120.0f, 60.0f );
+  float positions07[] = { 9.f, 25.f, 30.f, 38.f, 48.f, 64.f, 73.f, 79.f, 91.f, 101.f, 105.f, 110.f, 118.f };
+
+  Size  textSize08( 120.0f, 60.0f );
+  float positions08[] = { 8.f, 25.f, 34.f, 39.f, 55.f, 65.f, 69.f, 78.f, 88.f, 104.f, 112.f };
+
+  Size  textSize09( 100.0f, 60.0f );
+  float positions09[] = { 5.f, 21.f, 26.f, 30.f, 39.f, 45.f, 57.f, 61.f, 67.f, 77.f  };
+
+  Size  textSize10( 100.0f, 60.0f );
+  float positions10[] = { 5.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 67.0f, 77.0f };
+
+  Size  textSize11( 120.0f, 60.0f );
+  float positions11[] = { 119.0f, 112.0f, 98.0f, 89.0f, 80.0f, 74.0f, 63.0f, 58.0f, 53.0f, 45.0f, 36.0f, 31.0f, 112.0f, 103.0f, 93.0f };
+
+  Size  textSize12( 110.0f, 60.0f );
+  float positions12[] = { 115.0f, 108.0f, 94.0f, 85.0f, 76.0f, 70.0f, 60.0f, 54.0f, 50.0f, 41.0f, 32.0f };
+
+  Size  textSize13( 110.0f, 60.0f );
+  float positions13[] = { 113.0f, 106.0f, 92.0f, 83.0f, 74.0f, 68.0f, 58.0f, 52.0f, 48.0f, 39.0f, 30.0f, 25.0f, 106.0f };
+
+  Size  textSize14( 110.0f, 60.0f );
+  float positions14[] = { 113.0f, 106.0f, 92.0f, 83.0f, 74.0f, 68.0f, 58.0f, 52.0f, 48.0f, 39.0f, 30.0f, 25.0f, 106.0f };
+
+  Size  textSize15( 120.0f, 60.0f );
+  float positions15[] = { 125.f, 112.f, 107.f, 105.f, 98.f, 95.f, 85.f, 76.f, 71.f, 61.f, 54.f, 51.f, 46.f };
+
+  Size  textSize16( 110.0f, 60.0f );
+  float positions16[] = { 89.f, 81.f, 78.f, 67.f, 59.f, 54.f, 44.f, 37.f, 33.f, 27.f, 24.f, 12.f, 7.f, 2.f, 0.f };
+
+  Size  textSize17( 110.0f, 60.0f );
+  float positions17[] = { 105.f, 92.f, 87.f, 85.f, 78.f, 75.f, 65.f, 56.f, 51.f, 41.f, 34.f, 31.f, 26.f };
+
+  Size  textSize18( 110.0f, 60.0f );
+  float positions18[] = { 105.f, 92.f, 87.f, 85.f, 78.f, 75.f, 65.f, 56.f, 51.f, 41.f, 34.f, 31.f, 26.f };
+
+  Size  textSize19( 120.0f, 50.0f );
+  float positions19[] = { 0.f, 11.f, 23.f, 32.f, 42.f, 52.f, 62.f, 73.f, 83.f, 95.f };
+
+  Size  textSize20( 120.0f, 60.0f );
+  float positions20[] = { 0.f, 12.f, 21.f, 26.f, 30.f, 39.f, 45.f, 57.f, 61.f, 0.f, 10.f, 19.f, 29.f, 39.f, 46.f, 50.f, 68.f };
+
+  Size  textSize21( 120.0f, 60.0f );
+  float positions21[] = { 0.f, 12.f, 21.f, 26.f, 30.f, 39.f, 45.f, 57.f, 61.f, 67.f, 77.f, 86.f, 96.f, 106.f, 113.f, 0.f, 15.f, 25.f, 34.f, 39.f, 55.f, 65.f, 69.f, 78.f, 90.f };
+
+  Size  textSize22( 110.0f, 60.0f );
+  float positions22[] = { 0.f, 12.f, 21.f, 26.f, 30.f, 39.f, 45.f, 57.f, 61.f, 67.f, 77.f, 0.f, 10.f, 20.f, 26.f, 31.f, 46.f, 56.f, 65.f, 72.f };
+
+  Size  textSize23( 110.0f, 60.0f );
+  float positions23[] = { 0.f, 12.f, 21.f, 26.f, 30.f, 39.f, 45.f, 57.f, 61.f, 0.f, 10.f, 19.f, 29.f, 39.f, 46.f, 50.f, 68.f };
+
+  Size  textSize24( 120.0f, 60.0f );
+  float positions24[] = { 137.0f, 131.0f, 116.0f, 108.0f, 99.0f, 93.0f, 82.0f, 77.0f, 72.0f, 63.0f, 55.0f };
+
+  Size  textSize25( 110.0f, 60.0f );
+  float positions25[] = { 107.f, 100.f, 86.f, 77.f, 68.f, 62.f, 52.f, 46.f, 42.f, 33.f, 24.f, 18.f, 8.f, 0.f, 95.f, 90.f, 87.f, 81.f, 78.f, 67.f, 59.f, 54.f, 44.f, 37.f, 33.f, 27.f, 24.f, 9.f };
+
+  Size  textSize26( 110.0f, 60.0f );
+  float positions26[] = { 117.0f, 111.0f, 96.0f, 88.0f, 79.0f, 73.0f, 62.0f, 57.0f, 52.0f, 43.0f, 35.0f };
+
+  Size  textSize27( 110.0f, 60.0f );
+  float positions27[] = { 117.0f, 111.0f, 96.0f, 88.0f, 79.0f, 73.0f, 62.0f, 57.0f, 52.0f, 43.0f, 35.0f };
+
+  Size  textSize28( 120.0f, 30.0f );
+  float positions28[] = { 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f, 61.0f, 67.0f, 77.0f, 86.0f, 98.0f };
+
+  Size  textSize29( 120.0f, 30.0f );
+  float positions29[] = { 2.0f, 20.0f, 29.0f, 39.0f, 44.0f, 60.0f, 69.0f, 74.0f, 83.0f, 92.0f, 108.0f };
+
+  Size  textSize30( 120.0f, 30.0f );
+  float positions30[] = { 0.0f, 12.0f, 21.0f, 26.0f, 30.0f, 39.0f, 45.0f, 57.0f };
+
+
+  struct ElideData data[] =
+  {
+    {
+      "void text",
+      "",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize00,
+      0u,
+      0u,
+      nullptr
+    },
+
+    {
+      "void text",
+      "",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize00,
+      0u,
+      0u,
+      nullptr
+    },
+
+    {
+      "void text",
+      "",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize00,
+      0u,
+      0u,
+      nullptr
+    },
+
+   //END LTR cases
+
+    {
+      "EllipsisPosition: TextEditor: Basic case Mulitlines LineWrap-WORD LTR END",
+      "A0123456789 B0123456789 C0123456789 D0123456789 ",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize01,
+      2u,
+      22u,
+      positions01
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-WORD LTR END",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize02,
+      3u,
+      29u,
+      positions02
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-CHARACTER LTR END",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::CHARACTER,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize03,
+      3u,
+      40u,
+      positions03
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-HYPHAN LTR END",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::HYPHENATION,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize04,
+      3u,
+      32u,
+      positions04
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-MIXED LTR END",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::MIXED,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize05,
+      3u,
+      28u,
+      positions05
+    },
+
+   //START LTR cases
+
+    {
+      "EllipsisPosition: TextEditor: Basic case Mulitlines LineWrap-WORD LTR START",
+      "A0123456789 B0123456789 C0123456789 D0123456789 ",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize06,
+      2u,
+      23u,
+      positions06
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-WORD LTR START",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize07,
+      3u,
+      33u,
+      positions07
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-CHARACTER LTR START",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::CHARACTER,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize08,
+      3u,
+      37u,
+      positions08
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-HYPHAN LTR START",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::HYPHENATION,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize09,
+      3u,
+      25u,
+      positions09
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-MIXED LTR START",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::MIXED,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize10,
+      3u,
+      25u,
+      positions10
+    },
+
+  //END RTL cases
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-WORD RTL END",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize11,
+      3u,
+      41u,
+      positions11
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-CHARACTER RTL END",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::CHARACTER,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize12,
+      3u,
+      42u,
+      positions12
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-HYPHENATION RTL END",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::HYPHENATION,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize13,
+      3u,
+      39u,
+      positions13
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-MIXED RTL END",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::MIXED,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize14,
+      3u,
+      39u,
+      positions14
+    },
+
+   //START RTL cases
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-WORD RTL START",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize15,
+      3u,
+      33u,
+      positions15
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-CHARACTER RTL START",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::CHARACTER,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize16,
+      3u,
+      30u,
+      positions16
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-HYPHENATION RTL START",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::HYPHENATION,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize17,
+      3u,
+      33u,
+      positions17
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-MIXED RTL START",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::MIXED,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize18,
+      3u,
+      33u,
+      positions18
+    },
+
+//MIDDLE LTR cases
+
+    {
+      "EllipsisPosition: TextEditor: Basic case Mulitlines LineWrap-WORD LTR MIDDLE",
+      "A0123456789 B0123456789 C0123456789 D0123456789 ",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize19,
+      2u,
+      22u,
+      positions19
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-WORD LTR MIDDLE",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize20,
+      3u,
+      24u,
+      positions20
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-CHARACTER LTR MIDDLE",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::CHARACTER,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize21,
+      3u,
+      36u,
+      positions21
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-HYPHAN LTR MIDDLE",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::HYPHENATION,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize22,
+      3u,
+      27u,
+      positions22
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-MIXED LTR MIDDLE",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::MIXED,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize23,
+      3u,
+      24u,
+      positions23
+    },
+
+//MIDDLE RTL cases
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-WORD RTL MIDDLE",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize24,
+      3u,
+      31u,
+      positions24
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-CHARACTER RTL MIDDLE",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::CHARACTER,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize25,
+      3u,
+      30u,
+      positions25
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-HYPHENATION RTL MIDDLE",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::HYPHENATION,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize26,
+      3u,
+      31u,
+      positions26
+    },
+
+    {
+      "EllipsisPosition: TextEditor: Mulitlines LineWrap-MIXED RTL MIDDLE",
+      "السلام عليكم مرحبا اهلا هذا اختبار شكرا للمساعدة",
+      true,
+      DevelText::LineWrap::MIXED,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize27,
+      3u,
+      31u,
+      positions27
+    },
+
+    {
+      "EllipsisPosition: TextEditor: One-Line for Mulitlines LineWrap-WORD LTR END",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::END,
+      false,
+      textSize28,
+      1u,
+      13u,
+      positions28
+    },
+
+    {
+      "EllipsisPosition: TextEditor: One-Line for Mulitlines LineWrap-WORD LTR START",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::START,
+      false,
+      textSize29,
+      1u,
+      11u,
+      positions29
+    },
+
+    {
+      "EllipsisPosition: TextEditor: One-Line for Mulitlines LineWrap-WORD LTR MIDDLE",
+      "Hello Hi Experimen Welcome Hello Hi Experimen Welcome" ,
+      true,
+      DevelText::LineWrap::WORD,
+      DevelText::EllipsisPosition::MIDDLE,
+      false,
+      textSize30,
+      1u,
+      12u,
+      positions30
+    },
+
+  };
+  const unsigned int numberOfTests = 33u;
+
+  for( unsigned int index = 0u; index < numberOfTests; ++index )
+  {
+    ToolkitTestApplication application;
+    if( !ElideTestTextView( data[index] ) )
+    {
+      tet_result(TET_FAIL);
+    }
+  }
+
+  tet_result(TET_PASS);
+  END_TEST;
+}
index ccc8463..402cc40 100755 (executable)
@@ -91,7 +91,9 @@ bool LayoutTextTest( const LayoutTextData& data )
                    textModel,
                    metrics,
                    false,
-                   data.wrapMode );
+                   data.wrapMode,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   Vector<LineRun>& lines = textModel->mVisualModel->mLines;
 
@@ -157,7 +159,7 @@ int UtcDaliTextHyphenWrapping(void)
   Vector<FontDescriptionRun> fontDescriptionRuns;
   fontDescriptionRuns.PushBack( fontDescriptionRun1 );
   Size textArea(65.0f, 200.f);
-  
+
   LineRun line1 =
   {
     { 0u, 5u },
@@ -184,7 +186,7 @@ int UtcDaliTextHyphenWrapping(void)
     false,
     false
   };
-  
+
   Vector<LineRun> lines;
   lines.PushBack( line1 );
   lines.PushBack( line2 );
@@ -237,7 +239,7 @@ int UtcDaliTextMixedWrapping(void)
   Vector<FontDescriptionRun> fontDescriptionRuns;
   fontDescriptionRuns.PushBack( fontDescriptionRun1 );
   Size textArea(72.0f, 200.f);
-  
+
   LineRun line1 =
   {
     { 0u, 3u },
@@ -277,7 +279,7 @@ int UtcDaliTextMixedWrapping(void)
     false,
     false
   };
-  
+
   Vector<LineRun> lines;
   lines.PushBack( line1 );
   lines.PushBack( line2 );
index 8bdecaa..f670d49 100755 (executable)
@@ -41,21 +41,22 @@ const std::string DEFAULT_FONT_DIR( "/resources/fonts" );
 
 struct LayoutTextData
 {
-  std::string          description;
-  std::string          text;
-  Size                 textArea;
-  unsigned int         numberOfFonts;
-  FontDescriptionRun*  fontDescriptions;
-  Size                 layoutSize;
-  unsigned int         totalNumberOfGlyphs;
-  float*               positions;
-  unsigned int         numberOfLines;
-  LineRun*             lines;
-  Layout::Engine::Type layout;
-  unsigned int         startIndex;
-  unsigned int         numberOfGlyphs;
-  bool                 ellipsis:1;
-  bool                 updated:1;
+  std::string                                       description;
+  std::string                                       text;
+  Size                                              textArea;
+  unsigned int                                      numberOfFonts;
+  FontDescriptionRun*                               fontDescriptions;
+  Size                                              layoutSize;
+  unsigned int                                      totalNumberOfGlyphs;
+  float*                                            positions;
+  unsigned int                                      numberOfLines;
+  LineRun*                                          lines;
+  Layout::Engine::Type                              layout;
+  unsigned int                                      startIndex;
+  unsigned int                                      numberOfGlyphs;
+  bool                                              ellipsis:1;
+  DevelText::EllipsisPosition::Type                 ellipsisPosition;
+  bool                                              updated:1;
 };
 
 void Print( const LineRun& line )
@@ -109,7 +110,9 @@ bool LayoutTextTest( const LayoutTextData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
@@ -162,7 +165,6 @@ bool LayoutTextTest( const LayoutTextData& data )
   textModel->mHorizontalAlignment = Text::HorizontalAlignment::BEGIN;
   textModel->mLineWrapMode = LineWrap::WORD;
   textModel->mIgnoreSpacesAfterText = true;
-  textModel->mMatchSystemLanguageDirection = false;
   Layout::Parameters layoutParameters( data.textArea,
                                        textModel );
 
@@ -180,7 +182,8 @@ bool LayoutTextTest( const LayoutTextData& data )
   const bool updated = engine.LayoutText( layoutParameters,
                                           layoutSize,
                                           data.ellipsis,
-                                          isAutoScroll );
+                                          isAutoScroll,
+                                          data.ellipsisPosition );
 
   // 4) Compare the results.
 
@@ -365,7 +368,9 @@ bool AlignTest( const AlignData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
@@ -502,6 +507,7 @@ int UtcDaliTextLayoutNoText(void)
     0u,
     0u,
     false,
+    DevelText::EllipsisPosition::END,
     false
   };
 
@@ -556,6 +562,7 @@ int UtcDaliTextLayoutSmallTextArea01(void)
     0u,
     11u,
     false,
+    DevelText::EllipsisPosition::END,
     false
   };
 
@@ -627,6 +634,7 @@ int UtcDaliTextLayoutSmallTextArea02(void)
     0u,
     11u,
     false,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -775,6 +783,7 @@ int UtcDaliTextLayoutMultilineText01(void)
     0u,
     48u,
     false,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -989,6 +998,7 @@ int UtcDaliTextLayoutMultilineText02(void)
     0u,
     55u,
     false,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -1093,6 +1103,7 @@ int UtcDaliTextLayoutMultilineText03(void)
     0u,
     29u,
     false,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -1180,6 +1191,7 @@ int UtcDaliTextLayoutMultilineText04(void)
     0u,
     13u,
     false,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -1296,6 +1308,7 @@ int UtcDaliTextLayoutMultilineText05(void)
     0u,
     17u,
     false,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -1384,6 +1397,7 @@ int UtcDaliTextLayoutMultilineText06(void)
     0u,
     10u,
     false,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -1487,6 +1501,7 @@ int UtcDaliTextLayoutMultilineText07(void)
     0u,
     9u,
     false,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -2062,6 +2077,7 @@ int UtcDaliTextUpdateLayout01(void)
     0u,
     64u,
     false,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -2637,6 +2653,7 @@ int UtcDaliTextUpdateLayout02(void)
     64u,
     64u,
     false,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -3212,6 +3229,7 @@ int UtcDaliTextUpdateLayout03(void)
     128u,
     64u,
     false,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -3289,6 +3307,7 @@ int UtcDaliTextLayoutEllipsis01(void)
     0u,
     51u,
     true,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -3381,6 +3400,7 @@ int UtcDaliTextLayoutEllipsis02(void)
     0u,
     51u,
     true,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -3524,6 +3544,7 @@ int UtcDaliTextLayoutEllipsis03(void)
     0u,
     72u,
     true,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -3682,6 +3703,7 @@ int UtcDaliTextLayoutEllipsis04(void)
     0u,
     72u,
     true,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -3757,6 +3779,7 @@ int UtcDaliTextLayoutEllipsis05(void)
     0u,
     11u,
     true,
+    DevelText::EllipsisPosition::END,
     true
   };
 
@@ -5378,6 +5401,7 @@ int UtcDaliTextLayoutGetGlyphMetrics(void)
       0u,
       1u,
       false,
+      DevelText::EllipsisPosition::END,
       true
     },
     {
@@ -5395,6 +5419,7 @@ int UtcDaliTextLayoutGetGlyphMetrics(void)
       0u,
       2u,
       false,
+      DevelText::EllipsisPosition::END,
       true
     },
    {
@@ -5412,6 +5437,7 @@ int UtcDaliTextLayoutGetGlyphMetrics(void)
       0u,
       2u,
       false,
+      DevelText::EllipsisPosition::END,
       true
     }
   };
index 52c8808..8c056dd 100755 (executable)
@@ -141,7 +141,9 @@ bool ShapeInfoTest( const ShapeInfoData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
index fc4f9ac..b9de8c1 100755 (executable)
@@ -604,10 +604,10 @@ int UtcDaliTextViewModelElideText02(void)
   float positions01[] = { 0.f, 8.f, 16.f, 26.f, 34.f, 43.f, 47.f, 58.f, 64.0f };
 
   Size textSize02( 80.f, 100.f );
-  float positions02[] = { 69.f, 63.f, 58.f, 50.f, 45.f, 41.f, 32.f, 23.f, 9.f };
+  float positions02[] = { 69.f, 63.f, 58.f, 50.f, 45.f, 41.f, 32.f, 23.f, 5.f };
 
   Size textSize03( 80.f, 100.f );
-  float positions03[] = { 54.f, 47.f, 44.f, 41.f, 36.f, 29.f, 25.f, 20.f, 13.f, 8.f, 4.f, 6.f };
+  float positions03[] = { 72.f, 65.f, 61.f, 59.f, 53.f, 47.f, 43.f, 38.f, 30.f, 25.f, 21.f, 7.f };
 
   Size textSize04( 80.f, 10.f );
   float positions04[] = { 2.f };
index 09c5078..0b18d11 100755 (executable)
@@ -90,13 +90,13 @@ int UtcDaliTextEditorMarkupUnderline(void)
   uint32_t expectedNumberOfUnderlinedGlyphs = 5u;
 
   Toolkit::Internal::TextEditor& textEditorImpl = GetImpl( textEditor );
-  const Text::Length numberOfUnderlineRuns = textEditorImpl.getController()->GetTextModel()->GetNumberOfUnderlineRuns();
+  const Text::Length numberOfUnderlineRuns = textEditorImpl.GetTextController()->GetTextModel()->GetNumberOfUnderlineRuns();
 
   DALI_TEST_EQUALS( numberOfUnderlineRuns, expectedNumberOfUnderlinedGlyphs, TEST_LOCATION );
 
   Vector<GlyphRun> underlineRuns;
   underlineRuns.Resize(numberOfUnderlineRuns);
-  textEditorImpl.getController()->GetTextModel()->GetUnderlineRuns(underlineRuns.Begin(), 0u, numberOfUnderlineRuns);
+  textEditorImpl.GetTextController()->GetTextModel()->GetUnderlineRuns(underlineRuns.Begin(), 0u, numberOfUnderlineRuns);
 
   //ABC are underlined
   DALI_TEST_EQUALS( underlineRuns[0u].glyphIndex, 0u, TEST_LOCATION);
@@ -184,7 +184,7 @@ int UtcDaliTextEditorBackgroundTag(void)
   application.Render();
 
   Toolkit::Internal::TextEditor& editorImpl = GetImpl( editor );
-  const ColorIndex* const backgroundColorIndicesBuffer = editorImpl.getController()->GetTextModel()->GetBackgroundColorIndices();
+  const ColorIndex* const backgroundColorIndicesBuffer = editorImpl.GetTextController()->GetTextModel()->GetBackgroundColorIndices();
 
   DALI_TEST_CHECK( backgroundColorIndicesBuffer );
 
@@ -226,7 +226,7 @@ int UtcDaliTextEditorTextWithSpan(void)
   DALI_TEST_GREATER(spanSize.width, originalSize.width, TEST_LOCATION);
 
   Toolkit::Internal::TextEditor& editorImpl = GetImpl( editor );
-  const ColorIndex* const colorIndicesBuffer1 = editorImpl.getController()->GetTextModel()->GetColorIndices();
+  const ColorIndex* const colorIndicesBuffer1 = editorImpl.GetTextController()->GetTextModel()->GetColorIndices();
 
   DALI_TEST_CHECK( colorIndicesBuffer1 );
 
@@ -245,7 +245,7 @@ int UtcDaliTextEditorTextWithSpan(void)
   application.SendNotification();
   application.Render();
 
-  const ColorIndex* const colorIndicesBuffer2 = editorImpl.getController()->GetTextModel()->GetColorIndices();
+  const ColorIndex* const colorIndicesBuffer2 = editorImpl.GetTextController()->GetTextModel()->GetColorIndices();
 
   DALI_TEST_CHECK( colorIndicesBuffer2 );
 
@@ -262,4 +262,39 @@ int UtcDaliTextEditorTextWithSpan(void)
   DALI_TEST_EQUALS( colorIndicesBuffer2[7], 0u, TEST_LOCATION);
 
   END_TEST;
-}
\ No newline at end of file
+}
+
+int UtcDaliTextEditorControlBackgroundColor(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliTextEditorControlBackgroundColor\n");
+
+  TextEditor editor = TextEditor::New();
+  DALI_TEST_CHECK(editor);
+
+  Vector4 backgroundColor;
+
+  editor.SetProperty(TextEditor::Property::TEXT, "Background Color");
+  application.GetScene().Add(editor);
+  application.SendNotification();
+  application.Render();
+
+  Toolkit::Internal::TextEditor& editorImpl = GetImpl(editor);
+  ControllerPtr controller = editorImpl.GetTextController();
+  Controller::Impl& controllerImpl = Controller::Impl::GetImplementation(*controller.Get());
+
+  // Default color is transparent
+  controllerImpl.mEditableControlInterface->GetControlBackgroundColor(backgroundColor);
+  DALI_TEST_EQUALS(backgroundColor, Color::TRANSPARENT, TEST_LOCATION);
+
+  // Set background color to red
+  editor.SetBackgroundColor(Color::RED);
+  application.SendNotification();
+  application.Render();
+
+  // Should be red
+  controllerImpl.mEditableControlInterface->GetControlBackgroundColor(backgroundColor);
+  DALI_TEST_EQUALS(backgroundColor, Color::RED, TEST_LOCATION);
+
+  END_TEST;
+}
index 1fbc13e..7cf4084 100755 (executable)
@@ -172,13 +172,13 @@ int UtcDaliTextFieldMarkupUnderline(void)
   uint32_t expectedNumberOfUnderlinedGlyphs = 5u;
 
   Toolkit::Internal::TextField& textFieldImpl = GetImpl( textField );
-  const Text::Length numberOfUnderlineRuns = textFieldImpl.getController()->GetTextModel()->GetNumberOfUnderlineRuns();
+  const Text::Length numberOfUnderlineRuns = textFieldImpl.GetTextController()->GetTextModel()->GetNumberOfUnderlineRuns();
 
   DALI_TEST_EQUALS( numberOfUnderlineRuns, expectedNumberOfUnderlinedGlyphs, TEST_LOCATION );
 
   Vector<GlyphRun> underlineRuns;
   underlineRuns.Resize(numberOfUnderlineRuns);
-  textFieldImpl.getController()->GetTextModel()->GetUnderlineRuns(underlineRuns.Begin(), 0u, numberOfUnderlineRuns);
+  textFieldImpl.GetTextController()->GetTextModel()->GetUnderlineRuns(underlineRuns.Begin(), 0u, numberOfUnderlineRuns);
 
   //ABC are underlined
   DALI_TEST_EQUALS( underlineRuns[0u].glyphIndex, 0u, TEST_LOCATION);
@@ -268,7 +268,7 @@ int UtcDaliTextFieldBackgroundTag(void)
   application.Render();
 
   Toolkit::Internal::TextField& fieldImpl = GetImpl( field );
-  const ColorIndex* const backgroundColorIndicesBuffer = fieldImpl.getController()->GetTextModel()->GetBackgroundColorIndices();
+  const ColorIndex* const backgroundColorIndicesBuffer = fieldImpl.GetTextController()->GetTextModel()->GetBackgroundColorIndices();
 
   DALI_TEST_CHECK( backgroundColorIndicesBuffer );
 
@@ -284,6 +284,40 @@ int UtcDaliTextFieldBackgroundTag(void)
   END_TEST;
 }
 
+int UtcDaliToolkitTextFieldEllipsisInternalAPIs(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisInternalAPIs ");
+  TextField textField = TextField::New();
+
+  Toolkit::Internal::TextField& textFieldImpl = GetImpl( textField );
+  Text::ViewInterface& view = textFieldImpl.GetTextController()->GetView();
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisInternalAPIs - ELLIPSIS Disabled");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS, false);
+  DALI_TEST_EQUALS( textField.GetProperty< bool >( DevelTextField::Property::ELLIPSIS ), false, TEST_LOCATION );
+  DALI_TEST_CHECK(!(view.IsTextElideEnabled()));
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisInternalAPIs - ELLIPSIS Enabled");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS, true);
+  DALI_TEST_EQUALS( textField.GetProperty< bool >( DevelTextField::Property::ELLIPSIS ), true, TEST_LOCATION );
+  DALI_TEST_CHECK(view.IsTextElideEnabled());
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisInternalAPIs - GetStartIndexOfElidedGlyphs Default");
+  DALI_TEST_EQUALS( view.GetStartIndexOfElidedGlyphs(), 0u, TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisInternalAPIs - GetEndIndexOfElidedGlyphs Default");
+  DALI_TEST_EQUALS( view.GetEndIndexOfElidedGlyphs(), 0u, TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisInternalAPIs - GetFirstMiddleIndexOfElidedGlyphs Default");
+  DALI_TEST_EQUALS( view.GetFirstMiddleIndexOfElidedGlyphs(), 0u, TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisInternalAPIs - GetSecondMiddleIndexOfElidedGlyphs Default");
+  DALI_TEST_EQUALS( view.GetSecondMiddleIndexOfElidedGlyphs(), 0u, TEST_LOCATION );
+
+
+  END_TEST;
+}
 int UtcDaliTextFieldTextWithSpan(void)
 {
   ToolkitTestApplication application;
@@ -310,7 +344,7 @@ int UtcDaliTextFieldTextWithSpan(void)
   DALI_TEST_GREATER(spanSize.width, originalSize.width, TEST_LOCATION);
 
   Toolkit::Internal::TextField& fieldImpl = GetImpl( field );
-  const ColorIndex* const colorIndicesBuffer1 = fieldImpl.getController()->GetTextModel()->GetColorIndices();
+  const ColorIndex* const colorIndicesBuffer1 = fieldImpl.GetTextController()->GetTextModel()->GetColorIndices();
 
   DALI_TEST_CHECK( colorIndicesBuffer1 );
 
@@ -329,7 +363,7 @@ int UtcDaliTextFieldTextWithSpan(void)
   application.SendNotification();
   application.Render();
 
-  const ColorIndex* const colorIndicesBuffer2 = fieldImpl.getController()->GetTextModel()->GetColorIndices();
+  const ColorIndex* const colorIndicesBuffer2 = fieldImpl.GetTextController()->GetTextModel()->GetColorIndices();
 
   DALI_TEST_CHECK( colorIndicesBuffer2 );
 
@@ -346,4 +380,39 @@ int UtcDaliTextFieldTextWithSpan(void)
   DALI_TEST_EQUALS( colorIndicesBuffer2[7], 0u, TEST_LOCATION);
 
   END_TEST;
-}
\ No newline at end of file
+}
+
+int UtcDaliTextFieldControlBackgroundColor(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliTextFieldControlBackgroundColor\n");
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK(field);
+
+  Vector4 backgroundColor;
+
+  field.SetProperty(TextField::Property::TEXT, "Background Color");
+  application.GetScene().Add(field);
+  application.SendNotification();
+  application.Render();
+
+  Toolkit::Internal::TextField& fieldImpl = GetImpl(field);
+  ControllerPtr controller = fieldImpl.GetTextController();
+  Controller::Impl& controllerImpl = Controller::Impl::GetImplementation(*controller.Get());
+
+  // Default color is transparent
+  controllerImpl.mEditableControlInterface->GetControlBackgroundColor(backgroundColor);
+  DALI_TEST_EQUALS(backgroundColor, Color::TRANSPARENT, TEST_LOCATION);
+
+  // Set background color to red
+  field.SetBackgroundColor(Color::RED);
+  application.SendNotification();
+  application.Render();
+
+  // Should be red
+  controllerImpl.mEditableControlInterface->GetControlBackgroundColor(backgroundColor);
+  DALI_TEST_EQUALS(backgroundColor, Color::RED, TEST_LOCATION);
+
+  END_TEST;
+}
index e03fec1..b72dcb4 100755 (executable)
@@ -24,6 +24,8 @@
 #include <dali-toolkit/internal/controls/text-controls/text-label-impl.h>
 #include <dali-toolkit/internal/text/text-controller.h>
 #include <dali-toolkit/internal/text/text-controller-impl.h>
+#include <dali-toolkit/internal/text/rendering/text-typesetter.h>
+#include <dali-toolkit/internal/text/rendering/view-model.h>
 
 using namespace Dali;
 using namespace Toolkit;
@@ -47,13 +49,13 @@ int UtcDaliTextLabelMarkupUnderline(void)
   uint32_t expectedNumberOfUnderlinedGlyphs = 5u;
 
   Toolkit::Internal::TextLabel& textLabelImpl = GetImpl( textLabel );
-  const Text::Length numberOfUnderlineRuns = textLabelImpl.getController()->GetTextModel()->GetNumberOfUnderlineRuns();
+  const Text::Length numberOfUnderlineRuns = textLabelImpl.GetTextController()->GetTextModel()->GetNumberOfUnderlineRuns();
 
   DALI_TEST_EQUALS( numberOfUnderlineRuns, expectedNumberOfUnderlinedGlyphs, TEST_LOCATION );
 
   Vector<GlyphRun> underlineRuns;
   underlineRuns.Resize(numberOfUnderlineRuns);
-  textLabelImpl.getController()->GetTextModel()->GetUnderlineRuns(underlineRuns.Begin(), 0u, numberOfUnderlineRuns);
+  textLabelImpl.GetTextController()->GetTextModel()->GetUnderlineRuns(underlineRuns.Begin(), 0u, numberOfUnderlineRuns);
 
   //ABC are underlined
   DALI_TEST_EQUALS( underlineRuns[0u].glyphIndex, 0u, TEST_LOCATION);
@@ -83,7 +85,7 @@ int UtcDaliTextLabelBackgroundTag(void)
   application.Render();
 
   Toolkit::Internal::TextLabel& labelImpl = GetImpl( label );
-  const ColorIndex* const backgroundColorIndicesBuffer = labelImpl.getController()->GetTextModel()->GetBackgroundColorIndices();
+  const ColorIndex* const backgroundColorIndicesBuffer = labelImpl.GetTextController()->GetTextModel()->GetBackgroundColorIndices();
 
   DALI_TEST_CHECK( backgroundColorIndicesBuffer );
 
@@ -99,6 +101,62 @@ int UtcDaliTextLabelBackgroundTag(void)
   END_TEST;
 }
 
+int UtcDaliToolkitTextlabelEllipsisInternalAPIs(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisInternalAPIs ");
+  TextLabel textLabel = TextLabel::New();
+
+  Toolkit::Internal::TextLabel& textLabelImpl = GetImpl( textLabel );
+  const ModelInterface* const textModel = textLabelImpl.GetTextController()->GetTextModel();
+
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisInternalAPIs - ELLIPSIS Disabled");
+  textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS, false);
+  DALI_TEST_EQUALS( textLabel.GetProperty< bool >( DevelTextLabel::Property::ELLIPSIS ), false, TEST_LOCATION );
+  DALI_TEST_CHECK(!(textModel->IsTextElideEnabled()));
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisInternalAPIs - ELLIPSIS Enabled");
+  textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS, true);
+  DALI_TEST_EQUALS( textLabel.GetProperty< bool >( DevelTextLabel::Property::ELLIPSIS ), true, TEST_LOCATION );
+  DALI_TEST_CHECK(textModel->IsTextElideEnabled());
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisInternalAPIs - GetStartIndexOfElidedGlyphs Default");
+  DALI_TEST_EQUALS( textModel->GetStartIndexOfElidedGlyphs(), 0u, TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisInternalAPIs - GetEndIndexOfElidedGlyphs Default");
+  DALI_TEST_EQUALS( textModel->GetEndIndexOfElidedGlyphs(), 0u, TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisInternalAPIs - GetFirstMiddleIndexOfElidedGlyphs Default");
+  DALI_TEST_EQUALS( textModel->GetFirstMiddleIndexOfElidedGlyphs(), 0u, TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisInternalAPIs - GetSecondMiddleIndexOfElidedGlyphs Default");
+  DALI_TEST_EQUALS( textModel->GetSecondMiddleIndexOfElidedGlyphs(), 0u, TEST_LOCATION );
+
+  // Tests the rendering controller has been created.
+  TypesetterPtr typesetter = Typesetter::New( textModel );
+  DALI_TEST_CHECK(typesetter);
+
+  // Tests the view model has been created.
+  ViewModel* model = typesetter->GetViewModel();
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisInternalAPIs - IsTextElideEnabled ViewModel");
+  DALI_TEST_CHECK(model->IsTextElideEnabled());
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisInternalAPIs - GetStartIndexOfElidedGlyphs ViewModel");
+  DALI_TEST_EQUALS( model->GetStartIndexOfElidedGlyphs(), 0u, TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisInternalAPIs - GetEndIndexOfElidedGlyphs ViewModel");
+  DALI_TEST_EQUALS( model->GetEndIndexOfElidedGlyphs(), 0u, TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisInternalAPIs - GetFirstMiddleIndexOfElidedGlyphs ViewModel");
+  DALI_TEST_EQUALS( model->GetFirstMiddleIndexOfElidedGlyphs(), 0u, TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisInternalAPIs - GetSecondMiddleIndexOfElidedGlyphs ViewModel");
+  DALI_TEST_EQUALS( model->GetSecondMiddleIndexOfElidedGlyphs(), 0u, TEST_LOCATION );
+
+  END_TEST;
+}
 int UtcDaliTextLabelTextWithSpan(void)
 {
   ToolkitTestApplication application;
@@ -125,7 +183,7 @@ int UtcDaliTextLabelTextWithSpan(void)
   DALI_TEST_GREATER(spanSize.width, originalSize.width, TEST_LOCATION);
 
   Toolkit::Internal::TextLabel& labelImpl = GetImpl( label );
-  const ColorIndex* const colorIndicesBuffer1 = labelImpl.getController()->GetTextModel()->GetColorIndices();
+  const ColorIndex* const colorIndicesBuffer1 = labelImpl.GetTextController()->GetTextModel()->GetColorIndices();
 
   DALI_TEST_CHECK( colorIndicesBuffer1 );
 
@@ -144,7 +202,7 @@ int UtcDaliTextLabelTextWithSpan(void)
   application.SendNotification();
   application.Render();
 
-  const ColorIndex* const colorIndicesBuffer2 = labelImpl.getController()->GetTextModel()->GetColorIndices();
+  const ColorIndex* const colorIndicesBuffer2 = labelImpl.GetTextController()->GetTextModel()->GetColorIndices();
 
   DALI_TEST_CHECK( colorIndicesBuffer2 );
 
@@ -161,4 +219,4 @@ int UtcDaliTextLabelTextWithSpan(void)
   DALI_TEST_EQUALS( colorIndicesBuffer2[7], 0u, TEST_LOCATION);
 
   END_TEST;
-}
\ No newline at end of file
+}
index 43157ff..2453771 100644 (file)
@@ -80,7 +80,9 @@ bool SetGlyphsPerCharacterTest( const SetGlyphsPerCharacterData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
@@ -165,7 +167,9 @@ bool SetCharacterToGlyphTest( const SetCharacterToGlyphData& data )
                    textModel,
                    metrics,
                    false,
-                   LineWrap::WORD );
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
index 962ad8e..c57ec89 100644 (file)
@@ -42,6 +42,18 @@ int UtcDaliVisualUrlConstructor(void)
   DALI_TEST_EQUALS( true, visualUrl3.IsValid(), TEST_LOCATION );
   DALI_TEST_EQUALS( visualUrl3.GetType(), VisualUrl::GIF, TEST_LOCATION );
   DALI_TEST_EQUALS( visualUrl3.GetProtocolType(), VisualUrl::LOCAL, TEST_LOCATION );
+
+  VisualUrl visualUrl4("dali://0");
+  visualUrl4 = visualUrl;
+  DALI_TEST_EQUALS( true, visualUrl4.IsValid(), TEST_LOCATION );
+  DALI_TEST_EQUALS( visualUrl4.GetType(), VisualUrl::GIF, TEST_LOCATION );
+  DALI_TEST_EQUALS( visualUrl4.GetProtocolType(), VisualUrl::LOCAL, TEST_LOCATION );
+
+  VisualUrl visualUrl5("dali://1");
+  visualUrl4 = visualUrl5;
+  DALI_TEST_EQUALS( true, visualUrl4.IsValid(), TEST_LOCATION );
+  DALI_TEST_EQUALS( visualUrl4.GetType(), VisualUrl::REGULAR_IMAGE, TEST_LOCATION );
+  DALI_TEST_EQUALS( visualUrl4.GetProtocolType(), VisualUrl::TEXTURE, TEST_LOCATION );
   END_TEST;
 }
 
index 9b2691c..0e984f0 100755 (executable)
@@ -26,6 +26,7 @@ SET(TC_SOURCES
   utc-Dali-Image.cpp
   utc-Dali-ImageView.cpp
   utc-Dali-ImageVisual.cpp
+  utc-Dali-ImageUrl.cpp
   utc-Dali-JsonParser.cpp
   utc-Dali-KeyInputFocusManager.cpp
   utc-Dali-PageTurnView.cpp
index 4b465a7..4532c6e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -149,16 +149,23 @@ void TestEndPan(TestApplication& application, Vector2 pos, uint32_t time)
   application.ProcessEvent(GenerateSingleTouch(PointState::UP, pos, time));
 }
 
+void TestTriggerTap(TestApplication& application)
+{
+  application.GetPlatform().TriggerTimer();
+}
+
 void TestGenerateTap(TestApplication& application, float x, float y, uint32_t time_down)
 {
   application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(x, y), time_down));
   application.ProcessEvent(GenerateSingleTouch(PointState::UP, Vector2(x, y), time_down + 20));
+  TestTriggerTap(application);
 }
 
 void TestGenerateTwoPointTap(TestApplication& application, float x1, float y1, float x2, float y2, uint32_t time_down)
 {
   application.ProcessEvent(GenerateDoubleTouch(PointState::DOWN, Vector2(x1, y1), PointState::DOWN, Vector2(x2, y2), time_down));
   application.ProcessEvent(GenerateDoubleTouch(PointState::UP, Vector2(x1, y1), PointState::UP, Vector2(x2, y2), time_down + 20));
+  TestTriggerTap(application);
 }
 
 void TestGenerateRotation(TestApplication& application)
index e6e367d..cb3b1a6 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TEST_GESTURE_GENERATOR_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -94,6 +94,11 @@ void TestMovePan(TestApplication& application, Vector2 pos, uint32_t time = 400)
 void TestEndPan(TestApplication& application, Vector2 pos, uint32_t time = 500);
 
 /**
+ * Triggers the timer to begin a tap gesture
+ */
+void TestTriggerTap(TestApplication& application);
+
+/**
  * Produces a single point tap gesture with a 20ms interval
  */
 void TestGenerateTap(TestApplication& application, float x = 20.0f, float y = 20.0f, uint32_t time_down = 100);
index d59f29f..8493992 100644 (file)
@@ -240,9 +240,10 @@ bool TestGraphicsReflection::GetNamedUniform(const std::string& name, Dali::Grap
   return true;
 }
 
-std::vector<Dali::Graphics::UniformInfo> TestGraphicsReflection::GetSamplers() const
+const std::vector<Dali::Graphics::UniformInfo>& TestGraphicsReflection::GetSamplers() const
 {
-  return std::vector<Dali::Graphics::UniformInfo>{};
+  static std::vector<Dali::Graphics::UniformInfo> samplers{};
+  return samplers;
 }
 
 Graphics::ShaderLanguage TestGraphicsReflection::GetLanguage() const
index 7af052e..2147cae 100644 (file)
@@ -28,22 +28,22 @@ class TestGraphicsReflection : public Graphics::Reflection
 public:
   TestGraphicsReflection(TestGlAbstraction& gl, Property::Array& vertexFormats, const Graphics::ProgramCreateInfo& createInfo, std::vector<UniformData>& customUniforms);
 
-  uint32_t                                   GetVertexAttributeLocation(const std::string& name) const override;
-  Dali::Graphics::VertexInputAttributeFormat GetVertexAttributeFormat(uint32_t location) const override;
-  std::string                                GetVertexAttributeName(uint32_t location) const override;
-  std::vector<uint32_t>                      GetVertexAttributeLocations() const override;
-  uint32_t                                   GetUniformBlockCount() const override;
-  uint32_t                                   GetUniformBlockBinding(uint32_t index) const override;
-  uint32_t                                   GetUniformBlockSize(uint32_t index) const override;
-  bool                                       GetUniformBlock(uint32_t index, Dali::Graphics::UniformBlockInfo& out) const override;
-  std::vector<uint32_t>                      GetUniformBlockLocations() const override;
-  std::string                                GetUniformBlockName(uint32_t blockIndex) const override;
-  uint32_t                                   GetUniformBlockMemberCount(uint32_t blockIndex) const override;
-  std::string                                GetUniformBlockMemberName(uint32_t blockIndex, uint32_t memberLocation) const override;
-  uint32_t                                   GetUniformBlockMemberOffset(uint32_t blockIndex, uint32_t memberLocation) const override;
-  bool                                       GetNamedUniform(const std::string& name, Dali::Graphics::UniformInfo& out) const override;
-  std::vector<Dali::Graphics::UniformInfo>   GetSamplers() const override;
-  Graphics::ShaderLanguage                   GetLanguage() const override;
+  uint32_t                                        GetVertexAttributeLocation(const std::string& name) const override;
+  Dali::Graphics::VertexInputAttributeFormat      GetVertexAttributeFormat(uint32_t location) const override;
+  std::string                                     GetVertexAttributeName(uint32_t location) const override;
+  std::vector<uint32_t>                           GetVertexAttributeLocations() const override;
+  uint32_t                                        GetUniformBlockCount() const override;
+  uint32_t                                        GetUniformBlockBinding(uint32_t index) const override;
+  uint32_t                                        GetUniformBlockSize(uint32_t index) const override;
+  bool                                            GetUniformBlock(uint32_t index, Dali::Graphics::UniformBlockInfo& out) const override;
+  std::vector<uint32_t>                           GetUniformBlockLocations() const override;
+  std::string                                     GetUniformBlockName(uint32_t blockIndex) const override;
+  uint32_t                                        GetUniformBlockMemberCount(uint32_t blockIndex) const override;
+  std::string                                     GetUniformBlockMemberName(uint32_t blockIndex, uint32_t memberLocation) const override;
+  uint32_t                                        GetUniformBlockMemberOffset(uint32_t blockIndex, uint32_t memberLocation) const override;
+  bool                                            GetNamedUniform(const std::string& name, Dali::Graphics::UniformInfo& out) const override;
+  const std::vector<Dali::Graphics::UniformInfo>& GetSamplers() const override;
+  Graphics::ShaderLanguage                        GetLanguage() const override;
 
 public: // Test methods
   void SetAttributes(std::vector<std::string> locations)
index 33a27b5..2ccf2c1 100755 (executable)
@@ -52,6 +52,7 @@ public:
     mDelayTime(0),
     mDroppedFrames(0),
     mFrameRate( 60.0f ),
+    mTestFrameDrop(false),
     mNeedDroppedFrames(false),
     mEventThreadCallback( new EventThreadCallback( MakeCallback( this, &VectorAnimationRenderer::OnTriggered ) ) )
   {
@@ -79,6 +80,7 @@ public:
     {
       // Change total frame number for test
       mTotalFrameNumber = 200;
+      mTestFrameDrop = true;
     }
     return true;
   }
@@ -112,10 +114,10 @@ public:
 
   bool Render( uint32_t frameNumber )
   {
-    if(mDelayTime != 0)
+    if(mTestFrameDrop)
     {
       std::this_thread::sleep_for(std::chrono::milliseconds(static_cast<int32_t>(mDelayTime)));
-      mDelayTime = 0;
+      mTestFrameDrop = false;
       mNeedDroppedFrames = true;
     }
     else if(mNeedDroppedFrames)
@@ -199,6 +201,7 @@ public:
   uint32_t mDelayTime;
   uint32_t mDroppedFrames;
   float mFrameRate;
+  bool mTestFrameDrop;
   bool mNeedDroppedFrames;
   Dali::VectorAnimationRenderer::UploadCompletedSignalType mUploadCompletedSignal;
   std::unique_ptr< EventThreadCallback > mEventThreadCallback;
index b30d3b6..e6f47a8 100755 (executable)
@@ -118,6 +118,22 @@ public:
 
   void SetProxyUri( const std::string& uri ) override
   {
+    mockProxyUri = uri;
+  }
+
+  std::string GetProxyUri() const override
+  {
+    return mockProxyUri;
+  }
+
+  void SetProxyBypassRule(const std::string& proxy, const std::string& bypass) override
+  {
+    mockBypassRule = bypass;
+  }
+
+  std::string GetProxyBypassRule() const override
+  {
+    return mockBypassRule;
   }
 
   void SetDefaultProxyAuth( const std::string& username, const std::string& password ) override
@@ -126,6 +142,12 @@ public:
 
   void SetCertificateFilePath( const std::string& certificatePath ) override
   {
+    mockCertificateFilePath = certificatePath;
+  }
+
+  std::string GetCertificateFilePath() const override
+  {
+    return mockCertificateFilePath;
   }
 
   void DeleteAllWebDatabase() override
@@ -218,36 +240,32 @@ public:
 
   void EnableCache( bool cacheEnabled ) override
   {
+    mockCacheEnabled = cacheEnabled;
   }
 
   bool IsCacheEnabled() const override
   {
-    return true;
+    return mockCacheEnabled;
   }
 
-  std::string GetContextCertificateFile() const override
+  void SetAppId(const std::string& appID) override
   {
-    return "test";
   }
 
-  void SetContextAppId(const std::string& appID) override
-  {
-  }
-
-  bool SetContextAppVersion(const std::string& appVersion) override
+  bool SetAppVersion(const std::string& appVersion) override
   {
     return true;
   }
 
-  void SetContextApplicationType(const Dali::WebEngineContext::ApplicationType applicationType) override
+  void SetApplicationType(const Dali::WebEngineContext::ApplicationType applicationType) override
   {
   }
 
-  void SetContextTimeOffset(float timeOffset) override
+  void SetTimeOffset(float timeOffset) override
   {
   }
 
-  void SetContextTimeZoneOffset(float timeZoneOffset, float daylightSavingTime) override
+  void SetTimeZoneOffset(float timeZoneOffset, float daylightSavingTime) override
   {
   }
 
@@ -261,11 +279,12 @@ public:
 
   void SetDefaultZoomFactor(float zoomFactor) override
   {
+    mockZoomFactor = zoomFactor;
   }
 
-  float GetContextDefaultZoomFactor() const override
+  float GetDefaultZoomFactor() const override
   {
-    return 0;
+    return mockZoomFactor;
   }
 
   bool DeleteAllApplicationCache() override
@@ -290,20 +309,6 @@ public:
   {
   }
 
-  std::string GetContextProxy() const override
-  {
-    return "test";
-  }
-
-  void SetContextProxy(const std::string& proxy, const std::string& bypass) override
-  {
-  }
-
-  std::string GetProxyBypassRule() const override
-  {
-    return "test";
-  }
-
   bool FreeUnusedMemory() override
   {
     return true;
@@ -318,6 +323,11 @@ public:
 
 private:
   Dali::WebEngineContext::CacheModel mockModel;
+  std::string                        mockProxyUri;
+  std::string                        mockBypassRule;
+  std::string                        mockCertificateFilePath;
+  bool                               mockCacheEnabled;
+  float                              mockZoomFactor;
 };
 
 class MockWebEngineCookieManager : public Dali::WebEngineCookieManager
@@ -751,11 +761,6 @@ public:
     return result;
   }
 
-  Dali::Vector2 GetPosition() const override
-  {
-    return Dali::Vector2(100, 100);
-  }
-
   bool RemoveItem(WebEngineContextMenuItem& item) override
   {
     return true;
@@ -1148,8 +1153,6 @@ class WebEngine: public Dali::BaseObject
 {
 public:
 
-  using JavaScriptEvaluatedResultCallback = std::function<void(const std::string&)>;
-
   WebEngine()
     : mUrl()
     , mCurrentPlusOnePos( 0 )
@@ -1217,7 +1220,7 @@ public:
     ConnectToGlobalSignal( &OnLoadUrl );
   }
 
-  const std::string& GetUrl() const
+  std::string GetUrl() const
   {
     return mUrl;
   }
@@ -1325,7 +1328,7 @@ public:
     ConnectToGlobalSignal( &OnClearHistory );
   }
 
-  const std::string& GetUserAgent() const
+  std::string GetUserAgent() const
   {
     return mUserAgent;
   }
@@ -1449,84 +1452,84 @@ public:
     }
   }
 
-  Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadStartedSignal()
+  Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& FrameRenderedSignal()
   {
-    return mPageLoadStartedSignal;
+    return mFrameRenderedSignal;
   }
 
-  Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadInProgressSignal()
+  void RegisterPageLoadStartedCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback)
   {
-    return mPageLoadInProgressSignal;
+    mPageLoadStartedCallback = callback;
   }
 
-  Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadFinishedSignal()
+  void RegisterPageLoadInProgressCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback)
   {
-    return mPageLoadFinishedSignal;
+    mPageLoadInProgressCallback = callback;
   }
 
-  Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType& PageLoadErrorSignal()
+  void RegisterPageLoadFinishedCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback)
   {
-    return mPageLoadErrorSignal;
+    mPageLoadFinishedCallback = callback;
   }
 
-  Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType& ScrollEdgeReachedSignal()
+  void RegisterPageLoadErrorCallback(Dali::WebEnginePlugin::WebEnginePageLoadErrorCallback callback)
   {
-    return mScrollEdgeReachedSignal;
+    mPageLoadErrorCallback = callback;
   }
 
-  Dali::WebEnginePlugin::WebEngineUrlChangedSignalType& UrlChangedSignal()
+  void RegisterScrollEdgeReachedCallback(Dali::WebEnginePlugin::WebEngineScrollEdgeReachedCallback callback)
   {
-    return mUrlChangedSignal;
+    mScrollEdgeReachedCallback = callback;
   }
 
-  Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType& FormRepostDecisionSignal()
+  void RegisterUrlChangedCallback(Dali::WebEnginePlugin::WebEngineUrlChangedCallback callback)
   {
-    return mFormRepostDecisionSignal;
+    mUrlChangedCallback = callback;
   }
 
-  Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& FrameRenderedSignal()
+  void RegisterFormRepostDecidedCallback(Dali::WebEnginePlugin::WebEngineFormRepostDecidedCallback callback)
   {
-    return mFrameRenderedSignal;
+    mFormRepostDecidedCallback = callback;
   }
 
-  Dali::WebEnginePlugin::WebEngineRequestInterceptorSignalType& RequestInterceptorSignal()
+  void RegisterRequestInterceptorCallback(Dali::WebEnginePlugin::WebEngineRequestInterceptorCallback callback)
   {
-    return mRequestInterceptorSignal;
+    mRequestInterceptorCallback = callback;
   }
 
-  Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType& ConsoleMessageSignal()
+  void RegisterConsoleMessageReceivedCallback(Dali::WebEnginePlugin::WebEngineConsoleMessageReceivedCallback callback)
   {
-    return mConsoleMessageSignal;
+    mConsoleMessageCallback = callback;
   }
 
-  Dali::WebEnginePlugin::WebEngineResponsePolicyDecisionSignalType& ResponsePolicyDecisionSignal()
+  void RegisterResponsePolicyDecidedCallback(Dali::WebEnginePlugin::WebEngineResponsePolicyDecidedCallback callback)
   {
-    return mResponsePolicyDecisionSignal;
+    mResponsePolicyDecisionCallback = callback;
   }
 
-  Dali::WebEnginePlugin::WebEngineCertificateSignalType& CertificateConfirmSignal()
+  void RegisterCertificateConfirmedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback)
   {
-    return mCertificateConfirmSignal;
+    mCertificateConfirmCallback = callback;
   }
 
-  Dali::WebEnginePlugin::WebEngineCertificateSignalType& SslCertificateChangedSignal()
+  void RegisterSslCertificateChangedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback)
   {
-    return mSslCertificateChangedSignal;
+    mSslCertificateChangedCallback = callback;
   }
 
-  Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType& HttpAuthHandlerSignal()
+  void RegisterHttpAuthHandlerCallback(Dali::WebEnginePlugin::WebEngineHttpAuthHandlerCallback callback)
   {
-    return mHttpAuthHandlerSignal;
+    mHttpAuthHandlerCallback = callback;
   }
 
-  Dali::WebEnginePlugin::WebEngineContextMenuCustomizedSignalType& ContextMenuCustomizedSignal()
+  void RegisterContextMenuShownCallback(Dali::WebEnginePlugin::WebEngineContextMenuShownCallback callback)
   {
-    return mContextMenuCustomizedSignal;
+    mContextMenuShownCallback = callback;
   }
 
-  Dali::WebEnginePlugin::WebEngineContextMenuItemSelectedSignalType& ContextMenuItemSelectedSignal()
+  void RegisterContextMenuHiddenCallback(Dali::WebEnginePlugin::WebEngineContextMenuHiddenCallback callback)
   {
-    return mContextMenuItemSelectedSignal;
+    mContextMenuHiddenCallback = callback;
   }
 
   std::string              mUrl;
@@ -1534,22 +1537,7 @@ public:
   size_t                   mCurrentPlusOnePos;
   std::string              mUserAgent;
 
-  Dali::WebEnginePlugin::WebEnginePageLoadSignalType                mPageLoadStartedSignal;
-  Dali::WebEnginePlugin::WebEnginePageLoadSignalType                mPageLoadInProgressSignal;
-  Dali::WebEnginePlugin::WebEnginePageLoadSignalType                mPageLoadFinishedSignal;
-  Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType           mPageLoadErrorSignal;
-  Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType       mScrollEdgeReachedSignal;
-  Dali::WebEnginePlugin::WebEngineUrlChangedSignalType              mUrlChangedSignal;
-  Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType      mFormRepostDecisionSignal;
-  Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType           mFrameRenderedSignal;
-  Dali::WebEnginePlugin::WebEngineRequestInterceptorSignalType      mRequestInterceptorSignal;
-  Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType          mConsoleMessageSignal;
-  Dali::WebEnginePlugin::WebEngineResponsePolicyDecisionSignalType  mResponsePolicyDecisionSignal;
-  Dali::WebEnginePlugin::WebEngineCertificateSignalType             mCertificateConfirmSignal;
-  Dali::WebEnginePlugin::WebEngineCertificateSignalType             mSslCertificateChangedSignal;
-  Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType         mHttpAuthHandlerSignal;
-  Dali::WebEnginePlugin::WebEngineContextMenuCustomizedSignalType   mContextMenuCustomizedSignal;
-  Dali::WebEnginePlugin::WebEngineContextMenuItemSelectedSignalType mContextMenuItemSelectedSignal;
+  Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType mFrameRenderedSignal;
 
   bool  mEvaluating;
   float mPageZoomFactor;
@@ -1564,14 +1552,31 @@ public:
   WebEngineCookieManager*   mockWebEngineCookieManager;
   WebEngineSettings*        mockWebEngineSettings;
 
-  std::vector<JavaScriptEvaluatedResultCallback>         mResultCallbacks;
-  Dali::WebEnginePlugin::JavaScriptAlertCallback         mJavaScriptAlertCallback;
-  Dali::WebEnginePlugin::JavaScriptConfirmCallback       mJavaScriptConfirmCallback;
-  Dali::WebEnginePlugin::JavaScriptPromptCallback        mJavaScriptPromptCallback;
-  Dali::WebEnginePlugin::ScreenshotCapturedCallback      mScreenshotCapturedCallback;
-  Dali::WebEnginePlugin::VideoPlayingCallback            mVideoPlayingCallback;
-  Dali::WebEnginePlugin::GeolocationPermissionCallback   mGeolocationPermissionCallback;
-  Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback mHitTestCreatedCallback;
+  std::vector<Dali::WebEnginePlugin::JavaScriptMessageHandlerCallback> mResultCallbacks;
+
+  Dali::WebEnginePlugin::WebEnginePageLoadCallback               mPageLoadStartedCallback;
+  Dali::WebEnginePlugin::WebEnginePageLoadCallback               mPageLoadInProgressCallback;
+  Dali::WebEnginePlugin::WebEnginePageLoadCallback               mPageLoadFinishedCallback;
+  Dali::WebEnginePlugin::WebEnginePageLoadErrorCallback          mPageLoadErrorCallback;
+  Dali::WebEnginePlugin::WebEngineScrollEdgeReachedCallback      mScrollEdgeReachedCallback;
+  Dali::WebEnginePlugin::WebEngineUrlChangedCallback             mUrlChangedCallback;
+  Dali::WebEnginePlugin::WebEngineFormRepostDecidedCallback      mFormRepostDecidedCallback;
+  Dali::WebEnginePlugin::WebEngineFrameRenderedCallback          mFrameRenderedCallback;
+  Dali::WebEnginePlugin::WebEngineRequestInterceptorCallback     mRequestInterceptorCallback;
+  Dali::WebEnginePlugin::WebEngineConsoleMessageReceivedCallback mConsoleMessageCallback;
+  Dali::WebEnginePlugin::WebEngineResponsePolicyDecidedCallback  mResponsePolicyDecisionCallback;
+  Dali::WebEnginePlugin::WebEngineCertificateCallback            mCertificateConfirmCallback;
+  Dali::WebEnginePlugin::WebEngineCertificateCallback            mSslCertificateChangedCallback;
+  Dali::WebEnginePlugin::WebEngineHttpAuthHandlerCallback        mHttpAuthHandlerCallback;
+  Dali::WebEnginePlugin::WebEngineContextMenuShownCallback       mContextMenuShownCallback;
+  Dali::WebEnginePlugin::WebEngineContextMenuHiddenCallback      mContextMenuHiddenCallback;
+  Dali::WebEnginePlugin::JavaScriptAlertCallback                 mJavaScriptAlertCallback;
+  Dali::WebEnginePlugin::JavaScriptConfirmCallback               mJavaScriptConfirmCallback;
+  Dali::WebEnginePlugin::JavaScriptPromptCallback                mJavaScriptPromptCallback;
+  Dali::WebEnginePlugin::ScreenshotCapturedCallback              mScreenshotCapturedCallback;
+  Dali::WebEnginePlugin::VideoPlayingCallback                    mVideoPlayingCallback;
+  Dali::WebEnginePlugin::GeolocationPermissionCallback           mGeolocationPermissionCallback;
+  Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback         mHitTestCreatedCallback;
 };
 
 
@@ -1612,35 +1617,77 @@ bool OnLoadUrl()
     }
     gInstance->mHistory.push_back( gInstance->mUrl );
     gInstance->mCurrentPlusOnePos++;
-    gInstance->mPageLoadStartedSignal.Emit( gInstance->mUrl );
-    gInstance->mPageLoadInProgressSignal.Emit( gInstance->mUrl );
-    gInstance->mPageLoadFinishedSignal.Emit( gInstance->mUrl );
-    gInstance->mUrlChangedSignal.Emit( "http://new-test" );
-
-    std::shared_ptr<Dali::WebEngineFormRepostDecision> repostDecision(new MockWebEngineFormRepostDecision());
-    gInstance->mFormRepostDecisionSignal.Emit(std::move(repostDecision));
+    if (gInstance->mPageLoadStartedCallback)
+    {
+      gInstance->mPageLoadStartedCallback( gInstance->mUrl );
+    }
+    if (gInstance->mPageLoadInProgressCallback)
+    {
+      gInstance->mPageLoadInProgressCallback( gInstance->mUrl );
+    }
+    if (gInstance->mPageLoadFinishedCallback)
+    {
+      gInstance->mPageLoadFinishedCallback( gInstance->mUrl );
+    }
+    if (gInstance->mPageLoadErrorCallback)
+    {
+      std::unique_ptr<Dali::WebEngineLoadError> error(new MockWebEngineLoadError(gInstance->mUrl));
+      gInstance->mPageLoadErrorCallback(std::move(error));
+    }
+    if (gInstance->mUrlChangedCallback)
+    {
+      gInstance->mUrlChangedCallback( "http://new-test" );
+    }
+    if (gInstance->mFormRepostDecidedCallback)
+    {
+      std::unique_ptr<Dali::WebEngineFormRepostDecision> repostDecision(new MockWebEngineFormRepostDecision());
+      gInstance->mFormRepostDecidedCallback(std::move(repostDecision));
+    }
     gInstance->mFrameRenderedSignal.Emit();
-    std::shared_ptr<Dali::WebEngineRequestInterceptor> interceptor(new MockWebEngineRequestInterceptor());
-    gInstance->mRequestInterceptorSignal.Emit(std::move(interceptor));
-
-    std::shared_ptr<Dali::WebEngineLoadError> error(new MockWebEngineLoadError(gInstance->mUrl));
-    gInstance->mPageLoadErrorSignal.Emit(std::move(error));
-    std::shared_ptr<Dali::WebEngineConsoleMessage> message(new MockWebEngineConsoleMessage());
-    gInstance->mConsoleMessageSignal.Emit(std::move(message));
-    std::shared_ptr<Dali::WebEnginePolicyDecision> policyDecision(new MockWebEnginePolicyDecision());
-    gInstance->mResponsePolicyDecisionSignal.Emit(std::move(policyDecision));
-
-    std::shared_ptr<Dali::WebEngineCertificate> certificate(new MockWebEngineCertificate());
-    gInstance->mCertificateConfirmSignal.Emit(std::move(certificate));
-    std::shared_ptr<Dali::WebEngineCertificate> sslCertificate(new MockWebEngineCertificate());
-    gInstance->mSslCertificateChangedSignal.Emit(std::move(sslCertificate));
-    std::shared_ptr<Dali::WebEngineHttpAuthHandler> handler(new MockWebEngineHttpAuthHandler());
-    gInstance->mHttpAuthHandlerSignal.Emit(std::move(handler));
-
-    std::shared_ptr<Dali::WebEngineContextMenu> menu(new MockWebEngineContextMenu());
-    gInstance->mContextMenuCustomizedSignal.Emit(std::move(menu));
-    std::shared_ptr<Dali::WebEngineContextMenuItem> item(new MockWebEngineContextMenuItem());
-    gInstance->mContextMenuItemSelectedSignal.Emit(std::move(item));
+    if (gInstance->mFrameRenderedCallback)
+    {
+      gInstance->mFrameRenderedCallback();
+    }
+    if (gInstance->mRequestInterceptorCallback)
+    {
+      std::unique_ptr<Dali::WebEngineRequestInterceptor> interceptor(new MockWebEngineRequestInterceptor());
+      gInstance->mRequestInterceptorCallback(std::move(interceptor));
+    }
+    if (gInstance->mConsoleMessageCallback)
+    {
+      std::unique_ptr<Dali::WebEngineConsoleMessage> message(new MockWebEngineConsoleMessage());
+      gInstance->mConsoleMessageCallback(std::move(message));
+    }
+    if (gInstance->mResponsePolicyDecisionCallback)
+    {
+      std::unique_ptr<Dali::WebEnginePolicyDecision> policyDecision(new MockWebEnginePolicyDecision());
+      gInstance->mResponsePolicyDecisionCallback(std::move(policyDecision));
+    }
+    if (gInstance->mCertificateConfirmCallback)
+    {
+      std::unique_ptr<Dali::WebEngineCertificate> certificate(new MockWebEngineCertificate());
+      gInstance->mCertificateConfirmCallback(std::move(certificate));
+    }
+    if (gInstance->mSslCertificateChangedCallback)
+    {
+      std::unique_ptr<Dali::WebEngineCertificate> sslCertificate(new MockWebEngineCertificate());
+      gInstance->mSslCertificateChangedCallback(std::move(sslCertificate));
+    }
+    if (gInstance->mHttpAuthHandlerCallback)
+    {
+      std::unique_ptr<Dali::WebEngineHttpAuthHandler> handler(new MockWebEngineHttpAuthHandler());
+      gInstance->mHttpAuthHandlerCallback(std::move(handler));
+    }
+    if (gInstance->mContextMenuShownCallback)
+    {
+      std::unique_ptr<Dali::WebEngineContextMenu> menu(new MockWebEngineContextMenu());
+      gInstance->mContextMenuShownCallback(std::move(menu));
+    }
+    if (gInstance->mContextMenuHiddenCallback)
+    {
+      std::unique_ptr<Dali::WebEngineContextMenu> hiddenMenu(new MockWebEngineContextMenu());
+      gInstance->mContextMenuHiddenCallback(std::move(hiddenMenu));
+    }
   }
   return false;
 }
@@ -1649,9 +1696,9 @@ bool OnScrollEdge()
 {
   DisconnectFromGlobalSignal( &OnScrollEdge );
 
-  if( gInstance )
+  if( gInstance && gInstance->mScrollEdgeReachedCallback )
   {
-    gInstance->mScrollEdgeReachedSignal.Emit( Dali::WebEnginePlugin::ScrollEdge::BOTTOM );
+    gInstance->mScrollEdgeReachedCallback( Dali::WebEnginePlugin::ScrollEdge::BOTTOM );
   }
 
   return false;
@@ -1941,7 +1988,7 @@ Dali::PixelData WebEngine::GetFavicon() const
   return Internal::Adaptor::GetImplementation( *this ).GetFavicon();
 }
 
-const std::string& WebEngine::GetUrl()
+std::string WebEngine::GetUrl() const
 {
   return Internal::Adaptor::GetImplementation( *this ).GetUrl();
 }
@@ -2134,7 +2181,7 @@ void WebEngine::RegisterGeolocationPermissionCallback(Dali::WebEnginePlugin::Geo
   Internal::Adaptor::GetImplementation( *this ).RegisterGeolocationPermissionCallback(callback);
 }
 
-const std::string& WebEngine::GetUserAgent() const
+std::string WebEngine::GetUserAgent() const
 {
   return Internal::Adaptor::GetImplementation( *this ).GetUserAgent();
 }
@@ -2264,84 +2311,84 @@ void WebEngine::EnableKeyEvents( bool enabled )
 {
 }
 
-Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSignal()
+Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& WebEngine::FrameRenderedSignal()
 {
-  return Internal::Adaptor::GetImplementation( *this ).PageLoadStartedSignal();
+  return Internal::Adaptor::GetImplementation(*this).FrameRenderedSignal();
 }
 
-Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadInProgressSignal()
+void WebEngine::RegisterPageLoadStartedCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback)
 {
-  return Internal::Adaptor::GetImplementation( *this ).PageLoadInProgressSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterPageLoadStartedCallback(callback);
 }
 
-Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadFinishedSignal()
+void WebEngine::RegisterPageLoadInProgressCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback)
 {
-  return Internal::Adaptor::GetImplementation( *this ).PageLoadFinishedSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterPageLoadInProgressCallback(callback);
 }
 
-Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType& WebEngine::PageLoadErrorSignal()
+void WebEngine::RegisterPageLoadFinishedCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback)
 {
-  return Internal::Adaptor::GetImplementation( *this ).PageLoadErrorSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterPageLoadFinishedCallback(callback);
 }
 
-Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType& WebEngine::ScrollEdgeReachedSignal()
+void WebEngine::RegisterPageLoadErrorCallback(Dali::WebEnginePlugin::WebEnginePageLoadErrorCallback callback)
 {
-  return Internal::Adaptor::GetImplementation( *this ).ScrollEdgeReachedSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterPageLoadErrorCallback(callback);
 }
 
-Dali::WebEnginePlugin::WebEngineUrlChangedSignalType& WebEngine::UrlChangedSignal()
+void WebEngine::RegisterScrollEdgeReachedCallback(Dali::WebEnginePlugin::WebEngineScrollEdgeReachedCallback callback)
 {
-  return Internal::Adaptor::GetImplementation( *this ).UrlChangedSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterScrollEdgeReachedCallback(callback);
 }
 
-Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType& WebEngine::FormRepostDecisionSignal()
+void WebEngine::RegisterUrlChangedCallback(Dali::WebEnginePlugin::WebEngineUrlChangedCallback callback)
 {
-  return Internal::Adaptor::GetImplementation(*this).FormRepostDecisionSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterUrlChangedCallback(callback);
 }
 
-Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& WebEngine::FrameRenderedSignal()
+void WebEngine::RegisterFormRepostDecidedCallback(Dali::WebEnginePlugin::WebEngineFormRepostDecidedCallback callback)
 {
-  return Internal::Adaptor::GetImplementation(*this).FrameRenderedSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterFormRepostDecidedCallback(callback);
 }
 
-Dali::WebEnginePlugin::WebEngineRequestInterceptorSignalType& WebEngine::RequestInterceptorSignal()
+void WebEngine::RegisterRequestInterceptorCallback(Dali::WebEnginePlugin::WebEngineRequestInterceptorCallback callback)
 {
-  return Internal::Adaptor::GetImplementation(*this).RequestInterceptorSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterRequestInterceptorCallback(callback);
 }
 
-Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType& WebEngine::ConsoleMessageSignal()
+void WebEngine::RegisterConsoleMessageReceivedCallback(Dali::WebEnginePlugin::WebEngineConsoleMessageReceivedCallback callback)
 {
-  return Internal::Adaptor::GetImplementation(*this).ConsoleMessageSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterConsoleMessageReceivedCallback(callback);
 }
 
-Dali::WebEnginePlugin::WebEngineResponsePolicyDecisionSignalType& WebEngine::ResponsePolicyDecisionSignal()
+void WebEngine::RegisterResponsePolicyDecidedCallback(Dali::WebEnginePlugin::WebEngineResponsePolicyDecidedCallback callback)
 {
-  return Internal::Adaptor::GetImplementation(*this).ResponsePolicyDecisionSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterResponsePolicyDecidedCallback(callback);
 }
 
-Dali::WebEnginePlugin::WebEngineCertificateSignalType& WebEngine::CertificateConfirmSignal()
+void WebEngine::RegisterCertificateConfirmedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback)
 {
-  return Internal::Adaptor::GetImplementation(*this).CertificateConfirmSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterCertificateConfirmedCallback(callback);
 }
 
-Dali::WebEnginePlugin::WebEngineCertificateSignalType& WebEngine::SslCertificateChangedSignal()
+void WebEngine::RegisterSslCertificateChangedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback)
 {
-  return Internal::Adaptor::GetImplementation(*this).SslCertificateChangedSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterSslCertificateChangedCallback(callback);
 }
 
-Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType& WebEngine::HttpAuthHandlerSignal()
+void WebEngine::RegisterHttpAuthHandlerCallback(Dali::WebEnginePlugin::WebEngineHttpAuthHandlerCallback callback)
 {
-  return Internal::Adaptor::GetImplementation(*this).HttpAuthHandlerSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterHttpAuthHandlerCallback(callback);
 }
 
-Dali::WebEnginePlugin::WebEngineContextMenuCustomizedSignalType& WebEngine::ContextMenuCustomizedSignal()
+void WebEngine::RegisterContextMenuShownCallback(Dali::WebEnginePlugin::WebEngineContextMenuShownCallback callback)
 {
-  return Internal::Adaptor::GetImplementation( *this ).ContextMenuCustomizedSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterContextMenuShownCallback(callback);
 }
 
-Dali::WebEnginePlugin::WebEngineContextMenuItemSelectedSignalType& WebEngine::ContextMenuItemSelectedSignal()
+void WebEngine::RegisterContextMenuHiddenCallback(Dali::WebEnginePlugin::WebEngineContextMenuHiddenCallback callback)
 {
-  return Internal::Adaptor::GetImplementation( *this ).ContextMenuItemSelectedSignal();
+  Internal::Adaptor::GetImplementation( *this ).RegisterContextMenuHiddenCallback(callback);
 }
 
 } // namespace Dali;
index d2be632..5d46d68 100644 (file)
@@ -1593,23 +1593,24 @@ int UtcDaliAnimatedVectorImageVisualFrameDrops(void)
   application.SendNotification();
   application.Render();
 
+  // Trigger count is 1 - render the first frame
+  DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(1), true, TEST_LOCATION);
+
   Property::Map attributes;
   DevelControl::DoAction(actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes);
 
+  // Make delay to drop frames
+  Test::VectorAnimationRenderer::DelayRendering(170); // longer than 16.6 * 10frames
+
   application.SendNotification();
   application.Render();
 
-  // Trigger count is 1 - render the first frame
+  // Wait for calculating frame drops
   DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(1), true, TEST_LOCATION);
 
-  // Make delay to drop frames
-  Test::VectorAnimationRenderer::DelayRendering(170); // longer than 16.6 * 10frames
-
   // Check dropped frame
-  DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(1), true, TEST_LOCATION);
-
   uint32_t frames = Test::VectorAnimationRenderer::GetDroppedFrames();
-  DALI_TEST_CHECK(frames >= 9);
+  DALI_TEST_CHECK(frames > 0);
 
   END_TEST;
 }
index f19d181..37e3b5e 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/public-api/rendering/frame-buffer.h>
 #include <dali/public-api/adaptor-framework/native-image-source.h>
 #include <dali-toolkit/public-api/image-loader/image.h>
+#include <dali-toolkit/public-api/image-loader/image-url.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -51,9 +52,9 @@ int UtcDaliImageConvertFrameBufferToUrl1(void)
   FrameBuffer frameBuffer = FrameBuffer::New( width, height, FrameBuffer::Attachment::NONE );
 
   DALI_TEST_CHECK( frameBuffer );
-  std::string url = Dali::Toolkit::Image::GenerateUrl( frameBuffer, Pixel::Format::RGBA8888, width, height );
+  ImageUrl url = Dali::Toolkit::Image::GenerateUrl( frameBuffer, Pixel::Format::RGBA8888, width, height );
 
-  DALI_TEST_CHECK( url.size() > 0u );
+  DALI_TEST_CHECK( url.GetUrl().size() > 0u );
 
   END_TEST;
 }
@@ -71,7 +72,7 @@ int UtcDaliImageConvertFrameBufferToUrl2(void)
   Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height );
   frameBuffer.AttachColorTexture( texture );
 
-  DALI_TEST_CHECK( Dali::Toolkit::Image::GenerateUrl( frameBuffer, 0 ).size() > 0u );
+  DALI_TEST_CHECK( Dali::Toolkit::Image::GenerateUrl( frameBuffer, 0 ).GetUrl().size() > 0u );
 
   END_TEST;
 }
@@ -89,7 +90,7 @@ int UtcDaliImageConvertPixelDataToUrl(void)
   unsigned char* buffer= reinterpret_cast<unsigned char*>( malloc( bufferSize ) );
   PixelData pixelData = PixelData::New( buffer, bufferSize, width, height, Pixel::RGB888, PixelData::FREE );
 
-  DALI_TEST_CHECK( Dali::Toolkit::Image::GenerateUrl( pixelData ).size() > 0u );
+  DALI_TEST_CHECK( Dali::Toolkit::Image::GenerateUrl( pixelData ).GetUrl().size() > 0u );
 
   END_TEST;
 }
@@ -106,7 +107,7 @@ int UtcDaliImageConvertNativeImageSourceToUrl(void)
   {
     NativeImageSourcePtr nativeImageSource = NativeImageSource::New(width, height, NativeImageSource::COLOR_DEPTH_DEFAULT );
 
-    DALI_TEST_CHECK( Dali::Toolkit::Image::GenerateUrl( nativeImageSource ).size() > 0u );
+    DALI_TEST_CHECK( Dali::Toolkit::Image::GenerateUrl( nativeImageSource ).GetUrl().size() > 0u );
   }
   catch(Dali::DaliException& e)
   {
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ImageUrl.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ImageUrl.cpp
new file mode 100644 (file)
index 0000000..09cc7cd
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <iostream>
+#include <stdlib.h>
+#include <dali-toolkit-test-suite-utils.h>
+#include <dali-toolkit/public-api/image-loader/image-url.h>
+
+using namespace Dali;
+using namespace Dali::Toolkit;
+
+int UtcImageUrlConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  tet_infoline(" UtcImageUrlValid ");
+
+  // Test default constructor.
+  ImageUrl imageUrl;
+  DALI_TEST_CHECK( !imageUrl );
+
+  // Test object creation
+  Texture image = Texture::New(TextureType::TEXTURE_2D, Pixel::RGBA8888, 4u, 4u); // test texture
+  imageUrl = ImageUrl::New(image);
+  DALI_TEST_CHECK( imageUrl );
+
+  // Test copy constructor
+  ImageUrl ImageUrlCopy( imageUrl );
+  DALI_TEST_CHECK( ImageUrlCopy );
+
+  // Test down cast
+  BaseHandle baseUrl;
+  baseUrl = imageUrl;
+  ImageUrl downcastUrl = ImageUrl::DownCast( baseUrl );
+  DALI_TEST_CHECK( downcastUrl );
+  END_TEST;
+}
\ No newline at end of file
index fdf1697..40ca439 100644 (file)
@@ -25,6 +25,7 @@
 #include <dali-toolkit/devel-api/controls/control-devel.h>
 #include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
 #include <dali-toolkit/public-api/image-loader/image.h>
+#include <dali-toolkit/public-api/image-loader/image-url.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include "dummy-control.h"
 
@@ -424,7 +425,8 @@ int UtcDaliImageVisualWithNativeImage(void)
   tet_infoline( "Use Native Image as url" );
 
   NativeImageSourcePtr nativeImageSource = NativeImageSource::New(500, 500, NativeImageSource::COLOR_DEPTH_DEFAULT);
-  std::string url = Dali::Toolkit::Image::GenerateUrl(nativeImageSource);
+  ImageUrl imageUrl = Dali::Toolkit::Image::GenerateUrl(nativeImageSource);
+  std::string url = imageUrl.GetUrl();
 
   VisualFactory factory = VisualFactory::Get();
   DALI_TEST_CHECK( factory );
@@ -462,6 +464,62 @@ int UtcDaliImageVisualWithNativeImage(void)
   END_TEST;
 }
 
+int UtcDaliImageVisualWithNativeImageRemoved(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "Use Native Image as url" );
+
+  TestGlAbstraction& gl = application.GetGlAbstraction();
+  TraceCallStack& textureTrace = gl.GetTextureTrace();
+  textureTrace.Enable(true);
+
+  NativeImageSourcePtr nativeImageSource = NativeImageSource::New(500, 500, NativeImageSource::COLOR_DEPTH_DEFAULT);
+  ImageUrl imageUrl = Dali::Toolkit::Image::GenerateUrl(nativeImageSource);
+  std::string url = imageUrl.GetUrl();
+
+  VisualFactory factory = VisualFactory::Get();
+  DALI_TEST_CHECK( factory );
+
+  Property::Map propertyMap;
+  propertyMap.Insert( Toolkit::Visual::Property::TYPE,  Visual::IMAGE );
+  propertyMap.Insert( ImageVisual::Property::URL,  url );
+
+  Visual::Base visual = factory.CreateVisual( propertyMap );
+  DALI_TEST_CHECK( visual );
+
+  DummyControl actor = DummyControl::New();
+  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
+  dummyImpl.RegisterVisual(  DummyControl::Property::TEST_VISUAL, visual );
+
+  DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
+
+  application.GetScene().Add( actor );
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( textureTrace.CountMethod("DeleteTextures"), 0, TEST_LOCATION );
+
+  tet_infoline( "No delete texture because reference count is not zero" );
+  imageUrl.Reset();
+  application.GetScene().Remove( actor );
+  dummyImpl.UnregisterVisual( DummyControl::Property::TEST_VISUAL );
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( textureTrace.CountMethod("DeleteTextures"), 0, TEST_LOCATION );
+
+  tet_infoline( "Delete texture because reference count is zero" );
+  visual.Reset();
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( textureTrace.CountMethod("DeleteTextures"), 1, TEST_LOCATION );
+
+  END_TEST;
+}
+
 int UtcDaliImageVisualTextureReuse1(void)
 {
   ToolkitTestApplication application;
index 053b25c..37c6ded 100644 (file)
@@ -1689,6 +1689,9 @@ int UtcDaliKeyboardFocusManagerWithoutFocusablePropertiesMoveFocus(void)
   focusChangedCallback.Reset();
 
   // without set the navigation properties, but we can focus move
+  // enable the default algorithm
+  Dali::Toolkit::DevelKeyboardFocusManager::EnableDefaultAlgorithm(manager, true);
+  DALI_TEST_CHECK( Dali::Toolkit::DevelKeyboardFocusManager::IsDefaultAlgorithmEnabled(manager) );
 
   // Move the focus towards right
   // button1 -- [button2]
@@ -1898,4 +1901,95 @@ int UtcDaliKeyboardFocusManagerSetAndGetCurrentFocusActorInTouchMode(void)
   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
 
   END_TEST;
-}
\ No newline at end of file
+}
+
+int UtcDaliKeyboardFocusManagerEnableDefaultAlgorithm(void)
+{
+  ToolkitTestApplication application;
+
+  tet_infoline(" UtcDaliKeyboardFocusManagerEnableDefaultAlgorithm");
+
+  // Register Type
+  TypeInfo type;
+  type = TypeRegistry::Get().GetTypeInfo( "KeyboardFocusManager" );
+  DALI_TEST_CHECK( type );
+  BaseHandle handle = type.CreateInstance();
+  DALI_TEST_CHECK( handle );
+
+  KeyboardFocusManager manager = KeyboardFocusManager::Get();
+  DALI_TEST_CHECK(manager);
+
+  bool focusChangedSignalVerified = false;
+  FocusChangedCallback focusChangedCallback(focusChangedSignalVerified);
+  manager.FocusChangedSignal().Connect( &focusChangedCallback, &FocusChangedCallback::Callback );
+
+  PushButton button1 = PushButton::New();
+  PushButton button2 = PushButton::New();
+
+  button1.SetProperty(Actor::Property::SIZE, Vector2(50, 50));
+  button2.SetProperty(Actor::Property::SIZE, Vector2(50, 50));
+
+  button1.SetProperty(Actor::Property::KEYBOARD_FOCUSABLE,true);
+  button2.SetProperty(Actor::Property::KEYBOARD_FOCUSABLE,true);
+
+  application.GetScene().Add(button1);
+  application.GetScene().Add(button2);
+
+  // set position
+  // button1 -- button2
+  button1.SetProperty(Actor::Property::POSITION, Vector2(0.0f, 0.0f));
+  button2.SetProperty(Actor::Property::POSITION, Vector2(100.0f, 0.0f));
+
+  // flush the queue and render once
+  application.SendNotification();
+  application.Render();
+
+  // Set the focus to the button1
+  // [button1] -- button2
+  DALI_TEST_CHECK(manager.SetCurrentFocusActor(button1) == true);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == button1);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == Actor());
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == button1);
+  focusChangedCallback.Reset();
+
+  // without set the navigation properties, but we can focus move
+  // enable the default algorithm
+  Dali::Toolkit::DevelKeyboardFocusManager::EnableDefaultAlgorithm(manager, true);
+  DALI_TEST_CHECK( Dali::Toolkit::DevelKeyboardFocusManager::IsDefaultAlgorithmEnabled(manager) );
+
+  // Move the focus towards right
+  // button1 -- [button2]
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == true);
+
+  // Confirm whether focus is moved to button2
+  DALI_TEST_EQUALS(button2.GetProperty<int>(DevelControl::Property::STATE), (int)DevelControl::FOCUSED, TEST_LOCATION);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == button1);
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == button2);
+  focusChangedCallback.Reset();
+
+  // disable the default algorithm
+  Dali::Toolkit::DevelKeyboardFocusManager::EnableDefaultAlgorithm(manager, false);
+  DALI_TEST_CHECK( !Dali::Toolkit::DevelKeyboardFocusManager::IsDefaultAlgorithmEnabled(manager) );
+
+  // Move the focus towards left, The focus move will fail because the default algorithm is disabled.
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::LEFT) == false);
+
+  // enable the default algorithm
+  Dali::Toolkit::DevelKeyboardFocusManager::EnableDefaultAlgorithm(manager, true);
+  DALI_TEST_CHECK( Dali::Toolkit::DevelKeyboardFocusManager::IsDefaultAlgorithmEnabled(manager) );
+
+  // Move the focus towards left, The focus move will success because the default algorithm is enabled.
+  // [button1] -- button2
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::LEFT) == true);
+  // Confirm whether focus is moved to button2
+  DALI_TEST_EQUALS(button1.GetProperty<int>(DevelControl::Property::STATE), (int)DevelControl::FOCUSED, TEST_LOCATION);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == button2);
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == button1);
+  focusChangedCallback.Reset();
+
+
+  END_TEST;
+}
index 31d1762..b518743 100644 (file)
@@ -107,6 +107,7 @@ const char* const PROPERTY_NAME_FONT_SIZE_SCALE                      = "fontSize
 const char* const PROPERTY_NAME_GRAB_HANDLE_COLOR                    = "grabHandleColor";
 const char* const PROPERTY_NAME_ENABLE_GRAB_HANDLE_POPUP             = "enableGrabHandlePopup";
 const char* const PROPERTY_NAME_INPUT_METHOD_SETTINGS                = "inputMethodSettings";
+const char* const PROPERTY_NAME_INPUT_FILTER                         = "inputFilter";
 
 const Vector4 PLACEHOLDER_TEXT_COLOR( 0.8f, 0.8f, 0.8f, 0.8f );
 const Dali::Vector4 LIGHT_BLUE( 0.75f, 0.96f, 1.f, 1.f ); // The text highlight color.
@@ -135,6 +136,8 @@ const std::string DEFAULT_DEVICE_NAME("hwKeyboard");
 static bool gAnchorClickedCallBackCalled;
 static bool gAnchorClickedCallBackNotCalled;
 static bool gTextChangedCallBackCalled;
+static bool gInputFilteredAcceptedCallbackCalled;
+static bool gInputFilteredRejectedCallbackCalled;
 static bool gInputStyleChangedCallbackCalled;
 static bool gMaxCharactersCallBackCalled;
 static Dali::Toolkit::TextEditor::InputStyle::Mask gInputStyleMask;
@@ -187,6 +190,20 @@ static void TestMaxLengthReachedCallback( TextEditor control )
   gMaxCharactersCallBackCalled = true;
 }
 
+static void TestInputFilteredCallback(TextEditor control, Toolkit::InputFilter::Property::Type type)
+{
+  tet_infoline(" TestInputFilteredCallback");
+
+  if(type == Toolkit::InputFilter::Property::ACCEPTED)
+  {
+    gInputFilteredAcceptedCallbackCalled = true;
+  }
+  else if(type == Toolkit::InputFilter::Property::REJECTED)
+  {
+    gInputFilteredRejectedCallbackCalled = true;
+  }
+}
+
 // Generate a KeyEvent to send to Core.
 Integration::KeyEvent GenerateKey( const std::string& keyName,
                                    const std::string& logicalKey,
@@ -515,6 +532,7 @@ int UtcDaliTextEditorGetPropertyP(void)
   DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_GRAB_HANDLE_COLOR ) == DevelTextEditor::Property::GRAB_HANDLE_COLOR );
   DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_ENABLE_GRAB_HANDLE_POPUP ) == DevelTextEditor::Property::ENABLE_GRAB_HANDLE_POPUP );
   DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_INPUT_METHOD_SETTINGS ) == DevelTextEditor::Property::INPUT_METHOD_SETTINGS );
+  DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_INPUT_FILTER ) == DevelTextEditor::Property::INPUT_FILTER );
 
   END_TEST;
 }
@@ -969,6 +987,21 @@ int UtcDaliTextEditorSetPropertyP(void)
   DALI_TEST_CHECK( map[ "VARIATION" ].Get( variation ) );
   DALI_TEST_EQUALS( inputVariation, variation, TEST_LOCATION );
 
+  // Check the input filter property
+  Property::Map inputFilterMapSet;
+  Property::Map inputFilterMapGet;
+  inputFilterMapSet[InputFilter::Property::ACCEPTED] = "[\\w]";
+  inputFilterMapSet[InputFilter::Property::REJECTED] = "[\\d]";
+
+  editor.SetProperty(DevelTextEditor::Property::INPUT_FILTER, inputFilterMapSet);
+
+  inputFilterMapGet = editor.GetProperty<Property::Map>(DevelTextEditor::Property::INPUT_FILTER);
+  DALI_TEST_EQUALS(inputFilterMapGet.Count(), inputFilterMapSet.Count(), TEST_LOCATION);
+
+  // Clear
+  inputFilterMapSet.Clear();
+  editor.SetProperty(DevelTextEditor::Property::INPUT_FILTER, inputFilterMapSet);
+
   application.SendNotification();
   application.Render();
 
@@ -3105,6 +3138,58 @@ int utcDaliTextEditorMaxCharactersReached(void)
   END_TEST;
 }
 
+int utcDaliTextEditorInputFiltered(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextEditorInputFiltered");
+  TextEditor editor = TextEditor::New();
+  DALI_TEST_CHECK(editor);
+
+  application.GetScene().Add(editor);
+
+  Property::Map inputFilter;
+
+  // Only digit is accepted.
+  inputFilter[InputFilter::Property::ACCEPTED] = "[\\d]";
+
+  // Set input filter to TextEditor.
+  editor.SetProperty(DevelTextEditor::Property::INPUT_FILTER, inputFilter);
+
+  editor.SetKeyInputFocus();
+
+  // connect to the input filtered signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  DevelTextEditor::InputFilteredSignal(editor).Connect(&TestInputFilteredCallback);
+  bool inputFilteredSignal = false;
+  editor.ConnectSignal(testTracker, "inputFiltered", CallbackFunctor(&inputFilteredSignal));
+
+  gInputFilteredAcceptedCallbackCalled = false;
+
+  application.ProcessEvent(GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ));
+
+  DALI_TEST_CHECK(gInputFilteredAcceptedCallbackCalled);
+  DALI_TEST_CHECK(inputFilteredSignal);
+
+  // Word is rejected.
+  inputFilter[InputFilter::Property::ACCEPTED] = "";
+  inputFilter[InputFilter::Property::REJECTED] = "[\\w]";
+
+  // Set input filter to TextEditor.
+  editor.SetProperty(DevelTextEditor::Property::INPUT_FILTER, inputFilter);
+
+  editor.SetKeyInputFocus();
+
+  inputFilteredSignal = false;
+  gInputFilteredRejectedCallbackCalled = false;
+
+  application.ProcessEvent(GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+
+  DALI_TEST_CHECK(gInputFilteredAcceptedCallbackCalled);
+  DALI_TEST_CHECK(inputFilteredSignal);
+
+  END_TEST;
+}
+
 int UtcDaliTextEditorSelectWholeText(void)
 {
   ToolkitTestApplication application;
@@ -3770,4 +3855,64 @@ int UtcDaliTextEditorHyphenWrapMode(void)
   DALI_TEST_EQUALS( lineCount, 3, TEST_LOCATION );
 
   END_TEST;
+}
+
+int UtcDaliToolkitTextEditorEllipsisPositionProperty(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextEditorEllipsisPositionProperty ");
+  TextEditor textEditor = TextEditor::New();
+
+  tet_infoline(" UtcDaliToolkitTextEditorEllipsisPositionProperty - Default is END");
+  DALI_TEST_EQUALS( textEditor.GetProperty< int >( DevelTextEditor::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextEditorEllipsisPositionProperty - Change to START");
+  textEditor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::START);
+  DALI_TEST_EQUALS( textEditor.GetProperty< int >( DevelTextEditor::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextEditorEllipsisPositionProperty - Change to MIDDLE");
+  textEditor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::MIDDLE);
+  DALI_TEST_EQUALS( textEditor.GetProperty< int >( DevelTextEditor::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextEditorEllipsisPositionProperty - Change to END");
+  textEditor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::END);
+  DALI_TEST_EQUALS( textEditor.GetProperty< int >( DevelTextEditor::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextEditorEllipsisPositionProperty - Change to START using integer");
+  textEditor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, 1);
+  DALI_TEST_EQUALS( textEditor.GetProperty< int >( DevelTextEditor::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextEditorEllipsisPositionProperty - Change to MIDDLE using integer");
+  textEditor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, 2);
+  DALI_TEST_EQUALS( textEditor.GetProperty< int >( DevelTextEditor::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextEditorEllipsisPositionProperty - Change to END using integer");
+  textEditor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, 0);
+  DALI_TEST_EQUALS( textEditor.GetProperty< int >( DevelTextEditor::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to START using string - uppercase");
+  textEditor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, "START");
+  DALI_TEST_EQUALS( textEditor.GetProperty< int >( DevelTextEditor::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to MIDDLE using string - uppercase");
+  textEditor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, "MIDDLE");
+  DALI_TEST_EQUALS( textEditor.GetProperty< int >( DevelTextEditor::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to END using string - uppercase");
+  textEditor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, "END");
+  DALI_TEST_EQUALS( textEditor.GetProperty< int >( DevelTextEditor::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to START using string - lowercase");
+  textEditor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, "start");
+  DALI_TEST_EQUALS( textEditor.GetProperty< int >( DevelTextEditor::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to MIDDLE using string - lowercase");
+  textEditor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, "middle");
+  DALI_TEST_EQUALS( textEditor.GetProperty< int >( DevelTextEditor::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to END using string - lowercase");
+  textEditor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, "end");
+  DALI_TEST_EQUALS( textEditor.GetProperty< int >( DevelTextEditor::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  END_TEST;
 }
\ No newline at end of file
index 2044ea3..f6e24e6 100644 (file)
@@ -30,6 +30,7 @@
 #include <dali-toolkit/devel-api/controls/text-controls/text-field-devel.h>
 #include <dali-toolkit/devel-api/text/rendering-backend.h>
 #include "toolkit-clipboard.h"
+#include <dali-toolkit/devel-api/text/text-enumerations-devel.h>
 
 using namespace Dali;
 using namespace Toolkit;
@@ -106,6 +107,7 @@ const char* const PROPERTY_NAME_ENABLE_GRAB_HANDLE_POPUP             = "enableGr
 const char* const PROPERTY_NAME_BACKGROUND                           = "textBackground";
 const char* const PROPERTY_NAME_FONT_SIZE_SCALE                      = "fontSizeScale";
 const char* const PROPERTY_NAME_GRAB_HANDLE_COLOR                    = "grabHandleColor";
+const char* const PROPERTY_NAME_INPUT_FILTER                         = "inputFilter";
 
 const Vector4 PLACEHOLDER_TEXT_COLOR( 0.8f, 0.8f, 0.8f, 0.8f );
 const Dali::Vector4 LIGHT_BLUE( 0.75f, 0.96f, 1.f, 1.f ); // The text highlight color.
@@ -125,6 +127,8 @@ static bool gAnchorClickedCallBackCalled;
 static bool gAnchorClickedCallBackNotCalled;
 static bool gTextChangedCallBackCalled;
 static bool gMaxCharactersCallBackCalled;
+static bool gInputFilteredAcceptedCallbackCalled;
+static bool gInputFilteredRejectedCallbackCalled;
 static bool gInputStyleChangedCallbackCalled;
 static Dali::Toolkit::TextField::InputStyle::Mask gInputStyleMask;
 
@@ -234,6 +238,20 @@ static void TestMaxLengthReachedCallback( TextField control )
   gMaxCharactersCallBackCalled = true;
 }
 
+static void TestInputFilteredCallback(TextField control, Toolkit::InputFilter::Property::Type type)
+{
+  tet_infoline(" TestInputFilteredCallback");
+
+  if(type == Toolkit::InputFilter::Property::ACCEPTED)
+  {
+    gInputFilteredAcceptedCallbackCalled = true;
+  }
+  else if(type == Toolkit::InputFilter::Property::REJECTED)
+  {
+    gInputFilteredRejectedCallbackCalled = true;
+  }
+}
+
 static void TestInputStyleChangedCallback( TextField control, TextField::InputStyle::Mask mask )
 {
   tet_infoline(" TestInputStyleChangedCallback");
@@ -526,6 +544,7 @@ int UtcDaliTextFieldGetPropertyP(void)
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_ENABLE_GRAB_HANDLE_POPUP ) == DevelTextField::Property::ENABLE_GRAB_HANDLE_POPUP );
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_BACKGROUND ) == DevelTextField::Property::BACKGROUND );
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_GRAB_HANDLE_COLOR ) == DevelTextField::Property::GRAB_HANDLE_COLOR );
+  DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_INPUT_FILTER ) == DevelTextField::Property::INPUT_FILTER );
 
   END_TEST;
 }
@@ -1000,6 +1019,21 @@ int UtcDaliTextFieldSetPropertyP(void)
   field.SetProperty( DevelTextField::Property::GRAB_HANDLE_COLOR, Color::GREEN );
   DALI_TEST_EQUALS( field.GetProperty<Vector4>( DevelTextField::Property::GRAB_HANDLE_COLOR ), Color::GREEN, TEST_LOCATION );
 
+  // Check the input filter property
+  Property::Map inputFilterMapSet;
+  Property::Map inputFilterMapGet;
+  inputFilterMapSet[InputFilter::Property::ACCEPTED] = "[\\w]";
+  inputFilterMapSet[InputFilter::Property::REJECTED] = "[\\d]";
+
+  field.SetProperty(DevelTextField::Property::INPUT_FILTER, inputFilterMapSet);
+
+  inputFilterMapGet = field.GetProperty<Property::Map>(DevelTextField::Property::INPUT_FILTER);
+  DALI_TEST_EQUALS(inputFilterMapGet.Count(), inputFilterMapSet.Count(), TEST_LOCATION);
+
+  // Clear
+  inputFilterMapSet.Clear();
+  field.SetProperty(DevelTextField::Property::INPUT_FILTER, inputFilterMapSet);
+
   application.SendNotification();
   application.Render();
 
@@ -1544,6 +1578,135 @@ int utcDaliTextFieldMaxCharactersReachedN(void)
   END_TEST;
 }
 
+// Positive test for Input Filtered signal.
+int utcDaliTextFieldInputFilteredP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldInputFilteredP");
+  TextField field = TextField::New();
+  DALI_TEST_CHECK(field);
+
+  application.GetScene().Add(field);
+
+  Property::Map inputFilter;
+
+  // Only digit is accepted.
+  inputFilter[InputFilter::Property::ACCEPTED] = "[\\d]";
+
+  // Set input filter to TextField.
+  field.SetProperty(DevelTextField::Property::INPUT_FILTER, inputFilter);
+
+  field.SetKeyInputFocus();
+
+  // connect to the input filtered signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  DevelTextField::InputFilteredSignal(field).Connect(&TestInputFilteredCallback);
+  bool inputFilteredSignal = false;
+  field.ConnectSignal(testTracker, "inputFiltered", CallbackFunctor(&inputFilteredSignal));
+
+  gInputFilteredAcceptedCallbackCalled = false;
+
+  application.ProcessEvent(GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ));
+
+  DALI_TEST_CHECK(gInputFilteredAcceptedCallbackCalled);
+  DALI_TEST_CHECK(inputFilteredSignal);
+
+  // Word is rejected.
+  inputFilter[InputFilter::Property::ACCEPTED] = "";
+  inputFilter[InputFilter::Property::REJECTED] = "[\\w]";
+
+  // Set input filter to TextField.
+  field.SetProperty(DevelTextField::Property::INPUT_FILTER, inputFilter);
+
+  field.SetKeyInputFocus();
+
+  inputFilteredSignal = false;
+  gInputFilteredRejectedCallbackCalled = false;
+
+  application.ProcessEvent(GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+
+  DALI_TEST_CHECK(gInputFilteredAcceptedCallbackCalled);
+  DALI_TEST_CHECK(inputFilteredSignal);
+
+  END_TEST;
+}
+
+// Negative test for Input Filtered signal.
+int utcDaliTextFieldInputFilteredN(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldInputFilteredP");
+  TextField field = TextField::New();
+  DALI_TEST_CHECK(field);
+
+  application.GetScene().Add(field);
+
+  Property::Map inputFilter;
+
+  // Only word is accepted.
+  inputFilter[InputFilter::Property::ACCEPTED] = "[\\w]";
+
+  // Set input filter to TextField.
+  field.SetProperty(DevelTextField::Property::INPUT_FILTER, inputFilter);
+
+  field.SetKeyInputFocus();
+
+  // connect to the input filtered signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  DevelTextField::InputFilteredSignal(field).Connect(&TestInputFilteredCallback);
+  bool inputFilteredSignal = false;
+  field.ConnectSignal(testTracker, "inputFiltered", CallbackFunctor(&inputFilteredSignal));
+
+  gInputFilteredAcceptedCallbackCalled = false;
+
+  // Key a, d should not be filtered.
+  application.ProcessEvent(GenerateKey("a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+  application.ProcessEvent(GenerateKey("a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::UP, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+  application.ProcessEvent(GenerateKey("d", "", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+  application.ProcessEvent(GenerateKey("d", "", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::UP, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+
+  // Backspace, Delete should not be filtered.
+  application.ProcessEvent(GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+  application.ProcessEvent(GenerateKey( "Delete", "", "Delete", Dali::DevelKey::DALI_KEY_DELETE, 0, 0, Integration::KeyEvent::DOWN, "Delete", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_CHECK(!gInputFilteredAcceptedCallbackCalled);
+  DALI_TEST_CHECK(!inputFilteredSignal);
+
+  // Digit is rejected.
+  inputFilter[InputFilter::Property::ACCEPTED] = "";
+  inputFilter[InputFilter::Property::REJECTED] = "[\\d]";
+
+  field.SetProperty(DevelTextField::Property::INPUT_FILTER, inputFilter);
+
+  field.SetKeyInputFocus();
+
+  inputFilteredSignal = false;
+  gInputFilteredRejectedCallbackCalled = false;
+
+  // Key a, d should not be filtered.
+  application.ProcessEvent(GenerateKey("a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+  application.ProcessEvent(GenerateKey("a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::UP, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+  application.ProcessEvent(GenerateKey("d", "", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+  application.ProcessEvent(GenerateKey("d", "", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::UP, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+
+  // Backspace, Delete should not be filtered.
+  application.ProcessEvent(GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+  application.ProcessEvent(GenerateKey( "Delete", "", "Delete", Dali::DevelKey::DALI_KEY_DELETE, 0, 0, Integration::KeyEvent::DOWN, "Delete", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_CHECK(!gInputFilteredAcceptedCallbackCalled);
+  DALI_TEST_CHECK(!inputFilteredSignal);
+
+  END_TEST;
+}
+
 int utcDaliTextFieldInputStyleChanged01(void)
 {
   // The text-field emits signals when the input style changes. These changes of style are
@@ -3628,4 +3791,64 @@ int UtcDaliTextFieldAtlasLimitationIsEnabledPerformanceCases(void)
   }
 
   END_TEST;
+}
+
+int UtcDaliToolkitTextFieldEllipsisPositionProperty(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty ");
+  TextField textField = TextField::New();
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty - Default is END");
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty - Change to START");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::START);
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty - Change to MIDDLE");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::MIDDLE);
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty - Change to END");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::END);
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty - Change to START using integer");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, 1);
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty - Change to MIDDLE using integer");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, 2);
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty - Change to END using integer");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, 0);
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to START using string - uppercase");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, "START");
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to MIDDLE using string - uppercase");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, "MIDDLE");
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to END using string - uppercase");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, "END");
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to START using string - lowercase");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, "start");
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to MIDDLE using string - lowercase");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, "middle");
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to END using string - lowercase");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, "end");
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  END_TEST;
 }
\ No newline at end of file
index f505faf..e91c2b8 100644 (file)
@@ -74,6 +74,8 @@ const char* const PROPERTY_NAME_ELLIPSIS = "ellipsis";
 const char* const PROPERTY_NAME_AUTO_SCROLL_LOOP_DELAY = "autoScrollLoopDelay";
 const char* const PROPERTY_NAME_FONT_SIZE_SCALE = "fontSizeScale";
 
+const char* const PROPERTY_NAME_ELLIPSIS_POSITION = "ellipsisPosition";
+
 const std::string DEFAULT_FONT_DIR( "/resources/fonts" );
 const unsigned int EMOJI_FONT_SIZE = 3840u; // 60 * 64
 
@@ -341,6 +343,7 @@ int UtcDaliToolkitTextLabelGetPropertyP(void)
   DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_ELLIPSIS ) == TextLabel::Property::ELLIPSIS );
   DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_AUTO_SCROLL_LOOP_DELAY ) == TextLabel::Property::AUTO_SCROLL_LOOP_DELAY );
   DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_FONT_SIZE_SCALE ) == DevelTextLabel::Property::FONT_SIZE_SCALE );
+  DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_ELLIPSIS_POSITION ) == DevelTextLabel::Property::ELLIPSIS_POSITION );
 
   END_TEST;
 }
@@ -1929,4 +1932,65 @@ int utcDaliTextLabelGetHeightForWidthChangeLineCountWhenTextChanged(void)
 
 
   END_TEST;
+}
+
+int UtcDaliToolkitTextlabelEllipsisPositionProperty(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty ");
+  TextLabel textLabel = TextLabel::New();
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Default is END");
+  DALI_TEST_EQUALS( textLabel.GetProperty< int >( DevelTextLabel::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to START");
+  textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::START);
+  DALI_TEST_EQUALS( textLabel.GetProperty< int >( DevelTextLabel::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to MIDDLE");
+  textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::MIDDLE);
+  DALI_TEST_EQUALS( textLabel.GetProperty< int >( DevelTextLabel::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to END");
+  textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::END);
+  DALI_TEST_EQUALS( textLabel.GetProperty< int >( DevelTextLabel::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to START using integer");
+  textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, 1);
+  DALI_TEST_EQUALS( textLabel.GetProperty< int >( DevelTextLabel::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to MIDDLE using integer");
+  textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, 2);
+  DALI_TEST_EQUALS( textLabel.GetProperty< int >( DevelTextLabel::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to END using integer");
+  textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, 0);
+  DALI_TEST_EQUALS( textLabel.GetProperty< int >( DevelTextLabel::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to START using string - uppercase");
+  textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, "START");
+  DALI_TEST_EQUALS( textLabel.GetProperty< int >( DevelTextLabel::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to MIDDLE using string - uppercase");
+  textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, "MIDDLE");
+  DALI_TEST_EQUALS( textLabel.GetProperty< int >( DevelTextLabel::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to END using string - uppercase");
+  textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, "END");
+  DALI_TEST_EQUALS( textLabel.GetProperty< int >( DevelTextLabel::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to START using string - lowercase");
+  textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, "start");
+  DALI_TEST_EQUALS( textLabel.GetProperty< int >( DevelTextLabel::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to MIDDLE using string - lowercase");
+  textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, "middle");
+  DALI_TEST_EQUALS( textLabel.GetProperty< int >( DevelTextLabel::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to END using string - lowercase");
+  textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, "end");
+  DALI_TEST_EQUALS( textLabel.GetProperty< int >( DevelTextLabel::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+
+  END_TEST;
 }
\ No newline at end of file
index b694a69..955e15e 100755 (executable)
@@ -94,6 +94,9 @@ int UtcDaliTransitionSetGetProperty01(void)
   controlProperty1.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
   controlProperty1.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
   controlProperty1.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 50.f);
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 50.f);
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, 1.f);
   control1.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty1);
 
   Control control2 = Control::New();
@@ -104,6 +107,9 @@ int UtcDaliTransitionSetGetProperty01(void)
   controlProperty2.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
   controlProperty2.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 0.0f, 0.5f));
   controlProperty2.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 30.f);
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 30.f);
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(1.0f, 1.0f, 0.0f, 0.5f));
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, -1.f);
   control2.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty2);
 
   application.GetScene().Add(control1);
@@ -148,6 +154,9 @@ int UtcDaliTransitionSetGetProperty02(void)
   controlProperty1.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
   controlProperty1.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
   controlProperty1.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, Vector4(50.0f, 30.0f, 40.0f, 20.0f));
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 50.f);
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, -1.f);
   control1.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty1);
 
   Control control2 = Control::New();
@@ -158,6 +167,9 @@ int UtcDaliTransitionSetGetProperty02(void)
   controlProperty2.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
   controlProperty2.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 0.0f, 0.5f));
   controlProperty2.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, Vector4(32.f, 54.0f, 24.0f, 42.0f));
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 30.f);
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(1.0f, 1.0f, 0.0f, 0.5f));
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, -1.f);
   control2.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty2);
 
   application.GetScene().Add(control1);
@@ -200,6 +212,9 @@ int UtcDaliTransitionBetweenControlPair(void)
   Vector4 destinationColor(1.0f, 0.5f, 1.0f, 0.8f);
   float destinationOpacity(0.8f);
   float destinationRadius(50.f);
+  float destinationBorderlineWidth(80.0f);
+  Vector4 destinationBorderlineColor(0.5f, 1.0f, 0.5f, 0.3f);
+  float destinationBorderlineOffset(-1.0f);
   Vector4 destinationRadiusV4 = Vector4(destinationRadius, destinationRadius, destinationRadius, destinationRadius);
 
   Control control1 = Control::New();
@@ -214,6 +229,9 @@ int UtcDaliTransitionBetweenControlPair(void)
   controlProperty1.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
   controlProperty1.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
   controlProperty1.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 30.f);
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 60.f);
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, 1.f);
   control1.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty1);
 
   Control control2 = Control::New();
@@ -228,12 +246,21 @@ int UtcDaliTransitionBetweenControlPair(void)
   controlProperty2.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
   controlProperty2.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 0.0f, 0.5f));
   controlProperty2.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, destinationRadius);
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, destinationBorderlineWidth);
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, destinationBorderlineColor);
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, destinationBorderlineOffset);
   control2.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty2);
 
   DALI_TEST_EQUALS(destinationPosition, control2.GetProperty<Vector3>(Actor::Property::POSITION), TEST_LOCATION);
   Property::Map backgroundMap = control2.GetProperty<Property::Map>(Toolkit::Control::Property::BACKGROUND);
   Vector4 cornerRadius = backgroundMap.Find(Toolkit::DevelVisual::Property::CORNER_RADIUS)->Get<Vector4>();
   DALI_TEST_EQUALS(destinationRadiusV4, cornerRadius, TEST_LOCATION);
+  float borderlineWidth = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH)->Get<float>();
+  DALI_TEST_EQUALS(destinationBorderlineWidth, borderlineWidth, TEST_LOCATION);
+  Vector4 borderlineColor = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_COLOR)->Get<Vector4>();
+  DALI_TEST_EQUALS(destinationBorderlineColor, borderlineColor, TEST_LOCATION);
+  float borderlineOffset = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET)->Get<float>();
+  DALI_TEST_EQUALS(destinationBorderlineOffset, borderlineOffset, TEST_LOCATION);
 
   application.GetScene().Add(control1);
   application.GetScene().Add(control2);
@@ -263,6 +290,15 @@ int UtcDaliTransitionBetweenControlPair(void)
   Property::Index index = renderer.GetPropertyIndex(DevelVisual::Property::CORNER_RADIUS);
   cornerRadius = renderer.GetCurrentProperty<Vector4>(index);
   DALI_TEST_NOT_EQUALS(destinationRadiusV4, cornerRadius, 0.00001f, TEST_LOCATION);
+  index = renderer.GetPropertyIndex(DevelVisual::Property::BORDERLINE_WIDTH);
+  borderlineWidth = renderer.GetCurrentProperty<float>(index);
+  DALI_TEST_NOT_EQUALS(destinationBorderlineWidth, borderlineWidth, 0.00001f, TEST_LOCATION);
+  index = renderer.GetPropertyIndex(DevelVisual::Property::BORDERLINE_COLOR);
+  borderlineColor = renderer.GetCurrentProperty<Vector4>(index);
+  DALI_TEST_NOT_EQUALS(destinationBorderlineColor, borderlineColor, 0.00001f, TEST_LOCATION);
+  index = renderer.GetPropertyIndex(DevelVisual::Property::BORDERLINE_OFFSET);
+  borderlineOffset = renderer.GetCurrentProperty<float>(index);
+  DALI_TEST_NOT_EQUALS(destinationBorderlineOffset, borderlineOffset, 0.00001f, TEST_LOCATION);
 
   application.SendNotification();
   application.Render(700);
@@ -284,6 +320,15 @@ int UtcDaliTransitionBetweenControlPair(void)
   index = renderer.GetPropertyIndex(DevelVisual::Property::CORNER_RADIUS);
   cornerRadius = renderer.GetCurrentProperty<Vector4>(index);
   DALI_TEST_EQUALS(destinationRadiusV4, cornerRadius, TEST_LOCATION);
+  index = renderer.GetPropertyIndex(DevelVisual::Property::BORDERLINE_WIDTH);
+  borderlineWidth = renderer.GetCurrentProperty<float>(index);
+  DALI_TEST_EQUALS(destinationBorderlineWidth, borderlineWidth, TEST_LOCATION);
+  index = renderer.GetPropertyIndex(DevelVisual::Property::BORDERLINE_COLOR);
+  borderlineColor = renderer.GetCurrentProperty<Vector4>(index);
+  DALI_TEST_EQUALS(destinationBorderlineColor, borderlineColor, TEST_LOCATION);
+  index = renderer.GetPropertyIndex(DevelVisual::Property::BORDERLINE_OFFSET);
+  borderlineOffset = renderer.GetCurrentProperty<float>(index);
+  DALI_TEST_EQUALS(destinationBorderlineOffset, borderlineOffset, TEST_LOCATION);
 
   END_TEST;
 }
@@ -294,6 +339,9 @@ int UtcDaliTransitionBetweenControlPairWithoutEmptySourceBackground(void)
   tet_infoline(" UtcDaliTransitionBetweenControlPair");
 
   Vector4 destinationRadius(50.f, 30.f, 40.f, 0.f);
+  float   destinationBorderlineWidth(40.f);
+  Vector4 destinationBorderlineColor(1.0f, 0.5f, 0.2f, 0.8f);
+  float   destinationBorderlineOffset(1.f);
 
   Control control1 = Control::New();
   control1.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
@@ -308,11 +356,20 @@ int UtcDaliTransitionBetweenControlPairWithoutEmptySourceBackground(void)
   controlProperty2.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
   controlProperty2.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 0.0f, 0.5f));
   controlProperty2.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, destinationRadius);
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, destinationBorderlineWidth);
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, destinationBorderlineColor);
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, destinationBorderlineOffset);
   control2.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty2);
 
   Property::Map backgroundMap = control2.GetProperty<Property::Map>(Toolkit::Control::Property::BACKGROUND);
   Vector4 cornerRadius = backgroundMap.Find(Toolkit::DevelVisual::Property::CORNER_RADIUS)->Get<Vector4>();
   DALI_TEST_EQUALS(destinationRadius, cornerRadius, TEST_LOCATION);
+  float borderlineWidth = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH)->Get<float>();
+  DALI_TEST_EQUALS(destinationBorderlineWidth, borderlineWidth, TEST_LOCATION);
+  Vector4 borderlineColor = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_COLOR)->Get<Vector4>();
+  DALI_TEST_EQUALS(destinationBorderlineColor, borderlineColor, TEST_LOCATION);
+  float borderlineOffset = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET)->Get<float>();
+  DALI_TEST_EQUALS(destinationBorderlineOffset, borderlineOffset, TEST_LOCATION);
 
   application.GetScene().Add(control1);
   application.GetScene().Add(control2);
@@ -339,6 +396,12 @@ int UtcDaliTransitionBetweenControlPairWithoutEmptySourceBackground(void)
   backgroundMap = control2.GetProperty<Property::Map>(Toolkit::Control::Property::BACKGROUND);
   cornerRadius = backgroundMap.Find(Toolkit::DevelVisual::Property::CORNER_RADIUS)->Get<Vector4>();
   DALI_TEST_EQUALS(destinationRadius, cornerRadius, TEST_LOCATION);
+  borderlineWidth = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH)->Get<float>();
+  DALI_TEST_EQUALS(destinationBorderlineWidth, borderlineWidth, TEST_LOCATION);
+  borderlineColor = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_COLOR)->Get<Vector4>();
+  DALI_TEST_EQUALS(destinationBorderlineColor, borderlineColor, TEST_LOCATION);
+  borderlineOffset = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET)->Get<float>();
+  DALI_TEST_EQUALS(destinationBorderlineOffset, borderlineOffset, TEST_LOCATION);
 
   application.SendNotification();
   application.Render(700);
@@ -353,6 +416,12 @@ int UtcDaliTransitionBetweenControlPairWithoutEmptySourceBackground(void)
   backgroundMap = control2.GetProperty<Property::Map>(Toolkit::Control::Property::BACKGROUND);
   cornerRadius = backgroundMap.Find(Toolkit::DevelVisual::Property::CORNER_RADIUS)->Get<Vector4>();
   DALI_TEST_EQUALS(destinationRadius, cornerRadius, TEST_LOCATION);
+  borderlineWidth = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH)->Get<float>();
+  DALI_TEST_EQUALS(destinationBorderlineWidth, borderlineWidth, TEST_LOCATION);
+  borderlineColor = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_COLOR)->Get<Vector4>();
+  DALI_TEST_EQUALS(destinationBorderlineColor, borderlineColor, TEST_LOCATION);
+  borderlineOffset = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET)->Get<float>();
+  DALI_TEST_EQUALS(destinationBorderlineOffset, borderlineOffset, TEST_LOCATION);
 
   END_TEST;
 }
@@ -374,6 +443,9 @@ int UtcDaliTransitionBetweenImageViewPair(void)
   controlProperty1.Insert(Toolkit::ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME);
   controlProperty1.Insert(Toolkit::Visual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 0.5f, 0.5f));
   controlProperty1.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 50.f);
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 50.f);
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, 1.f);
   control1.SetProperty(Toolkit::ImageView::Property::IMAGE, controlProperty1);
 
   ImageView control2 = ImageView::New();
@@ -386,6 +458,9 @@ int UtcDaliTransitionBetweenImageViewPair(void)
   controlProperty2.Insert(Toolkit::ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME);
   controlProperty2.Insert(Toolkit::Visual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 1.0f, 1.0f));
   controlProperty2.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 30.f);
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 30.f);
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(0.0f, 1.0f, 1.0f, 0.5f));
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, -1.f);
   control2.SetProperty(Toolkit::ImageView::Property::IMAGE, controlProperty2);
 
   DALI_TEST_EQUALS(destinationPosition, control2.GetProperty<Vector3>(Actor::Property::POSITION), TEST_LOCATION);
@@ -456,6 +531,9 @@ int UtcDaliTransitionBetweenImageViewPairWithDelay(void)
   controlProperty1.Insert(Toolkit::ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME);
   controlProperty1.Insert(Toolkit::Visual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 0.5f, 0.5f));
   controlProperty1.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 50.f);
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 50.f);
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+  controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, 1.f);
   control1.SetProperty(Toolkit::ImageView::Property::IMAGE, controlProperty1);
 
   ImageView control2 = ImageView::New();
@@ -468,6 +546,9 @@ int UtcDaliTransitionBetweenImageViewPairWithDelay(void)
   controlProperty2.Insert(Toolkit::ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME);
   controlProperty2.Insert(Toolkit::Visual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 1.0f, 1.0f));
   controlProperty2.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 30.f);
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 30.f);
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(0.0f, 1.0f, 1.0f, 0.5f));
+  controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, -1.f);
   control2.SetProperty(Toolkit::ImageView::Property::IMAGE, controlProperty2);
 
   DALI_TEST_EQUALS(destinationPosition, control2.GetProperty<Vector3>(Actor::Property::POSITION), TEST_LOCATION);
index 4fbe8c1..4f7d8fa 100755 (executable)
@@ -61,7 +61,7 @@ static int gPageLoadStartedCallbackCalled = 0;
 static int gPageLoadInProgressCallbackCalled = 0;
 static int gPageLoadFinishedCallbackCalled = 0;
 static int gPageLoadErrorCallbackCalled = 0;
-static std::shared_ptr<Dali::WebEngineLoadError> gPageLoadErrorInstance = nullptr;
+static std::unique_ptr<Dali::WebEngineLoadError> gPageLoadErrorInstance = nullptr;
 static int gScrollEdgeReachedCallbackCalled = 0;
 static int gUrlChangedCallbackCalled = 0;
 static int gEvaluateJavaScriptCallbackCalled = 0;
@@ -74,21 +74,21 @@ static int gGeolocationPermissionCallbackCalled = 0;
 static bool gTouched = false;
 static bool gHovered = false;
 static bool gWheelEventHandled = false;
-static int gFormRepostDecisionCallbackCalled = 0;
-static std::shared_ptr<Dali::WebEngineFormRepostDecision> gFormRepostDecisionInstance = nullptr;
+static int gFormRepostDecidedCallbackCalled = 0;
+static std::unique_ptr<Dali::WebEngineFormRepostDecision> gFormRepostDecidedInstance = nullptr;
 static int gFrameRenderedCallbackCalled = 0;
 static int gRequestInterceptorCallbackCalled = 0;
-static std::shared_ptr<Dali::WebEngineRequestInterceptor> gRequestInterceptorInstance = nullptr;
+static std::unique_ptr<Dali::WebEngineRequestInterceptor> gRequestInterceptorInstance = nullptr;
 static int gConsoleMessageCallbackCalled = 0;
-static std::shared_ptr<Dali::WebEngineConsoleMessage> gConsoleMessageInstance = nullptr;
+static std::unique_ptr<Dali::WebEngineConsoleMessage> gConsoleMessageInstance = nullptr;
 static int gResponsePolicyDecidedCallbackCalled = 0;
-static std::shared_ptr<Dali::WebEnginePolicyDecision> gResponsePolicyDecisionInstance = nullptr;
+static std::unique_ptr<Dali::WebEnginePolicyDecision> gResponsePolicyDecisionInstance = nullptr;
 static int gCertificateConfirmCallbackCalled = 0;
-static std::shared_ptr<Dali::WebEngineCertificate> gCertificateConfirmInstance = nullptr;
+static std::unique_ptr<Dali::WebEngineCertificate> gCertificateConfirmInstance = nullptr;
 static int gSslCertificateChangedCallbackCalled = 0;
-static std::shared_ptr<Dali::WebEngineCertificate> gSslCertificateInstance = nullptr;
+static std::unique_ptr<Dali::WebEngineCertificate> gSslCertificateInstance = nullptr;
 static int gHttpAuthHandlerCallbackCalled = 0;
-static std::shared_ptr<Dali::WebEngineHttpAuthHandler> gHttpAuthInstance = nullptr;
+static std::unique_ptr<Dali::WebEngineHttpAuthHandler> gHttpAuthInstance = nullptr;
 static int gSecurityOriginsAcquiredCallbackCalled = 0;
 static int gStorageUsageAcquiredCallbackCalled = 0;
 static int gFormPasswordsAcquiredCallbackCalled = 0;
@@ -96,10 +96,10 @@ static int gDownloadStartedCallbackCalled = 0;
 static int gMimeOverriddenCallbackCalled = 0;
 static std::vector<std::unique_ptr<Dali::WebEngineSecurityOrigin>> gSecurityOriginList;
 static std::vector<std::unique_ptr<Dali::WebEngineContext::PasswordData>> gPasswordDataList;
-static int gContextMenuCustomizedCallbackCalled = 0;
-static std::shared_ptr<Dali::WebEngineContextMenu> gContextMenuInstance = nullptr;
-static int gContextMenuItemSelectedCallbackCalled = 0;
-static std::shared_ptr<Dali::WebEngineContextMenuItem> gContextMenuItemInstance = nullptr;
+static int gContextMenuShownCallbackCalled = 0;
+static std::unique_ptr<Dali::WebEngineContextMenu> gContextMenuShownInstance = nullptr;
+static int gContextMenuHiddenCallbackCalled = 0;
+static std::unique_ptr<Dali::WebEngineContextMenu> gContextMenuHiddenInstance = nullptr;
 static int gHitTestCreatedCallbackCalled = 0;
 static int gCookieManagerChangsWatchCallbackCalled = 0;
 
@@ -117,33 +117,33 @@ struct CallbackFunctor
   bool* mCallbackFlag;
 };
 
-static void OnPageLoadStarted( WebView view, const std::string& url )
+static void OnPageLoadStarted(const std::string& url)
 {
   gPageLoadStartedCallbackCalled++;
 }
 
-static void OnPageLoadInProgress( WebView view, const std::string& url )
+static void OnPageLoadInProgress(const std::string& url)
 {
   gPageLoadInProgressCallbackCalled++;
 }
 
-static void OnPageLoadFinished( WebView view, const std::string& url )
+static void OnPageLoadFinished(const std::string& url)
 {
   gPageLoadFinishedCallbackCalled++;
 }
 
-static void OnScrollEdgeReached( WebView view, Dali::WebEnginePlugin::ScrollEdge edge )
+static void OnScrollEdgeReached(Dali::WebEnginePlugin::ScrollEdge edge)
 {
   gScrollEdgeReachedCallbackCalled++;
 }
 
-static void OnResponsePolicyDecided(WebView view, std::shared_ptr<Dali::WebEnginePolicyDecision> decision)
+static void OnResponsePolicyDecided(std::unique_ptr<Dali::WebEnginePolicyDecision> decision)
 {
   gResponsePolicyDecidedCallbackCalled++;
   gResponsePolicyDecisionInstance = std::move(decision);
 }
 
-static void OnUrlChanged( WebView view, const std::string& url )
+static void OnUrlChanged(const std::string& url)
 {
   gUrlChangedCallbackCalled++;
 }
@@ -154,30 +154,30 @@ static bool OnHitTestCreated(std::unique_ptr<Dali::WebEngineHitTest> test)
   return true;
 }
 
-static void OnPageLoadError(WebView view, std::shared_ptr<Dali::WebEngineLoadError> error)
+static void OnPageLoadError(std::unique_ptr<Dali::WebEngineLoadError> error)
 {
   gPageLoadErrorCallbackCalled++;
   gPageLoadErrorInstance = std::move(error);
 }
 
-static void OnEvaluateJavaScript( const std::string& result )
+static void OnEvaluateJavaScript(const std::string& result)
 {
   gEvaluateJavaScriptCallbackCalled++;
 }
 
-static bool OnJavaScriptAlert( const std::string& result )
+static bool OnJavaScriptAlert(const std::string& result)
 {
   gJavaScriptAlertCallbackCalled++;
   return true;
 }
 
-static bool OnJavaScriptConfirm( const std::string& result )
+static bool OnJavaScriptConfirm(const std::string& result)
 {
   gJavaScriptConfirmCallbackCalled++;
   return true;
 }
 
-static bool OnJavaScriptPrompt( const std::string& meesage1, const std::string& message2 )
+static bool OnJavaScriptPrompt(const std::string& meesage1, const std::string& message2)
 {
   gJavaScriptPromptCallbackCalled++;
   return true;
@@ -210,54 +210,54 @@ static void OnChangesWatch()
   gCookieManagerChangsWatchCallbackCalled++;
 }
 
-static bool OnHovered( Actor actor, const Dali::HoverEvent& hover )
+static bool OnHovered(Actor actor, const Dali::HoverEvent& hover)
 {
   gHovered = true;
   return true;
 }
 
-static bool OnWheelEvent( Actor actor, const Dali::WheelEvent& wheel )
+static bool OnWheelEvent(Actor actor, const Dali::WheelEvent& wheel)
 {
   gWheelEventHandled = true;
   return true;
 }
 
-static void OnFormRepostDecision(WebView, std::shared_ptr<Dali::WebEngineFormRepostDecision> decision)
+static void OnFormRepostDecided(std::unique_ptr<Dali::WebEngineFormRepostDecision> decision)
 {
-  gFormRepostDecisionCallbackCalled++;
-  gFormRepostDecisionInstance = std::move(decision);
+  gFormRepostDecidedCallbackCalled++;
+  gFormRepostDecidedInstance = std::move(decision);
 }
 
-static void OnFrameRendered(WebView)
+static void OnFrameRendered()
 {
   gFrameRenderedCallbackCalled++;
 }
 
-static void OnRequestInterceptor(WebView view, std::shared_ptr<Dali::WebEngineRequestInterceptor> interceptor)
+static void OnRequestInterceptor(std::unique_ptr<Dali::WebEngineRequestInterceptor> interceptor)
 {
   gRequestInterceptorCallbackCalled++;
   gRequestInterceptorInstance = std::move(interceptor);
 }
 
-static void OnConsoleMessage(WebView view, std::shared_ptr<Dali::WebEngineConsoleMessage> message)
+static void OnConsoleMessage(std::unique_ptr<Dali::WebEngineConsoleMessage> message)
 {
   gConsoleMessageCallbackCalled++;
   gConsoleMessageInstance = std::move(message);
 }
 
-static void OnCertificateConfirm(WebView view, std::shared_ptr<Dali::WebEngineCertificate> certificate )
+static void OnCertificateConfirm(std::unique_ptr<Dali::WebEngineCertificate> certificate)
 {
   gCertificateConfirmCallbackCalled++;
   gCertificateConfirmInstance = std::move(certificate);
 }
 
-static void OnSslCertificateChanged(WebView view, std::shared_ptr<Dali::WebEngineCertificate> certificate )
+static void OnSslCertificateChanged(std::unique_ptr<Dali::WebEngineCertificate> certificate)
 {
   gSslCertificateChangedCallbackCalled++;
   gSslCertificateInstance = std::move(certificate);
 }
 
-static void OnHttpAuthHandler( WebView view, std::shared_ptr<Dali::WebEngineHttpAuthHandler> hander )
+static void OnHttpAuthHandler(std::unique_ptr<Dali::WebEngineHttpAuthHandler> hander)
 {
   gHttpAuthHandlerCallbackCalled++;
   gHttpAuthInstance = std::move(hander);
@@ -293,16 +293,16 @@ static bool OnMimeOverridden(const std::string&, const std::string&, std::string
   return false;
 }
 
-static void OnContextMenuCustomized(WebView view, std::shared_ptr<Dali::WebEngineContextMenu> menu)
+static void OnContextMenuShown(std::unique_ptr<Dali::WebEngineContextMenu> menu)
 {
-  gContextMenuCustomizedCallbackCalled++;
-  gContextMenuInstance = std::move(menu);
+  gContextMenuShownCallbackCalled++;
+  gContextMenuShownInstance = std::move(menu);
 }
 
-static void OnContextMenuItemSelected(WebView view, std::shared_ptr<Dali::WebEngineContextMenuItem> item)
+static void OnContextMenuHidden(std::unique_ptr<Dali::WebEngineContextMenu> menu)
 {
-  gContextMenuItemSelectedCallbackCalled++;
-  gContextMenuItemInstance = std::move(item);
+  gContextMenuHiddenCallbackCalled++;
+  gContextMenuHiddenInstance = std::move(menu);
 }
 
 } // namespace
@@ -375,21 +375,10 @@ int UtcDaliWebViewPageNavigation(void)
   application.Render();
   DALI_TEST_CHECK( view );
 
-  ConnectionTracker* testTracker = new ConnectionTracker();
-  view.PageLoadStartedSignal().Connect( &OnPageLoadStarted );
-  view.PageLoadInProgressSignal().Connect( &OnPageLoadInProgress );
-  view.PageLoadFinishedSignal().Connect( &OnPageLoadFinished );
-  view.UrlChangedSignal().Connect( &OnUrlChanged );
-  bool signal1 = false;
-  bool signal2 = false;
-  bool signal3 = false;
-  bool signal4 = false;
-  bool signal5 = false;
-  view.ConnectSignal( testTracker, "pageLoadStarted", CallbackFunctor(&signal1) );
-  view.ConnectSignal( testTracker, "pageLoadInProgress", CallbackFunctor(&signal2) );
-  view.ConnectSignal( testTracker, "pageLoadFinished", CallbackFunctor(&signal3) );
-  view.ConnectSignal( testTracker, "urlChanged", CallbackFunctor(&signal4) );
-  view.ConnectSignal( testTracker, "invalidname", CallbackFunctor(&signal5) );
+  view.RegisterPageLoadStartedCallback( &OnPageLoadStarted );
+  view.RegisterPageLoadInProgressCallback( &OnPageLoadInProgress );
+  view.RegisterPageLoadFinishedCallback( &OnPageLoadFinished );
+  view.RegisterUrlChangedCallback( &OnUrlChanged );
   DALI_TEST_EQUALS( gPageLoadStartedCallbackCalled, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( gPageLoadInProgressCallbackCalled, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( gPageLoadFinishedCallbackCalled, 0, TEST_LOCATION );
@@ -403,8 +392,6 @@ int UtcDaliWebViewPageNavigation(void)
   DALI_TEST_EQUALS( gPageLoadInProgressCallbackCalled, 1, TEST_LOCATION );
   DALI_TEST_EQUALS( gPageLoadFinishedCallbackCalled, 1, TEST_LOCATION );
   DALI_TEST_EQUALS( gUrlChangedCallbackCalled, 1, TEST_LOCATION );
-  DALI_TEST_CHECK( signal1 & signal2 & signal3 & signal4 );
-  DALI_TEST_CHECK( !signal5 );
 
   view.LoadUrl( TEST_URL2 );
   view.Suspend();
@@ -454,13 +441,8 @@ int UtcDaliWebViewPageLoadErrorConsoleMessage(void)
   application.Render();
   DALI_TEST_CHECK( view );
 
-  ConnectionTracker* testTracker = new ConnectionTracker();
-  view.PageLoadErrorSignal().Connect( &OnPageLoadError );
-  view.ConsoleMessageSignal().Connect( &OnConsoleMessage );
-  bool signal1 = false;
-  bool signal2 = false;
-  view.ConnectSignal( testTracker, "pageLoadError", CallbackFunctor(&signal1) );
-  view.ConnectSignal( testTracker, "consoleMessage", CallbackFunctor(&signal2) );
+  view.RegisterPageLoadErrorCallback( &OnPageLoadError );
+  view.RegisterConsoleMessageReceivedCallback( &OnConsoleMessage );
   DALI_TEST_EQUALS( gPageLoadErrorCallbackCalled, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( gConsoleMessageCallbackCalled, 0, TEST_LOCATION );
 
@@ -468,7 +450,6 @@ int UtcDaliWebViewPageLoadErrorConsoleMessage(void)
   Test::EmitGlobalTimerSignal();
   DALI_TEST_EQUALS( gPageLoadErrorCallbackCalled, 1, TEST_LOCATION );
   DALI_TEST_EQUALS( gConsoleMessageCallbackCalled, 1, TEST_LOCATION );
-  DALI_TEST_CHECK( signal1 & signal2);
 
   // error code.
   DALI_TEST_CHECK(gPageLoadErrorInstance);
@@ -670,8 +651,8 @@ int UtcDaliWebViewPropertyVideoHoleEnabled(void)
   WebView view = WebView::New();
   DALI_TEST_CHECK( view );
 
-  const bool kDefaultValue = true;
-  const bool kTestValue = false;
+  const bool kDefaultValue = false;
+  const bool kTestValue = true;
 
   // Check default value
   bool output;
@@ -794,7 +775,7 @@ int UtcDaliWebViewHoverAndWheel(void)
   END_TEST;
 }
 
-int UtcDaliWebViewFormRepostDecisionFrameRendering(void)
+int UtcDaliWebViewFormRepostDecidedFrameRendering(void)
 {
   ToolkitTestApplication application;
 
@@ -808,28 +789,22 @@ int UtcDaliWebViewFormRepostDecisionFrameRendering(void)
   application.Render();
   DALI_TEST_CHECK( view );
 
-  ConnectionTracker* testTracker = new ConnectionTracker();
-  view.FormRepostDecisionSignal().Connect(&OnFormRepostDecision);
-  view.FrameRenderedSignal().Connect(&OnFrameRendered);
-  bool signal1 = false;
-  bool signal2 = false;
-  view.ConnectSignal( testTracker, "formRepostDecision", CallbackFunctor(&signal1) );
-  view.ConnectSignal( testTracker, "frameRendered", CallbackFunctor(&signal2) );
-  DALI_TEST_EQUALS( gFormRepostDecisionCallbackCalled, 0, TEST_LOCATION );
+  view.RegisterFormRepostDecidedCallback(&OnFormRepostDecided);
+  view.RegisterFrameRenderedCallback(&OnFrameRendered);
+  DALI_TEST_EQUALS( gFormRepostDecidedCallbackCalled, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( gFrameRenderedCallbackCalled, 0, TEST_LOCATION );
 
   view.LoadUrl( TEST_URL1 );
   Test::EmitGlobalTimerSignal();
-  DALI_TEST_EQUALS( gFormRepostDecisionCallbackCalled, 1, TEST_LOCATION );
+  DALI_TEST_EQUALS( gFormRepostDecidedCallbackCalled, 1, TEST_LOCATION );
   DALI_TEST_EQUALS( gFrameRenderedCallbackCalled, 1, TEST_LOCATION );
-  DALI_TEST_CHECK( signal1 & signal2);
 
   // form repost decision.
-  DALI_TEST_CHECK(gFormRepostDecisionInstance);
-  gFormRepostDecisionInstance->Reply(true);
+  DALI_TEST_CHECK(gFormRepostDecidedInstance);
+  gFormRepostDecidedInstance->Reply(true);
 
   // reset
-  gFormRepostDecisionInstance = nullptr;
+  gFormRepostDecidedInstance = nullptr;
 
   END_TEST;
 }
@@ -848,16 +823,9 @@ int UtcDaliWebViewSslCertificateHttpAuthentication(void)
   application.Render();
   DALI_TEST_CHECK( view );
 
-  ConnectionTracker* testTracker = new ConnectionTracker();
-  view.CertificateConfirmSignal().Connect(&OnCertificateConfirm);
-  view.SslCertificateChangedSignal().Connect(&OnSslCertificateChanged);
-  view.HttpAuthHandlerSignal().Connect(&OnHttpAuthHandler);
-  bool signal1 = false;
-  bool signal2 = false;
-  bool signal3 = false;
-  view.ConnectSignal( testTracker, "certificateConfirm", CallbackFunctor(&signal1) );
-  view.ConnectSignal( testTracker, "sslCertificateChanged", CallbackFunctor(&signal2) );
-  view.ConnectSignal( testTracker, "httpAuthRequest", CallbackFunctor(&signal3) );
+  view.RegisterCertificateConfirmedCallback(&OnCertificateConfirm);
+  view.RegisterSslCertificateChangedCallback(&OnSslCertificateChanged);
+  view.RegisterHttpAuthHandlerCallback(&OnHttpAuthHandler);
   DALI_TEST_EQUALS( gCertificateConfirmCallbackCalled, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( gSslCertificateChangedCallbackCalled, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( gHttpAuthHandlerCallbackCalled, 0, TEST_LOCATION );
@@ -867,7 +835,6 @@ int UtcDaliWebViewSslCertificateHttpAuthentication(void)
   DALI_TEST_EQUALS( gCertificateConfirmCallbackCalled, 1, TEST_LOCATION );
   DALI_TEST_EQUALS( gSslCertificateChangedCallbackCalled, 1, TEST_LOCATION );
   DALI_TEST_EQUALS( gHttpAuthHandlerCallbackCalled, 1, TEST_LOCATION );
-  DALI_TEST_CHECK( signal1 & signal2 & signal3);
 
   // certificate.
   DALI_TEST_CHECK(gCertificateConfirmInstance);
@@ -1072,7 +1039,7 @@ int UtcDaliWebViewPropertyTitleFavicon(void)
   END_TEST;
 }
 
-int UtcDaliWebViewContextMenuCustomizedAndItemSelected(void)
+int UtcDaliWebViewContextMenuShownAndHidden(void)
 {
   ToolkitTestApplication application;
 
@@ -1080,55 +1047,47 @@ int UtcDaliWebViewContextMenuCustomizedAndItemSelected(void)
   DALI_TEST_CHECK( view );
 
   // load url.
-  ConnectionTracker* testTracker = new ConnectionTracker();
-  view.ContextMenuCustomizedSignal().Connect( &OnContextMenuCustomized );
-  view.ContextMenuItemSelectedSignal().Connect( &OnContextMenuItemSelected );
-  bool signal1 = false;
-  bool signal2 = false;
-  view.ConnectSignal( testTracker, "contextMenuCustomized", CallbackFunctor(&signal1) );
-  view.ConnectSignal( testTracker, "contextMenuItemSelected", CallbackFunctor(&signal2) );
-  DALI_TEST_EQUALS( gContextMenuCustomizedCallbackCalled, 0, TEST_LOCATION );
-  DALI_TEST_EQUALS( gContextMenuItemSelectedCallbackCalled, 0, TEST_LOCATION );
-  DALI_TEST_CHECK(gContextMenuInstance == 0);
-  DALI_TEST_CHECK(gContextMenuItemInstance == 0);
+  view.RegisterContextMenuShownCallback( &OnContextMenuShown );
+  view.RegisterContextMenuHiddenCallback( &OnContextMenuHidden );
+  DALI_TEST_EQUALS( gContextMenuShownCallbackCalled, 0, TEST_LOCATION );
+  DALI_TEST_EQUALS( gContextMenuHiddenCallbackCalled, 0, TEST_LOCATION );
+  DALI_TEST_CHECK(gContextMenuShownInstance == 0);
+  DALI_TEST_CHECK(gContextMenuHiddenInstance == 0);
 
   view.LoadUrl( TEST_URL1 );
   Test::EmitGlobalTimerSignal();
-  DALI_TEST_EQUALS( gContextMenuCustomizedCallbackCalled, 1, TEST_LOCATION );
-  DALI_TEST_EQUALS( gContextMenuItemSelectedCallbackCalled, 1, TEST_LOCATION );
-  DALI_TEST_CHECK( signal1 );
-  DALI_TEST_CHECK( signal2 );
+  DALI_TEST_EQUALS( gContextMenuShownCallbackCalled, 1, TEST_LOCATION );
+  DALI_TEST_EQUALS( gContextMenuHiddenCallbackCalled, 1, TEST_LOCATION );
 
   // check context meun & its items.
-  DALI_TEST_CHECK(gContextMenuInstance != 0);
-  std::unique_ptr<Dali::WebEngineContextMenuItem> item = gContextMenuInstance->GetItemAt(0);
+  DALI_TEST_CHECK(gContextMenuShownInstance != 0);
+  std::unique_ptr<Dali::WebEngineContextMenuItem> item = gContextMenuShownInstance->GetItemAt(0);
   DALI_TEST_CHECK(item.get() != 0);
-  std::vector<std::unique_ptr<Dali::WebEngineContextMenuItem>> itemList = gContextMenuInstance->GetItemList();
+  std::vector<std::unique_ptr<Dali::WebEngineContextMenuItem>> itemList = gContextMenuShownInstance->GetItemList();
   DALI_TEST_CHECK(itemList.size() == 1);
-  Dali::Vector2 testPosition = Dali::Vector2(100, 100);
-  DALI_TEST_EQUALS(gContextMenuInstance->GetPosition(), testPosition, TEST_LOCATION);
-  DALI_TEST_CHECK(gContextMenuInstance->RemoveItem(*(item.get())));
-  DALI_TEST_CHECK(gContextMenuInstance->AppendItemAsAction(WebEngineContextMenuItem::ItemTag::NO_ACTION, "", false));
-  DALI_TEST_CHECK(gContextMenuInstance->AppendItem(WebEngineContextMenuItem::ItemTag::NO_ACTION, "", "", false));
-  DALI_TEST_CHECK(gContextMenuInstance->SelectItem(*(item.get())));
-  DALI_TEST_CHECK(gContextMenuInstance->Hide());
-
-  DALI_TEST_CHECK(gContextMenuItemInstance != 0);
+  DALI_TEST_CHECK(gContextMenuShownInstance->RemoveItem(*(item.get())));
+  DALI_TEST_CHECK(gContextMenuShownInstance->AppendItemAsAction(WebEngineContextMenuItem::ItemTag::NO_ACTION, "", false));
+  DALI_TEST_CHECK(gContextMenuShownInstance->AppendItem(WebEngineContextMenuItem::ItemTag::NO_ACTION, "", "", false));
+  DALI_TEST_CHECK(gContextMenuShownInstance->SelectItem(*(item.get())));
+  DALI_TEST_CHECK(gContextMenuShownInstance->Hide());
+
   Dali::WebEngineContextMenuItem::ItemTag testItemTag = Dali::WebEngineContextMenuItem::ItemTag::NO_ACTION;
-  DALI_TEST_EQUALS(gContextMenuItemInstance->GetTag(), testItemTag, TEST_LOCATION);
+  DALI_TEST_EQUALS(item->GetTag(), testItemTag, TEST_LOCATION);
   Dali::WebEngineContextMenuItem::ItemType testItemType = Dali::WebEngineContextMenuItem::ItemType::ACTION;
-  DALI_TEST_EQUALS(gContextMenuItemInstance->GetType(), testItemType, TEST_LOCATION);
-  DALI_TEST_CHECK(gContextMenuItemInstance->IsEnabled());
+  DALI_TEST_EQUALS(item->GetType(), testItemType, TEST_LOCATION);
+  DALI_TEST_CHECK(item->IsEnabled());
   std::string testLinkUrl("http://test.html");
-  DALI_TEST_EQUALS(gContextMenuItemInstance->GetLinkUrl(), testLinkUrl, TEST_LOCATION);
+  DALI_TEST_EQUALS(item->GetLinkUrl(), testLinkUrl, TEST_LOCATION);
   std::string testImageUrl("http://test.jpg");
-  DALI_TEST_EQUALS(gContextMenuItemInstance->GetImageUrl(), testImageUrl, TEST_LOCATION);
+  DALI_TEST_EQUALS(item->GetImageUrl(), testImageUrl, TEST_LOCATION);
   std::string testTitle("title");
-  DALI_TEST_EQUALS(gContextMenuItemInstance->GetTitle(), testTitle, TEST_LOCATION);
-  DALI_TEST_CHECK(gContextMenuItemInstance->GetParentMenu().get() == 0);
+  DALI_TEST_EQUALS(item->GetTitle(), testTitle, TEST_LOCATION);
+  DALI_TEST_CHECK(item->GetParentMenu().get() == 0);
 
-  gContextMenuInstance = nullptr;
-  gContextMenuItemInstance = nullptr;
+  DALI_TEST_CHECK(gContextMenuHiddenInstance != 0);
+
+  gContextMenuShownInstance = nullptr;
+  gContextMenuHiddenInstance = nullptr;
 
   END_TEST;
 }
@@ -1141,10 +1100,7 @@ int UtcDaliWebViewScrollBy(void)
   DALI_TEST_CHECK( view );
 
   // load url.
-  ConnectionTracker* testTracker = new ConnectionTracker();
-  view.ScrollEdgeReachedSignal().Connect( &OnScrollEdgeReached );
-  bool signal1 = false;
-  view.ConnectSignal( testTracker, "scrollEdgeReached", CallbackFunctor(&signal1) );
+  view.RegisterScrollEdgeReachedCallback( &OnScrollEdgeReached );
   DALI_TEST_EQUALS( gScrollEdgeReachedCallbackCalled, 0, TEST_LOCATION );
 
   view.LoadUrl( TEST_URL1 );
@@ -1164,7 +1120,6 @@ int UtcDaliWebViewScrollBy(void)
   view.GetProperty( WebView::Property::SCROLL_POSITION ).Get( output );
   DALI_TEST_CHECK( output.x == 150 && output.y == 150 );
   DALI_TEST_EQUALS( gScrollEdgeReachedCallbackCalled, 1, TEST_LOCATION );
-  DALI_TEST_CHECK( signal1 );
 
   // scroll by and trigger scrollEdgeReached event.
   bool result = view.ScrollEdgeBy( 50, 50 );
@@ -1174,7 +1129,6 @@ int UtcDaliWebViewScrollBy(void)
   view.GetProperty( WebView::Property::SCROLL_POSITION ).Get( output );
   DALI_TEST_CHECK( output.x == 200 && output.y == 200 );
   DALI_TEST_EQUALS( gScrollEdgeReachedCallbackCalled, 2, TEST_LOCATION );
-  DALI_TEST_CHECK( signal1 );
 
   END_TEST;
 }
@@ -1278,17 +1232,13 @@ int UtcDaliWebViewHttpRequestInterceptor(void)
   DALI_TEST_CHECK( view );
 
   // load url.
-  ConnectionTracker* testTracker = new ConnectionTracker();
-  view.RequestInterceptorSignal().Connect( &OnRequestInterceptor );
-  bool signal1 = false;
-  view.ConnectSignal( testTracker, "requestInterceptor", CallbackFunctor(&signal1) );
+  view.RegisterRequestInterceptorCallback( &OnRequestInterceptor );
   DALI_TEST_EQUALS( gRequestInterceptorCallbackCalled, 0, TEST_LOCATION );
   DALI_TEST_CHECK(gRequestInterceptorInstance == 0);
 
   view.LoadUrl( TEST_URL1 );
   Test::EmitGlobalTimerSignal();
   DALI_TEST_EQUALS( gRequestInterceptorCallbackCalled, 1, TEST_LOCATION );
-  DALI_TEST_CHECK( signal1 );
 
   // check request interceptor.
   DALI_TEST_CHECK(gRequestInterceptorInstance != 0);
@@ -1312,17 +1262,13 @@ int UtcDaliWebViewResponsePolicyDecisionRequest(void)
   DALI_TEST_CHECK( view );
 
   // load url.
-  ConnectionTracker* testTracker = new ConnectionTracker();
-  view.ResponsePolicyDecisionSignal().Connect( &OnResponsePolicyDecided );
-  bool signal1 = false;
-  view.ConnectSignal( testTracker, "responsePolicyDecided", CallbackFunctor(&signal1) );
+  view.RegisterResponsePolicyDecidedCallback( &OnResponsePolicyDecided );
   DALI_TEST_EQUALS( gResponsePolicyDecidedCallbackCalled, 0, TEST_LOCATION );
   DALI_TEST_CHECK(gResponsePolicyDecisionInstance == 0);
 
   view.LoadUrl( TEST_URL1 );
   Test::EmitGlobalTimerSignal();
   DALI_TEST_EQUALS( gResponsePolicyDecidedCallbackCalled, 1, TEST_LOCATION );
-  DALI_TEST_CHECK( signal1 );
 
   // check response policy decision & its frame.
   DALI_TEST_CHECK(gResponsePolicyDecisionInstance != 0);
@@ -1516,6 +1462,7 @@ int UtcDaliWebViewMethodsForCoverage(void)
     []( const std::string& arg ) {
     }
   );
+  view.SetTtsFocus(true);
 
   DALI_TEST_CHECK( view );
 
@@ -1585,19 +1532,15 @@ int UtcDaliWebContextGetSetCacheModel(void)
   std::string kDefaultValue;
 
   // Reset something
-  context->SetProxyUri( kDefaultValue );
-  context->SetCertificateFilePath( kDefaultValue );
-  context->EnableCache( true );
+  context->SetAppId( "id" );
+  context->SetApplicationType( Dali::WebEngineContext::ApplicationType::OTHER );
+  context->SetTimeOffset( 0 );
+  context->SetTimeZoneOffset( 0, 0 );
   context->SetDefaultProxyAuth( kDefaultValue, kDefaultValue );
   context->DeleteAllWebDatabase();
   context->DeleteAllWebStorage();
   context->DeleteLocalFileSystem();
   context->ClearCache();
-  context->SetContextAppId( "id" );
-  context->SetContextApplicationType( Dali::WebEngineContext::ApplicationType::OTHER );
-  context->SetContextTimeOffset( 0 );
-  context->SetContextTimeZoneOffset( 0, 0 );
-  context->SetDefaultZoomFactor( 0 );
   context->DeleteAllFormPasswordData();
   context->DeleteAllFormCandidateData();
 
@@ -1611,14 +1554,16 @@ int UtcDaliWebContextGetSetCacheModel(void)
   DALI_TEST_CHECK( value == Dali::WebEngineContext::CacheModel::DOCUMENT_BROWSER );
 
   // Get cache enabled
+  context->EnableCache( true );
   DALI_TEST_CHECK( context->IsCacheEnabled() );
 
   // Get certificate
-  std::string str = context->GetContextCertificateFile();
+  context->SetCertificateFilePath( "test" );
+  std::string str = context->GetCertificateFilePath();
   DALI_TEST_EQUALS( str, "test", TEST_LOCATION );
 
   // Set version
-  DALI_TEST_CHECK( context->SetContextAppVersion( "test" ) );
+  DALI_TEST_CHECK( context->SetAppVersion( "test" ) );
 
   // Register
   std::vector<std::string> temp;
@@ -1626,16 +1571,18 @@ int UtcDaliWebContextGetSetCacheModel(void)
   context->RegisterJsPluginMimeTypes( temp );
   context->DeleteFormPasswordDataList( temp );
 
-  // Get zoom
-  DALI_TEST_EQUALS( context->GetContextDefaultZoomFactor(), float( 0 ), TEST_LOCATION );
+  // Get zoom factor
+  context->SetDefaultZoomFactor( 1.0f );
+  DALI_TEST_EQUALS( context->GetDefaultZoomFactor(), float( 1.0f ), TEST_LOCATION );
 
   // Delete cache and database
   DALI_TEST_CHECK( context->DeleteAllApplicationCache() );
   DALI_TEST_CHECK( context->DeleteAllWebIndexedDatabase() );
 
   // Get contextProxy
-  context->SetContextProxy("", "");
-  DALI_TEST_EQUALS( context->GetContextProxy(), "test", TEST_LOCATION );
+  context->SetProxyUri( "test" );
+  DALI_TEST_EQUALS( context->GetProxyUri(), "test", TEST_LOCATION );
+  context->SetProxyBypassRule("", "test");
   DALI_TEST_EQUALS( context->GetProxyBypassRule(), "test", TEST_LOCATION );
 
   //Notify low memory
index 1cf4adc..839e96d 100644 (file)
@@ -44,6 +44,7 @@
 #include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
 #include <dali-toolkit/public-api/controls/slider/slider.h>
 #include <dali-toolkit/public-api/controls/text-controls/hidden-input-properties.h>
+#include <dali-toolkit/public-api/controls/text-controls/input-filter-properties.h>
 #include <dali-toolkit/public-api/controls/text-controls/placeholder-properties.h>
 #include <dali-toolkit/public-api/controls/text-controls/text-editor.h>
 #include <dali-toolkit/public-api/controls/text-controls/text-field.h>
index fd3e72e..c42cb8a 100644 (file)
 #include "accessible-impl.h"
 
 // EXTERNAL INCLUDES
+#ifdef DGETTEXT_ENABLED
+#include <libintl.h>
+#endif
+
 #include <dali/devel-api/actors/actor-devel.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
 #include <dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h>
 
-namespace Dali::Toolkit::DevelControl {
+namespace Dali::Toolkit::DevelControl
+{
+
+static std::string GetLocaleText(std::string string, const char *domain = "dali-toolkit")
+{
+#ifdef DGETTEXT_ENABLED
+    /*TODO: currently non-localized string is used as a key for translation lookup. In case the lookup key formatting is forced
+          consider calling utility function for converting non-localized string into well-formatted key before lookup. */
+    return dgettext(domain, string.c_str());
+#else
+    return string;
+#endif
+}
 
 AccessibleImpl::AccessibleImpl(Dali::Actor self, Dali::Accessibility::Role role, bool modal)
-: self(self),
-  modal(modal)
+: mSelf(self),
+  mIsModal(modal)
 {
   auto control = Dali::Toolkit::Control::DownCast(Self());
 
   Internal::Control&       internalControl = Toolkit::Internal::GetImplementation(control);
   Internal::Control::Impl& controlImpl     = Internal::Control::Impl::Get(internalControl);
   if(controlImpl.mAccessibilityRole == Dali::Accessibility::Role::UNKNOWN)
+  {
     controlImpl.mAccessibilityRole = role;
+  }
 
   Self().PropertySetSignal().Connect(&controlImpl, [this, &controlImpl](Dali::Handle& handle, Dali::Property::Index index, Dali::Property::Value value) {
     if(this->Self() != Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor())
@@ -72,21 +90,31 @@ std::string AccessibleImpl::GetName()
 
   Internal::Control&       internalControl = Toolkit::Internal::GetImplementation(control);
   Internal::Control::Impl& controlImpl     = Internal::Control::Impl::Get(internalControl);
+  std::string name;
 
   if(!controlImpl.mAccessibilityGetNameSignal.Empty())
   {
-    std::string ret;
-    controlImpl.mAccessibilityGetNameSignal.Emit(ret);
-    return ret;
+    controlImpl.mAccessibilityGetNameSignal.Emit(name);
+  }
+  else if(controlImpl.mAccessibilityNameSet)
+  {
+    name = controlImpl.mAccessibilityName;
+  }
+  else if(auto raw = GetNameRaw(); !raw.empty())
+  {
+    name = raw;
+  }
+  else
+  {
+    name = Self().GetProperty<std::string>(Actor::Property::NAME);
   }
 
-  if(controlImpl.mAccessibilityNameSet)
-    return controlImpl.mAccessibilityName;
-
-  if(auto raw = GetNameRaw(); !raw.empty())
-    return raw;
+  if(controlImpl.mAccessibilityTranslationDomainSet)
+  {
+    return GetLocaleText(name, controlImpl.mAccessibilityTranslationDomain.c_str());
+  }
 
-  return Self().GetProperty<std::string>(Actor::Property::NAME);
+  return GetLocaleText(name);
 }
 
 std::string AccessibleImpl::GetNameRaw()
@@ -100,23 +128,31 @@ std::string AccessibleImpl::GetDescription()
 
   Internal::Control&       internalControl = Toolkit::Internal::GetImplementation(control);
   Internal::Control::Impl& controlImpl     = Internal::Control::Impl::Get(internalControl);
+  std::string description;
 
   if(!controlImpl.mAccessibilityGetDescriptionSignal.Empty())
   {
-    std::string ret;
-    controlImpl.mAccessibilityGetDescriptionSignal.Emit(ret);
-    return ret;
+    controlImpl.mAccessibilityGetDescriptionSignal.Emit(description);
+  }
+  else if(controlImpl.mAccessibilityDescriptionSet)
+  {
+    description = controlImpl.mAccessibilityDescription;
+  }
+  else
+  {
+    description = GetDescriptionRaw();
+  }
+  if(controlImpl.mAccessibilityTranslationDomainSet)
+  {
+    return GetLocaleText(description, controlImpl.mAccessibilityTranslationDomain.c_str());
   }
 
-  if(controlImpl.mAccessibilityDescriptionSet)
-    return controlImpl.mAccessibilityDescription;
-
-  return GetDescriptionRaw();
+  return GetLocaleText(description);
 }
 
 std::string AccessibleImpl::GetDescriptionRaw()
 {
-  return "";
+  return {};
 }
 
 Dali::Accessibility::Accessible* AccessibleImpl::GetParent()
@@ -136,15 +172,18 @@ Dali::Accessibility::Accessible* AccessibleImpl::GetChildAtIndex(size_t index)
 
 size_t AccessibleImpl::GetIndexInParent()
 {
-  auto s      = Self();
-  auto parent = s.GetParent();
+  auto self = Self();
+  auto parent = self.GetParent();
   DALI_ASSERT_ALWAYS(parent && "can't call GetIndexInParent on object without parent");
+
   auto count = parent.GetChildCount();
   for(auto i = 0u; i < count; ++i)
   {
-    auto c = parent.GetChildAt(i);
-    if(c == s)
+    auto child = parent.GetChildAt(i);
+    if(child == self)
+    {
       return i;
+    }
   }
   DALI_ASSERT_ALWAYS(false && "object isn't child of it's parent");
   return static_cast<size_t>(-1);
@@ -155,28 +194,40 @@ Dali::Accessibility::Role AccessibleImpl::GetRole()
   return Self().GetProperty<Dali::Accessibility::Role>(Toolkit::DevelControl::Property::ACCESSIBILITY_ROLE);
 }
 
+std::string AccessibleImpl::GetLocalizedRoleName()
+{
+  return GetLocaleText(GetRoleName());
+}
+
 Dali::Accessibility::States AccessibleImpl::CalculateStates()
 {
   Dali::Actor self = Self();
-  Dali::Accessibility::States s;
-  s[Dali::Accessibility::State::FOCUSABLE] = self.GetProperty<bool>(Actor::Property::KEYBOARD_FOCUSABLE);
-  s[Dali::Accessibility::State::FOCUSED]   = Toolkit::KeyboardFocusManager::Get().GetCurrentFocusActor() == self;
+  Dali::Accessibility::States state;
+  state[Dali::Accessibility::State::FOCUSABLE] = self.GetProperty<bool>(Actor::Property::KEYBOARD_FOCUSABLE);
+  state[Dali::Accessibility::State::FOCUSED]   = Toolkit::KeyboardFocusManager::Get().GetCurrentFocusActor() == self;
+
   if(self.GetProperty(Toolkit::DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE).GetType() == Dali::Property::NONE)
-    s[Dali::Accessibility::State::HIGHLIGHTABLE] = false;
+  {
+    state[Dali::Accessibility::State::HIGHLIGHTABLE] = false;
+  }
   else
-    s[Dali::Accessibility::State::HIGHLIGHTABLE] = self.GetProperty(Toolkit::DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE).Get<bool>();
-  s[Dali::Accessibility::State::HIGHLIGHTED] = GetCurrentlyHighlightedActor() == self;
-  s[Dali::Accessibility::State::ENABLED]     = true;
-  s[Dali::Accessibility::State::SENSITIVE]   = true;
-  s[Dali::Accessibility::State::VISIBLE]     = true;
-  if(modal)
   {
-    s[Dali::Accessibility::State::MODAL] = true;
+    state[Dali::Accessibility::State::HIGHLIGHTABLE] = self.GetProperty(Toolkit::DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE).Get<bool>();
+  }
+
+  state[Dali::Accessibility::State::HIGHLIGHTED] = GetCurrentlyHighlightedActor() == self;
+  state[Dali::Accessibility::State::ENABLED]     = true;
+  state[Dali::Accessibility::State::SENSITIVE]   = true;
+  state[Dali::Accessibility::State::VISIBLE]     = true;
+
+  if(mIsModal)
+  {
+    state[Dali::Accessibility::State::MODAL] = true;
   }
-  s[Dali::Accessibility::State::SHOWING] = !self.GetProperty(Dali::DevelActor::Property::CULLED).Get<bool>() && self.GetCurrentProperty<bool>(Actor::Property::VISIBLE);
+  state[Dali::Accessibility::State::SHOWING] = !self.GetProperty(Dali::DevelActor::Property::CULLED).Get<bool>() && self.GetCurrentProperty<bool>(Actor::Property::VISIBLE);
 
-  s[Dali::Accessibility::State::DEFUNCT] = !self.GetProperty(Dali::DevelActor::Property::CONNECTED_TO_SCENE).Get<bool>();
-  return s;
+  state[Dali::Accessibility::State::DEFUNCT] = !self.GetProperty(Dali::DevelActor::Property::CONNECTED_TO_SCENE).Get<bool>();
+  return state;
 }
 
 Dali::Accessibility::States AccessibleImpl::GetStates()
@@ -186,32 +237,30 @@ Dali::Accessibility::States AccessibleImpl::GetStates()
 
 Dali::Accessibility::Attributes AccessibleImpl::GetAttributes()
 {
-  std::unordered_map<std::string, std::string> attribute_map;
-  auto                                         q = Dali::Toolkit::Control::DownCast(Self());
-  auto                                         w =
-    q.GetProperty(Dali::Toolkit::DevelControl::Property::ACCESSIBILITY_ATTRIBUTES);
-  auto z = w.GetMap();
+  std::unordered_map<std::string, std::string> attributeMap;
+  auto control = Dali::Toolkit::Control::DownCast(Self());
+  auto attribute = control.GetProperty(Dali::Toolkit::DevelControl::Property::ACCESSIBILITY_ATTRIBUTES);
+  auto map = attribute.GetMap();
 
-  if(z)
+  if(map)
   {
-    auto map_size = z->Count();
+    auto mapSize = map->Count();
 
-    for(unsigned int i = 0; i < map_size; i++)
+    for(unsigned int i = 0; i < mapSize; i++)
     {
-      auto map_key = z->GetKeyAt(i);
-      if(map_key.type == Dali::Property::Key::STRING)
+      auto mapKey = map->GetKeyAt(i);
+      if(mapKey.type == Dali::Property::Key::STRING)
       {
-        std::string map_value;
-        if(z->GetValue(i).Get(map_value))
+        std::string mapValue;
+        if(map->GetValue(i).Get(mapValue))
         {
-          attribute_map.emplace(std::move(map_key.stringKey),
-                                std::move(map_value));
+          attributeMap.emplace(std::move(mapKey.stringKey), std::move(mapValue));
         }
       }
     }
   }
 
-  return attribute_map;
+  return attributeMap;
 }
 
 Dali::Accessibility::ComponentLayer AccessibleImpl::GetLayer()
@@ -219,21 +268,15 @@ Dali::Accessibility::ComponentLayer AccessibleImpl::GetLayer()
   return Dali::Accessibility::ComponentLayer::WINDOW;
 }
 
-Dali::Rect<> AccessibleImpl::GetExtents(Dali::Accessibility::CoordType ctype)
+Dali::Rect<> AccessibleImpl::GetExtents(Dali::Accessibility::CoordinateType type)
 {
   Dali::Actor self = Self();
-  Vector2 screenPosition =
-    self.GetProperty(Dali::DevelActor::Property::SCREEN_POSITION)
-      .Get<Vector2>();
+
+  Vector2 screenPosition = self.GetProperty(Dali::DevelActor::Property::SCREEN_POSITION).Get<Vector2>();
   auto size = self.GetCurrentProperty<Vector3>(Actor::Property::SIZE) * self.GetCurrentProperty<Vector3>(Actor::Property::WORLD_SCALE);
-  bool positionUsesAnchorPoint =
-    self.GetProperty(Dali::DevelActor::Property::POSITION_USES_ANCHOR_POINT)
-      .Get<bool>();
-  Vector3 anchorPointOffSet =
-    size * (positionUsesAnchorPoint ? self.GetCurrentProperty<Vector3>(Actor::Property::ANCHOR_POINT)
-                                    : AnchorPoint::TOP_LEFT);
-  Vector2 position = Vector2(screenPosition.x - anchorPointOffSet.x,
-                             screenPosition.y - anchorPointOffSet.y);
+  bool positionUsesAnchorPoint = self.GetProperty(Dali::DevelActor::Property::POSITION_USES_ANCHOR_POINT).Get<bool>();
+  Vector3 anchorPointOffSet = size * (positionUsesAnchorPoint ? self.GetCurrentProperty<Vector3>(Actor::Property::ANCHOR_POINT) : AnchorPoint::TOP_LEFT);
+  Vector2 position = Vector2((screenPosition.x - anchorPointOffSet.x), (screenPosition.y - anchorPointOffSet.y));
 
   return {position.x, position.y, size.x, size.y};
 }
@@ -256,11 +299,13 @@ static Dali::Actor CreateHighlightIndicatorActor()
 {
   std::string focusBorderImagePath(AssetManager::GetDaliImagePath());
   focusBorderImagePath += "/keyboard_focus.9.png";
+
   // Create the default if it hasn't been set and one that's shared by all the
   // keyboard focusable actors
   auto actor = Toolkit::ImageView::New(focusBorderImagePath);
   actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
-  DevelControl::AppendAccessibilityAttribute(actor, "highlight", "");
+
+  DevelControl::AppendAccessibilityAttribute(actor, "highlight", std::string());
   actor.SetProperty(Toolkit::DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE, false);
 
   return actor;
@@ -286,24 +331,35 @@ void AccessibleImpl::ScrollToSelf()
 bool AccessibleImpl::GrabHighlight()
 {
   Dali::Actor self = Self();
-  auto old = GetCurrentlyHighlightedActor();
+  auto oldHighlightedActor = GetCurrentlyHighlightedActor();
 
   if(!Dali::Accessibility::IsUp())
+  {
     return false;
-  if(self == old)
+  }
+
+  if(self == oldHighlightedActor)
+  {
     return true;
-  if(old)
+  }
+
+  // Clear the old highlight.
+  if(oldHighlightedActor)
   {
-    auto c = dynamic_cast<Dali::Accessibility::Component*>(Internal::Control::Impl::GetAccessibilityObject(old));
-    if(c)
-      c->ClearHighlight();
+    auto oldHighlightObject = dynamic_cast<Dali::Accessibility::Component*>(Internal::Control::Impl::GetAccessibilityObject(oldHighlightedActor));
+    if(oldHighlightObject)
+    {
+      oldHighlightObject->ClearHighlight();
+    }
   }
+
   auto highlight = GetHighlightActor();
   if(!highlight)
   {
     highlight = CreateHighlightIndicatorActor();
     SetHighlightActor(highlight);
   }
+
   highlight.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
   highlight.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
   highlight.SetProperty(Actor::Property::POSITION_Z, 1.0f);
@@ -311,7 +367,7 @@ bool AccessibleImpl::GrabHighlight()
 
   // Remember the highlight actor, so that when the default is changed with
   // SetHighlightActor(), the currently displayed highlight can still be cleared.
-  currentHighlightActor = highlight;
+  mCurrentHighlightActor = highlight;
   ScrollToSelf();
   self.Add(highlight);
   SetCurrentlyHighlightedActor(self);
@@ -325,11 +381,14 @@ bool AccessibleImpl::ClearHighlight()
   Dali::Actor self = Self();
 
   if(!Dali::Accessibility::IsUp())
+  {
     return false;
+  }
+
   if(GetCurrentlyHighlightedActor() == self)
   {
-    self.Remove(currentHighlightActor.GetHandle());
-    currentHighlightActor = {};
+    self.Remove(mCurrentHighlightActor.GetHandle());
+    mCurrentHighlightActor = {};
     SetCurrentlyHighlightedActor({});
     EmitHighlighted(false);
     return true;
@@ -339,7 +398,11 @@ bool AccessibleImpl::ClearHighlight()
 
 std::string AccessibleImpl::GetActionName(size_t index)
 {
-  if(index >= GetActionCount()) return "";
+  if(index >= GetActionCount())
+  {
+    return {};
+  }
+
   Dali::TypeInfo type;
   Self().GetTypeInfo(type);
   DALI_ASSERT_ALWAYS(type && "no TypeInfo object");
@@ -348,13 +411,12 @@ std::string AccessibleImpl::GetActionName(size_t index)
 
 std::string AccessibleImpl::GetLocalizedActionName(size_t index)
 {
-  // TODO: add localization
-  return GetActionName(index);
+  return GetLocaleText(GetActionName(index));
 }
 
 std::string AccessibleImpl::GetActionDescription(size_t index)
 {
-  return "";
+  return {};
 }
 
 size_t AccessibleImpl::GetActionCount()
@@ -367,7 +429,7 @@ size_t AccessibleImpl::GetActionCount()
 
 std::string AccessibleImpl::GetActionKeyBinding(size_t index)
 {
-  return "";
+  return {};
 }
 
 bool AccessibleImpl::DoAction(size_t index)
@@ -407,13 +469,12 @@ std::vector<Dali::Accessibility::Relation> AccessibleImpl::GetRelationSet()
 
   std::vector<Dali::Accessibility::Relation> ret;
 
-  auto& v = controlImpl.mAccessibilityRelations;
-  for(auto i = 0u; i < v.size(); ++i)
+  auto& relation = controlImpl.mAccessibilityRelations;
+  for(auto i = 0u; i < relation.size(); ++i)
   {
-    if(v[i].empty())
-      continue;
+    if(relation[i].empty()) continue;
 
-    ret.emplace_back(Accessibility::Relation{static_cast<Accessibility::RelationType>(i), v[i]});
+    ret.emplace_back(Accessibility::Relation{static_cast<Accessibility::RelationType>(i), relation[i]});
   }
 
   return ret;
index ab168c6..37e7ad3 100644 (file)
@@ -47,13 +47,14 @@ struct DALI_TOOLKIT_API AccessibleImpl : public virtual Dali::Accessibility::Acc
                                          public virtual Dali::Accessibility::Action
 {
 protected:
-  Dali::WeakHandle<Dali::Actor> self;
-  Dali::WeakHandle<Dali::Actor> currentHighlightActor;
-  bool        modal = false, root = false;
+  Dali::WeakHandle<Dali::Actor> mSelf;
+  Dali::WeakHandle<Dali::Actor> mCurrentHighlightActor;
+  bool mIsModal = false;
+  bool mIsRoot = false;
 
   Dali::Actor Self()
   {
-    auto handle = self.GetHandle();
+    auto handle = mSelf.GetHandle();
 
     // Control::Impl holds a std::unique_ptr to the Accessible object,
     // so that one does not outlive the other.
@@ -113,6 +114,11 @@ public:
   Dali::Accessibility::Role GetRole() override;
 
   /**
+   * @copydoc Dali::Accessibility::Accessible::GetLocalizedRoleName()
+   */
+  std::string GetLocalizedRoleName() override;
+
+  /**
    * @copydoc Dali::Accessibility::Accessible::GetStates()
    */
   Dali::Accessibility::States GetStates() override;
@@ -125,7 +131,7 @@ public:
   /**
    * @copydoc Dali::Accessibility::Component::GetExtents()
    */
-  Dali::Rect<> GetExtents(Dali::Accessibility::CoordType ctype) override;
+  Dali::Rect<> GetExtents(Accessibility::CoordinateType type) override;
 
   /**
    * @copydoc Dali::Accessibility::Component::GetLayer()
index 487aa1b..55becb3 100644 (file)
@@ -135,107 +135,102 @@ void CreateTransitions(Control control, Dali::Animation& animation, Dali::Toolki
   }
 }
 
-static Toolkit::Internal::Control::Impl* GetControlImplementationIfAny(Dali::Actor actor)
+static Toolkit::Internal::Control::Impl* GetControlImplementation(Dali::Actor actor)
 {
-  Dali::Toolkit::Control c = Toolkit::Control::DownCast(actor);
-  if(c)
+  Dali::Toolkit::Control control = Toolkit::Control::DownCast(actor);
+  if(control)
   {
-    auto& impl1 = Toolkit::Internal::GetImplementation(c);
-    auto& impl2 = Toolkit::Internal::Control::Impl::Get(impl1);
-    return &impl2;
+    auto& internalControl = Toolkit::Internal::GetImplementation(control);
+    auto& controlDataImpl = Toolkit::Internal::Control::Impl::Get(internalControl);
+    return &controlDataImpl;
   }
   return nullptr;
 }
 
 Toolkit::DevelControl::AccessibilityActivateSignalType& AccessibilityActivateSignal(Toolkit::Control control)
 {
-  auto ac = GetControlImplementationIfAny(control);
-  return ac->mAccessibilityActivateSignal;
+  return GetControlImplementation(control)->mAccessibilityActivateSignal;
 }
 
 Toolkit::DevelControl::AccessibilityReadingSkippedSignalType& AccessibilityReadingSkippedSignal(Toolkit::Control control)
 {
-  auto ac = GetControlImplementationIfAny(control);
-  return ac->mAccessibilityReadingSkippedSignal;
+  return GetControlImplementation(control)->mAccessibilityReadingSkippedSignal;
 }
 
 Toolkit::DevelControl::AccessibilityReadingPausedSignalType& AccessibilityReadingPausedSignal(Toolkit::Control control)
 {
-  auto ac = GetControlImplementationIfAny(control);
-  return ac->mAccessibilityReadingPausedSignal;
+  return GetControlImplementation(control)->mAccessibilityReadingPausedSignal;
 }
 
 Toolkit::DevelControl::AccessibilityReadingResumedSignalType& AccessibilityReadingResumedSignal(Toolkit::Control control)
 {
-  auto ac = GetControlImplementationIfAny(control);
-  return ac->mAccessibilityReadingResumedSignal;
+  return GetControlImplementation(control)->mAccessibilityReadingResumedSignal;
 }
 
 Toolkit::DevelControl::AccessibilityReadingCancelledSignalType& AccessibilityReadingCancelledSignal(Toolkit::Control control)
 {
-  auto ac = GetControlImplementationIfAny(control);
-  return ac->mAccessibilityReadingCancelledSignal;
+  return GetControlImplementation(control)->mAccessibilityReadingCancelledSignal;
 }
 
 Toolkit::DevelControl::AccessibilityReadingStoppedSignalType& AccessibilityReadingStoppedSignal(Toolkit::Control control)
 {
-  auto ac = GetControlImplementationIfAny(control);
-  return ac->mAccessibilityReadingStoppedSignal;
+  return GetControlImplementation(control)->mAccessibilityReadingStoppedSignal;
 }
 
 Toolkit::DevelControl::AccessibilityGetNameSignalType& AccessibilityGetNameSignal(Toolkit::Control control)
 {
-  auto ac = GetControlImplementationIfAny(control);
-  return ac->mAccessibilityGetNameSignal;
+  return GetControlImplementation(control)->mAccessibilityGetNameSignal;
 }
 
 Toolkit::DevelControl::AccessibilityGetDescriptionSignalType& AccessibilityGetDescriptionSignal(Toolkit::Control control)
 {
-  auto ac = GetControlImplementationIfAny(control);
-  return ac->mAccessibilityGetDescriptionSignal;
+  return GetControlImplementation(control)->mAccessibilityGetDescriptionSignal;
 }
 
 Toolkit::DevelControl::AccessibilityDoGestureSignalType& AccessibilityDoGestureSignal(Toolkit::Control control)
 {
-  auto ac = GetControlImplementationIfAny(control);
-  return ac->mAccessibilityDoGestureSignal;
+  return GetControlImplementation(control)->mAccessibilityDoGestureSignal;
 }
 
 void AppendAccessibilityRelation(Dali::Actor control, Actor destination, Dali::Accessibility::RelationType relation)
 {
-  if(auto ac = GetControlImplementationIfAny(control))
+  if(auto controlDataImpl = GetControlImplementation(control))
   {
     auto index = static_cast<Dali::Property::Array::SizeType>(relation);
-    if(index >= ac->mAccessibilityRelations.size())
+    if(index >= controlDataImpl->mAccessibilityRelations.size())
     {
       DALI_LOG_ERROR("Relation index exceeds vector size.");
       return;
     }
 
-    auto obj = ac->GetAccessibilityObject(destination);
-    if(obj)
-      ac->mAccessibilityRelations[index].push_back(obj->GetAddress());
+    auto object = controlDataImpl->GetAccessibilityObject(destination);
+    if(object)
+    {
+      controlDataImpl->mAccessibilityRelations[index].push_back(object->GetAddress());
+    }
   }
 }
 
 void RemoveAccessibilityRelation(Dali::Actor control, Actor destination, Dali::Accessibility::RelationType relation)
 {
-  if(auto ac = GetControlImplementationIfAny(control))
+  if(auto controlDataImpl = GetControlImplementation(control))
   {
     auto index = static_cast<Dali::Property::Array::SizeType>(relation);
-    if(index >= ac->mAccessibilityRelations.size())
+    if(index >= controlDataImpl->mAccessibilityRelations.size())
     {
       DALI_LOG_ERROR("Relation index exceeds vector size.");
       return;
     }
 
-    auto obj = ac->GetAccessibilityObject(destination);
-    if(!obj)
+    auto object = controlDataImpl->GetAccessibilityObject(destination);
+    if(!object)
+    {
       return;
+    }
 
-    auto address = obj->GetAddress();
+    auto address = object->GetAddress();
 
-    auto& targets = ac->mAccessibilityRelations[index];
+    auto& targets = controlDataImpl->mAccessibilityRelations[index];
     for(auto i = 0u; i < targets.size(); ++i)
     {
       if(targets[i].ToString() == address.ToString())
@@ -249,110 +244,117 @@ void RemoveAccessibilityRelation(Dali::Actor control, Actor destination, Dali::A
 
 std::vector<std::vector<Accessibility::Address>> GetAccessibilityRelations(Dali::Actor control)
 {
-  if(auto ac = GetControlImplementationIfAny(control))
+  if(auto controlDataImpl = GetControlImplementation(control))
   {
-    return ac->mAccessibilityRelations;
+    return controlDataImpl->mAccessibilityRelations;
   }
   return {};
 }
 
 void ClearAccessibilityRelations(Dali::Actor control)
 {
-  if(auto ac = GetControlImplementationIfAny(control))
+  if(auto controlDataImpl = GetControlImplementation(control))
   {
-    for(auto& it : ac->mAccessibilityRelations)
+    for(auto& it : controlDataImpl->mAccessibilityRelations)
+    {
       it.clear();
+    }
   }
 }
 
-void SetAccessibilityConstructor(Dali::Actor                                                                  control,
-                                 std::function<std::unique_ptr<Dali::Accessibility::Accessible>(Dali::Actor)> constructor)
+void SetAccessibilityConstructor(Dali::Actor control, std::function<std::unique_ptr<Dali::Accessibility::Accessible>(Dali::Actor)> constructor)
 {
-  if(auto ac = GetControlImplementationIfAny(control))
+  if(auto controlDataImpl = GetControlImplementation(control))
   {
-    ac->accessibilityConstructor = constructor;
+    controlDataImpl->mAccessibilityConstructor = constructor;
   }
 }
 
 void AppendAccessibilityAttribute(Dali::Actor control, const std::string& key, const std::string value)
 {
-  if(auto ac = GetControlImplementationIfAny(control))
+  if(auto controlDataImpl = GetControlImplementation(control))
   {
-    ac->AppendAccessibilityAttribute(key, value);
+    controlDataImpl->AppendAccessibilityAttribute(key, value);
   }
 }
 
 void RemoveAccessibilityAttribute(Dali::Actor control, const std::string& key)
 {
-  if(auto ac = GetControlImplementationIfAny(control))
+  if(auto controlDataImpl = GetControlImplementation(control))
   {
-    ac->RemoveAccessibilityAttribute(key);
+    controlDataImpl->RemoveAccessibilityAttribute(key);
   }
 }
 
 void ClearAccessibilityAttributes(Dali::Actor control)
 {
-  if(auto ac = GetControlImplementationIfAny(control))
+  if(auto controlDataImpl = GetControlImplementation(control))
   {
-    ac->ClearAccessibilityAttributes();
+    controlDataImpl->ClearAccessibilityAttributes();
   }
 }
 
 void SetAccessibilityReadingInfoType(Dali::Actor control, const Dali::Accessibility::ReadingInfoTypes types)
 {
-  if(auto ac = GetControlImplementationIfAny(control))
+  if(auto controlDataImpl = GetControlImplementation(control))
   {
-    ac->SetAccessibilityReadingInfoType(types);
+    controlDataImpl->SetAccessibilityReadingInfoType(types);
   }
 }
 
 Dali::Accessibility::ReadingInfoTypes GetAccessibilityReadingInfoType(Dali::Actor control)
 {
-  if(auto ac = GetControlImplementationIfAny(control))
+  if(auto controlDataImpl = GetControlImplementation(control))
   {
-    return ac->GetAccessibilityReadingInfoType();
+    return controlDataImpl->GetAccessibilityReadingInfoType();
   }
   return {};
 }
 
 bool ClearAccessibilityHighlight(Dali::Actor control)
 {
-  if(auto ac = GetControlImplementationIfAny(control))
+  if(auto controlDataImpl = GetControlImplementation(control))
   {
-    auto ptr = dynamic_cast<Dali::Accessibility::Component*>(ac->GetAccessibilityObject());
-    if(ptr)
-      return ptr->ClearHighlight();
+    auto object = dynamic_cast<Dali::Accessibility::Component*>(controlDataImpl->GetAccessibilityObject());
+    if(object)
+    {
+      return object->ClearHighlight();
+    }
   }
   return false;
 }
 
 bool GrabAccessibilityHighlight(Dali::Actor control)
 {
-  if(auto ac = GetControlImplementationIfAny(control))
+  if(auto controlDataImpl = GetControlImplementation(control))
   {
-    auto ptr = dynamic_cast<Dali::Accessibility::Component*>(ac->GetAccessibilityObject());
-    if(ptr)
-      return ptr->GrabHighlight();
+    auto object = dynamic_cast<Dali::Accessibility::Component*>(controlDataImpl->GetAccessibilityObject());
+    if(object)
+    {
+      return object->GrabHighlight();
+    }
   }
   return false;
 }
 
 Dali::Accessibility::States GetAccessibilityStates(Dali::Actor control)
 {
-  if(auto ac = GetControlImplementationIfAny(control))
+  if(auto controlDataImpl = GetControlImplementation(control))
   {
-    auto ptr = dynamic_cast<Dali::Accessibility::Component*>(ac->GetAccessibilityObject());
-    if(ptr)
-      return ptr->GetStates();
+    auto object = dynamic_cast<Dali::Accessibility::Component*>(controlDataImpl->GetAccessibilityObject());
+    if(object)
+    {
+      return object->GetStates();
+    }
   }
   return {};
 }
 
-void NotifyAccessibilityStateChange(Dali::Actor control, Dali::Accessibility::States states, bool doRecursive)
+void NotifyAccessibilityStateChange(Dali::Actor control, Dali::Accessibility::States states, bool isRecursive)
 {
-  if(auto ac = GetControlImplementationIfAny(control))
+  if(auto controlDataImpl = GetControlImplementation(control))
   {
-    ac->GetAccessibilityObject()->NotifyAccessibilityStateChange(std::move(states), doRecursive);
+    controlDataImpl->GetAccessibilityObject()->NotifyAccessibilityStateChange(std::move(states), isRecursive);
   }
 }
 
index d977c34..51cf1cc 100644 (file)
@@ -555,9 +555,9 @@ DALI_TOOLKIT_API Dali::Accessibility::States GetAccessibilityStates(Dali::Actor
  *
  * @param control object to append attribute to
  * @param states      mask with states expected to broadcast
- * @param doRecursive flag pointing if notifications of children's state would be sent
+ * @param isRecursive flag pointing if notifications of children's state would be sent
  */
-DALI_TOOLKIT_API void NotifyAccessibilityStateChange(Dali::Actor control, Dali::Accessibility::States states, bool doRecursive);
+DALI_TOOLKIT_API void NotifyAccessibilityStateChange(Dali::Actor control, Dali::Accessibility::States states, bool isRecursive);
 
 /**
  * The method allows to set specific constructor for creating accessibility structure
index 37678d8..a685aee 100644 (file)
@@ -40,6 +40,11 @@ AnchorClickedSignalType& AnchorClickedSignal(TextEditor textEditor)
   return GetImpl(textEditor).AnchorClickedSignal();
 }
 
+InputFilteredSignalType& InputFilteredSignal(TextEditor textEditor)
+{
+  return GetImpl(textEditor).InputFilteredSignal();
+}
+
 void SelectWholeText(TextEditor textEditor)
 {
   GetImpl(textEditor).SelectWholeText();
index 665af7a..695ca1b 100644 (file)
@@ -21,6 +21,7 @@
 #include <dali/devel-api/adaptor-framework/input-method-context.h>
 
 // INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/text-controls/input-filter-properties.h>
 #include <dali-toolkit/public-api/controls/text-controls/text-editor.h>
 
 namespace Dali
@@ -111,7 +112,7 @@ enum Type
   /**
    * @brief Modifies the default text alignment to match the direction of the system language.
    * @details Name "matchSystemLanguageDirection", type (Property::BOOLEAN), Read/Write
-   * @note The default value is false
+   * @note The default value is true
    */
   MATCH_SYSTEM_LANGUAGE_DIRECTION,
 
@@ -220,6 +221,52 @@ enum Type
    * @endcode
    */
   INPUT_METHOD_SETTINGS,
+
+  /**
+   * @brief The input filter
+   * @details Name "inputFilter", type Property::MAP.
+   *
+   * The inputFilter map contains the following keys:
+   *
+   * | %Property Name       | Type     | Required | Description                                                                                                         |
+   * |----------------------|----------|----------|---------------------------------------------------------------------------------------------------------------------|
+   * | accepted             | STRING   | No       | A regular expression in the set of characters to be accepted by the inputFilter (the default value is empty string) |
+   * | rejected             | STRING   | No       | A regular expression in the set of characters to be rejected by the inputFilter (the default value is empty string) |
+   *
+   * @note Optional.
+   * The character set must follow the regular expression rules.
+   * Behaviour can not be guaranteed for incorrect grammars.
+   * Refer the link below for detailed rules.
+   * The functions in std::regex library use the ECMAScript grammar:
+   * http://cplusplus.com/reference/regex/ECMAScript/
+   *
+   * You can use enums instead of "accepted" and "rejected" strings.
+   * @see Dali::Toolkit::InputFilter::Property::Type
+   *
+   * Example Usage:
+   * @code
+   *   Property::Map filter;
+   *   filter[InputFilter::Property::ACCEPTED] = "[\\d]"; // accept whole digits
+   *   filter[InputFilter::Property::REJECTED] = "[0-5]"; // reject 0, 1, 2, 3, 4, 5
+   *
+   *   editor.SetProperty(DevelTextEditor::Property::INPUT_FILTER, filter); // acceptable inputs are 6, 7, 8, 9
+   * @endcode
+   */
+  INPUT_FILTER,
+
+  /**
+  * @brief Whether we should show the ellipsis if required.
+  * @details Name "ellipsis", type Property::BOOLEAN.
+  */
+  ELLIPSIS,
+
+  /**
+  * @brief The enumerations used to specify whether to position the ellipsis at the END, START or MIDDLE of the text.
+  * @details Name "EllipsisPosition", type [Type](@ref Dali::Toolkit::DevelText::EllipsisPosition::Type) (Property::INTEGER), or Property::STRING. Read/Write
+  * @note Default is EllipsisPosition::END.
+  * @see DevelText::EllipsisPosition
+  */
+  ELLIPSIS_POSITION,
 };
 
 } // namespace Property
@@ -271,6 +318,37 @@ using AnchorClickedSignalType = Signal<void(TextEditor, const char*, uint32_t)>;
 DALI_TOOLKIT_API AnchorClickedSignalType& AnchorClickedSignal(TextEditor textEditor);
 
 /**
+ * @brief Input filtered signal type.
+ */
+using InputFilteredSignalType = Signal<void(TextEditor, Toolkit::InputFilter::Property::Type)>;
+
+/**
+ * @brief This signal is emitted when the character to be inserted is filtered by the input filter.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ *   void YourCallbackName(TextEditor textEditor, Toolkit::InputFilter::Property::Type type);
+ *
+ *   DevelTextEditor::InputFilteredSignal(textEditor).Connect(this, &OnInputFiltered);
+ *
+ *   void OnInputFiltered(TextEditor textEditor, InputFilter::Property::Type type)
+ *   {
+ *     if (type == InputFilter::Property::ACCEPTED)
+ *     {
+ *       // If the input has been filtered with an accepted filter, the type is ACCEPTED.
+ *     }
+ *     else if (type == InputFilter::Property::REJECTED)
+ *     {
+ *       // If the input has been filtered with an rejected filter, the type is REJECTED.
+ *     }
+ *   }
+ * @endcode
+ * @param[in] textEditor The instance of TextEditor.
+ * @return The signal to connect to.
+ */
+DALI_TOOLKIT_API InputFilteredSignalType& InputFilteredSignal(TextEditor textEditor);
+
+/**
  * @brief Select the whole text of TextEditor.
  *
  * @param[in] textEditor The instance of TextEditor.
index fdfac30..727b42a 100644 (file)
@@ -35,6 +35,11 @@ AnchorClickedSignalType& AnchorClickedSignal(TextField textField)
   return GetImpl(textField).AnchorClickedSignal();
 }
 
+InputFilteredSignalType& InputFilteredSignal(TextField textField)
+{
+  return GetImpl(textField).InputFilteredSignal();
+}
+
 void SelectWholeText(TextField textField)
 {
   GetImpl(textField).SelectWholeText();
index 3367bec..377b606 100644 (file)
@@ -21,6 +21,7 @@
 #include <dali/devel-api/adaptor-framework/input-method-context.h>
 
 // INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/text-controls/input-filter-properties.h>
 #include <dali-toolkit/public-api/controls/text-controls/text-field.h>
 
 namespace Dali
@@ -99,7 +100,7 @@ enum
   /**
    * @brief Modifies the default text alignment to match the direction of the system language.
    * @details Name "matchSystemLanguageDirection", type (Property::BOOLEAN), Read/Write
-   * @note The default value is false
+   * @note The default value is true
    */
   MATCH_SYSTEM_LANGUAGE_DIRECTION = ELLIPSIS + 3,
 
@@ -172,6 +173,46 @@ enum
    * @details Name "grabHandleColor", type Property::VECTOR4.
    */
   GRAB_HANDLE_COLOR,
+
+  /**
+   * @brief The input filter
+   * @details Name "inputFilter", type Property::MAP.
+   *
+   * The inputFilter map contains the following keys:
+   *
+   * | %Property Name       | Type     | Required | Description                                                                                                         |
+   * |----------------------|----------|----------|---------------------------------------------------------------------------------------------------------------------|
+   * | accepted             | STRING   | No       | A regular expression in the set of characters to be accepted by the inputFilter (the default value is empty string) |
+   * | rejected             | STRING   | No       | A regular expression in the set of characters to be rejected by the inputFilter (the default value is empty string) |
+   *
+   * @note Optional.
+   * The character set must follow the regular expression rules.
+   * Behaviour can not be guaranteed for incorrect grammars.
+   * Refer the link below for detailed rules.
+   * The functions in std::regex library use the ECMAScript grammar:
+   * http://cplusplus.com/reference/regex/ECMAScript/
+   *
+   * You can use enums instead of "accepted" and "rejected" strings.
+   * @see Dali::Toolkit::InputFilter::Property::Type
+   *
+   * Example Usage:
+   * @code
+   *   Property::Map filter;
+   *   filter[InputFilter::Property::ACCEPTED] = "[\\d]"; // accept whole digits
+   *   filter[InputFilter::Property::REJECTED] = "[0-5]"; // reject 0, 1, 2, 3, 4, 5
+   *
+   *   field.SetProperty(DevelTextField::Property::INPUT_FILTER, filter); // acceptable inputs are 6, 7, 8, 9
+   * @endcode
+   */
+  INPUT_FILTER,
+
+  /**
+  * @brief The enumerations used to specify whether to position the ellipsis at the END, START or MIDDLE of the text.
+  * @details Name "EllipsisPosition", type [Type](@ref Dali::Toolkit::DevelText::EllipsisPosition::Type) (Property::INTEGER), or Property::STRING. Read/Write
+  * @note Default is EllipsisPosition::END.
+  * @see DevelText::EllipsisPosition
+  */
+  ELLIPSIS_POSITION,
 };
 
 } // namespace Property
@@ -206,6 +247,37 @@ using AnchorClickedSignalType = Signal<void(TextField, const char*, uint32_t)>;
 DALI_TOOLKIT_API AnchorClickedSignalType& AnchorClickedSignal(TextField textField);
 
 /**
+ * @brief Input filtered signal type.
+ */
+using InputFilteredSignalType = Signal<void(TextField, Toolkit::InputFilter::Property::Type)>;
+
+/**
+ * @brief This signal is emitted when the character to be inserted is filtered by the input filter.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ *   void YourCallbackName(TextField textField, Toolkit::InputFilter::Property::Type type);
+ *
+ *   DevelTextField::InputFilteredSignal(textField).Connect(this, &OnInputFiltered);
+ *
+ *   void OnInputFiltered(TextField textField, InputFilter::Property::Type type)
+ *   {
+ *     if (type == InputFilter::Property::ACCEPTED)
+ *     {
+ *       // If the input has been filtered with an accepted filter, the type is ACCEPTED.
+ *     }
+ *     else if (type == InputFilter::Property::REJECTED)
+ *     {
+ *       // If the input has been filtered with an rejected filter, the type is REJECTED.
+ *     }
+ *   }
+ * @endcode
+ * @param[in] textField The instance of TextField.
+ * @return The signal to connect to.
+ */
+DALI_TOOLKIT_API InputFilteredSignalType& InputFilteredSignal(TextField textField);
+
+/**
  * @brief Select the whole text of TextField.
  *
  * @param[in] textField The instance of TextField.
index efdad10..ac0f30c 100644 (file)
@@ -95,7 +95,7 @@ enum Type
   /**
      * @brief Modifies the default text alignment to match the direction of the system language.
      * @details Name "matchSystemLanguageDirection", type (Property::BOLEAN), Read/Write
-     * @note The default value is false
+     * @note The default value is true
      *
      * If MATCH_SYSTEM_LANGUAGE_DIRECTION property set true, the default text alignment to match the direction of the system language.
      *
@@ -105,10 +105,10 @@ enum Type
      *
      * | TextLabel::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION                 |
      * |-----------------------------------------------------------------------
-     * |        false (default)            |                true              |
+     * |               false               |          true (default)          |
      * |-----------------------------------|----------------------------------|
      * |                     Hello world   |                  Hello world     |
-     * |   ﻡﺮﺤﺑﺍ.                          |                      ﻡﺮﺤﺑﺍ.      |
+     * |   ﻡﺮﺤﺑﺍ.                     |                          ﻡﺮﺤﺑﺍ.      |
      *
      */
   MATCH_SYSTEM_LANGUAGE_DIRECTION,
@@ -154,6 +154,14 @@ enum Type
    *  - fontSize: 10pt, fontSizeScale: 1.5
    */
   FONT_SIZE_SCALE,
+
+  /**
+  * @brief The enumerations used to specify whether to position the ellipsis at the END, START or MIDDLE of the text.
+  * @details Name "EllipsisPosition", type [Type](@ref Dali::Toolkit::DevelText::EllipsisPosition::Type) (Property::INTEGER), or Property::STRING. Read/Write
+  * @note Default is EllipsisPosition::END.
+  * @see DevelText::EllipsisPosition
+  */
+  ELLIPSIS_POSITION,
 };
 
 } // namespace Property