[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 14:18:16 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 4372abb1250303d0824db5bccd4a56866ffe1049
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 6 16:28:46 2010 +0000

    2010-10-06  Ryuan Choi  <ryuan.choi at samsung.com>
    
            Reviewed by Antonio Gomes.
    
            [EFL] Support Progress Tag
            https://bugs.webkit.org/show_bug.cgi?id=45951
    
            Implement to render progress tag.
    
            No new tests. Existing tests in fast/dom/HTMLProgressElement.
    
            * platform/efl/RenderThemeEfl.cpp:
            (WebCore::RenderThemeEfl::paintThemePart):
            (WebCore::RenderThemeEfl::edjeGroupFromFormType):
            (WebCore::RenderThemeEfl::adjustProgressBarStyle):
            (WebCore::RenderThemeEfl::paintProgressBar):
            * platform/efl/RenderThemeEfl.h:
    2010-10-06  Ryuan Choi  <ryuan.choi at samsung.com>
    
            Reviewed by Antonio Gomes.
    
            [EFL] Support Progress Tag
            https://bugs.webkit.org/show_bug.cgi?id=45951
    
            Implement progressbar.edc to support progress tag
    
            * CMakeListsEfl.txt:
            * DefaultTheme/default.edc:
            * DefaultTheme/widget/progressbar: Added.
            * DefaultTheme/widget/progressbar/bt_base.png: Added.
            * DefaultTheme/widget/progressbar/progressbar.edc: Added.
            * DefaultTheme/widget/progressbar/shelf_inset.png: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69198 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b850b40..9fc1628 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-10-06  Ryuan Choi  <ryuan.choi at samsung.com>
+
+        Reviewed by Antonio Gomes.
+
+        [EFL] Support Progress Tag
+        https://bugs.webkit.org/show_bug.cgi?id=45951
+
+        Implement to render progress tag.
+
+        No new tests. Existing tests in fast/dom/HTMLProgressElement.
+
+        * platform/efl/RenderThemeEfl.cpp:
+        (WebCore::RenderThemeEfl::paintThemePart):
+        (WebCore::RenderThemeEfl::edjeGroupFromFormType):
+        (WebCore::RenderThemeEfl::adjustProgressBarStyle):
+        (WebCore::RenderThemeEfl::paintProgressBar):
+        * platform/efl/RenderThemeEfl.h:
+
 2010-10-06  Patrick Gansterer  <paroga at webkit.org>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/platform/efl/RenderThemeEfl.cpp b/WebCore/platform/efl/RenderThemeEfl.cpp
index 53997be..6076747 100644
--- a/WebCore/platform/efl/RenderThemeEfl.cpp
+++ b/WebCore/platform/efl/RenderThemeEfl.cpp
@@ -35,6 +35,7 @@
 #include "Page.h"
 #include "RenderBox.h"
 #include "RenderObject.h"
+#include "RenderProgress.h"
 #include "RenderSlider.h"
 #include <wtf/text/CString.h>
 
@@ -296,6 +297,25 @@ bool RenderThemeEfl::paintThemePart(RenderObject* o, FormType type, const PaintI
         msg->val[0] = static_cast<float>(value) / static_cast<float>(max);
         msg->val[1] = 0.1;
         edje_object_message_send(ce->o, EDJE_MESSAGE_FLOAT_SET, 0, msg);
+#if ENABLE(PROGRESS_TAG)
+    } else if (type == ProgressBar) {
+        RenderProgress* renderProgress = toRenderProgress(o);
+        Edje_Message_Float_Set* msg;
+        int max;
+        double value;
+
+        msg = static_cast<Edje_Message_Float_Set*>(alloca(sizeof(Edje_Message_Float_Set) + sizeof(float)));
+        max = rect.width();
+        value = renderProgress->position();
+
+        msg->count = 2;
+        if (o->style()->direction() == RTL)
+            msg->val[0] = (1.0 - value) * max;
+        else
+            msg->val[0] = 0;
+        msg->val[1] = value;
+        edje_object_message_send(ce->o, EDJE_MESSAGE_FLOAT_SET, 0, msg);
+#endif
     }
 
     edje_object_calc_force(ce->o);
@@ -562,6 +582,9 @@ const char* RenderThemeEfl::edjeGroupFromFormType(FormType type) const
         W("entry"),
         W("checkbox"),
         W("combo"),
+#if ENABLE(PROGRESS_TAG)
+        W("progressbar"),
+#endif
         W("search/field"),
         W("search/decoration"),
         W("search/results_button"),
@@ -1008,4 +1031,16 @@ void RenderThemeEfl::systemFont(int propId, FontDescription& fontDescription) co
     fontDescription.setItalic(false);
 }
 
