Highlighter related warning message (Layout was forced before the page was fully loaded) is displayed in regular console
Categories
(DevTools :: Inspector, defect, P2)
Tracking
(firefox133 verified, firefox134 verified)
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
Attachments
(1 file)
Steps to reproduce
- Go to https://www.playorama.app/
- Open the inspector
- Open the split console
- Reload the page
Actual results
The following warning message is displayed : Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. markup.js:250:53
The message is triggered by the highlighters: https://searchfox.org/mozilla-release/rev/bad2bcb1b74cce00563fde8aab67ae924befe3c2/devtools/server/actors/highlighters/utils/markup.js#247-252
// If we didn't wait for the document to load, we want to force a layout update
// to ensure the anonymous content will be rendered (see Bug 1580394).
const forceSynchronousLayoutUpdate = !this.waitForDocumentToLoad;
this._content = this.anonymousContentDocument.insertAnonymousContent(
forceSynchronousLayoutUpdate
);
We should not print highlighter-related warning/error messages to regular webconsole.
Reported on Mastodon: https://mastodon.social/@HTeuMeuLeu/113232651506510579
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
The highlighter is created when the inspector
is initialized and we were forcing a layout update
since we're not waiting for the page to load.
This was displaying a warning message in the console
that could confuse end users, and worse, trigger
animations when people didn't expected them to be.
To fix this, we add a new option in CanvasFrameAnonymousContentHelper
to control the layout update.
Updated•1 year ago
|
Comment 2•1 year ago
|
||
Thanks for working on this Nicolas, do you think we should close Bug 1924725 and Bug 1925126 as duplicates?
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Reproducible on a 2024-10-02 Nightly build on Windows 10.
Verified as fixed on Firefox Nightly 134.0a1 and Firefox 133.0 on Windows 10, Ubuntu 22, macOS 14.
Description
•