[Webkit-unassigned] [Bug 264037] Web Inspector: Search results don't select source code line in fetch json
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 28 15:32:32 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=264037
Qianlang Chen <qianlangchen at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |qianlangchen at apple.com
--- Comment #5 from Qianlang Chen <qianlangchen at apple.com> ---
I think Jeff is pointing out that our link to source code location from the search results are not working properly for the particular search result in that JSON file. This happens in general on that same website (https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow). Search any string from the JSON file `customizing_the_notarization_workflow.json`, such as "documentVersion" or ":true," and you'll find that search results always seems to link to the top of file rather than where the contents are.
---
I believe the reason that this happens is because our file viewer automatically prettifies the contents when the file is first opened, where the "Pretty Print" button on the top right (with a "{}" icon) is highlighted blue. Disable prettifying and you'll see that the file is just one line.
So the fix we might need to apply should be either
* Disable auto-enabling prettifying source file when jumping from a search result, or
* Re-compute the search results' locations in the file after it's prettified
- We don't necessarily need to do this for all files at the time of searching, just when a search result is clicked
- However, prettifying a file might change its contents by adding whitespaces (e.g. `:true` becomes `: true`), so we do need to somehow work around that in the fix
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240528/79d8aeb5/attachment.htm>
More information about the webkit-unassigned
mailing list