Closed Bug 2049489 Opened 2 months ago Closed 2 months ago

Render the Daily Crossword in a sandboxed iframe

Categories

(Firefox :: New Tab Page, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: maxx, Assigned: rhamoui)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 5 obsolete files)

Render the crossword bundle (served via Merino) inside a sandboxed iframe within the widget article.

  • <iframe sandbox="allow-scripts"> (no allow-same-origin) inside <article className="widget">; loading spinner + error/"Try again" states.
  • Add frame-src <merino-origin> to the newtab CSP meta tag in prerendered/activity-stream.html (no frame-src exists today, so default-src 'none' currently blocks all iframes).
  • Add a configurable Merino endpoint pref (following the pattern from the World Cup Widget), defaulting to the staging endpoint https://stage-games-particle.merino.nonprod.webservices.mozgcp.net/index.html, routed through a resolve* helper that applies trainhopConfig overrides (never read the raw pref). The iframe src reads the resolved value so we can swap staging to prod and trainhop-target it.

Additional notes:

  • No client-side caching or puzzle feed in v1: The iframe self-fetches its own puzzle data
  • Merino plus the browser HTTP cache handle bundle versioning.

Sample Merino endpoint: https://stage-games-particle.merino.nonprod.webservices.mozgcp.net/index.html

Assignee: nobody → rhamoui
Attachment #9602195 - Attachment description: WIP: Bug 2049489 - Add in Particle iframe for crosswords widget. → Bug 2049489 - Add in Particle iframe for crosswords widget. r=#home-newtab-reviewers
Status: NEW → ASSIGNED
Pushed by rperta@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9ff04418a75a https://hg.mozilla.org/integration/autoland/rev/822bf4207870 Revert "Bug 2049489 - Add in Particle iframe for crosswords widget. r=maxx" for causingg multiple failures on nsContentSecurityUtils.cpp

Backed out for causingg multiple failures on nsContentSecurityUtils.cpp
Backout link
Push with failures
Failure log(s)

Flags: needinfo?(rhamoui)

The failure log isn't really indicating what the "unexpected exception" is, would you be able to tell me what the error is?

edit: sorry i found it shortly after but forgot to update this comment

Flags: needinfo?(rhamoui) → needinfo?(rperta)
Attachment #9606266 - Flags: approval-mozilla-release?

firefox-release Uplift Approval Request

  • User impact if declined/Reason for urgency: New tab will not be able to experiment with the Crossword widget in the en-US market
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: Follow steps in https://phabricator.services.mozilla.com/D309189
  • Risk associated with taking this patch: low
  • Explanation of risk level: The feature that would use this code change is behind a pref (and off by default)
  • String changes made/needed?: No
  • Is Android affected?: no
Flags: qe-verify+

Note that I created a revision for the dom/security/nsContentSecurityUtils.cpp changes to be uplifted to maintain train-hop compatibility.

https://lando.moz.tools/D311311/

Attachment #9606266 - Attachment description: Bug 2049489 - Allow frame-src https host sources for the New Tab crossword widget in about:home/about:newtab CSP checks. → Bug 2049489 - Allow frame-src https host sources for the New Tab crossword widget in about:home/about:newtab CSP checks. r=tschuster
Attachment #9606266 - Attachment description: Bug 2049489 - Allow frame-src https host sources for the New Tab crossword widget in about:home/about:newtab CSP checks. r=tschuster → Bug 2049489 - Allow frame-src https host sources for the New Tab crossword widget in about:home/about:newtab CSP checks. r=tschuster

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: New tab will not be able to experiment with the Crossword widget in the en-US market
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: Follow steps in https://phabricator.services.mozilla.com/D309189
  • Risk associated with taking this patch: low
  • Explanation of risk level: The feature that would use this code change is behind a pref (and off by default)
  • String changes made/needed?: No
  • Is Android affected?: no
Attachment #9606290 - Flags: approval-mozilla-beta?
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
Attachment #9606304 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: New tab will not be able to experiment with the Crossword widget in the en-US market
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: Follow steps in https://phabricator.services.mozilla.com/D309189
  • Risk associated with taking this patch: low
  • Explanation of risk level: The feature that would use this code change is behind a pref (and off by default)
  • String changes made/needed?: No
  • Is Android affected?: no
Attachment #9606305 - Flags: approval-mozilla-beta?
Attachment #9606266 - Attachment is obsolete: true
Attachment #9606266 - Flags: approval-mozilla-release?
Attachment #9606269 - Attachment is obsolete: true
Attachment #9606304 - Attachment is obsolete: true
Attachment #9606304 - Flags: approval-mozilla-beta?
Attachment #9606290 - Attachment is obsolete: true
Attachment #9606290 - Flags: approval-mozilla-beta?
Attachment #9606305 - Attachment is obsolete: true
Attachment #9606305 - Flags: approval-mozilla-beta?
Flags: needinfo?(rperta)
QA Whiteboard: [qa-triage-done-c155/b154][qa-ver-needed-c155/b154]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: