• Peter Kasting's avatar
    Clean up/simplify StyledLabel, part 3. · 120f4ba0
    Peter Kasting authored
    * Convert the central loop of CalculateAndDoLayout() to two nested loops.  The
      outer loop iterates once per line, the inner once per view.  This allows
      unifying all existing calls to AdvanceOneLine() to a single one in the outer
      loop.
    * At this point AdvanceOneLine() can be inlined and simplified.
    
    Bug: 1015717
    Change-Id: Iecd4832a7b8eafccd69b50a7951628fded1336f4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1874825
    Commit-Queue: Peter Kasting <pkasting@chromium.org>
    Auto-Submit: Peter Kasting <pkasting@chromium.org>
    Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#708844}
    120f4ba0
styled_label.cc 19.2 KB