[EFL] Move RenderThemeEfl.cpp|h from WebCore/platform/efl to WebCore/rendering
authorgyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Aug 2015 09:59:37 +0000 (09:59 +0000)
committergyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Aug 2015 09:59:37 +0000 (09:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=148511

Reviewed by Csaba Osztrogon√°c.

To be aligned with other ports, move RenderThemeEfl.cpp|h to WebCore/rendering.

Additionally this patch fixes style errors in RenderThemeEfl.cpp

* PlatformEfl.cmake:
* rendering/RenderThemeEfl.cpp: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.cpp.
(WebCore::toEdjeGroup):
(WebCore::setSourceGroupForEdjeObject):
(WebCore::RenderThemeEfl::adjustSizeConstraints):
(WebCore::isFormElementTooLargeToDisplay):
(WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
(WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse):
(WebCore::RenderThemeEfl::getThemePartFromCache):
(WebCore::RenderThemeEfl::clearThemePartCache):
(WebCore::RenderThemeEfl::applyEdjeStateFromForm):
(WebCore::RenderThemeEfl::applyEdjeRTLState):
(WebCore::RenderThemeEfl::isControlStyled):
(WebCore::RenderThemeEfl::paintThemePart):
(WebCore::RenderThemeEfl::create):
(WebCore::RenderTheme::themeForPage):
(WebCore::applyColorCallback):
(WebCore::fillColorsFromEdjeClass):
(WebCore::RenderThemeEfl::setColorFromThemeClass):
(WebCore::RenderThemeEfl::setThemePath):
(WebCore::RenderThemeEfl::themePath):
(WebCore::RenderThemeEfl::loadTheme):
(WebCore::RenderThemeEfl::applyPartDescriptionFallback):
(WebCore::RenderThemeEfl::applyPartDescription):
(WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
(WebCore::RenderThemeEfl::RenderThemeEfl):
(WebCore::RenderThemeEfl::~RenderThemeEfl):
(WebCore::supportsFocus):
(WebCore::RenderThemeEfl::supportsFocusRing):
(WebCore::RenderThemeEfl::controlSupportsTints):
(WebCore::RenderThemeEfl::baselinePosition):
(WebCore::RenderThemeEfl::platformActiveSelectionBackgroundColor):
(WebCore::RenderThemeEfl::platformInactiveSelectionBackgroundColor):
(WebCore::RenderThemeEfl::platformActiveSelectionForegroundColor):
(WebCore::RenderThemeEfl::platformInactiveSelectionForegroundColor):
(WebCore::RenderThemeEfl::platformFocusRingColor):
(WebCore::RenderThemeEfl::supportsSelectionForegroundColors):
(WebCore::RenderThemeEfl::paintSliderTrack):
(WebCore::RenderThemeEfl::adjustSliderTrackStyle):
(WebCore::RenderThemeEfl::adjustSliderThumbStyle):
(WebCore::RenderThemeEfl::adjustSliderThumbSize):
(WebCore::RenderThemeEfl::sliderTickSize):
(WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter):
(WebCore::RenderThemeEfl::sliderTickSnappingThreshold):
(WebCore::RenderThemeEfl::supportsDataListUI):
(WebCore::RenderThemeEfl::paintSliderThumb):
(WebCore::RenderThemeEfl::adjustCheckboxStyle):
(WebCore::RenderThemeEfl::paintCheckbox):
(WebCore::RenderThemeEfl::adjustRadioStyle):
(WebCore::RenderThemeEfl::paintRadio):
(WebCore::RenderThemeEfl::adjustButtonStyle):
(WebCore::RenderThemeEfl::paintButton):
(WebCore::RenderThemeEfl::adjustMenuListStyle):
(WebCore::RenderThemeEfl::paintMenuList):
(WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
(WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
(WebCore::RenderThemeEfl::adjustTextFieldStyle):
(WebCore::RenderThemeEfl::paintTextField):
(WebCore::RenderThemeEfl::adjustTextAreaStyle):
(WebCore::RenderThemeEfl::paintTextArea):
(WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeEfl::paintSearchFieldResultsButton):
(WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeEfl::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeEfl::paintSearchFieldCancelButton):
(WebCore::RenderThemeEfl::adjustSearchFieldStyle):
(WebCore::RenderThemeEfl::paintSearchField):
(WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
(WebCore::RenderThemeEfl::paintInnerSpinButton):
(WebCore::RenderThemeEfl::setDefaultFontSize):
(WebCore::RenderThemeEfl::updateCachedSystemFontDescription):
(WebCore::RenderThemeEfl::adjustProgressBarStyle):
(WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
(WebCore::RenderThemeEfl::animationDurationForProgressBar):
(WebCore::RenderThemeEfl::paintProgressBar):
(WebCore::RenderThemeEfl::mediaControlsStyleSheet):
(WebCore::RenderThemeEfl::mediaControlsScript):
* rendering/RenderThemeEfl.h: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.h.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189020 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/rendering/RenderThemeEfl.cpp [moved from Source/WebCore/platform/efl/RenderThemeEfl.cpp with 98% similarity]
Source/WebCore/rendering/RenderThemeEfl.h [moved from Source/WebCore/platform/efl/RenderThemeEfl.h with 100% similarity]

index 71cce99..02da282 100644 (file)
@@ -1,3 +1,94 @@
+2015-08-27  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
+
+        [EFL] Move RenderThemeEfl.cpp|h from WebCore/platform/efl to WebCore/rendering
+        https://bugs.webkit.org/show_bug.cgi?id=148511
+
+        Reviewed by Csaba Osztrogon√°c.
+
+        To be aligned with other ports, move RenderThemeEfl.cpp|h to WebCore/rendering.
+
+        Additionally this patch fixes style errors in RenderThemeEfl.cpp
+
+        * PlatformEfl.cmake:
+        * rendering/RenderThemeEfl.cpp: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.cpp.
+        (WebCore::toEdjeGroup):
+        (WebCore::setSourceGroupForEdjeObject):
+        (WebCore::RenderThemeEfl::adjustSizeConstraints):
+        (WebCore::isFormElementTooLargeToDisplay):
+        (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
+        (WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse):
+        (WebCore::RenderThemeEfl::getThemePartFromCache):
+        (WebCore::RenderThemeEfl::clearThemePartCache):
+        (WebCore::RenderThemeEfl::applyEdjeStateFromForm):
+        (WebCore::RenderThemeEfl::applyEdjeRTLState):
+        (WebCore::RenderThemeEfl::isControlStyled):
+        (WebCore::RenderThemeEfl::paintThemePart):
+        (WebCore::RenderThemeEfl::create):
+        (WebCore::RenderTheme::themeForPage):
+        (WebCore::applyColorCallback):
+        (WebCore::fillColorsFromEdjeClass):
+        (WebCore::RenderThemeEfl::setColorFromThemeClass):
+        (WebCore::RenderThemeEfl::setThemePath):
+        (WebCore::RenderThemeEfl::themePath):
+        (WebCore::RenderThemeEfl::loadTheme):
+        (WebCore::RenderThemeEfl::applyPartDescriptionFallback):
+        (WebCore::RenderThemeEfl::applyPartDescription):
+        (WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
+        (WebCore::RenderThemeEfl::RenderThemeEfl):
+        (WebCore::RenderThemeEfl::~RenderThemeEfl):
+        (WebCore::supportsFocus):
+        (WebCore::RenderThemeEfl::supportsFocusRing):
+        (WebCore::RenderThemeEfl::controlSupportsTints):
+        (WebCore::RenderThemeEfl::baselinePosition):
+        (WebCore::RenderThemeEfl::platformActiveSelectionBackgroundColor):
+        (WebCore::RenderThemeEfl::platformInactiveSelectionBackgroundColor):
+        (WebCore::RenderThemeEfl::platformActiveSelectionForegroundColor):
+        (WebCore::RenderThemeEfl::platformInactiveSelectionForegroundColor):
+        (WebCore::RenderThemeEfl::platformFocusRingColor):
+        (WebCore::RenderThemeEfl::supportsSelectionForegroundColors):
+        (WebCore::RenderThemeEfl::paintSliderTrack):
+        (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
+        (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
+        (WebCore::RenderThemeEfl::adjustSliderThumbSize):
+        (WebCore::RenderThemeEfl::sliderTickSize):
+        (WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter):
+        (WebCore::RenderThemeEfl::sliderTickSnappingThreshold):
+        (WebCore::RenderThemeEfl::supportsDataListUI):
+        (WebCore::RenderThemeEfl::paintSliderThumb):
+        (WebCore::RenderThemeEfl::adjustCheckboxStyle):
+        (WebCore::RenderThemeEfl::paintCheckbox):
+        (WebCore::RenderThemeEfl::adjustRadioStyle):
+        (WebCore::RenderThemeEfl::paintRadio):
+        (WebCore::RenderThemeEfl::adjustButtonStyle):
+        (WebCore::RenderThemeEfl::paintButton):
+        (WebCore::RenderThemeEfl::adjustMenuListStyle):
+        (WebCore::RenderThemeEfl::paintMenuList):
+        (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
+        (WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
+        (WebCore::RenderThemeEfl::adjustTextFieldStyle):
+        (WebCore::RenderThemeEfl::paintTextField):
+        (WebCore::RenderThemeEfl::adjustTextAreaStyle):
+        (WebCore::RenderThemeEfl::paintTextArea):
+        (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
+        (WebCore::RenderThemeEfl::paintSearchFieldResultsButton):
+        (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
+        (WebCore::RenderThemeEfl::paintSearchFieldResultsDecorationPart):
+        (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
+        (WebCore::RenderThemeEfl::paintSearchFieldCancelButton):
+        (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
+        (WebCore::RenderThemeEfl::paintSearchField):
+        (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
+        (WebCore::RenderThemeEfl::paintInnerSpinButton):
+        (WebCore::RenderThemeEfl::setDefaultFontSize):
+        (WebCore::RenderThemeEfl::updateCachedSystemFontDescription):
+        (WebCore::RenderThemeEfl::adjustProgressBarStyle):
+        (WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
+        (WebCore::RenderThemeEfl::animationDurationForProgressBar):
+        (WebCore::RenderThemeEfl::paintProgressBar):
+        (WebCore::RenderThemeEfl::mediaControlsStyleSheet):
+        (WebCore::RenderThemeEfl::mediaControlsScript):
+        * rendering/RenderThemeEfl.h: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.h.
+
 2015-08-26  Mark Lam  <mark.lam@apple.com>
 
         watchdog m_didFire state erroneously retained.
index 9393149..f469960 100644 (file)
@@ -119,7 +119,6 @@ list(APPEND WebCore_SOURCES
     platform/efl/PlatformMouseEventEfl.cpp
     platform/efl/PlatformScreenEfl.cpp
     platform/efl/PlatformWheelEventEfl.cpp
-    platform/efl/RenderThemeEfl.cpp
     platform/efl/ScrollbarThemeEfl.cpp
     platform/efl/SharedTimerEfl.cpp
     platform/efl/SoundEfl.cpp
@@ -284,6 +283,8 @@ list(APPEND WebCore_SOURCES
     platform/text/enchant/TextCheckerEnchant.cpp
 
     platform/text/hyphen/HyphenationLibHyphen.cpp
+
+    rendering/RenderThemeEfl.cpp
 )
 
 if (USE_GEOCLUE2)
similarity index 98%
rename from Source/WebCore/platform/efl/RenderThemeEfl.cpp
rename to Source/WebCore/rendering/RenderThemeEfl.cpp
index 22fa761..d0fcad6 100644 (file)
@@ -79,10 +79,22 @@ static const int sliderThumbWidth = 29;
 static const int sliderThumbHeight = 11;
 
 #define _ASSERT_ON_RELEASE_RETURN(o, fmt, ...) \
-    do { if (!o) { EINA_LOG_CRIT(fmt, ## __VA_ARGS__); ASSERT(o); return; } } while (0)
-#define _ASSERT_ON_RELEASE_RETURN_VAL(o, val, fmt, ...) \
-    do { if (!o) { EINA_LOG_CRIT(fmt, ## __VA_ARGS__); ASSERT(o); return val; } } while (0)
+    do { \
+        if (!o) { \
+            EINA_LOG_CRIT(fmt, ## __VA_ARGS__); \
+            ASSERT(o); \
+            return; \
+        } \
+    } while (0)
 
+#define _ASSERT_ON_RELEASE_RETURN_VAL(o, val, fmt, ...) \
+    do { \
+        if (!o) { \
+            EINA_LOG_CRIT(fmt, ## __VA_ARGS__); \
+            ASSERT(o); \
+            return val; \
+        } \
+    } while (0)
 
 static const char* toEdjeGroup(FormType type)
 {
@@ -275,7 +287,7 @@ void RenderThemeEfl::clearThemePartCache()
 
 void RenderThemeEfl::applyEdjeStateFromForm(Evas_Object* object, const ControlStates* states, bool haveBackground)
 {
-    const char *signals[] = { // keep in sync with WebCore/platform/ThemeTypes.h
+    const charsignals[] = { // keep in sync with WebCore/platform/ThemeTypes.h
         "hovered",
         "pressed",
         "focused",
@@ -494,7 +506,7 @@ bool RenderThemeEfl::loadTheme()
     if (!canvas()) {
         m_canvas = EflUniquePtr<Ecore_Evas>(ecore_evas_buffer_new(1, 1));
         _ASSERT_ON_RELEASE_RETURN_VAL(canvas(), false,
-                "Could not create canvas required by theme, things will not work properly.");
+        "Could not create canvas required by theme, things will not work properly.");
     }
 
     EflUniquePtr<Evas_Object> o = EflUniquePtr<Evas_Object>(edje_object_add(ecore_evas_get(canvas())));
@@ -560,7 +572,7 @@ void RenderThemeEfl::applyPartDescription(Evas_Object* object, ThemePartDesc* de
     else {
         Evas_Coord px, py, pw, ph;
         Evas_Coord ox = 0, oy = 0, ow = 0, oh = 0;
-        int t, r, b, l;
+        int top, right, bottom, left;
 
         if (minw > 0)
             ow = minw;
@@ -581,13 +593,13 @@ void RenderThemeEfl::applyPartDescription(Evas_Object* object, ThemePartDesc* de
         edje_object_message_signal_process(object);
         edje_object_part_geometry_get(object, "text_confinement", &px, &py, &pw, &ph);
 
-        t = py - oy;
-        b = (oh + oy) - (ph + py);
+        top = py - oy;
+        bottom = (oh + oy) - (ph + py);
 
-        l = px - ox;
-        r = (ow + ox) - (pw + px);
+        left = px - ox;
+        right = (ow + ox) - (pw + px);
 
-        desc->padding = LengthBox(t, r, b, l);
+        desc->padding = LengthBox(top, right, bottom, left);
     }
 }