| Summary: | Web Inspector: Execution highlighting in the frontend should be line/column-based | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Matt Baker <mattbaker> | ||||||||
| Component: | Web Inspector | Assignee: | Matt Baker <mattbaker> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | commit-queue, inspector-bugzilla-changes, joepeck, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Bug Depends on: | 187612 | ||||||||||
| Bug Blocks: | 186453 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Matt Baker
2018-07-10 12:36:20 PDT
Created attachment 344716 [details]
Patch
Again I have a very bad feeling about this. Changing line endings affects many things, offsets was supposed to be an easy solution avoiding line endings. Is this fixing a recent regression? If so, what caused it? I think we should land https://webkit.org/b/187612 first. It is a simpler change, and duplicates some of the changes here, allowing this patch to be smaller. It looks like expression highlighting in inline scripts is currently broken in Safari, even in files with Unix-style line endings. For example,
// test.js
var o = {
get x() {
debugger;
return 1;
}
};
var x = o.x;
// test.html
<html>
<head>
<script>
var o = {
get x() {
debugger;
return 1;
}
};
var x = o.x;
</script>
<script src="test.js"></script>
</head>
</html>
Steps to Reproduce:
1. Inspect the test page
2. Reload the page
3. Debugger breaks at test.html:6
4. Select the call frame's parent
Expected:
> var x = |o.x|;
Actual:
> var x |= o|.x;
When breaking at the second debugger statement (in the separate script file) the parent call frame's selection appears correctly.
Created attachment 344948 [details]
Patch
Created attachment 344950 [details]
Patch
(In reply to Matt Baker from comment #7) > Created attachment 344950 [details] > Patch This also addresses the long standing bug with expression highlighting in inline scripts: https://bugs.webkit.org/show_bug.cgi?id=187532#c5. Comment on attachment 344950 [details]
Patch
r=me Nice! I think using SourcePosition everywhere is cleaning things up a bit!
Comment on attachment 344950 [details] Patch Clearing flags on attachment: 344950 Committed r233817: <https://trac.webkit.org/changeset/233817> All reviewed patches have been landed. Closing bug. |