Commit 37ea3a01 authored by sfalken@apple.com's avatar sfalken@apple.com

WebKit on Windows should pick up system setting changes without requiring explicit API calls

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

Reviewed by Darin Adler.

* WebKit.vcproj/WebKit.def: Removed WebKitSystemParameterChanged.
* WebKit.vcproj/WebKit_debug.def: Removed WebKitSystemParameterChanged.
* WebKitGraphics.cpp: Removed WebKitSystemParameterChanged.
* WebKitGraphics.h: Removed WebKitSystemParameterChanged.
* WebView.cpp:
(systemParameterChanged): Call through to wkSystemFontSmoothingChanged for font changes.
(WebView::windowReceivedMessage): Pick up WM_SETTINGCHANGE from windowReceivedMessage.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ebc9355e
2010-02-22 Steve Falkenburg <sfalken@apple.com>
Reviewed by Darin Adler.
WebKit on Windows should pick up system setting changes without requiring explicit API calls
https://bugs.webkit.org/show_bug.cgi?id=35269
* WebKit.vcproj/WebKit.def: Removed WebKitSystemParameterChanged.
* WebKit.vcproj/WebKit_debug.def: Removed WebKitSystemParameterChanged.
* WebKitGraphics.cpp: Removed WebKitSystemParameterChanged.
* WebKitGraphics.h: Removed WebKitSystemParameterChanged.
* WebView.cpp:
(systemParameterChanged): Call through to wkSystemFontSmoothingChanged for font changes.
(WebView::windowReceivedMessage): Pick up WM_SETTINGCHANGE from windowReceivedMessage.
2010-02-22 Brady Eidson <beidson@apple.com>
Reviewed by Tim Hatcher.
......
......@@ -20,7 +20,6 @@ EXPORTS
WebKitSetShouldUseFontSmoothing
WebKitShouldUseFontSmoothing
WebKitCreateInstance
WebKitSystemParameterChanged
; These functions are deprecated
WebLocalizedString
......
......@@ -20,7 +20,6 @@ EXPORTS
WebKitSetShouldUseFontSmoothing
WebKitShouldUseFontSmoothing
WebKitCreateInstance
WebKitSystemParameterChanged
; These functions are deprecated
WebLocalizedString
......
......@@ -175,9 +175,3 @@ bool WebKitShouldUseFontSmoothing()
{
return WebCoreShouldUseFontSmoothing();
}
void WebKitSystemParameterChanged(UINT parameter)
{
if (parameter == SPI_SETFONTSMOOTHING || parameter == SPI_SETFONTSMOOTHINGTYPE || parameter == SPI_SETFONTSMOOTHINGCONTRAST || parameter == SPI_SETFONTSMOOTHINGORIENTATION)
wkSystemFontSmoothingChanged();
}
......@@ -74,8 +74,6 @@ unsigned RightTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescr
void WebKitSetShouldUseFontSmoothing(bool);
bool WebKitShouldUseFontSmoothing();
void WebKitSystemParameterChanged(UINT parameter);
}
#endif // !defined(WebKitGraphics_h)
......@@ -3125,6 +3125,14 @@ HRESULT STDMETHODCALLTYPE WebView::preferencesIdentifier(
return E_NOTIMPL;
}
static void systemParameterChanged(WPARAM parameter)
{
#if PLATFORM(CG)
if (parameter == SPI_SETFONTSMOOTHING || parameter == SPI_SETFONTSMOOTHINGTYPE || parameter == SPI_SETFONTSMOOTHINGCONTRAST || parameter == SPI_SETFONTSMOOTHINGORIENTATION)
wkSystemFontSmoothingChanged();
#endif
}
void WebView::windowReceivedMessage(HWND, UINT message, WPARAM wParam, LPARAM)
{
switch (message) {
......@@ -3133,6 +3141,9 @@ void WebView::windowReceivedMessage(HWND, UINT message, WPARAM wParam, LPARAM)
if (!wParam)
deleteBackingStoreSoon();
break;
case WM_SETTINGCHANGE:
systemParameterChanged(wParam);
break;
}
}
......
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