Closed Bug 1605527 Opened 1 year ago Closed 6 months ago

Check the webcompat overrides again if documentURI changes

Categories

(Toolkit :: Video/Audio Controls, defect, P1)

defect

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: mstriemer, Assigned: mconley)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When the document itself changes a new docState will be created, but if the page is using the history API then the documentURI can change without the need to create a new docState.

If the matcher has a path then this could mean the position is stored for all subsequent videos on that domain.

Example:

  1. Have this matcher: "https://*.twitch.tv/mikeconley_dot_ca/*": TOGGLE_POLICIES.TOP,
  2. Go directly to a video that matches that (open a new tab and put the URL in).
  3. Go to some other video on twitch.

Expected Results:
The PiP button is in the default position.

Actual Results (or, expected actual results?):
The PiP button's position is still cached since it's only set once per document.

Yeah, this is a problem. Good catch. We should probably get this patched and maybe uplifted before we try putting any policies into the webcompat add-on.

Assignee: nobody → mconley
Blocks: videopip
Priority: -- → P1

Does this issue reproduce now that we have overrides? I haven't seen it myself.

I actually think this is the root cause behind the Netflix toggle bug. I believe if users land on the Netflix browse page, the "hidden" policy is applied to all videos (per policy here: https://searchfox.org/mozilla-central/rev/26b13464c2beb26e0d864d561c30e817a85c348a/browser/extensions/webcompat/data/picture_in_picture_overrides.js#32), but then upon choosing a video, the history API is used instead of a full page navigation. This causes the policy to "transfer" even though the URI has changed.

Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7da47d42204e
Re-evaluate Picture-in-Picture toggle overrides if the documentURI changes via the history API. r=mstriemer
Regressions: 1658077
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
Duplicate of this bug: 1653265
You need to log in before you can comment on or make changes to this bug.