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

Issue 293653002: Canvas fillText and measureText handle ideographic spaces differently. (Closed)

Created:
6 years, 7 months ago by zino
Modified:
6 years, 7 months ago
Reviewers:
Justin Novosad
CC:
blink-reviews, aandrey+blink_chromium.org, blink-reviews-html_chromium.org, dglazkov+blink, Rik
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Canvas fillText and measureText handle ideographic spaces differently. According to specification[1] all space characters should be replaced with 0x0020 space character. (U+0009, U+000A, U+000C, U+000D -> U+0020) BTW, ideographic space(U+3000) isn't space characters what the spec[2] says. This change aligns behavior with Gecko and WebKit. [1] text preparation algorithm: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-preparation-algorithm [2] space characters http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character This patch is based on following patch from WebKit: https://bugs.webkit.org/show_bug.cgi?id=108881 BUG=171639 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174663

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : #

Total comments: 1

Patch Set 4 : #

Patch Set 5 : rebase #

Patch Set 6 : #

Patch Set 7 : add v/g/* test expectations #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -18 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M LayoutTests/canvas/philip/tests/2d.text.measure.width.space.html View 1 2 3 4 5 6 1 chunk +4 lines, -4 lines 0 comments Download
A LayoutTests/fast/canvas/canvas-text-ideographic-space.html View 1 1 chunk +36 lines, -0 lines 0 comments Download
A LayoutTests/fast/canvas/canvas-text-space-characters.html View 1 2 3 4 1 chunk +31 lines, -0 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.cpp View 1 2 3 4 5 4 chunks +29 lines, -14 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
zino
Please take a look. Thank you :)
6 years, 7 months ago (2014-05-19 11:17:55 UTC) #1
Justin Novosad
https://codereview.chromium.org/293653002/diff/1/LayoutTests/fast/canvas/canvas-text-ideographic-space.html File LayoutTests/fast/canvas/canvas-text-ideographic-space.html (right): https://codereview.chromium.org/293653002/diff/1/LayoutTests/fast/canvas/canvas-text-ideographic-space.html#newcode29 LayoutTests/fast/canvas/canvas-text-ideographic-space.html:29: var abc = 'a' + '\u3000' + 'b' + ...
6 years, 7 months ago (2014-05-20 18:29:50 UTC) #2
zino
On 2014/05/20 18:29:50, junov wrote: > https://codereview.chromium.org/293653002/diff/1/LayoutTests/fast/canvas/canvas-text-ideographic-space.html > File LayoutTests/fast/canvas/canvas-text-ideographic-space.html (right): > > https://codereview.chromium.org/293653002/diff/1/LayoutTests/fast/canvas/canvas-text-ideographic-space.html#newcode29 > ...
6 years, 7 months ago (2014-05-21 15:08:01 UTC) #3
Justin Novosad
Thanks for the explanation. lgtm
6 years, 7 months ago (2014-05-21 15:14:32 UTC) #4
Justin Novosad
https://codereview.chromium.org/293653002/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/293653002/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode2027 Source/core/html/canvas/CanvasRenderingContext2D.cpp:2027: static inline bool isSpaceCharacters(UChar c) Remove 's' at the ...
6 years, 7 months ago (2014-05-21 15:14:46 UTC) #5
zino
On 2014/05/21 15:14:46, junov wrote: > https://codereview.chromium.org/293653002/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.cpp > File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): > > https://codereview.chromium.org/293653002/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode2027 > ...
6 years, 7 months ago (2014-05-21 15:19:14 UTC) #6
Justin Novosad
On 2014/05/21 15:19:14, zino wrote: > On 2014/05/21 15:14:46, junov wrote: > > > https://codereview.chromium.org/293653002/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.cpp ...
6 years, 7 months ago (2014-05-21 19:44:47 UTC) #7
zino
The CQ bit was checked by jinho.bang@samsung.com
6 years, 7 months ago (2014-05-21 23:43:47 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jinho.bang@samsung.com/293653002/60001
6 years, 7 months ago (2014-05-21 23:46:15 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-21 23:46:22 UTC) #10
commit-bot: I haz the power
Failed to apply patch for LayoutTests/TestExpectations: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 7 months ago (2014-05-21 23:46:22 UTC) #11
zino
The CQ bit was checked by jinho.bang@samsung.com
6 years, 7 months ago (2014-05-22 09:34:57 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jinho.bang@samsung.com/293653002/80001
6 years, 7 months ago (2014-05-22 09:35:21 UTC) #13
zino
The CQ bit was unchecked by jinho.bang@samsung.com
6 years, 7 months ago (2014-05-22 10:23:37 UTC) #14
zino
The CQ bit was checked by jinho.bang@samsung.com
6 years, 7 months ago (2014-05-23 02:20:50 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jinho.bang@samsung.com/293653002/100001
6 years, 7 months ago (2014-05-23 02:21:28 UTC) #16
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-23 03:42:00 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-23 04:24:00 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/8723)
6 years, 7 months ago (2014-05-23 04:24:00 UTC) #19
zino
The CQ bit was checked by jinho.bang@samsung.com
6 years, 7 months ago (2014-05-23 07:03:58 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jinho.bang@samsung.com/293653002/150001
6 years, 7 months ago (2014-05-23 07:04:38 UTC) #21
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-23 08:26:48 UTC) #22
commit-bot: I haz the power
6 years, 7 months ago (2014-05-23 10:16:38 UTC) #23
Message was sent while issue was closed.
Change committed as 174663

Powered by Google App Engine
This is Rietveld 408576698