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

Issue 755613002: Fix assertion: !visualMetricsValues.isEmpty() in layoutTextOnLineOrPath (Closed)

Created:
6 years, 1 month ago by zherczeg
Modified:
5 years, 6 months ago
Reviewers:
pdr., fs, kouhei (in TOK)
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Fix assertion: !visualMetricsValues.isEmpty() in layoutTextOnLineOrPath Having only whitespaces within a <tspan> and setting white-space to pre-wrap fires the !visualMetricsValues.isEmpty() assert, because the new renderer has no visualMetricsValues. However, the renderer shouldn't even be created in such case. So, if the text only contains whitespaces, and the white-space CSS property is set to pre-wrap, and the parent of the text is an SVG node, we avoid creating a renderer. Peter Molnar (pmolnar.u-szeged@partner.samsung.com) started this patch before, and he let me continue his work. BUG=416833

Patch Set 1 #

Total comments: 4

Patch Set 2 : Next patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -0 lines) Patch
A LayoutTests/svg/text/tspan-pre-wrap-whitespace-crash.html View 1 1 chunk +11 lines, -0 lines 0 comments Download
A LayoutTests/svg/text/tspan-pre-wrap-whitespace-crash-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Text.cpp View 1 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (4 generated)
zherczeg
Fixed Peter's original patch (https://codereview.chromium.org/635353002/) and simplified the test case. @eseidel, please review this.
6 years, 1 month ago (2014-11-24 10:08:53 UTC) #2
zherczeg
> @eseidel, please review this. Ping!
6 years ago (2014-12-01 07:37:13 UTC) #3
zherczeg
On 2014/12/01 07:37:13, zherczeg wrote: > > @eseidel, please review this. > > Ping! Eseidel, ...
6 years ago (2014-12-03 12:20:40 UTC) #4
zherczeg
If Eseidel is not available, plase somebody else review this. This patch is here for ...
6 years ago (2014-12-07 12:17:51 UTC) #6
pdr.
On 2014/12/07 at 12:17:51, zherczeg.u-szeged wrote: > If Eseidel is not available, plase somebody else ...
6 years ago (2014-12-08 21:30:41 UTC) #7
pdr.
6 years ago (2014-12-08 21:31:04 UTC) #10
kouhei (in TOK)
https://codereview.chromium.org/755613002/diff/1/LayoutTests/svg/text/tspan-pre-wrap-whitespace-crash.html File LayoutTests/svg/text/tspan-pre-wrap-whitespace-crash.html (right): https://codereview.chromium.org/755613002/diff/1/LayoutTests/svg/text/tspan-pre-wrap-whitespace-crash.html#newcode4 LayoutTests/svg/text/tspan-pre-wrap-whitespace-crash.html:4: <tspan style="white-space:pre-wrap";> </tspan> ; should be before " https://codereview.chromium.org/755613002/diff/1/Source/core/dom/Text.cpp ...
6 years ago (2014-12-09 09:15:23 UTC) #11
fs
https://codereview.chromium.org/755613002/diff/1/LayoutTests/svg/text/tspan-pre-wrap-whitespace-crash.html File LayoutTests/svg/text/tspan-pre-wrap-whitespace-crash.html (right): https://codereview.chromium.org/755613002/diff/1/LayoutTests/svg/text/tspan-pre-wrap-whitespace-crash.html#newcode4 LayoutTests/svg/text/tspan-pre-wrap-whitespace-crash.html:4: <tspan style="white-space:pre-wrap";> </tspan> On 2014/12/09 09:15:22, kouhei wrote: > ...
6 years ago (2014-12-09 10:18:33 UTC) #12
zherczeg
> All cases in which the metrics builder will end up collapsing I suppose - ...
6 years ago (2014-12-09 12:13:02 UTC) #13
fs
On 2014/12/09 12:13:02, zherczeg wrote: > > All cases in which the metrics builder will ...
6 years ago (2014-12-09 12:18:08 UTC) #14
zherczeg
> The way I would interpret myself would be: "style.whiteSpace() != PRE && ...". > ...
6 years ago (2014-12-16 13:16:19 UTC) #15
fs
On 2014/12/16 13:16:19, zherczeg wrote: > > The way I would interpret myself would be: ...
6 years ago (2014-12-16 13:47:16 UTC) #16
fs
5 years, 6 months ago (2015-06-04 22:44:02 UTC) #17

Powered by Google App Engine
This is Rietveld 408576698