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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>27829</bug_id>
          
          <creation_ts>2015-01-14 05:22:35 +0000</creation_ts>
          <short_desc>[Shadow]: Update ShadowRoot to have elementsFromPoint and caretPositionFromPoint</short_desc>
          <delta_ts>2015-04-15 06:39:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>
          
          <blocked>14978</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Philip Rogers">pdr</reporter>
          <assigned_to name="Hayato Ito">hayato</assigned_to>
          <cc>hayato</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>117132</commentid>
    <comment_count>0</comment_count>
    <who name="Philip Rogers">pdr</who>
    <bug_when>2015-01-14 05:22:35 +0000</bug_when>
    <thetext>cssom-view now has the following extensions to Document[1]:
partial interface Document {
  Element? elementFromPoint(double x, double y);
  sequence&lt;Element&gt; elementsFromPoint(double x, double y);
  CaretPosition? caretPositionFromPoint(double x, double y);
};

Only elementFromPoint is currently defined on ShadowRoot. The best way forward would be to define this in cssom but, until then, can we add the following methods to ShadowRoot?
  sequence&lt;Element&gt; elementsFromPoint(double x, double y);
  CaretPosition? caretPositionFromPoint(double x, double y);

They could be defined in roughly the same way as elementFromPoint.

[1] http://dev.w3.org/csswg/cssom-view/#dom-document-elementfrompoint</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117184</commentid>
    <comment_count>1</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-01-15 03:37:50 +0000</bug_when>
    <thetext>Agreed. Sounds the spec needs to reflect the change of cssom-view.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117186</commentid>
    <comment_count>2</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-01-15 06:09:41 +0000</bug_when>
    <thetext>Instead of defining these in Shadow Root as well as in Document, I&apos;ve started to feel that it&apos;d be better that we have the common interface between Document and Shadow Root.


e.g.

interface NodeTreeRoot {
  Element? elementFromPoint(double x, double y);
  sequence&lt;Element&gt; elementsFromPoint(double x, double y);
  CaretPosition? caretPositionFromPoint(double x, double y);
  Selection? getSelection ();
  readonly    attribute Element?       activeElement;
  readonly    attribute StyleSheetList styleSheets;
};

Document implements NodeTreeRoot;
ShadowRoot implements NodeTreeRoot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117443</commentid>
    <comment_count>3</comment_count>
    <who name="Philip Rogers">pdr</who>
    <bug_when>2015-01-22 23:34:06 +0000</bug_when>
    <thetext>@Hayato, that sounds reasonable to me. Can we make it so? :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117532</commentid>
    <comment_count>4</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-01-28 08:41:10 +0000</bug_when>
    <thetext>(In reply to Philip Rogers from comment #3)
&gt; @Hayato, that sounds reasonable to me. Can we make it so? :)

Yeah, we can do it, however, we have to rewrite each behavior of each API so that it also considers shadow trees as well as the document.

That&apos;s not so difficult, but let me put this on my task queue for now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117652</commentid>
    <comment_count>5</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-02-02 05:26:05 +0000</bug_when>
    <thetext>Make ShadowRoot have elementsFromPoints and caretPositionFromPoint tentatively at: 
https://github.com/w3c/webcomponents/commit/3df488859776f0f1cd4a17b5c564cf6165584cb9

In the long term, we should have the common interface between Document and ShadowRoot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117653</commentid>
    <comment_count>6</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-02-02 05:30:45 +0000</bug_when>
    <thetext>I&apos;m aware that these are tentative definitions.
However, it would serve the most of our purposes for a while, I hope.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119517</commentid>
    <comment_count>7</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-04-15 06:39:03 +0000</bug_when>
    <thetext>Let me close this bug.

I&apos;ve filed a bug for comment #2 as 
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28493</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>