Merge "Support Emoji sequences" into devel/master
authorBowon Ryu <bowon.ryu@samsung.com>
Thu, 18 Nov 2021 06:11:55 +0000 (06:11 +0000)
committerGerrit Code Review <gerrit@review>
Thu, 18 Nov 2021 06:11:55 +0000 (06:11 +0000)
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Ellipsis.cpp
dali-toolkit/devel-api/controls/accessible-impl.cpp
dali-toolkit/devel-api/controls/accessible-impl.h
dali-toolkit/internal/text/layouts/layout-engine.cpp
dali-toolkit/internal/text/rendering/view-model.cpp
dali-toolkit/public-api/dali-toolkit-version.cpp
packaging/dali-toolkit.spec

index 872e85e..bab8800 100755 (executable)
@@ -118,6 +118,21 @@ namespace
     const GlyphIndex     firstMiddleIndexOfGlyphs  = model->GetFirstMiddleIndexOfElidedGlyphs();
 
 
+    //Test total height of lines is fit inside Controller's size
+    Length heightOfLines = 0;
+    for(Length lineIndex=0u; lineIndex < numberOfLines; lineIndex++)
+    {
+        const LineRun& tempLine         = *( model->GetLines() + lineIndex);
+        heightOfLines+= (tempLine.ascender - tempLine.descender);
+    }
+
+    if(heightOfLines > data.size.height)
+    {
+        std::cout << "The heightOfLines should be less than height of controller.";
+        std::cout << " The heightOfLines is "<< heightOfLines << "and the height of controller is "<< data.size.height <<std::endl;
+        return false;
+    }
+
     if( numberOfLines != 0u )
     {
       Length   elidedLineIndex    = 0u;
@@ -296,6 +311,21 @@ namespace
     const GlyphIndex firstMiddleIndexOfGlyphs  = textModel->GetFirstMiddleIndexOfElidedGlyphs();
     const GlyphIndex secondMiddleIndexOfGlyphs = textModel->GetSecondMiddleIndexOfElidedGlyphs();
 
+    //Test total height of lines is fit inside Controller's size
+    Length heightOfLines = 0;
+    for(Length lineIndex=0u; lineIndex < numberOfLines; lineIndex++)
+    {
+        const LineRun& tempLine         = *( textModel->GetLines() + lineIndex);
+        heightOfLines+= (tempLine.ascender - tempLine.descender);
+    }
+
+    if(heightOfLines > data.size.height)
+    {
+        std::cout << "The heightOfLines should be less than height of controller.";
+        std::cout << " The heightOfLines is "<< heightOfLines << "and the height of controller is "<< data.size.height <<std::endl;
+        return false;
+    }
+
     if( numberOfLines != 0u )
     {
       Length   elidedLineIndex    = 0u;
index bd4a649..9f6f4f9 100644 (file)
@@ -363,7 +363,6 @@ void AccessibleImpl::ScrollToSelf()
       parent->ScrollToChild(child->Self());
     }
 
-    child = parent;
     parent = dynamic_cast<Toolkit::DevelControl::AccessibleImpl*>(parent->GetParent());
   }
 }
index 18b77f5..8bd0714 100644 (file)
@@ -236,7 +236,7 @@ public:
   virtual Dali::Accessibility::States CalculateStates();
 
   /**
-   * @brief Makes sure that a given child of this container (e.g. ItemView) is visible
+   * @brief Makes sure that a given child (descendant) of this container (e.g. ItemView) is visible
    * @return false if scrolling is not supported or child is already visible
    */
   virtual bool ScrollToChild(Actor child);
index 695d950..7610b67 100644 (file)
@@ -1867,7 +1867,6 @@ struct Engine::Impl
             linesBuffer[lineIndex].ellipsis = false;
           }
           numberOfLines--;
-          lineIndex++;
         }
         linesBuffer[0u].ellipsis = true;
       }
index 35c0a87..2187487 100644 (file)
@@ -449,7 +449,7 @@ void ViewModel::ElideGlyphs()
               // Need to reshape the glyph as the font may be different in size.
               const GlyphInfo& ellipsisGlyph = fontClient.GetEllipsisGlyph(fontClient.GetPointSize(glyphToRemove.fontId));
 
-              if(!firstPenSet)
+              if(!firstPenSet || EqualsZero(glyphToRemove.advance))
               {
                 const Vector2& position = *(elidedPositionsBuffer + indexOfEllipsis);
 
index 520ffcf..5f6856e 100644 (file)
@@ -29,7 +29,7 @@ namespace Toolkit
 {
 const unsigned int TOOLKIT_MAJOR_VERSION = 2;
 const unsigned int TOOLKIT_MINOR_VERSION = 0;
-const unsigned int TOOLKIT_MICRO_VERSION = 51;
+const unsigned int TOOLKIT_MICRO_VERSION = 52;
 const char* const  TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index ad23b75..d9a1c86 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali2-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    2.0.51
+Version:    2.0.52
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT