Merge "[Tizen] Add TextField BACKGROUND property and more Preedit style options"... accepted/tizen/5.5/unified/20200102.013929 submit/tizen_5.5/20191227.100026 submit/tizen_5.5/20191230.003219
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Fri, 27 Dec 2019 09:14:49 +0000 (09:14 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Fri, 27 Dec 2019 09:14:49 +0000 (09:14 +0000)
dali-toolkit/internal/controls/control/control-data-impl.cpp
dali-toolkit/internal/controls/control/control-data-impl.h
dali-toolkit/public-api/dali-toolkit-version.cpp
dali-toolkit/third-party/nanosvg/nanosvg.cc [changed mode: 0644->0755]
packaging/dali-toolkit.spec

index d1e40be..b49a8c5 100755 (executable)
@@ -1431,6 +1431,27 @@ DevelControl::VisualEventSignalType& Control::Impl::VisualEventSignal()
   return mVisualEventSignal;
 }
 
+void Control::Impl::SetShadow( const Property::Map& map )
+{
+  Toolkit::Visual::Base visual = Toolkit::VisualFactory::Get().CreateVisual( map );
+  visual.SetName("shadow");
+
+  if( visual )
+  {
+    mControlImpl.mImpl->RegisterVisual( Toolkit::DevelControl::Property::SHADOW, visual, DepthIndex::BACKGROUND_EFFECT );
+
+    mControlImpl.RelayoutRequest();
+  }
+}
+
+void Control::Impl::ClearShadow()
+{
+   mControlImpl.mImpl->UnregisterVisual( Toolkit::DevelControl::Property::SHADOW );
+
+   // Trigger a size negotiation request that may be needed when unregistering a visual.
+   mControlImpl.RelayoutRequest();
+}
+
 void Control::Impl::SetAutofillEnabled( bool autofillEnabled )
 {
   mIsAutofillEnabled = autofillEnabled;
@@ -1461,27 +1482,6 @@ Toolkit::AutofillContainer Control::Impl::GetAutofillContainer()
   return mAutofillContainer;
 }
 
-void Control::Impl::SetShadow( const Property::Map& map )
-{
-  Toolkit::Visual::Base visual = Toolkit::VisualFactory::Get().CreateVisual( map );
-  visual.SetName("shadow");
-
-  if( visual )
-  {
-    mControlImpl.mImpl->RegisterVisual( Toolkit::DevelControl::Property::SHADOW, visual, DepthIndex::BACKGROUND_EFFECT );
-
-    mControlImpl.RelayoutRequest();
-  }
-}
-
-void Control::Impl::ClearShadow()
-{
-   mControlImpl.mImpl->UnregisterVisual( Toolkit::DevelControl::Property::SHADOW );
-
-   // Trigger a size negotiation request that may be needed when unregistering a visual.
-   mControlImpl.RelayoutRequest();
-}
-
 } // namespace Internal
 
 } // namespace Toolkit
index 487d896..73bf4dd 100755 (executable)
@@ -340,6 +340,17 @@ public:
   DevelControl::VisualEventSignalType& VisualEventSignal();
 
   /**
+   * @brief Sets the shadow with a property map.
+   * @param[in] map The shadow property map
+   */
+  void SetShadow(const Property::Map& map);
+
+  /**
+   * @brief Clear the shadow.
+   */
+  void ClearShadow();
+
+  /**
    * @brief Sets whether the Autofill functionality is enabled.
    * @param[in] autofillEnabled Set true when Autofill should be enabled.
    */
@@ -375,17 +386,6 @@ public:
    */
   Toolkit::AutofillContainer GetAutofillContainer();
 
-  /**
-   * @brief Sets the shadow with a property map.
-   * @param[in] map The shadow property map
-   */
-  void SetShadow(const Property::Map& map);
-
-  /**
-   * @brief Clear the shadow.
-   */
-  void ClearShadow();
-
 private:
 
   /**
index 41a4ebb..954abd6 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 4;
-const unsigned int TOOLKIT_MICRO_VERSION = 50;
+const unsigned int TOOLKIT_MICRO_VERSION = 51;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
old mode 100644 (file)
new mode 100755 (executable)
index f8b45f9..a99d1dd
@@ -1279,8 +1279,7 @@ static unsigned int nsvg__parseColor(const char* str)
 
 static float nsvg__parseOpacity(const char* str)
 {
-       float val = 0;
-       sscanf(str, "%f", &val);
+       float val = nsvg__atof(str);\r
        if (val < 0.0f) val = 0.0f;
        if (val > 1.0f) val = 1.0f;
        return val;
@@ -1288,8 +1287,7 @@ static float nsvg__parseOpacity(const char* str)
 
 static float nsvg__parseMiterLimit(const char* str)
 {
-       float val = 0;
-       sscanf(str, "%f", &val);
+       float val = nsvg__atof(str);
        if (val < 0.0f) val = 0.0f;
        return val;
 }
@@ -1320,13 +1318,9 @@ static int nsvg__parseUnits(const char* units)
 static NSVGcoordinate nsvg__parseCoordinateRaw(const char* str)
 {
        NSVGcoordinate coord = {0, NSVG_UNITS_USER};
-       char units[33]="";
-       /**
-        * In the original file, the formatted data reading did not specify the string with width limitation.
-        * To prevent the possible overflow, we replace '%s' with '%32s' here.
-        */
-       sscanf(str, "%f%32s", &coord.value, units);
-       coord.units = nsvg__parseUnits(units);
+       char buf[64];
+       coord.units = nsvg__parseUnits(nsvg__parseNumber(str, buf, 64));
+       coord.value = nsvg__atof(buf);
        return coord;
 }
 
@@ -2366,7 +2360,22 @@ static void nsvg__parseSVG(NSVGparser* p, const char** attr)
                        } else if (strcmp(attr[i], "height") == 0) {
                                p->image->height = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 1.0f);
                        } else if (strcmp(attr[i], "viewBox") == 0) {
-                               sscanf(attr[i + 1], "%f%*[%%, \t]%f%*[%%, \t]%f%*[%%, \t]%f", &p->viewMinx, &p->viewMiny, &p->viewWidth, &p->viewHeight);
+                               const char *s = attr[i + 1];
+                               char buf[64];
+                               s = nsvg__parseNumber(s, buf, 64);
+                               p->viewMinx = nsvg__atof(buf);
+                               while (*s && (nsvg__isspace(*s) || *s == '%' || *s == ',')) s++;
+                               if (!*s) return;
+                               s = nsvg__parseNumber(s, buf, 64);
+                               p->viewMiny = nsvg__atof(buf);
+                               while (*s && (nsvg__isspace(*s) || *s == '%' || *s == ',')) s++;
+                               if (!*s) return;
+                               s = nsvg__parseNumber(s, buf, 64);
+                               p->viewWidth = nsvg__atof(buf);
+                               while (*s && (nsvg__isspace(*s) || *s == '%' || *s == ',')) s++;
+                               if (!*s) return;
+                               s = nsvg__parseNumber(s, buf, 64);
+                               p->viewHeight = nsvg__atof(buf);
                        } else if (strcmp(attr[i], "preserveAspectRatio") == 0) {
                                if (strstr(attr[i + 1], "none") != 0) {
                                        // No uniform scaling
index 5fc3faa..9380ce6 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    1.4.50
+Version:    1.4.51
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT