New issue
Advanced search Search tips

Issue 852785 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

SVG's path throws error when scientific notation is used

Reported by pa...@blacklabel.pl, Jun 14 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36

Steps to reproduce the problem:
Open jsFiddle: http://jsfiddle.net/BlackLabel/yht516oz/

What is the expected behavior?

What went wrong?
Safari, Firefox and IE browsers render blue-ish line, in Chrome we get an exception: 

> Error: <path> attribute d: Expected number, "M 2.94741357853383…". 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 67.0.3396.79  Channel: n/a
OS Version: OS X 10.13.3
Flash Version:
 

Comment 1 by f...@opera.com, Jun 14 2018

Status: Available (was: Unconfirmed)
The relevant number is 2.9474135785338346e-43, and supposedly we're erroring out on a "too small" exponent here (-37 being the relevant limit in this case.) I guess we should just flush this to zero instead.

Comment 2 by f...@opera.com, Jun 14 2018

Labels: OS-Android OS-Linux OS-Windows

Comment 3 by f...@opera.com, Jun 15 2018

Owner: f...@opera.com
Status: Assigned (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 15 2018

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

commit 7bbda19079d281d71eb6dbeb55aa438554d68457
Author: Fredrik Söderquist <fs@opera.com>
Date: Fri Jun 15 15:50:16 2018

Change handling of negative exponents in GenericParseNumber

Rather than enforcing a limit on the smallest exponent, pass all
negative exponents straight to pow(...) and let it deal with it. Per
IEEE754 pow(10, -Inf) should yield 0, and the cast should round properly
for larger negative exponents (smaller than -37.)

Bug:  852785 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iccd80f7e80c8b87c49cd5eedf5e49ad1e9ccc8dc
Reviewed-on: https://chromium-review.googlesource.com/1102329
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567660}
[modify] https://crrev.com/7bbda19079d281d71eb6dbeb55aa438554d68457/third_party/blink/renderer/core/svg/svg_parser_utilities.cc
[modify] https://crrev.com/7bbda19079d281d71eb6dbeb55aa438554d68457/third_party/blink/renderer/core/svg/svg_path_parser_test.cc

Comment 5 by f...@opera.com, Jun 15 2018

Status: Fixed (was: Assigned)

Sign in to add a comment