Commit c7fca6eb authored by tony@chromium.org's avatar tony@chromium.org

[Chromium] Moved files towards GTK removal

https://bugs.webkit.org/show_bug.cgi?id=69229

Patch by Fady Samuel <fsamuel@chromium.org> on 2011-10-04
Reviewed by Tony Chang.

Source/WebCore:

* WebCore.gypi:
* platform/chromium/PlatformThemeChromiumLinux.cpp: Renamed from Source/WebCore/platform/chromium/PlatformThemeChromiumGtk.cpp.
(WebCore::PlatformThemeChromiumLinux::setScrollbarColors):
(WebCore::clamp):
(WebCore::PlatformThemeChromiumLinux::saturateAndBrighten):
(WebCore::PlatformThemeChromiumLinux::outlineColor):
(WebCore::PlatformThemeChromiumLinux::paintArrowButton):
* platform/chromium/PlatformThemeChromiumLinux.h: Renamed from Source/WebCore/platform/chromium/PlatformThemeChromiumGtk.h.
(WebCore::PlatformThemeChromiumLinux::thumbInactiveColor):
(WebCore::PlatformThemeChromiumLinux::thumbActiveColor):
(WebCore::PlatformThemeChromiumLinux::trackColor):
(WebCore::PlatformThemeChromiumLinux::PlatformThemeChromiumLinux):

Source/WebKit/chromium:

* WebKit.gyp:
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setScrollbarColors):
* src/linux/WebFontInfo.cpp: Renamed from Source/WebKit/chromium/src/gtk/WebFontInfo.cpp.
(WebKit::WebFontInfo::familyForChars):
(WebKit::WebFontInfo::renderStyleForStrike):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d786768b
2011-10-04 Fady Samuel <fsamuel@chromium.org>
[Chromium] Moved files towards GTK removal
https://bugs.webkit.org/show_bug.cgi?id=69229
Reviewed by Tony Chang.
* WebCore.gypi:
* platform/chromium/PlatformThemeChromiumLinux.cpp: Renamed from Source/WebCore/platform/chromium/PlatformThemeChromiumGtk.cpp.
(WebCore::PlatformThemeChromiumLinux::setScrollbarColors):
(WebCore::clamp):
(WebCore::PlatformThemeChromiumLinux::saturateAndBrighten):
(WebCore::PlatformThemeChromiumLinux::outlineColor):
(WebCore::PlatformThemeChromiumLinux::paintArrowButton):
* platform/chromium/PlatformThemeChromiumLinux.h: Renamed from Source/WebCore/platform/chromium/PlatformThemeChromiumGtk.h.
(WebCore::PlatformThemeChromiumLinux::thumbInactiveColor):
(WebCore::PlatformThemeChromiumLinux::thumbActiveColor):
(WebCore::PlatformThemeChromiumLinux::trackColor):
(WebCore::PlatformThemeChromiumLinux::PlatformThemeChromiumLinux):
2011-10-04 James Robinson <jamesr@chromium.org>
[chromium] Extract scheduling logic from CCThreadProxy to its own class
......@@ -3189,8 +3189,8 @@
'platform/chromium/PlatformKeyboardEventChromium.cpp',
'platform/chromium/PlatformScreenChromium.cpp',
'platform/chromium/PlatformSupport.h',
'platform/chromium/PlatformThemeChromiumGtk.cpp',
'platform/chromium/PlatformThemeChromiumGtk.h',
'platform/chromium/PlatformThemeChromiumLinux.cpp',
'platform/chromium/PlatformThemeChromiumLinux.h',
'platform/chromium/PlatformWidget.h',
'platform/chromium/PopupContainer.cpp',
'platform/chromium/PopupContainer.h',
......
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
* Copyright (C) 2011 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
......@@ -29,15 +29,15 @@
*/
#include "config.h"
#include "PlatformThemeChromiumGtk.h"
#include "PlatformThemeChromiumLinux.h"
namespace WebCore {
unsigned PlatformThemeChromiumGtk::s_thumbInactiveColor = 0xeaeaea;
unsigned PlatformThemeChromiumGtk::s_thumbActiveColor = 0xf4f4f4;
unsigned PlatformThemeChromiumGtk::s_trackColor = 0xd3d3d3;
unsigned PlatformThemeChromiumLinux::s_thumbInactiveColor = 0xeaeaea;
unsigned PlatformThemeChromiumLinux::s_thumbActiveColor = 0xf4f4f4;
unsigned PlatformThemeChromiumLinux::s_trackColor = 0xd3d3d3;
void PlatformThemeChromiumGtk::setScrollbarColors(
void PlatformThemeChromiumLinux::setScrollbarColors(
SkColor inactiveColor, SkColor activeColor, SkColor trackColor)
{
s_thumbInactiveColor = inactiveColor;
......@@ -50,7 +50,7 @@ static SkScalar clamp(SkScalar value, SkScalar min, SkScalar max)
return std::min(std::max(value, min), max);
}
SkColor PlatformThemeChromiumGtk::saturateAndBrighten(const SkScalar hsv[3], SkScalar saturateAmount, SkScalar brightenAmount)
SkColor PlatformThemeChromiumLinux::saturateAndBrighten(const SkScalar hsv[3], SkScalar saturateAmount, SkScalar brightenAmount)
{
SkScalar color[3];
color[0] = hsv[0];
......@@ -59,7 +59,7 @@ SkColor PlatformThemeChromiumGtk::saturateAndBrighten(const SkScalar hsv[3], SkS
return SkHSVToColor(color);
}
SkColor PlatformThemeChromiumGtk::outlineColor(const SkScalar hsv1[3], const SkScalar hsv2[3])
SkColor PlatformThemeChromiumLinux::outlineColor(const SkScalar hsv1[3], const SkScalar hsv2[3])
{
// GTK Theme engines have way too much control over the layout of
// the scrollbar. We might be able to more closely approximate its
......@@ -76,7 +76,7 @@ SkColor PlatformThemeChromiumGtk::outlineColor(const SkScalar hsv1[3], const SkS
//
// This works fine for the track color and the overall thumb
// color. But it fails spectacularly for the outline color used
// around the thumb piece. Not all themes have a clearly defined
// around the thumb piece. Not all themes have a clearly defined
// outline. For some of them it is partially transparent, and for
// others the thickness is very unpredictable.
//
......@@ -97,7 +97,7 @@ SkColor PlatformThemeChromiumGtk::outlineColor(const SkScalar hsv1[3], const SkS
return saturateAndBrighten(hsv2, -0.2, diff);
}
void PlatformThemeChromiumGtk::paintArrowButton(GraphicsContext* gc, const IntRect& rect, ArrowDirection direction, ControlStates states)
void PlatformThemeChromiumLinux::paintArrowButton(GraphicsContext* gc, const IntRect& rect, ArrowDirection direction, ControlStates states)
{
SkCanvas* const canvas = gc->platformContext()->canvas();
int widthMiddle, lengthMiddle;
......
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
* Copyright (C) 2011 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
......@@ -28,8 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef PlatformThemeChromiumGtk_h
#define PlatformThemeChromiumGtk_h
#ifndef PlatformThemeChromiumLinux_h
#define PlatformThemeChromiumLinux_h
#include "PlatformContextSkia.h"
#include "SkColor.h"
......@@ -38,7 +38,7 @@
namespace WebCore {
class PlatformThemeChromiumGtk {
class PlatformThemeChromiumLinux {
public:
enum ArrowDirection {
North,
......@@ -59,7 +59,7 @@ public:
static void paintArrowButton(GraphicsContext*, const IntRect&, ArrowDirection, ControlStates);
private:
PlatformThemeChromiumGtk() {}
PlatformThemeChromiumLinux() { }
static unsigned s_thumbInactiveColor;
static unsigned s_thumbActiveColor;
......@@ -68,4 +68,4 @@ private:
} // namespace WebCore
#endif // PlatformThemeChromiumGtk_h
#endif // PlatformThemeChromiumLinux_h
2011-10-04 Fady Samuel <fsamuel@chromium.org>
[Chromium] Moved files towards GTK removal
https://bugs.webkit.org/show_bug.cgi?id=69229
Reviewed by Tony Chang.
* WebKit.gyp:
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setScrollbarColors):
* src/linux/WebFontInfo.cpp: Renamed from Source/WebKit/chromium/src/gtk/WebFontInfo.cpp.
(WebKit::WebFontInfo::familyForChars):
(WebKit::WebFontInfo::renderStyleForStrike):
2011-10-04 James Robinson <jamesr@chromium.org>
[chromium] Extract scheduling logic from CCThreadProxy to its own class
......
......@@ -371,7 +371,6 @@
'src/GeolocationClientProxy.h',
'src/GraphicsContext3DChromium.cpp',
'src/GraphicsContext3DPrivate.h',
'src/gtk/WebFontInfo.cpp',
'src/gtk/WebInputEventFactory.cpp',
'src/IDBCallbacksProxy.cpp',
'src/IDBCallbacksProxy.h',
......@@ -395,6 +394,7 @@
'src/InspectorClientImpl.h',
'src/InspectorFrontendClientImpl.cpp',
'src/InspectorFrontendClientImpl.h',
'src/linux/WebFontInfo.cpp',
'src/linux/WebFontRendering.cpp',
'src/linux/WebFontRenderStyle.cpp',
'src/linux/WebRenderTheme.cpp',
......
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
* Copyright (C) 2011 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
......@@ -85,7 +85,7 @@
#include "PlatformContextSkia.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformMouseEvent.h"
#include "PlatformThemeChromiumGtk.h"
#include "PlatformThemeChromiumLinux.h"
#include "PlatformWheelEvent.h"
#include "PopupContainer.h"
#include "PopupMenuClient.h"
......@@ -2308,9 +2308,7 @@ void WebViewImpl::setScrollbarColors(unsigned inactiveColor,
unsigned activeColor,
unsigned trackColor) {
#if OS(UNIX) && !OS(DARWIN)
PlatformThemeChromiumGtk::setScrollbarColors(inactiveColor,
activeColor,
trackColor);
PlatformThemeChromiumLinux::setScrollbarColors(inactiveColor, activeColor, trackColor);
#endif
}
......
......@@ -30,6 +30,7 @@
#include "config.h"
#include "WebFontInfo.h"
#include "WebFontRenderStyle.h"
#include <fontconfig/fontconfig.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment