<?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>22826</bug_id>
          
          <creation_ts>2013-07-29 02:00:28 +0000</creation_ts>
          <short_desc>[Shadow]: Clarify how getComputedStyle with unprojected elements works</short_desc>
          <delta_ts>2014-05-29 08:28:33 +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>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>23062</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Takashi Sakamoto">tasak</reporter>
          <assigned_to name="Hayato Ito">hayato</assigned_to>
          <cc>hayato</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>91366</commentid>
    <comment_count>0</comment_count>
    <who name="Takashi Sakamoto">tasak</who>
    <bug_when>2013-07-29 02:00:28 +0000</bug_when>
    <thetext>Originates from http://crbug.com/260502

If you have something like:

div
  #shadow-root
    &lt;content&gt;
  div#testCase

then remove the content element:

div
  #shadow-root
  div#testCase

then getComputedStyle(testCase) is empty - i.e. no styles are computed, even though the element is in the tree and should inherit.

On the other hand, if the content element is never inserted, styles are computed for testCase.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91367</commentid>
    <comment_count>1</comment_count>
    <who name="Takashi Sakamoto">tasak</who>
    <bug_when>2013-07-29 02:14:19 +0000</bug_when>
    <thetext>Talking about current Blink, when running the testcase with followings:

console.log(getComputedStyle(div#testCase));
console.log(getComputedStyle(div#testCase).display);
console.log(getComputedStyle(div#testCase).backgroundColor);

(a) Before removing &lt;content&gt;:

CONSOLE MESSAGE: line 23: [object CSSStyleDeclaration]
CONSOLE MESSAGE: line 24: block
CONSOLE MESSAGE: line 25: rgba(0, 0, 0, 0)


(b) After removing &lt;content&gt;:

CONSOLE MESSAGE: line 32: [object CSSStyleDeclaration]
CONSOLE MESSAGE: line 33:
CONSOLE MESSAGE: line 34:

---

So unprojected elements have empty styles? Or unprojected elements have some styles with display: none?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106969</commentid>
    <comment_count>2</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2014-05-29 08:28:33 +0000</bug_when>
    <thetext>Let me close this. I think css-scoping spec should have addressed that.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>