[webkit-reviews] review granted: [Bug 204884] [Win] Use ComplexTextController instead of UniscribeController : [Attachment 387087] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 9 11:31:40 PST 2020


Brent Fulgham <bfulgham at webkit.org> has granted Fujii Hironori
<Hironori.Fujii at sony.com>'s request for review:
Bug 204884: [Win] Use ComplexTextController instead of UniscribeController
https://bugs.webkit.org/show_bug.cgi?id=204884

Attachment 387087: Patch

https://bugs.webkit.org/attachment.cgi?id=387087&action=review




--- Comment #19 from Brent Fulgham <bfulgham at webkit.org> ---
Comment on attachment 387087
  --> https://bugs.webkit.org/attachment.cgi?id=387087
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=387087&action=review

Looks good, though I wish we could get rid of all of the GDI-based code.

>>>> Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp:41
>>>> +	  HWndDC hdc;
>>> 
>>> Should this be initialized?
>> 
>> I don't think so. HWndDC has ctor.
>> And, I didn't change the code.
> 
> hdc was 0 since the beginning.
> 
> https://trac.webkit.org/changeset/23128/webkit
>
https://trac.webkit.org/browser/webkit/branches/WindowsMerge/WebCore/platform/w
in/UniscribeController.cpp?rev=23128#L183

I sure wish we could just adopt DirectWrite, rather than creating a Uniscribe
implementation. :-(

> Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp:42
> +    HFONT oldFont = 0;

nullptr?

> Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp:56
> +	       hdc.setHWnd(0);

nullptr?

> Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp:58
> +	       oldFont = (HFONT)SelectObject(hdc, hfont);

This should be a C++ cast, probably reinterpret_cast


More information about the webkit-reviews mailing list