<?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>28493</bug_id>
          
          <creation_ts>2015-04-15 06:37:12 +0000</creation_ts>
          <short_desc>[Shadow]: Have a common interface between Document and ShadowRoot</short_desc>
          <delta_ts>2015-05-27 03:04:24 +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>MOVED</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>28552</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Hayato Ito">hayato</reporter>
          <assigned_to name="Hayato Ito">hayato</assigned_to>
          <cc>annevk</cc>
    
    <cc>jackalmage</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>119516</commentid>
    <comment_count>0</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-04-15 06:37:12 +0000</bug_when>
    <thetext># This is separated from https://www.w3.org/Bugs/Public/show_bug.cgi?id=27829#c2


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>119521</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-04-15 08:22:32 +0000</bug_when>
    <thetext>Perhaps something along the lines of LayoutRoot?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119526</commentid>
    <comment_count>2</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-04-15 09:27:47 +0000</bug_when>
    <thetext>Thank you.

BTW, in Blink, we use a term of *TreeScope* for this purpose, at least in C++.
Both Document and ShadowRoot implements TreeScope.

(In reply to Anne from comment #1)
&gt; Perhaps something along the lines of LayoutRoot?

So the candidates are:

- NodeTreeRoot
- LayoutRoot
- TreeScope

Any other better idea?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119527</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-04-15 09:32:58 +0000</bug_when>
    <thetext>TreeScope and NodeTreeRoot both have the problem that their terminology also applies to Element and DocumentFragment.

What&apos;s special about ShadowRoot and Document is that they are layout/CSS/stylesheet boundaries.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119530</commentid>
    <comment_count>4</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-04-15 11:29:25 +0000</bug_when>
    <thetext>Thank you for the explanation. I understand. Only Document and ShadowRoot contribute to Layout Tree. That&apos;s true!

+1 for LayoutRoot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119540</commentid>
    <comment_count>5</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2015-04-15 16:44:38 +0000</bug_when>
    <thetext>I used the name &quot;TreeScope&quot; in &lt;http://tabatkins.github.io/specs/construct-stylesheets/#adding-stylesheets&gt;.

But Anne&apos;s comments make some sense.  I&apos;m fine with LayoutRoot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120513</commentid>
    <comment_count>6</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-05-27 03:04:24 +0000</bug_when>
    <thetext>Moved to https://github.com/w3c/webcomponents/issues/91</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>