Open Bug 2098603 Opened 3 days ago Updated 11 hours ago

Loading about:blank into a new browser is treated like loading an initial page such as about:newtab

Categories

(Firefox :: Tabbed Browser, defect)

Desktop
All
defect

Tracking

()

ASSIGNED
Tracking Status
firefox-esr115 --- wontfix
firefox-esr153 --- wontfix
firefox161 --- wontfix
firefox162 --- wontfix
firefox163 --- fix-optional

People

(Reporter: dao, Assigned: dao)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(1 external file)

TabProgressListener.onStateChange skips setLoadStartedSinceUrlbarOverride(true) when an initial page loads into a fresh browser, so typed text in the address bar survives. The comment beside it says about:blank is excluded "because about:blank can be loaded by websites under their principal", but the check reads originalLocation != "about:blank", which compares an nsIURI with a string. An nsIURI converts to [xpconnect wrapped nsIURI], so the comparison is always true, and about:blank, the first entry in gInitialPages, gets the same exemption as about:newtab.

The fix is originalLocation.spec != "about:blank". Type-checking onStateChange for bug 2098548 flags the comparison.

Set release status flags based on info from the regressing bug 1241085

:Gijs, since you are the author of the regressor, bug 1241085, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(gkruitbosch)

The nsIURI-to-string comparison in Tabbrowser.sys.mjs has been there since it landed in bug 1241085. Changing only that condition also lets the bug 610357 prefill block below it run for about:blank and set nonWebControlledLoadingURI. The blank_page__* tasks in browser_link_in_tab_title_and_url_prefilled_new_window.js currently assert that this does not happen.

Fix: Use originalLocation.spec != "about:blank" but keep the prefill block skipped for about:blank. Cover the cleared typed text next to browser_privateBrowsingWindowChange.js.

Suggested severity: S4. Typed address bar text is left in place instead of cleared when about:blank loads into a fresh browser, a narrow path with no data loss.


If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-{wrong-file, wrong-cause, hallucination, out-of-scope, not-a-bug, wrong-fix, shallow-fix, wrong-severity}.

Needinfo hackbot@mozilla.tld to have a patch generated for this bug, include any questions or directions as needed in your comment.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Severity: -- → S4
Flags: needinfo?(gkruitbosch)
OS: Unspecified → All
Hardware: Unspecified → Desktop
Blocks: 2099191
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: