Skip to content
Permalink
Browse files
Bug 23492: Separating the WebKitSystemInterface Calls.
Canonical link: https://commits.webkit.org/32391@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@40203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Brent Fulgham committed Jan 24, 2009
1 parent a9e5f78 commit 7e740512d254ed80d7b1348cf5c517fa3d895803
Showing 3 changed files with 27 additions and 2 deletions.
@@ -1,3 +1,17 @@
2009-01-23 Brent Fulgham <bfulgham@webkit.org>

Reviewed by Darin Adler

https://bugs.webkit.org/show_bug.cgi?id=23492
Exclude calls to WebKitSystemInterface functions when not
using CoreGraphics.

* WebPreferences.cpp:
(WebPreferences::setFontSmoothing):
(WebPreferences::setFontSmoothingContrast):
* WebTextRenderer.cpp:
(WebTextRenderer::registerPrivateFont):

2009-01-23 Brady Eidson <beidson@apple.com>

Rubberstamped by Darin Adler
@@ -42,14 +42,17 @@
#pragma warning( pop )

#include <CoreFoundation/CoreFoundation.h>
#include <CoreGraphics/CoreGraphics.h>
#include <shlobj.h>
#include <shfolder.h>
#include <tchar.h>
#include <WebKitSystemInterface/WebKitSystemInterface.h>
#include <wtf/HashMap.h>
#include <wtf/OwnArrayPtr.h>

#if PLATFORM(CG)
#include <CoreGraphics/CoreGraphics.h>
#include <WebKitSystemInterface/WebKitSystemInterface.h>
#endif

using namespace WebCore;

static const String& oldPreferencesPath()
@@ -977,7 +980,9 @@ HRESULT STDMETHODCALLTYPE WebPreferences::setFontSmoothing(
setIntegerValue(CFSTR(WebKitFontSmoothingTypePreferenceKey), smoothingType);
if (smoothingType == FontSmoothingTypeWindows)
smoothingType = FontSmoothingTypeMedium;
#if PLATFORM(CG)
wkSetFontSmoothingLevel((int)smoothingType);
#endif
return S_OK;
}

@@ -992,7 +997,9 @@ HRESULT STDMETHODCALLTYPE WebPreferences::setFontSmoothingContrast(
/* [in] */ float contrast)
{
setFloatValue(CFSTR(WebKitFontSmoothingContrastPreferenceKey), contrast);
#if PLATFORM(CG)
wkSetFontSmoothingContrast(contrast);
#endif
return S_OK;
}

@@ -32,7 +32,9 @@
#include "WebKitDLL.h"

#include <CoreFoundation/CFString.h>
#if PLATFORM(CG)
#include <WebKitSystemInterface/WebKitSystemInterface.h>
#endif
#include <wtf/RetainPtr.h>

WebTextRenderer* WebTextRenderer::createInstance()
@@ -90,6 +92,8 @@ HRESULT STDMETHODCALLTYPE WebTextRenderer::registerPrivateFont(
return E_FAIL;

RetainPtr<CFStringRef> string(AdoptCF, CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(fontFilePath), static_cast<CFIndex>(wcslen(fontFilePath))));
#if PLATFORM(CG)
wkAddFontsAtPath(string.get());
#endif
return S_OK;
}

0 comments on commit 7e74051

Please sign in to comment.