Update web-platform-tests to revision fc57d7ad7a2942cfa363d5a9b8c6c7d74f5bb693

This commit is contained in:
WPT Sync Bot 2019-01-27 20:36:18 -05:00
parent 5fd64d9436
commit a2accae63a
13 changed files with 168 additions and 40 deletions

View file

@ -92,8 +92,14 @@ class FontInstaller(object):
gdi32 = ctypes.WinDLL('gdi32')
if gdi32.AddFontResourceW(font_path):
return bool(ctypes.windll.user32.SendMessageW(hwnd_broadcast,
wm_fontchange))
from ctypes import wintypes
wparam = 0
lparam = 0
SendMessageW = ctypes.windll.user32.SendMessageW
SendMessageW.argtypes = [wintypes.HANDLE, wintypes.UINT,
wintypes.WPARAM, wintypes.LPARAM]
return bool(SendMessageW(hwnd_broadcast, wm_fontchange,
wparam, lparam))
def remove_linux_font(self, font_name, _):
if self.created_dir:
@ -120,5 +126,11 @@ class FontInstaller(object):
gdi32 = ctypes.WinDLL('gdi32')
if gdi32.RemoveFontResourceW(font_path):
return bool(ctypes.windll.user32.SendMessageW(hwnd_broadcast,
wm_fontchange))
from ctypes import wintypes
wparam = 0
lparam = 0
SendMessageW = ctypes.windll.user32.SendMessageW
SendMessageW.argtypes = [wintypes.HANDLE, wintypes.UINT,
wintypes.WPARAM, wintypes.LPARAM]
return bool(SendMessageW(hwnd_broadcast, wm_fontchange,
wparam, lparam))