New issue
Advanced search Search tips

Issue 597312 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocked on:
issue 597311



Sign in to add a comment

Attribute indices not computed correctly for surrogate pairs in follow-on text nodes

Project Member Reported by f...@opera.com, Mar 23 2016

Issue description

Example:

https://jsfiddle.net/0o4hbqsh/

Expected: The first couple of notes should be positioned at y=80 while the second should be positioned at y=40.

Actual: Both couple of notes are positioned at y=80.
 

Comment 1 by f...@opera.com, Mar 23 2016

(Found by inspection; trivial one-liner that in turn will allow simplifying the code a bit. Hinges on  issue 597311  for being able to add a non-broken TC though...)

Comment 2 by f...@opera.com, Mar 23 2016

Feel free to grab if time permits.
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9331211c22aee7b499131aa1c58ce515deceeb45

commit 9331211c22aee7b499131aa1c58ce515deceeb45
Author: fs <fs@opera.com>
Date: Sat Apr 09 19:13:43 2016

Use characters (not code units) when computing value list positions

The value list position is updated by one for each character, and not
at all when spaces are skipped (collapsed). When assigning value list
positions, we are currently counting surrogates as two (on for each
code unit.)
Use the text metrics data to count the number of (non-collapsed)
characters instead.

BUG= 597312 ,  594058 

Review URL: https://codereview.chromium.org/1866703002

Cr-Commit-Position: refs/heads/master@{#386305}

[add] https://crrev.com/9331211c22aee7b499131aa1c58ce515deceeb45/third_party/WebKit/LayoutTests/svg/text/surrogate-pair-attribute-positions-expected.html
[add] https://crrev.com/9331211c22aee7b499131aa1c58ce515deceeb45/third_party/WebKit/LayoutTests/svg/text/surrogate-pair-attribute-positions.html
[modify] https://crrev.com/9331211c22aee7b499131aa1c58ce515deceeb45/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributesBuilder.cpp
[modify] https://crrev.com/9331211c22aee7b499131aa1c58ce515deceeb45/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributesBuilder.h

Comment 4 by f...@opera.com, Apr 9 2016

Status: Fixed (was: Assigned)
"trivial one-liner", mmm, yes...

Sign in to add a comment