Morph DocShell.hasLoadedNonBlankURI into isInitialAboutBlankDocument
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Tracking
()
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.
Assignee | ||
Comment 1•3 years ago
|
||
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.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Description
•