[dali_2.1.28] Merge branch 'devel/master' 96/276796/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 24 Jun 2022 13:09:32 +0000 (14:09 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 24 Jun 2022 13:09:32 +0000 (14:09 +0100)
Change-Id: I7fb722f798cabfbf10e2e08917edb27a1db690b5

automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp
dali-toolkit/public-api/dali-toolkit-version.cpp
packaging/dali-toolkit.spec

index c8f1422..24802c4 100644 (file)
@@ -2833,7 +2833,7 @@ int UtcDaliImageViewSVGLoadingSyncSetInvalidValue(void)
   END_TEST;
 }
 
-int UtcDaliImageViewSvgLoadingFailure(void)
+int UtcDaliImageViewSvgLoadingFailureLocalFile(void)
 {
   // Local svg file - invalid file path
   {
@@ -2941,6 +2941,11 @@ int UtcDaliImageViewSvgLoadingFailure(void)
     DALI_TEST_EQUALS(textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION);
   }
 
+  END_TEST;
+}
+
+int UtcDaliImageViewSvgLoadingFailureRemoteFile01(void)
+{
   // Remote svg file
   {
     ToolkitTestApplication application;
@@ -2950,7 +2955,6 @@ int UtcDaliImageViewSvgLoadingFailure(void)
     textureTrace.Enable(true);
 
     gResourceReadySignalFired = false;
-    textureTrace.Reset();
 
     ImageView imageView = ImageView::New("https://bar.org/foobar.svg");
     imageView.SetProperty(Actor::Property::SIZE, Vector2(200.f, 200.f));
@@ -2977,6 +2981,11 @@ int UtcDaliImageViewSvgLoadingFailure(void)
     DALI_TEST_EQUALS(textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION);
   }
 
+  END_TEST;
+}
+
+int UtcDaliImageViewSvgLoadingFailureRemoteFile02(void)
+{
   // Remote svg file without size set
   {
     ToolkitTestApplication application;
@@ -2986,7 +2995,6 @@ int UtcDaliImageViewSvgLoadingFailure(void)
     textureTrace.Enable(true);
 
     gResourceReadySignalFired = false;
-    textureTrace.Reset();
 
     ImageView imageView = ImageView::New("https://bar.org/foobar.svg");
     imageView.ResourceReadySignal().Connect(&ResourceReadySignal);
index dab40a2..2ff4a7d 100644 (file)
@@ -2087,6 +2087,13 @@ int UtcDaliToolkitTextlabelMaxTextureSet(void)
   // Check if the number of renderers is greater than 1.
   DALI_TEST_CHECK(label.GetRendererCount() > 1u);
 
+  // Coverage test for case of layoutSize is bigger than maxTextureSize
+  float max_value = static_cast<float>(std::numeric_limits<uint16_t>::max());
+  label.SetProperty(Actor::Property::SIZE, Vector2(max_value, 30.0f));
+  application.SendNotification();
+  application.Render();
+
+
   END_TEST;
 }
 
index 97ccc81..2d2368b 100644 (file)
@@ -1062,6 +1062,13 @@ void TextLabel::OnRelayout(const Vector2& size, RelayoutContainer& container)
     alignmentOffset.x = 0.0f;
     alignmentOffset.y = (contentSize.y - layoutSize.y) * VERTICAL_ALIGNMENT_TABLE[mController->GetVerticalAlignment()];
 
+    const int maxTextureSize = Dali::GetMaxTextureSize();
+    if(layoutSize.width > maxTextureSize)
+    {
+      DALI_LOG_WARNING("layoutSize(%f) > maxTextureSize(%d): To guarantee the behavior of Texture::New, layoutSize must not be bigger than maxTextureSize\n", layoutSize.width, maxTextureSize);
+      layoutSize.width = maxTextureSize;
+    }
+
     Property::Map visualTransform;
     visualTransform.Add(Toolkit::Visual::Transform::Property::SIZE, layoutSize)
       .Add(Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2(Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE))
index 3df6d4b..07dc86d 100644 (file)
@@ -986,7 +986,7 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
         actor.Add(GetFocusIndicatorActor());
       }
     }
-    else
+    else if(!mEnableDefaultAlgorithm)
     {
       // No actor is focused but keyboard focus is activated by the key press
       // Let's try to move the initial focus
index 1a14e47..530af02 100644 (file)
@@ -29,7 +29,7 @@ namespace Toolkit
 {
 const unsigned int TOOLKIT_MAJOR_VERSION = 2;
 const unsigned int TOOLKIT_MINOR_VERSION = 1;
-const unsigned int TOOLKIT_MICRO_VERSION = 27;
+const unsigned int TOOLKIT_MICRO_VERSION = 28;
 const char* const  TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index c4436de..4ed9b41 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali2-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    2.1.27
+Version:    2.1.28
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT