Bug 134007 - Web Inspector: JS PrettyPrinting unary - and + issues
Summary: Web Inspector: JS PrettyPrinting unary - and + issues
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 412.x
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 153830 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-17 17:02 PDT by Joseph Pecoraro
Modified: 2016-02-11 11:49 PST (History)
6 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (9.55 KB, patch)
2016-02-03 16:16 PST, Joseph Pecoraro
timothy: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
[PATCH] For Landing (9.51 KB, patch)
2016-02-03 16:23 PST, Joseph Pecoraro
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews117 for mac-yosemite (794.20 KB, application/zip)
2016-02-03 17:12 PST, Build Bot
no flags Details
Archive of layout-test-results from ews114 for mac-yosemite (796.27 KB, application/zip)
2016-02-03 17:17 PST, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2014-06-17 17:02:56 PDT
TEST:

    f(-1);
    x = -1 + 1;
    f(+1);
    x = +1 + 1;

OUTPUT:

    f( - 1);
    x = - 1 + 1;
    f( + 1);
    x = + 1 + 1;

EXPECTED:

    f(-1);
    x = -1 + 1;
    f(+1);
    x = +1 + 1;
Comment 1 Joseph Pecoraro 2014-06-17 17:04:15 PDT
In fact, this produces even worse results:

    f(-1);
    x=-1+1;
    f(+1);
    x=+1+1;

Namely that "=-" and "=+" are treated as operators. That is CodeMirror's tokenization, maybe that should be improved.
Comment 2 Radar WebKit Bug Importer 2014-06-17 17:04:49 PDT
<rdar://problem/17351953>
Comment 3 Radar WebKit Bug Importer 2014-06-17 17:05:23 PDT
<rdar://problem/17351983>
Comment 4 Joseph Pecoraro 2016-02-03 16:04:22 PST
*** Bug 153830 has been marked as a duplicate of this bug. ***
Comment 5 Joseph Pecoraro 2016-02-03 16:16:04 PST
Created attachment 270606 [details]
[PATCH] Proposed Fix
Comment 6 Joseph Pecoraro 2016-02-03 16:18:15 PST
This also fixed an issue with '%' (modulo) operator and ternary in array / property index '[' ']' scopes.
Comment 7 Joseph Pecoraro 2016-02-03 16:23:48 PST
Created attachment 270608 [details]
[PATCH] For Landing
Comment 8 WebKit Commit Bot 2016-02-03 16:56:27 PST
Comment on attachment 270608 [details]
[PATCH] For Landing

Clearing flags on attachment: 270608

Committed r196098: <http://trac.webkit.org/changeset/196098>
Comment 9 Build Bot 2016-02-03 17:12:06 PST
Comment on attachment 270606 [details]
[PATCH] Proposed Fix

Attachment 270606 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/779118

New failing tests:
imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-2.html
Comment 10 Build Bot 2016-02-03 17:12:08 PST
Created attachment 270613 [details]
Archive of layout-test-results from ews117 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 11 Build Bot 2016-02-03 17:17:28 PST
Comment on attachment 270608 [details]
[PATCH] For Landing

Attachment 270608 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/779144

New failing tests:
imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-2.html
Comment 12 Build Bot 2016-02-03 17:17:31 PST
Created attachment 270615 [details]
Archive of layout-test-results from ews114 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-yosemite  Platform: Mac OS X 10.10.5