Closed Bug 1922190 Opened 1 year ago Closed 1 year ago

Highlighter related warning message (Layout was forced before the page was fully loaded) is displayed in regular console

Categories

(DevTools :: Inspector, defect, P2)

defect

Tracking

(firefox133 verified, firefox134 verified)

VERIFIED FIXED
133 Branch
Tracking Status
firefox133 --- verified
firefox134 --- verified

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

Steps to reproduce

  1. Go to https://www.playorama.app/
  2. Open the inspector
  3. Open the split console
  4. 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

Severity: -- → S3
Priority: -- → P2
See Also: → 1925126

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.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

Thanks for working on this Nicolas, do you think we should close Bug 1924725 and Bug 1925126 as duplicates?

Flags: needinfo?(nchevobbe)
Duplicate of this bug: 1925126
Duplicate of this bug: 1924725
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/446043706a5d [devtools] Avoid forcing layout when creating ViewportSizeOnResizeHighlighter. r=devtools-reviewers,bomsy.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
Flags: needinfo?(nchevobbe)
QA Whiteboard: [qa-133b-p2]

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.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-133b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: