Closed Bug 1942018 Opened 15 days ago Closed 6 days ago

Object/embed elements embedding cross-origin images aren't always clickable.

Categories

(Core :: DOM: Events, defect)

defect

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: farre, Assigned: edgar)

References

Details

Attachments

(1 file)

object/embed element in an anchor embedding an image is only clickable if the mouse enters the image from below.

See the video in bug 1935609 comment 15.

This depends on having the changes from 1935609.

Component: Site Reports → DOM: Core & HTML
Product: Web Compatibility → Core

Sorry for bugging you again about this, but I'm trying to figure out which component that causes this error. It might be DOM: Core, but I'm not sure. Any help finding the right person to tackle this is appreciated.

Flags: needinfo?(emilio)

It is clickable tho, right? It's just the cursor that's wrong? At least that was what happened with the patches in bug 1935609...

If so I'd look at EventStateManager::SetCursor to see which frame are we getting the cursor from.

Flags: needinfo?(emilio)

It looks like it's EventStateManager::UpdateCursor that makes us behave in different ways. Entering from below this will update the cursor for an nsInlineFrame as target and if we leave the inline to enter the nsSubDocumentFrame, then EventStateManager::UpdateCursor won't reset the cursor (which makes it behave as expected). Entering from the top makes the nsSubDocumentFrame be the target, which means it stays a regular pointer.

Edgar, you added this check, do you have an idea of what's going on?

Flags: needinfo?(echen)

Ahh... So this check you linked to is wrong / has to check whether the remote content reacts to pointer events.

So probably it should be:

if (nsSubDocumentFrame* f = do_QueryFrame(aTargetFrame)) {
  if (auto* fl = f->FrameLoader(); fl && fl->IsRemoteFrame() && f->ContentReactsToPointerEvents()) {
    // The sub-frame will update the cursor if needed.
    return;
  }
}

Emilio's comment #5 should work. Yes, in this case we should not let remote content to update cursor and we don't actually forward the event to the remote content.

Assignee: nobody → echen
Flags: needinfo?(echen)
Severity: -- → S3
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/da0d0fe1351b Don't forward cursor update to the remote content that doesn’t handle pointer events; r=emilio
Status: NEW → RESOLVED
Closed: 6 days ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
Component: DOM: Core & HTML → DOM: Events
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: