https://codereview.chromium.org/2801543002/diff/1/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js File third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js (right): https://codereview.chromium.org/2801543002/diff/1/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js#newcode37 third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js:37: var scripts = Sources.ScriptFormatterEditorAction._scriptsForUISourceCode(formatData.originalSourceCode); You are formatting UISourceCodes, not ...
3 years, 8 months ago
(2017-04-05 18:23:36 UTC)
#4
https://codereview.chromium.org/2801543002/diff/1/third_party/WebKit/Source/d...
File
third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
(right):
https://codereview.chromium.org/2801543002/diff/1/third_party/WebKit/Source/d...
third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js:37:
var scripts =
Sources.ScriptFormatterEditorAction._scriptsForUISourceCode(formatData.originalSourceCode);
You are formatting UISourceCodes, not scripts. Formatter should take the text
from the UISourceCode, format it, store a pointer to the original UISourceCode.
To perform the UI -> Raw transformation, you should use formatting mapping to
get UILocation for the original formatter UISourceCode and then use debugger
workspace binding to move into the raw terms. You action should not operate on
scripts and script arrays.
To perform the Raw -> UI transformation, you should use debugger workspace
binding to jump to the original UI terms first and then use formatting data to
move into UI.
lushnikov
https://codereview.chromium.org/2801543002/diff/1/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js File third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js (right): https://codereview.chromium.org/2801543002/diff/1/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js#newcode33 third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js:33: var formatData = uiSourceCode[Sources.ScriptFormatterEditorAction._formatDataSymbol]; don't you want to save ...
3 years, 8 months ago
(2017-04-05 18:29:48 UTC)
#5
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1491526945015610, "parent_rev": "78d4b1d3374ed443db47841d65922619fa2441e1", "commit_rev": "ffd62e54dade66c69d8db05c71cf5a0a2f923012"}
3 years, 8 months ago
(2017-04-07 05:00:22 UTC)
#11
CQ is committing da patch.
Bot data: {"patchset_id": 40001, "attempt_start_ts": 1491526945015610,
"parent_rev": "78d4b1d3374ed443db47841d65922619fa2441e1", "commit_rev":
"ffd62e54dade66c69d8db05c71cf5a0a2f923012"}
commit-bot: I haz the power
Description was changed from ========== Simplify ScriptFormatterEditorAction - use symbols to map scripts and UISourceCodes ...
3 years, 8 months ago
(2017-04-07 05:01:16 UTC)
#12
Message was sent while issue was closed.
Description was changed from
==========
Simplify ScriptFormatterEditorAction
- use symbols to map scripts and UISourceCodes to FormatData;
- make FormatterScriptMapping independent on both debugger model and
editor action;
- make FormatData agnostic of source code type, just keep original
and formatted source codes.
==========
to
==========
Simplify ScriptFormatterEditorAction
- use symbols to map scripts and UISourceCodes to FormatData;
- make FormatterScriptMapping independent on both debugger model and
editor action;
- make FormatData agnostic of source code type, just keep original
and formatted source codes.
Review-Url: https://codereview.chromium.org/2801543002
Cr-Commit-Position: refs/heads/master@{#462756}
Committed:
https://chromium.googlesource.com/chromium/src/+/ffd62e54dade66c69d8db05c71cf...
==========
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/ffd62e54dade66c69d8db05c71cf5a0a2f923012
3 years, 8 months ago
(2017-04-07 05:01:18 UTC)
#13
Issue 2801543002: DevTools: simplify ScriptFormatterEditorAction
(Closed)
Created 3 years, 8 months ago by caseq
Modified 3 years, 8 months ago
Reviewers: dgozman, lushnikov, pfeldman
Base URL:
Comments: 7