Closed Bug 1926824 Opened 16 days ago Closed 14 days ago

Generate a block per line in view-source highlighter.

Categories

(Toolkit :: View Source, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- wontfix
firefox134 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 6 obsolete files)

Generate a block per line in view-source highlighter.

This would at least help with bug 1926808. Right now we generate a single <pre>, and then have a <span> per line. That causes things like the BiDi algorithm to deal with the whole document at one time, afaict.

There's no reason for that, we could output one <pre> per line, and that should make laying out view-source faster.

This would be a more minimal change compared to bug 1926820. Maybe worth doing sooner?

Summary: Consider using custom highlights to implement view-source syntax highlighting. → Generate a block per line in view-source highlighter.
Assignee: nobody → emilio
Status: NEW → ASSIGNED

This makes viewing source of the HTML spec usable.

This is not needed since bug 1919205.

This is always loaded in HTML and there's no user-controlled content, so
we're good.

After the previous patches we never set the line for span elements, we
always create a <pre>.

Use -moz-bool-pref for them and simplify all the back and forth. Use
light-dark() while at it.

Depends on: 1926922

Comment on attachment 9433116 [details]
Bug 1926824 - Remove unneeded @charset in viewsource.css. r=#style

Revision D226795 was moved to bug 1926922. Setting attachment 9433116 [details] to obsolete.

Attachment #9433116 - Attachment is obsolete: true

Comment on attachment 9433117 [details]
Bug 1926824 - Remove unneeded @namespace in viewsource.css. r=#style

Revision D226796 was moved to bug 1926922. Setting attachment 9433117 [details] to obsolete.

Attachment #9433117 - Attachment is obsolete: true

Comment on attachment 9433119 [details]
Bug 1926824 - Simplify view-source wrapping and syntax highlighting preferences. r=Gijs,#style

Revision D226798 was moved to bug 1926922. Setting attachment 9433119 [details] to obsolete.

Attachment #9433119 - Attachment is obsolete: true

Comment on attachment 9433113 [details]
Bug 1926824 - Use string literals rather than statics in nsHtml5Highlighter.cpp. r=smaug,hsivonen

Revision D226792 was moved to bug 1926922. Setting attachment 9433113 [details] to obsolete.

Attachment #9433113 - Attachment is obsolete: true

Comment on attachment 9433114 [details]
Bug 1926824 - Remove some unused code in nsHtml5Highlighter. r=smaug,hsivonen

Revision D226793 was moved to bug 1926922. Setting attachment 9433114 [details] to obsolete.

Attachment #9433114 - Attachment is obsolete: true
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7b4d4dd97112 Generate one block per line in the view source highlighter. r=hsivonen https://hg.mozilla.org/integration/autoland/rev/fd1ad91ca6ed Remove unneeded selectors in viewsource.css. r=dshin
Flags: needinfo?(emilio)
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/46d6710781aa Fix crash with speculated and discarded <pre> hanging around.

Not a huge priority, but do you know what the best way to regenerate the view-source reftests is?

https://phabricator.services.mozilla.com/D226797 breaks them because the references stop matching the span[id] stuff of course...

Flags: needinfo?(emilio) → needinfo?(hsivonen)

I guess Ctrl+S might do...

Status: ASSIGNED → RESOLVED
Closed: 14 days ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
Regressions: 1927404

Can we back this out from beta once the merge happens for causing a copy-paste regression?

Flags: needinfo?(sheriffs)

(ah, aryx mentioned it's not necessary to ni? :))

Flags: needinfo?(sheriffs)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #16)

Not a huge priority, but do you know what the best way to regenerate the view-source reftests is?

I don't recall for sure, but I think I've done Select All followed by View Selection Source on View Source itself.

Flags: needinfo?(hsivonen)

I ended up biting the bullet in bug 1927404 and just editing them since some of them had manual tweaks like line numbers removed etc.

Attachment #9433118 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: