[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:23:02 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 5ac065d3bc0a331894f1bf58a2a3e39708a37977
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 7 15:08:08 2010 +0000

    2010-10-07  Dave Moore  <davemoore at chromium.org>
    
            Reviewed by Kent Tamura.
    
            Add WebThemeEngine api for chromium/linux
            https://bugs.webkit.org/show_bug.cgi?id=47278
            Create new linux specific version of WinThemeEngine.h and move
            existing windows specific one to win directory. Keep old top
            level file until chromium is updated to use the new ones.
    
            * WebKit.gyp:
            * public/WebThemeEngine.h:
            * src/ChromiumBridge.cpp:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69311 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 7005238..ffa7c0b 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-07  Dave Moore  <davemoore at chromium.org>
+
+        Reviewed by Kent Tamura.
+
+        Add WebThemeEngine api for chromium/linux
+        https://bugs.webkit.org/show_bug.cgi?id=47278
+        Create new linux specific version of WinThemeEngine.h and move
+        existing windows specific one to win directory. Keep old top
+        level file until chromium is updated to use the new ones.
+
+        * WebKit.gyp:
+        * public/WebThemeEngine.h:
+        * src/ChromiumBridge.cpp:
+
 2010-10-07  Andrey Kosyakov  <caseq at chromium.org>
 
         Reviewed by Yury Semikhatsky.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index bc3b8ca..365dae8 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -96,6 +96,7 @@
                 'public/linux/WebFontRendering.h',
                 'public/linux/WebFontRenderStyle.h',
                 'public/linux/WebRenderTheme.h',
+                'public/linux/WebThemeEngine.h',
                 'public/x11/WebScreenInfoFactory.h',
                 'public/mac/WebInputEventFactory.h',
                 'public/mac/WebSandboxSupport.h',
@@ -263,7 +264,6 @@
                 'public/WebTextDirection.h',
                 'public/WebTextInputType.h',
                 'public/WebTextRun.h',
-                'public/WebThemeEngine.h',
                 'public/WebURL.h',
                 'public/WebURLError.h',
                 'public/WebURLLoader.h',
@@ -281,6 +281,7 @@
                 'public/win/WebInputEventFactory.h',
                 'public/win/WebSandboxSupport.h',
                 'public/win/WebScreenInfoFactory.h',
+                'public/win/WebThemeEngine.h',
                 'src/ApplicationCacheHost.cpp',
                 'src/ApplicationCacheHostInternal.h',
                 'src/AssertMatchingEnums.cpp',
diff --git a/WebKit/chromium/public/WebThemeEngine.h b/WebKit/chromium/public/WebThemeEngine.h
index ab59fa2..0ebcf74 100644
--- a/WebKit/chromium/public/WebThemeEngine.h
+++ b/WebKit/chromium/public/WebThemeEngine.h
@@ -39,6 +39,9 @@ namespace WebKit {
 struct WebRect;
 struct WebSize;
 
+// FIXME: This file has been moved to the win subdirectory as it's entirely
+// windows dependent. Once chromium has been updated to access the file from
+// there this file should be deleted.
 class WebThemeEngine {
 public:
 #ifdef WIN32
diff --git a/WebKit/chromium/public/linux/WebThemeEngine.h b/WebKit/chromium/public/linux/WebThemeEngine.h
new file mode 100644
index 0000000..fd72cf7
--- /dev/null
+++ b/WebKit/chromium/public/linux/WebThemeEngine.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebThemeEngine_h
+#define WebThemeEngine_h
+
+#include "../WebCanvas.h"
+#include "../WebColor.h"
+#include "../WebSize.h"
+
+namespace WebKit {
+
+struct WebRect;
+
+class WebThemeEngine {
+public:
+    // The UI part which is being accessed.
+    enum Part {
+        PartScrollbarDownArrow,
+        PartScrollbarLeftArrow,
+        PartScrollbarRightArrow,
+        PartScrollbarUpArrow,
+        PartScrollbarHorizontalThumb,
+        PartScrollbarVerticalThumb,
+        PartScrollbarHoriztonalTrack,
+        PartScrollbarVerticalTrack
+    };
+
+    // The current state of the associated Part.
+    enum State {
+        StateDisabled,
+        StateHover,
+        StateNormal,
+        StatePressed,
+    };
+
+    // Extra parameters for drawing the PartScrollbarHoriztonalTrack and
+    // PartScrollbarVerticalTrack.
+    struct ScrollbarTrackExtraParams {
+        // The bounds of the entire track, as opposed to the part being painted.
+        int trackX;
+        int trackY;
+        int trackWidth;
+        int trackHeight;
+    };
+
+    union ExtraParams {
+        ScrollbarTrackExtraParams scrollbarTrack;
+    };
+
+    // Gets the size of the given theme part. For variable sized items
+    // like vertical scrollbar thumbs, the width will be the required width of
+    // the track while the height will be the minimum height.
+    virtual WebSize getSize(Part) { return WebSize(); }
+    // Paint the given the given theme part.
+    virtual void paint(
+        WebCanvas*, Part, State, const WebRect&, const ExtraParams*) {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/win/WebThemeEngine.h b/WebKit/chromium/public/win/WebThemeEngine.h
new file mode 100644
index 0000000..1890db6
--- /dev/null
+++ b/WebKit/chromium/public/win/WebThemeEngine.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebThemeEngine_h
+#define WebThemeEngine_h
+
+#include "../WebCanvas.h"
+#include "../WebColor.h"
+#include "../WebSize.h"
+
+namespace WebKit {
+
+struct WebRect;
+struct WebSize;
+
+class WebThemeEngine {
+public:
+// The part and state parameters correspond to values defined by the
+// Windows Theme API (see
+// http://msdn.microsoft.com/en-us/library/bb773187(VS.85).aspx ).
+// The classicState parameter corresponds to the uState
+// parameter of the Windows DrawFrameControl() function.
+// See the definitions in <vsstyle.h> and <winuser.h>.
+    virtual void paintButton(
+        WebCanvas*, int part, int state, int classicState,
+        const WebRect&) = 0;
+
+    virtual void paintMenuList(
+        WebCanvas*, int part, int state, int classicState,
+        const WebRect&) = 0;
+
+    virtual void paintScrollbarArrow(
+        WebCanvas*, int state, int classicState,
+        const WebRect&) = 0;
+
+    virtual void paintScrollbarThumb(
+        WebCanvas*, int part, int state, int classicState,
+        const WebRect&) = 0;
+
+    virtual void paintScrollbarTrack(
+        WebCanvas*, int part, int state, int classicState,
+        const WebRect&, const WebRect& alignRect) = 0;
+
+    virtual void paintSpinButton(
+        WebCanvas*, int part, int state, int classicState,
+        const WebRect&) {}
+
+    virtual void paintTextField(
+        WebCanvas*, int part, int state, int classicState,
+        const WebRect&, WebColor, bool fillContentArea, bool drawEdges) = 0;
+
+    virtual void paintTrackbar(
+        WebCanvas*, int part, int state, int classicState,
+        const WebRect&) = 0;
+
+    virtual void paintProgressBar(
+        WebCanvas*, const WebRect& barRect, const WebRect& valueRect,
+        bool determinate, double animatedSeconds) {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index b906575..5998cf5 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -63,7 +63,7 @@
 
 #if OS(WINDOWS)
 #include "WebRect.h"
-#include "WebThemeEngine.h"
+#include "win/WebThemeEngine.h"
 #endif
 
 #if OS(LINUX) || OS(FREEBSD)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list