[chromium] WebKit::setColorNames is a client API
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 23:57:36 +0000 (23:57 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 23:57:36 +0000 (23:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=79539

Reviewed by Darin Fisher.

Source/Platform:

* Platform.gypi:
* chromium/public/WebColor.h:
(WebKit):

Source/WebKit/chromium:

* WebKit.gyp:
* public/WebColorName.h: Renamed from Source/Platform/chromium/public/WebColorName.h.
(WebKit):
* public/platform/WebColorName.h:
* src/WebColor.cpp:

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

Source/Platform/ChangeLog
Source/Platform/Platform.gypi
Source/Platform/chromium/public/WebColor.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/public/WebColorName.h [moved from Source/Platform/chromium/public/WebColorName.h with 91% similarity]
Source/WebKit/chromium/public/platform/WebColorName.h
Source/WebKit/chromium/src/WebColorName.cpp [moved from Source/WebKit/chromium/src/WebColor.cpp with 96% similarity]

index c50f2c28bed4eca6108c29115547cfa6e9589fdb..55284819cf15eecfeec483c619a3301cd9387c57 100644 (file)
@@ -1,3 +1,14 @@
+2012-02-24  James Robinson  <jamesr@chromium.org>
+
+        [chromium] WebKit::setColorNames is a client API
+        https://bugs.webkit.org/show_bug.cgi?id=79539
+
+        Reviewed by Darin Fisher.
+
+        * Platform.gypi:
+        * chromium/public/WebColor.h:
+        (WebKit):
+
 2012-02-22  James Robinson  <jamesr@chromium.org>
 
         [chromium] Move WebGraphicsContext3D header into the Platform directory
index a8385305b04dab283f0ab419ce434f9b9bbf36fa..afa14713f5d6aacb8319d75a67736a6f23b1349a 100644 (file)
@@ -34,7 +34,6 @@
             'chromium/public/WebCString.h',
             'chromium/public/WebCanvas.h',
             'chromium/public/WebColor.h',
-            'chromium/public/WebColorName.h',
             'chromium/public/WebCommon.h',
             'chromium/public/WebContentLayer.h',
             'chromium/public/WebContentLayerClient.h',
index da45eb1c6e495864ec4ab2a97c9aa84419ca96c7..d449e36c12d94de0ede751893034882e5173d873 100644 (file)
 #ifndef WebColor_h
 #define WebColor_h
 
-#include "WebColorName.h"
-#include "WebCommon.h"
-
 namespace WebKit {
 
 typedef unsigned WebColor;  // RGBA quad. Equivalent to SkColor.
 
-// Sets the values of a set of named colors.
-WEBKIT_EXPORT void setNamedColors(const WebColorName*, const WebColor*, size_t length);
-
 } // namespace WebKit
 
 #endif
index a5a9f1918952ef3b084611ab9f4c8fcd90174d7d..836fdda1a61a30e2785ce174949324ef2cdc2929 100644 (file)
@@ -1,3 +1,16 @@
+2012-02-24  James Robinson  <jamesr@chromium.org>
+
+        [chromium] WebKit::setColorNames is a client API
+        https://bugs.webkit.org/show_bug.cgi?id=79539
+
+        Reviewed by Darin Fisher.
+
+        * WebKit.gyp:
+        * public/WebColorName.h: Renamed from Source/Platform/chromium/public/WebColorName.h.
+        (WebKit):
+        * public/platform/WebColorName.h:
+        * src/WebColor.cpp:
+
 2012-02-22  James Robinson  <jamesr@chromium.org>
 
         [chromium] Move WebGraphicsContext3D header into the Platform directory
index f8e58b383b1b3c51475338c1f5f6399903f43c7e..3da0477a0114de9f8b7604dfd1bb50c8c7c64fa0 100644 (file)
                 'public/WebCache.h',
                 'public/WebColorChooser.h',
                 'public/WebColorChooserClient.h',
+                'public/WebColorName.h',
                 'public/WebCommonWorkerClient.h',
                 'public/WebCompositionUnderline.h',
                 'public/WebCompositor.h',
                 'public/platform/WebCanvas.h',
                 'public/platform/WebClipboard.h',
                 'public/platform/WebColor.h',
-                'public/platform/WebColorName.h',
                 'public/platform/WebCommon.h',
                 'public/platform/WebContentLayer.h',
                 'public/platform/WebContentLayerClient.h',
                 'src/WebBlob.cpp',
                 'src/WebBlobData.cpp',
                 'src/WebCache.cpp',
-                'src/WebColor.cpp',
                 'src/WebColorChooserClientImpl.cpp',
                 'src/WebColorChooserClientImpl.h',
+                'src/WebColorName.cpp',
                 'src/WebCommon.cpp',
                 'src/WebCompositorImpl.cpp',
                 'src/WebCompositorImpl.h',
similarity index 91%
rename from Source/Platform/chromium/public/WebColorName.h
rename to Source/WebKit/chromium/public/WebColorName.h
index f97ed265f3be60e38f4634b988805bc7fe3a0375..625eb5f607a92cf95e41086554dfd0f1f38e0a73 100644 (file)
@@ -31,6 +31,9 @@
 #ifndef WebColorName_h
 #define WebColorName_h
 
+#include <public/WebColor.h>
+#include <public/WebCommon.h>
+
 namespace WebKit {
 
 enum WebColorName {
@@ -66,6 +69,9 @@ enum WebColorName {
     WebColorWindowText
 };
 
-}  // namespace WebKit
+// Sets the values of a set of named colors.
+WEBKIT_EXPORT void setNamedColors(const WebColorName*, const WebColor*, size_t length);
+
+} // namespace WebKit
 
 #endif
index 17df3f2886c40fa61d5ef0bcf818af74396e7e65..c3a8afeddd96e37a3f1de74e7870b4fb85baba35 100644 (file)
@@ -23,4 +23,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "../../../../Platform/chromium/public/WebColorName.h"
+// FIXME: This is logically part of the WebKit client API and doesn't belong in platform. This is a forwarding header to avoid requiring a two-sided commit.
+// As soon as all chromium code is updated for the new location of this header, remove this.
+
+#include "../WebColorName.h"
similarity index 96%
rename from Source/WebKit/chromium/src/WebColor.cpp
rename to Source/WebKit/chromium/src/WebColorName.cpp
index 737338a8b2e585f7c01bffa59c0e3bd6f61c4ad5..04d8ed8a83dcaf840dd91e21b5e77f1ee149bed3 100644 (file)
  */
 
 #include "config.h"
-#include "platform/WebColor.h"
+#include "WebColorName.h"
 
-#include "Color.h"
 #include "CSSValueKeywords.h"
+#include "Color.h"
 #include "RenderTheme.h"
 #include "UnusedParam.h"
-#include "platform/WebColorName.h"
+#include <public/WebColor.h>
 
 using namespace::WebCore;
 
 namespace WebKit {
 
-static int toCSSValueKeyword(WebColorName in_value)
+static int toCSSValueKeyword(WebColorName name)
 {
-    switch (in_value) {
+    switch (name) {
     case WebColorActiveBorder:
         return CSSValueActiveborder;
     case WebColorActiveCaption: