Title: [134932] trunk/Source
Revision
134932
Author
commit-qu...@webkit.org
Date
2012-11-16 04:37:22 -0800 (Fri, 16 Nov 2012)

Log Message

Unreviewed, rolling out r134694.
http://trac.webkit.org/changeset/134694
https://bugs.webkit.org/show_bug.cgi?id=102481

it made API test crash on EFL port (Requested by gyuyoung on
#webkit).

Patch by Sheriff Bot <webkit.review....@gmail.com> on 2012-11-16

Source/WebCore:

* platform/efl/RenderThemeEfl.cpp:
(WebCore::fillColorsFromEdjeClass):
(WebCore::RenderThemeEfl::setColorFromThemeClass):
(WebCore::RenderThemeEfl::loadTheme):
(WebCore::RenderThemeEfl::RenderThemeEfl):
* platform/efl/RenderThemeEfl.h:
(RenderThemeEfl):

Source/WebKit/efl:

* DefaultTheme/default.edc:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (134931 => 134932)


--- trunk/Source/WebCore/ChangeLog	2012-11-16 12:32:53 UTC (rev 134931)
+++ trunk/Source/WebCore/ChangeLog	2012-11-16 12:37:22 UTC (rev 134932)
@@ -1,3 +1,20 @@
+2012-11-16  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r134694.
+        http://trac.webkit.org/changeset/134694
+        https://bugs.webkit.org/show_bug.cgi?id=102481
+
+        it made API test crash on EFL port (Requested by gyuyoung on
+        #webkit).
+
+        * platform/efl/RenderThemeEfl.cpp:
+        (WebCore::fillColorsFromEdjeClass):
+        (WebCore::RenderThemeEfl::setColorFromThemeClass):
+        (WebCore::RenderThemeEfl::loadTheme):
+        (WebCore::RenderThemeEfl::RenderThemeEfl):
+        * platform/efl/RenderThemeEfl.h:
+        (RenderThemeEfl):
+
 2012-11-16  Mike West  <mk...@chromium.org>
 
         Web Inspector: Move call stack generation out of bindings.

Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp (134931 => 134932)


--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp	2012-11-16 12:32:53 UTC (rev 134931)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp	2012-11-16 12:37:22 UTC (rev 134932)
@@ -414,14 +414,14 @@
     that->platformColorsDidChange(); // Triggers relayout.
 }
 
-static bool fillColorsFromEdjeClass(Evas_Object* o, const char* colorClass, Color* color1, Color* color2 = 0, Color* color3 = 0)
+static void fillColorsFromEdjeClass(Evas_Object* o, const char* colorClass, Color* color1, Color* color2 = 0, Color* color3 = 0)
 {
     int r1, g1, b1, a1;
     int r2, g2, b2, a2;
     int r3, g3, b3, a3;
 
     bool ok = edje_object_color_class_get(o, colorClass, &r1, &g1, &b1, &a1, &r2, &g2, &b2, &a2, &r3, &g3, &b3, &a3);
-    _ASSERT_ON_RELEASE_RETURN_VAL(ok, false, "Could not get color class '%s'\n", colorClass);
+    _ASSERT_ON_RELEASE_RETURN(ok, "Could not get color class '%s'\n", colorClass);
 
     if (color1)
         color1->setRGB(makeRGBA(r1, g1, b1, a1));
@@ -429,18 +429,16 @@
         color2->setRGB(makeRGBA(r2, g2, b2, a2));
     if (color3)
         color3->setRGB(makeRGBA(r3, g3, b3, a3));
-
-    return true;
 }
 
 void RenderThemeEfl::setColorFromThemeClass(const char* colorClass)
 {
     ASSERT(edje());
 
-    if (!strcmp("webkit/selection/foreground", colorClass))
-        m_supportsSelectionForegroundColor = fillColorsFromEdjeClass(edje(), colorClass, &m_activeSelectionForegroundColor, &m_inactiveSelectionForegroundColor);
-    else if (!strcmp("webkit/selection/background", colorClass))
-        fillColorsFromEdjeClass(edje(), colorClass, &m_activeSelectionBackgroundColor, &m_inactiveSelectionBackgroundColor);
+    if (!strcmp("webkit/selection/active", colorClass))
+        fillColorsFromEdjeClass(edje(), colorClass, &m_activeSelectionForegroundColor, &m_activeSelectionBackgroundColor);
+    else if (!strcmp("webkit/selection/inactive", colorClass))
+        fillColorsFromEdjeClass(edje(), colorClass, &m_inactiveSelectionForegroundColor, &m_inactiveSelectionBackgroundColor);
     else if (!strcmp("webkit/focus_ring", colorClass)) {
         fillColorsFromEdjeClass(edje(), colorClass, &m_focusRingColor);
         // platformFocusRingColor() is only used for the default theme (without page)
@@ -503,14 +501,14 @@
     // Set new loaded theme, and apply it.
     m_edje = o;
 
-    edje_object_signal_callback_add(edje(), "color_class,set", "webkit/selection/foreground", applyColorCallback, this);
-    edje_object_signal_callback_add(edje(), "color_class,set", "webkit/selection/background", applyColorCallback, this);
+    edje_object_signal_callback_add(edje(), "color_class,set", "webkit/selection/active", applyColorCallback, this);
+    edje_object_signal_callback_add(edje(), "color_class,set", "webkit/selection/inactive", applyColorCallback, this);
     edje_object_signal_callback_add(edje(), "color_class,set", "webkit/focus_ring", applyColorCallback, this);
 
     applyPartDescriptionsFrom(m_themePath);
 
-    setColorFromThemeClass("webkit/selection/foreground");
-    setColorFromThemeClass("webkit/selection/background");
+    setColorFromThemeClass("webkit/selection/active");
+    setColorFromThemeClass("webkit/selection/inactive");
     setColorFromThemeClass("webkit/focus_ring");
 
     platformColorsDidChange(); // Schedules a relayout, do last.
@@ -608,7 +606,6 @@
     , m_mediaPanelColor(220, 220, 195) // light tannish color.
     , m_mediaSliderColor(Color::white)
 #endif
-    , m_supportsSelectionForegroundColor(false)
 {
 }
 
@@ -688,12 +685,6 @@
     return m_focusRingColor;
 }
 
-bool RenderThemeEfl::supportsSelectionForegroundColors() const
-{
-    loadThemeIfNeeded();
-    return m_supportsSelectionForegroundColor;
-}
-
 bool RenderThemeEfl::paintSliderTrack(RenderObject* object, const PaintInfo& info, const IntRect& rect)
 {
     if (object->style()->appearance() == SliderHorizontalPart)

Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.h (134931 => 134932)


--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.h	2012-11-16 12:32:53 UTC (rev 134931)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.h	2012-11-16 12:37:22 UTC (rev 134932)
@@ -95,9 +95,6 @@
     // A general method asking if any control tinting is supported at all.
     virtual bool supportsControlTints() const { return true; }
 
-    // A general method asking if foreground colors of selection are supported.
-    virtual bool supportsSelectionForegroundColors() const;
-
     // A method to obtain the baseline position for a "leaf" control. This will only be used if a baseline
     // position cannot be determined by examining child content. Checkboxes and radio buttons are examples of
     // controls that need to do this.
@@ -256,8 +253,6 @@
     OwnPtr<Ecore_Evas> m_canvas;
     RefPtr<Evas_Object> m_edje;
 
-    bool m_supportsSelectionForegroundColor;
-
     struct ThemePartDesc {
         FormType type;
         LengthSize min;

Modified: trunk/Source/WebKit/efl/ChangeLog (134931 => 134932)


--- trunk/Source/WebKit/efl/ChangeLog	2012-11-16 12:32:53 UTC (rev 134931)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-11-16 12:37:22 UTC (rev 134932)
@@ -1,3 +1,14 @@
+2012-11-16  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r134694.
+        http://trac.webkit.org/changeset/134694
+        https://bugs.webkit.org/show_bug.cgi?id=102481
+
+        it made API test crash on EFL port (Requested by gyuyoung on
+        #webkit).
+
+        * DefaultTheme/default.edc:
+
 2012-11-15  Kenneth Rohde Christiansen  <kenn...@webkit.org>
 
         Rename member vars in ViewportArgument to match css-device-adapt

Modified: trunk/Source/WebKit/efl/DefaultTheme/default.edc (134931 => 134932)


--- trunk/Source/WebKit/efl/DefaultTheme/default.edc	2012-11-16 12:32:53 UTC (rev 134931)
+++ trunk/Source/WebKit/efl/DefaultTheme/default.edc	2012-11-16 12:37:22 UTC (rev 134932)
@@ -21,14 +21,14 @@
 
 color_classes {
    color_class {
-      name: "webkit/selection/foreground";
-      color: 255 255 255 255; /* active */
-      color2: 255 255 255 255; /* inactive */
+      name: "webkit/selection/active";
+      color: 255 255 255 255; /* foreground */
+      color2: 86 86 209 255; /* background */
    }
    color_class {
-      name: "webkit/selection/background";
-      color: 86 86 209 255; /* active */
-      color2: 0 0 128 128; /* inactive */
+      name: "webkit/selection/inactive";
+      color: 255 255 255 255; /* foreground */
+      color2: 0 0 128 128; /* background */
    }
    color_class {
       name: "webkit/focus_ring";
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to