Closed Bug 1718110 Opened 3 years ago Closed 3 years ago

Morph DocShell.hasLoadedNonBlankURI into isInitialAboutBlankDocument

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1586830

People

(Reporter: ochameau, Assigned: ochameau)

Details

Attachments

(1 obsolete file)

hasLoadedNonBlankURI is currently a bit limited as it will kept being false even when loading the finaly about:blank document.
While this flag was probably added to help identify the initial about:blank document, it doesn't help distinguish a potential actual final about:blank document.

It would be nice if its logic:
https://searchfox.org/mozilla-central/rev/b355f4e36eb45ef84ce9d3dd6af7f1a417ca8bfe/docshell/base/nsDocShell.cpp#1496-1498

  if (!NS_IsAboutBlank(mCurrentURI)) {
    mHasLoadedNonBlankURI = true;
  }

would instead be:

  mIsInitialAboutBlankDocument = aIsInitialAboutBlank;

Then the flag would immediatly tell us if we are on the actual final document, or still on the transient about:blank document.

This limited behavior forces us to have quite convoluted check in DevTools codebase to avoid processing the transient about:blank document. We are trying to get rid of this convoluted code in bug 1625026.

This better acknowledge the "initial about:blank document" and helps
distinguish it from the final actual about:blank which may load.

Note that this is true before the initial about:blank document starts loading.
So that it will be true if, in some case, we don't even try loading the initial about:blank document.

We might name this attribute isActualDocumentLoaded/isAnyDocumentButInitialAboutBlankLoaded and reverse its value.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Severity: -- → N/A
Priority: -- → P2
Attachment #9228817 - Attachment description: Bug 1718110 - Morph DocShell.hasLoadedNonBlankURI into isInitialAboutBlankDocument. → Bug 1718110 - Expose BrowsingContext.hasLoadedNonInitialDocument to JavaScript.
No longer blocks: 1625026
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Attachment #9228817 - 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: