Diff
Modified: trunk/Source/Platform/ChangeLog (108859 => 108860)
--- trunk/Source/Platform/ChangeLog 2012-02-24 23:57:28 UTC (rev 108859)
+++ trunk/Source/Platform/ChangeLog 2012-02-24 23:57:36 UTC (rev 108860)
@@ -1,3 +1,14 @@
+2012-02-24 James Robinson <[email protected]>
+
+ [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 <[email protected]>
[chromium] Move WebGraphicsContext3D header into the Platform directory
Modified: trunk/Source/Platform/Platform.gypi (108859 => 108860)
--- trunk/Source/Platform/Platform.gypi 2012-02-24 23:57:28 UTC (rev 108859)
+++ trunk/Source/Platform/Platform.gypi 2012-02-24 23:57:36 UTC (rev 108860)
@@ -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',
Modified: trunk/Source/Platform/chromium/public/WebColor.h (108859 => 108860)
--- trunk/Source/Platform/chromium/public/WebColor.h 2012-02-24 23:57:28 UTC (rev 108859)
+++ trunk/Source/Platform/chromium/public/WebColor.h 2012-02-24 23:57:36 UTC (rev 108860)
@@ -31,16 +31,10 @@
#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
Deleted: trunk/Source/Platform/chromium/public/WebColorName.h (108859 => 108860)
--- trunk/Source/Platform/chromium/public/WebColorName.h 2012-02-24 23:57:28 UTC (rev 108859)
+++ trunk/Source/Platform/chromium/public/WebColorName.h 2012-02-24 23:57:36 UTC (rev 108860)
@@ -1,71 +0,0 @@
-/*
-* Copyright (C) 2009 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 WebColorName_h
-#define WebColorName_h
-
-namespace WebKit {
-
-enum WebColorName {
- WebColorActiveBorder,
- WebColorActiveCaption,
- WebColorAppworkspace,
- WebColorBackground,
- WebColorButtonFace,
- WebColorButtonHighlight,
- WebColorButtonShadow,
- WebColorButtonText,
- WebColorCaptionText,
- WebColorGrayText,
- WebColorHighlight,
- WebColorHighlightText,
- WebColorInactiveBorder,
- WebColorInactiveCaption,
- WebColorInactiveCaptionText,
- WebColorInfoBackground,
- WebColorInfoText,
- WebColorMenu,
- WebColorMenuText,
- WebColorScrollbar,
- WebColorText,
- WebColorThreedDarkShadow,
- WebColorThreedShadow,
- WebColorThreedFace,
- WebColorThreedHighlight,
- WebColorThreedLightShadow,
- WebColorWebkitFocusRingColor,
- WebColorWindow,
- WebColorWindowFrame,
- WebColorWindowText
-};
-
-} // namespace WebKit
-
-#endif
Modified: trunk/Source/WebKit/chromium/ChangeLog (108859 => 108860)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-02-24 23:57:28 UTC (rev 108859)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-02-24 23:57:36 UTC (rev 108860)
@@ -1,3 +1,16 @@
+2012-02-24 James Robinson <[email protected]>
+
+ [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 <[email protected]>
[chromium] Move WebGraphicsContext3D header into the Platform directory
Modified: trunk/Source/WebKit/chromium/WebKit.gyp (108859 => 108860)
--- trunk/Source/WebKit/chromium/WebKit.gyp 2012-02-24 23:57:28 UTC (rev 108859)
+++ trunk/Source/WebKit/chromium/WebKit.gyp 2012-02-24 23:57:36 UTC (rev 108860)
@@ -112,6 +112,7 @@
'public/WebCache.h',
'public/WebColorChooser.h',
'public/WebColorChooserClient.h',
+ 'public/WebColorName.h',
'public/WebCommonWorkerClient.h',
'public/WebCompositionUnderline.h',
'public/WebCompositor.h',
@@ -292,7 +293,6 @@
'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',
@@ -494,9 +494,9 @@
'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',
Copied: trunk/Source/WebKit/chromium/public/WebColorName.h (from rev 108848, trunk/Source/Platform/chromium/public/WebColorName.h) (0 => 108860)
--- trunk/Source/WebKit/chromium/public/WebColorName.h (rev 0)
+++ trunk/Source/WebKit/chromium/public/WebColorName.h 2012-02-24 23:57:36 UTC (rev 108860)
@@ -0,0 +1,77 @@
+/*
+* Copyright (C) 2009 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 WebColorName_h
+#define WebColorName_h
+
+#include <public/WebColor.h>
+#include <public/WebCommon.h>
+
+namespace WebKit {
+
+enum WebColorName {
+ WebColorActiveBorder,
+ WebColorActiveCaption,
+ WebColorAppworkspace,
+ WebColorBackground,
+ WebColorButtonFace,
+ WebColorButtonHighlight,
+ WebColorButtonShadow,
+ WebColorButtonText,
+ WebColorCaptionText,
+ WebColorGrayText,
+ WebColorHighlight,
+ WebColorHighlightText,
+ WebColorInactiveBorder,
+ WebColorInactiveCaption,
+ WebColorInactiveCaptionText,
+ WebColorInfoBackground,
+ WebColorInfoText,
+ WebColorMenu,
+ WebColorMenuText,
+ WebColorScrollbar,
+ WebColorText,
+ WebColorThreedDarkShadow,
+ WebColorThreedShadow,
+ WebColorThreedFace,
+ WebColorThreedHighlight,
+ WebColorThreedLightShadow,
+ WebColorWebkitFocusRingColor,
+ WebColorWindow,
+ WebColorWindowFrame,
+ WebColorWindowText
+};
+
+// Sets the values of a set of named colors.
+WEBKIT_EXPORT void setNamedColors(const WebColorName*, const WebColor*, size_t length);
+
+} // namespace WebKit
+
+#endif
Property changes: trunk/Source/WebKit/chromium/public/WebColorName.h
Added: svn:eol-style
Modified: trunk/Source/WebKit/chromium/public/platform/WebColorName.h (108859 => 108860)
--- trunk/Source/WebKit/chromium/public/platform/WebColorName.h 2012-02-24 23:57:28 UTC (rev 108859)
+++ trunk/Source/WebKit/chromium/public/platform/WebColorName.h 2012-02-24 23:57:36 UTC (rev 108860)
@@ -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"
Deleted: trunk/Source/WebKit/chromium/src/WebColor.cpp (108859 => 108860)
--- trunk/Source/WebKit/chromium/src/WebColor.cpp 2012-02-24 23:57:28 UTC (rev 108859)
+++ trunk/Source/WebKit/chromium/src/WebColor.cpp 2012-02-24 23:57:36 UTC (rev 108860)
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
-#include "config.h"
-#include "platform/WebColor.h"
-
-#include "Color.h"
-#include "CSSValueKeywords.h"
-#include "RenderTheme.h"
-#include "UnusedParam.h"
-#include "platform/WebColorName.h"
-
-using namespace::WebCore;
-
-namespace WebKit {
-
-static int toCSSValueKeyword(WebColorName in_value)
-{
- switch (in_value) {
- case WebColorActiveBorder:
- return CSSValueActiveborder;
- case WebColorActiveCaption:
- return CSSValueActivecaption;
- case WebColorAppworkspace:
- return CSSValueAppworkspace;
- case WebColorBackground:
- return CSSValueBackground;
- case WebColorButtonFace:
- return CSSValueButtonface;
- case WebColorButtonHighlight:
- return CSSValueButtonhighlight;
- case WebColorButtonShadow:
- return CSSValueButtonshadow;
- case WebColorButtonText:
- return CSSValueButtontext;
- case WebColorCaptionText:
- return CSSValueCaptiontext;
- case WebColorGrayText:
- return CSSValueGraytext;
- case WebColorHighlight:
- return CSSValueHighlight;
- case WebColorHighlightText:
- return CSSValueHighlighttext;
- case WebColorInactiveBorder:
- return CSSValueInactiveborder;
- case WebColorInactiveCaption:
- return CSSValueInactivecaption;
- case WebColorInactiveCaptionText:
- return CSSValueInactivecaptiontext;
- case WebColorInfoBackground:
- return CSSValueInfobackground;
- case WebColorInfoText:
- return CSSValueInfotext;
- case WebColorMenu:
- return CSSValueMenu;
- case WebColorMenuText:
- return CSSValueMenutext;
- case WebColorScrollbar:
- return CSSValueScrollbar;
- case WebColorText:
- return CSSValueText;
- case WebColorThreedDarkShadow:
- return CSSValueThreeddarkshadow;
- case WebColorThreedShadow:
- return CSSValueThreedshadow;
- case WebColorThreedFace:
- return CSSValueThreedface;
- case WebColorThreedHighlight:
- return CSSValueThreedhighlight;
- case WebColorThreedLightShadow:
- return CSSValueThreedlightshadow;
- case WebColorWebkitFocusRingColor:
- return CSSValueWebkitFocusRingColor;
- case WebColorWindow:
- return CSSValueWindow;
- case WebColorWindowFrame:
- return CSSValueWindowframe;
- case WebColorWindowText:
- return CSSValueWindowtext;
- default:
- return CSSValueInvalid;
- }
-}
-
-void setNamedColors(const WebColorName* colorNames, const WebColor* colors, size_t length)
-{
- for (size_t i = 0; i < length; ++i) {
- WebColorName colorName = colorNames[i];
- WebColor color = colors[i];
-
- // Convert color to internal value identifier.
- int internalColorName = toCSSValueKeyword(colorName);
- if (internalColorName == CSSValueWebkitFocusRingColor) {
- RenderTheme::setCustomFocusRingColor(color);
- continue;
- }
- }
-
- // TODO(jeremy): Tell RenderTheme to update colors.
-}
-
-} // WebKit
Copied: trunk/Source/WebKit/chromium/src/WebColorName.cpp (from rev 108848, trunk/Source/WebKit/chromium/src/WebColor.cpp) (0 => 108860)
--- trunk/Source/WebKit/chromium/src/WebColorName.cpp (rev 0)
+++ trunk/Source/WebKit/chromium/src/WebColorName.cpp 2012-02-24 23:57:36 UTC (rev 108860)
@@ -0,0 +1,129 @@
+/*
+ * Copyright (C) 2009 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.
+ */
+
+#include "config.h"
+#include "WebColorName.h"
+
+#include "CSSValueKeywords.h"
+#include "Color.h"
+#include "RenderTheme.h"
+#include "UnusedParam.h"
+#include <public/WebColor.h>
+
+using namespace::WebCore;
+
+namespace WebKit {
+
+static int toCSSValueKeyword(WebColorName name)
+{
+ switch (name) {
+ case WebColorActiveBorder:
+ return CSSValueActiveborder;
+ case WebColorActiveCaption:
+ return CSSValueActivecaption;
+ case WebColorAppworkspace:
+ return CSSValueAppworkspace;
+ case WebColorBackground:
+ return CSSValueBackground;
+ case WebColorButtonFace:
+ return CSSValueButtonface;
+ case WebColorButtonHighlight:
+ return CSSValueButtonhighlight;
+ case WebColorButtonShadow:
+ return CSSValueButtonshadow;
+ case WebColorButtonText:
+ return CSSValueButtontext;
+ case WebColorCaptionText:
+ return CSSValueCaptiontext;
+ case WebColorGrayText:
+ return CSSValueGraytext;
+ case WebColorHighlight:
+ return CSSValueHighlight;
+ case WebColorHighlightText:
+ return CSSValueHighlighttext;
+ case WebColorInactiveBorder:
+ return CSSValueInactiveborder;
+ case WebColorInactiveCaption:
+ return CSSValueInactivecaption;
+ case WebColorInactiveCaptionText:
+ return CSSValueInactivecaptiontext;
+ case WebColorInfoBackground:
+ return CSSValueInfobackground;
+ case WebColorInfoText:
+ return CSSValueInfotext;
+ case WebColorMenu:
+ return CSSValueMenu;
+ case WebColorMenuText:
+ return CSSValueMenutext;
+ case WebColorScrollbar:
+ return CSSValueScrollbar;
+ case WebColorText:
+ return CSSValueText;
+ case WebColorThreedDarkShadow:
+ return CSSValueThreeddarkshadow;
+ case WebColorThreedShadow:
+ return CSSValueThreedshadow;
+ case WebColorThreedFace:
+ return CSSValueThreedface;
+ case WebColorThreedHighlight:
+ return CSSValueThreedhighlight;
+ case WebColorThreedLightShadow:
+ return CSSValueThreedlightshadow;
+ case WebColorWebkitFocusRingColor:
+ return CSSValueWebkitFocusRingColor;
+ case WebColorWindow:
+ return CSSValueWindow;
+ case WebColorWindowFrame:
+ return CSSValueWindowframe;
+ case WebColorWindowText:
+ return CSSValueWindowtext;
+ default:
+ return CSSValueInvalid;
+ }
+}
+
+void setNamedColors(const WebColorName* colorNames, const WebColor* colors, size_t length)
+{
+ for (size_t i = 0; i < length; ++i) {
+ WebColorName colorName = colorNames[i];
+ WebColor color = colors[i];
+
+ // Convert color to internal value identifier.
+ int internalColorName = toCSSValueKeyword(colorName);
+ if (internalColorName == CSSValueWebkitFocusRingColor) {
+ RenderTheme::setCustomFocusRingColor(color);
+ continue;
+ }
+ }
+
+ // TODO(jeremy): Tell RenderTheme to update colors.
+}
+
+} // WebKit
Property changes: trunk/Source/WebKit/chromium/src/WebColorName.cpp
Added: svn:eol-style