Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(602)

Issue 1839413002: Simplify the computation of the value list position (Closed)

Created:
4 years, 8 months ago by fs
Modified:
4 years, 8 months ago
Reviewers:
CC:
chromium-reviews, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, kouhei+svg_chromium.org, fs, krit, f(malita), jchaffraix+rendering, blink-reviews, gyuyoung2, Stephen Chennney, rwlbuis, pdr+svgwatchlist_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@svg-metrics-cleanup-6
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Simplify the computation of the value list position The value list position is updated by one for each character, and not at all when spaces are skipped (collapsed). Currently this is achieved by using currentPosition (the offset in the text node, in code units) as the base and then subtract the number of skipped spaces and the number of surrogates. I.e +0 for skipped spaces and +1 for surrogates (which occupy two code units) and other characters. We can simplify this to a simple increment for every "full" trip of the iteration, and do away with the dependent counters. BUG=594058

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -10 lines) Patch
M third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp View 1 chunk +4 lines, -10 lines 0 comments Download

Depends on Patchset:

Powered by Google App Engine
This is Rietveld 408576698