Syntax highlighting of HTML source code is broken
Categories
(Toolkit :: View Source, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr128 | --- | unaffected |
firefox133 | --- | unaffected |
firefox134 | --- | wontfix |
firefox135 | --- | verified |
firefox136 | --- | verified |
People
(Reporter: gildas.lormeau, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(6 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:135.0) Gecko/20100101 Firefox/135.0
Steps to reproduce:
1 - Open the attached page in Firefox (Nightly) 135.0a1
2 - Right-click on the page and select "View page source"
Actual results:
The syntax highlighting of the source code is broken, e.g. HTML comments are partially highlighted (in green).
Expected results:
The syntax highlighting should not be broken. It's a regression. The same test works fine in Firefox 133.0.3. It also works as expected in Chrome and Safari.
Comment 1•1 month ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Debugger' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•1 month ago
|
||
Bonjour Gildas!
It looks like the attachment has a pretty weird encoding, I'm seeing similar results between 133 and 135. Can you check that the file content is what you expect to be ? If so, a screenshot would help us investigating further
If you have some time (and a good bandwidth), you can use https://mozilla.github.io/mozregression/ to provide the pushlog where this started malfunctioning
Merci!
Reporter | ||
Comment 3•1 month ago
|
||
Reporter | ||
Comment 4•1 month ago
|
||
Reporter | ||
Comment 5•1 month ago
|
||
Reporter | ||
Comment 6•1 month ago
|
||
Bonjour Nicolas!
I confirm that the weird encoding is "normal". It's a file which is also compatible with ZIP and PNG.
I used the "View page source" a lot while debugging the code which generates this page. That's how I noticed the regression. I've attached some screenshots to illustrate the regression.
Reporter | ||
Comment 7•1 month ago
|
||
I did the test with mozregression. Here is below the commit which introduced the issue.
Bug 1926824 - Fix crash with speculated and discarded <pre> hanging around.
Reporter | ||
Comment 8•1 month ago
|
||
Note that I had to skip some tests because they crashed when I approached the problematic commit. Here are the details of the commit message:
Move the <pre> to a speculation now that its siblings can potentially
get discarded.
MANUAL PUSH: Trivial-ish crash fix CLOSED TREE
Comment 9•1 month ago
|
||
Thanks for the information and running mozregression, that's super helpful
Comment 10•1 month ago
|
||
:emilio, since you are the author of the regressor, bug 1926824, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Assignee | ||
Comment 11•1 month ago
|
||
A carriage return is confusing us, see above... It's weird because IIRC they get normalized by the HTML parser. Will look.
Assignee | ||
Comment 12•1 month ago
|
||
The regressing bug splits the span per line, so if there's no data state
within the comment, then we'd only add the class to the last comment
line.
Updated•1 month ago
|
Comment 13•1 month ago
|
||
Set release status flags based on info from the regressing bug 1926824
Assignee | ||
Updated•1 month ago
|
Comment 14•1 month ago
|
||
Updated•1 month ago
|
Comment 15•1 month ago
|
||
bugherder |
Comment 16•1 month ago
|
||
The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox135
towontfix
.
For more information, please visit BugBot documentation.
Assignee | ||
Comment 17•1 month ago
|
||
Comment on attachment 9445661 [details]
Bug 1939619 - Add comment class at comment start unconditionally. r=hsivonen
Beta/Release Uplift Approval Request
- User impact if declined/Reason for urgency: Relatively low risk regression fix.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: comment 0
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Trivial-ish change specific to view-source.
- String changes made/needed: none
- Is Android affected?: Yes
Assignee | ||
Updated•1 month ago
|
Comment 18•1 month ago
|
||
Comment on attachment 9445661 [details]
Bug 1939619 - Add comment class at comment start unconditionally. r=hsivonen
Approved for 135.0b3.
Comment 19•1 month ago
|
||
uplift |
Updated•1 month ago
|
Updated•1 month ago
|
Comment 20•1 month ago
|
||
Reproduced this issue on an affected Nightly build from 2024-12-31 on Windows 10.
Verified as fixed on latest Nightly 136.0a1 (20250109183505) and Firefox 135.0b3 (20250108173941) across the following platforms: Windows 10, macOS 10.15, macOS 11 and Ubuntu 22.04.
Updated•21 days ago
|
Description
•