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

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> 2010-02-22 Brady Eidson <beidson@apple.com>
Reviewed by Tim Hatcher. Reviewed by Tim Hatcher.
......
...@@ -20,7 +20,6 @@ EXPORTS ...@@ -20,7 +20,6 @@ EXPORTS
WebKitSetShouldUseFontSmoothing WebKitSetShouldUseFontSmoothing
WebKitShouldUseFontSmoothing WebKitShouldUseFontSmoothing
WebKitCreateInstance WebKitCreateInstance
WebKitSystemParameterChanged
; These functions are deprecated ; These functions are deprecated
WebLocalizedString WebLocalizedString
......
...@@ -20,7 +20,6 @@ EXPORTS ...@@ -20,7 +20,6 @@ EXPORTS
WebKitSetShouldUseFontSmoothing WebKitSetShouldUseFontSmoothing
WebKitShouldUseFontSmoothing WebKitShouldUseFontSmoothing
WebKitCreateInstance WebKitCreateInstance
WebKitSystemParameterChanged
; These functions are deprecated ; These functions are deprecated
WebLocalizedString WebLocalizedString
......
...@@ -175,9 +175,3 @@ bool WebKitShouldUseFontSmoothing() ...@@ -175,9 +175,3 @@ bool WebKitShouldUseFontSmoothing()
{ {
return WebCoreShouldUseFontSmoothing(); 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 ...@@ -74,8 +74,6 @@ unsigned RightTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescr
void WebKitSetShouldUseFontSmoothing(bool); void WebKitSetShouldUseFontSmoothing(bool);
bool WebKitShouldUseFontSmoothing(); bool WebKitShouldUseFontSmoothing();
void WebKitSystemParameterChanged(UINT parameter);
} }
#endif // !defined(WebKitGraphics_h) #endif // !defined(WebKitGraphics_h)
...@@ -3125,6 +3125,14 @@ HRESULT STDMETHODCALLTYPE WebView::preferencesIdentifier( ...@@ -3125,6 +3125,14 @@ HRESULT STDMETHODCALLTYPE WebView::preferencesIdentifier(
return E_NOTIMPL; 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) void WebView::windowReceivedMessage(HWND, UINT message, WPARAM wParam, LPARAM)
{ {
switch (message) { switch (message) {
...@@ -3133,6 +3141,9 @@ void WebView::windowReceivedMessage(HWND, UINT message, WPARAM wParam, LPARAM) ...@@ -3133,6 +3141,9 @@ void WebView::windowReceivedMessage(HWND, UINT message, WPARAM wParam, LPARAM)
if (!wParam) if (!wParam)
deleteBackingStoreSoon(); deleteBackingStoreSoon();
break; 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