[webkit-dev] 8 Bit String Handling in Render Text Code

Maciej Stachowiak mjs at apple.com
Mon Oct 15 14:44:46 PDT 2012

On Oct 15, 2012, at 9:56 AM, Michael Saboff <msaboff at apple.com> wrote:

> I recently landed r131311 which adds code to handle 8-bit strings in the render text path.  The code also puts HTML text into 8-bit strings.
> The reason for this announcement is that the handling of 8-bit text on the render path is disabled on non-Mac platforms.  Most platforms have platform specific text rendering code and that code needs to be updated to handle 8-bit text.  For Mac, the platform specific changes are for the complex text rendering path only.  The changes involved converting the 8-bit text to a 16-bit String, adding the 16-bit string to the ComplexTextController so the string won't be freed and using the contained 16-bit text with the rest of the complex code unchanged.  See ComplexTextController::collectComplexTextRuns() in WebCore/platform/graphics/mac/ComplexTextController.cpp.
> The new define WTF_USE_8BIT_TEXTRUN is used to control the creation of 8-bit TextRun objects.  When this define is not enabled, TextRun's will only contain 16-bit text and current code should work correctly.  After platform code is added to handle 8-bit text in platform specific code, that platform should enable WTF_USE_8BIT_TEXTRUN.  Note that all platforms compile with that define enabled, but it is likely they'll crash when running the tests.

Minor technicality, but this should be an ENABLE flag, not USE. ENABLE is for optional code in WebKit itself, USE is for optional external dependencies.


More information about the webkit-dev mailing list