Bug 109261
Summary: | Events wrongly propagated over shadow boundaries when we set a relatedTarget in FocusEvent constructor | ||
---|---|---|---|
Product: | WebKit | Reporter: | Kentaro Hara <haraken> |
Component: | DOM | Assignee: | Kentaro Hara <haraken> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | dglazkov, hayato, ojan, webcomponents-bugzilla |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 109561 | ||
Bug Blocks: |
Kentaro Hara
Currently we're creating a FocusEvent in Node.cpp in this way:
RefPtr<FocusEvent> event = FocusEvent::create(eventNames().focusEvent, false, false, document()->defaultView(), 0, 0);
EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(event.release(), oldFocusedNode));
Ideally we should create a FocusEvent in this way:
RefPtr<FocusEvent> event = FocusEvent::create(eventNames().focusEvent, false, false, document()->defaultView(), 0, oldFocusedNode);
EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(event.release()));
However, if we do so, fast/dom/shadow/shadow-boundary-events.html fails. It looks like that FocusEvent.relatedTarget has to be set not in the FocusEvent constructor but in EventContext::handleLocalEvents().
The same issue exists in BlurEvent, FocusInEvent and FocusOutEvent. We should fix them.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Hayato Ito
Marking INVALID since I cannot reproduce the issue.
See bug 109650.