[Webkit-unassigned] [Bug 271729] New: Rename *widthFor* functions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 26 14:31:51 PDT 2024


            Bug ID: 271729
           Summary: Rename *widthFor* functions
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Text
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: vitor.roriz at apple.com
                CC: fantasai.bugs at inkedblade.net, vitor.roriz at apple.com

We currently have:

1. widthForSimpleText
2. floatWidthForSimpleText
3. floatWidthForComplexText

These functions all do something similar but their names are a bit confusing, specially by the different meanings of the word "simple" here.

As previously described by @zallan with other words, the 3 function scale in level of complexity.

1. widthForSimpleText: does not use any width iterator, but has to pass "computeCanUseSimplifiedTextMeasuring" to be used.
2. floatWidthForSimpleText: It is used when we have a CodePath::Simple (calculated on FontCascade). It uses iterator WidthIterator
3. floatWidthForComplexText: It is used when we have a CodePath::Complex (calculated on FontCascade). It uses the ComplexTextControler, a more complete and slower iterator (supports kerning and ligaments, for example, which are currently not supported by WidthIterator).

We could probably have more explicit names for avoiding the confusion.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240326/d3e6c412/attachment.htm>

More information about the webkit-unassigned mailing list