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

Issue 1961953004: 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:
Stephen Chennney
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, krit, eae+blinkwatch, f(malita), gyuyoung2, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
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 Committed: https://crrev.com/7dabd875312333379d052e609cc9aad621de1754 Cr-Commit-Position: refs/heads/master@{#392880}

Patch Set 1 #

Patch Set 2 : Tweak test #

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 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 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (4 generated)
fs
4 years, 7 months ago (2016-05-10 15:31:11 UTC) #2
Stephen Chennney
lgtm with a test request. Can you still make the test crash (with unchanged code) ...
4 years, 7 months ago (2016-05-10 15:56:44 UTC) #3
fs
On 2016/05/10 at 15:56:44, schenney wrote: > lgtm with a test request. > > Can ...
4 years, 7 months ago (2016-05-11 07:44:00 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1961953004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1961953004/20001
4 years, 7 months ago (2016-05-11 08:42:27 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-11 08:46:15 UTC) #8
commit-bot: I haz the power
4 years, 7 months ago (2016-05-11 08:47:35 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/7dabd875312333379d052e609cc9aad621de1754
Cr-Commit-Position: refs/heads/master@{#392880}

Powered by Google App Engine
This is Rietveld 408576698