<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>109261</bug_id>
          
          <creation_ts>2013-02-07 22:20:24 -0800</creation_ts>
          <short_desc>Events wrongly propagated over shadow boundaries when we set a relatedTarget in FocusEvent constructor</short_desc>
          <delta_ts>2013-02-12 20:28:17 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>109561</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kentaro Hara">haraken</reporter>
          <assigned_to name="Kentaro Hara">haraken</assigned_to>
          <cc>dglazkov</cc>
    
    <cc>hayato</cc>
    
    <cc>ojan</cc>
    
    <cc>webcomponents-bugzilla</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>828199</commentid>
    <comment_count>0</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2013-02-07 22:20:24 -0800</bug_when>
    <thetext>Currently we&apos;re creating a FocusEvent in Node.cpp in this way:

  RefPtr&lt;FocusEvent&gt; event = FocusEvent::create(eventNames().focusEvent, false, false, document()-&gt;defaultView(), 0, 0);
  EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(event.release(), oldFocusedNode));

Ideally we should create a FocusEvent in this way:

  RefPtr&lt;FocusEvent&gt; event = FocusEvent::create(eventNames().focusEvent, false, false, document()-&gt;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>831570</commentid>
    <comment_count>1</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2013-02-12 20:28:17 -0800</bug_when>
    <thetext>Marking INVALID since I cannot reproduce the issue.
See bug 109650.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>