Closed Bug 1836289 Opened 11 months ago Closed 11 months ago

Early Hints image loads blocked by webextension ublock show broken image frame instead of hiding the image

Categories

(Core :: Networking: HTTP, defect, P2)

defect

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: manuel, Assigned: kershaw)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(2 files)

No description provided.
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]

Is there a STR (test case + expected vs actual behavior)?

And more details on why it's considered a bug?

The problem that the image element not being removed is that the tabId is missing.
To make tabId available for the web extensions, we need to provide nsILoadContext to hinted requests.

Assignee: nobody → kershaw
Status: NEW → ASSIGNED
Attached file eh_test_site.zip

The node server that I used to reproduce this issue locally.

(In reply to Rob Wu [:robwu] from comment #1)

Is there a STR (test case + expected vs actual behavior)?

Please see the attached test code.
STR:

  1. Run node server.js to start the server.
  2. Open Firefox and install uBlock.
  3. Navigate to https://localhost:4433
  4. Use uBlock to block image.jpg.
  5. Reload the page and you can observe that the image element is still visible.

The expected result is that the image element should be hidden.

And more details on why it's considered a bug?

After looking into uBlock's code, I found that cosmetic filtering in uBlock doesn't work because the early hinted preload request has no tabId.
To fix this, we should provide a nsILoadContext to the preload request.

Pushed by kjang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5e37c8d6f4be
Provide nsILoadContext to the hinted request, r=manuel,necko-reviewers

Backed out for causing Bp-nu bustages in EarlyHintsService.h.

Flags: needinfo?(kershaw)
Flags: needinfo?(kershaw)
Pushed by kjang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c18688c9011d
Provide nsILoadContext to the hinted request, r=manuel,necko-reviewers
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: