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

Issue 2005023005: Use the right TextRun length when checking for surrogate pairs (Closed)

Created:
4 years, 7 months ago by fs
Modified:
4 years, 7 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, krit, f(malita), jchaffraix+rendering, blink-reviews, gyuyoung2, Stephen Chennney, rwlbuis, pdr+svgwatchlist_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@2704
Target Ref:
refs/pending/branch-heads/2704
Project:
chromium
Visibility:
Public.

Description

Use the right TextRun length when checking for surrogate pairs The isValidSurrogatePair helper in LayoutSVGInlineText.cpp operates on a TextRun and an index, and checks if the character at the index is part of a valid surrogate pair. To check the trailing character, the next index is checked against the length of the TextRun (to see if the character exists). The TextRun used is a "sub run" of the entire text node, which means that the operator[] implementation expects accesses to be within the sub run rather than the "full run". Since this function is always used for runs that are sub runs, it should use TextRun::length() rather than TextRun::charactersLength() to stay consistent with the iteration and the code using it. BUG=610641 Review-Url: https://codereview.chromium.org/1961953004 Cr-Commit-Position: refs/heads/master@{#392880} (cherry picked from commit 7dabd875312333379d052e609cc9aad621de1754) Committed: https://chromium.googlesource.com/chromium/src/+/80b28a30853ef60bf7c8c4c2c2b47e08569252e3

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -1 line) Patch
A third_party/WebKit/LayoutTests/svg/text/unpaired-surrogate-with-trailing-char-crash.html View 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/text/unpaired-surrogate-with-trailing-char-crash-expected.txt View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2 (1 generated)
fs
4 years, 7 months ago (2016-05-24 10:37:55 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
80b28a30853ef60bf7c8c4c2c2b47e08569252e3 (tree was closed).

Powered by Google App Engine
This is Rietveld 408576698