+#if ENABLE(PROGRESS_TAG)
+void RenderThemeEfl::adjustProgressBarStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
+{
+    style->setBoxShadow(0);
+}
+
+bool RenderThemeEfl::paintProgressBar(RenderObject* o, const PaintInfo& i, const IntRect& rect)
+{
+    return paintThemePart(o, ProgressBar, i, rect);
+}
+#endif
+
 }
diff --git a/WebCore/platform/efl/RenderThemeEfl.h b/WebCore/platform/efl/RenderThemeEfl.h
index 478dfc5..087e2aa 100644
--- a/WebCore/platform/efl/RenderThemeEfl.h
+++ b/WebCore/platform/efl/RenderThemeEfl.h
@@ -45,6 +45,9 @@ enum FormType { // KEEP IN SYNC WITH edjeGroupFromFormType()
     TextField,
     CheckBox,
     ComboBox,
+#if ENABLE(PROGRESS_TAG)
+    ProgressBar,
+#endif
     SearchField,
     SearchFieldDecoration,
     SearchFieldResultsButton,
@@ -145,6 +148,11 @@ public:
 
     static void setDefaultFontSize(int size);
 
+#if ENABLE(PROGRESS_TAG)
+    virtual void adjustProgressBarStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+    virtual bool paintProgressBar(RenderObject*, const PaintInfo&, const IntRect&);
+#endif
+
 protected:
     static float defaultFontSize;
 
diff --git a/WebKit/efl/CMakeListsEfl.txt b/WebKit/efl/CMakeListsEfl.txt
index c154b66..1964d15 100644
--- a/WebKit/efl/CMakeListsEfl.txt
+++ b/WebKit/efl/CMakeListsEfl.txt
@@ -92,10 +92,15 @@ SET(BUILD_DATA_DIR ${CMAKE_BINARY_DIR}/WebKit/efl/DefaultTheme)
 SET(BUILD_DATA_DIR ${BUILD_DATA_DIR} PARENT_SCOPE)
 FILE(MAKE_DIRECTORY ${BUILD_DATA_DIR})
 
+SET(WebKit_THEME_DEFINITION "")
+IF (ENABLE_PROGRESS_TAG)
+  LIST(APPEND WebKit_THEME_DEFINITION "-DENABLE_PROGRESS_TAG")
+ENDIF ()
+
 SET(WebKit_THEME ${BUILD_DATA_DIR}/default.edj)
 ADD_CUSTOM_COMMAND(
   OUTPUT ${WebKit_THEME}
-  COMMAND ${EDJE_CC_EXECUTABLE} -v -id ${WEBKIT_DIR}/efl/DefaultTheme ${WEBKIT_DIR}/efl/DefaultTheme/default.edc ${WebKit_THEME}
+  COMMAND ${EDJE_CC_EXECUTABLE} -v -id ${WEBKIT_DIR}/efl/DefaultTheme ${WebKit_THEME_DEFINITION} ${WEBKIT_DIR}/efl/DefaultTheme/default.edc ${WebKit_THEME}
   DEPENDS
     ${WEBKIT_DIR}/efl/DefaultTheme/default.edc
     ${WEBKIT_DIR}/efl/DefaultTheme/widget/slider/slider_knob_v.png
@@ -159,6 +164,9 @@ ADD_CUSTOM_COMMAND(
     ${WEBKIT_DIR}/efl/DefaultTheme/widget/file/file_hover.png
     ${WEBKIT_DIR}/efl/DefaultTheme/widget/file/file_focus.png
     ${WEBKIT_DIR}/efl/DefaultTheme/widget/file/file.edc
+    ${WEBKIT_DIR}/efl/DefaultTheme/widget/progressbar/progressbar.edc
+    ${WEBKIT_DIR}/efl/DefaultTheme/widget/progressbar/shelf_inset.png
+    ${WEBKIT_DIR}/efl/DefaultTheme/widget/progressbar/bt_base.png
   VERBATIM
 )
 
diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
index 81d9a6a..5b4230d 100644
--- a/WebKit/efl/ChangeLog
+++ b/WebKit/efl/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-06  Ryuan Choi  <ryuan.choi at samsung.com>
+
+        Reviewed by Antonio Gomes.
+
+        [EFL] Support Progress Tag
+        https://bugs.webkit.org/show_bug.cgi?id=45951
+
+        Implement progressbar.edc to support progress tag
+
+        * CMakeListsEfl.txt:
+        * DefaultTheme/default.edc:
+        * DefaultTheme/widget/progressbar: Added.
+        * DefaultTheme/widget/progressbar/bt_base.png: Added.
+        * DefaultTheme/widget/progressbar/progressbar.edc: Added.
+        * DefaultTheme/widget/progressbar/shelf_inset.png: Added.
+
 2010-10-05  Ryuan Choi  <ryuan.choi at samsung.com>
 
         Reviewed by Antonio Gomes.
diff --git a/WebKit/efl/DefaultTheme/default.edc b/WebKit/efl/DefaultTheme/default.edc
index 0496a24..7d750f4 100644
--- a/WebKit/efl/DefaultTheme/default.edc
+++ b/WebKit/efl/DefaultTheme/default.edc
@@ -68,6 +68,9 @@ collections {
 #include "widget/check/check.edc"
 #include "widget/entry/entry.edc"
 #include "widget/combo/combo.edc"
+#ifdef ENABLE_PROGRESS_TAG
+#include "widget/progressbar/progressbar.edc"
+#endif
 #include "widget/file/file.edc"
 #include "widget/search/field/search_field.edc"
 #include "widget/search/cancel/search_cancel.edc"
diff --git a/WebKit/efl/DefaultTheme/widget/progressbar/bt_base.png b/WebKit/efl/DefaultTheme/widget/progressbar/bt_base.png
new file mode 100644
index 0000000..2d1f179
Binary files /dev/null and b/WebKit/efl/DefaultTheme/widget/progressbar/bt_base.png differ
diff --git a/WebKit/efl/DefaultTheme/widget/progressbar/progressbar.edc b/WebKit/efl/DefaultTheme/widget/progressbar/progressbar.edc
new file mode 100644
index 0000000..2a34d54
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/widget/progressbar/progressbar.edc
@@ -0,0 +1,108 @@
+/*
+    Copyright (C) 2010 Samsung Electronics
+
+    This file is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This file is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+group {
+    name: "webkit/widget/progressbar";
+    min: 0 11; /* if > 0, this is the minimum size that will be allocated.
+                * If wants to draw on top, just overflow usign edje's rel1/rel2
+                */
+    max: 999999 999999;
+
+    images {
+        image: "widget/progressbar/shelf_inset.png" COMP;
+        image: "widget/progressbar/bt_base.png" COMP;
+    }
+
+    script {
+        public message(Msg_Type:type, id, ...) {
+            if ((id == 0) && (type == MSG_FLOAT_SET)) {
+                new Float:x, Float:sx;
+                x = getfarg(2);
+                sx = getfarg(3);
+
+                if (sx >= 0.0) {
+                    set_drag_size(PART:"img.progressbar_fill", sx, 1.0);
+                    set_drag(PART:"img.progressbar_fill", x, 0.0);
+                }
+            }
+        }
+    }
+
+    parts {
+        part {
+           name: "rect.base";
+           type: RECT;
+           description {
+              state: "default" 0.0;
+              min: 29 11;
+              max: 999999 99999;
+              color: 255 255 255 0;
+           }
+        }
+        part {
+           name: "rect.clipper";
+           type: RECT;
+           description {
+              state: "default" 0.0;
+              color: 255 255 255 255;
+           }
+           description {
+              state: "hidden" 0.0;
+              color: 255 255 255 128;
+           }
+        }
+
+        part {
+           name: "img.progressbar";
+           type: IMAGE;
+           mouse_events: 0;
+           clip_to: "rect.clipper";
+           description {
+              state: "default" 0.0;
+              min: 29 5;
+              rel1.to: "rect.base";
+              rel2.to: "rect.base";
+              align: 0.5 0.5;
+              image {
+                 normal: "widget/progressbar/shelf_inset.png";
+                 border: 8 8 8 8;
+              }
+           }
+        }
+        part {
+           name: "img.progressbar_fill";
+           type: IMAGE;
+           mouse_events: 0;
+           clip_to: "rect.clipper";
+           dragable {
+               x: 1 1 0;
+               y: 0 0 0;
+               confine: "rect.base";
+           }
+           description {
+              state: "default" 0.0;
+              min: 0 5;
+              align: 0.5 0.5;
+              image {
+                 normal: "widget/progressbar/bt_base.png";
+                 border: 7 7 0 0;
+              }
+           }
+        }
+    }
+}
diff --git a/WebKit/efl/DefaultTheme/widget/progressbar/shelf_inset.png b/WebKit/efl/DefaultTheme/widget/progressbar/shelf_inset.png
new file mode 100644
index 0000000..bb1989d
Binary files /dev/null and b/WebKit/efl/DefaultTheme/widget/progressbar/shelf_inset.png differ

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list