<?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>5478</bug_id>
          
          <creation_ts>2005-10-24 07:53:15 -0700</creation_ts>
          <short_desc>Dynamically adding &lt;style&gt; element outside of &lt;head&gt; fails to change style</short_desc>
          <delta_ts>2008-04-25 08:59:46 -0700</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>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>5476</dup_id>
          
          <bug_file_loc>http://projects.backbase.com/SafariBugs/style.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>6628</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Sjoerd Mulder">sjoerdmulder</reporter>
          <assigned_to name="Geoffrey Garen">ggaren</assigned_to>
          <cc>ian</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>22811</commentid>
    <comment_count>0</comment_count>
    <who name="Sjoerd Mulder">sjoerdmulder</who>
    <bug_when>2005-10-24 07:53:15 -0700</bug_when>
    <thetext>At Backbase we are trying to write support for Safari but we found the 
following bug:

If you try to add a &lt;style&gt; tag dynamicly anywhere inside the DOM-tree 
throught createElement Safari does nothing (2.x and ToT).

I tried different methods / attributes, they all seem to do nothing.
innerHTML gives a strange Expection 7

The testcase fails in IE because it wasnt build for it (we got another 
solution).

Mozilla Firefox and Opera are working as supposed with the testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22885</commentid>
    <comment_count>1</comment_count>
    <who name="Sjoerd Mulder">sjoerdmulder</who>
    <bug_when>2005-10-25 01:32:16 -0700</bug_when>
    <thetext>Changed severity to critical because this bug prevents development of any kind
of          Ajax applications</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23689</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2005-11-04 07:29:57 -0800</bug_when>
    <thetext>This is a high priority bug to fix, and we should also look for a workaround that the backbase folks can 
take advantage of.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23690</commentid>
    <comment_count>3</comment_count>
      <attachid>4590</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2005-11-04 07:32:12 -0800</bug_when>
    <thetext>Created attachment 4590
local copy of test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23691</commentid>
    <comment_count>4</comment_count>
      <attachid>4591</attachid>
    <who name="Mark Malone">markmalone</who>
    <bug_when>2005-11-04 08:03:09 -0800</bug_when>
    <thetext>Created attachment 4591
Workaround - append to head element

Style elements created with createElement and appended to the document head
works as required. This appears to only be an issue when appending style
information to the body.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23695</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2005-11-04 08:16:18 -0800</bug_when>
    <thetext>Great! We have a workaround.

Since style elements are supposed to be in the head, I think it&apos;s probably a good workaround.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23714</commentid>
    <comment_count>6</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2005-11-04 08:36:31 -0800</bug_when>
    <thetext>Given the workaround, downgrading &quot;severity&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31128</commentid>
    <comment_count>7</comment_count>
    <who name="Sjoerd Mulder">sjoerdmulder</who>
    <bug_when>2006-02-03 00:36:33 -0800</bug_when>
    <thetext>This bug is also in Radar: &lt;rdar://4327493&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36429</commentid>
    <comment_count>8</comment_count>
    <who name="Tim Omernick">timo</who>
    <bug_when>2006-03-15 02:05:44 -0800</bug_when>
    <thetext>The patch I attached to 5476 also fixes this bug.  If the patch (or a similar one which also fixes this bug) is accepted, then this bug should be marked as a duplicate of 5476.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78917</commentid>
    <comment_count>9</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2008-04-25 08:59:46 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 5476 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4590</attachid>
            <date>2005-11-04 07:32:12 -0800</date>
            <delta_ts>2005-11-04 07:32:12 -0800</delta_ts>
            <desc>local copy of test case</desc>
            <filename>create-style-element.html</filename>
            <type>text/html</type>
            <size>1068</size>
            <attacher name="Darin Adler">darin</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIGh0bWwgUFVC
TElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgU3RyaWN0Ly9FTiIgImh0dHA6Ly93d3cudzMub3Jn
L1RSL3hodG1sMS9EVEQveGh0bWwxLXN0cmljdC5kdGQiPgo8aHRtbCB4bWxucz0iaHR0cDovL3d3
dy53My5vcmcvMTk5OS94aHRtbCI+Cgk8aGVhZD4KCQk8dGl0bGU+RHluYW1pYyBBZGRpbmcgU3R5
bGUgVGFnPC90aXRsZT4KCTwvaGVhZD4KCTxib2R5PgoJCTxkaXYgY2xhc3M9ImNvbnRhaW5lciI+
PC9kaXY+CgkJPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCQkJLmNvbnRhaW5lciB7CgkJCQl3aWR0
aDoyMDBweDsKCQkJCWhlaWdodDozMDBweDsKCQkJfQoJCTwvc3R5bGU+CgkJPGRpdiBvbmNsaWNr
PSJtYWtlU3R5bGUoJy5jb250YWluZXIgeyBiYWNrZ3JvdW5kLWNvbG9yOiNGMDA7IH0nKTsiPkNo
YW5nZSB0byBSZWQ8L2Rpdj4KCQk8ZGl2IG9uY2xpY2s9Im1ha2VTdHlsZSgnLmNvbnRhaW5lciB7
YmFja2dyb3VuZC1jb2xvcjojMDBGOyB9Jyk7Ij5BbmQgYmFjayB0byBCbHVlPC9kaXY+CgkJPHNj
cmlwdD4KCQkJZnVuY3Rpb24gbWFrZVN0eWxlKHNWYWx1ZSl7CgkJCQl2YXIgb1N0eWxlID0gZG9j
dW1lbnQuY3JlYXRlRWxlbWVudCgnc3R5bGUnKTsKCQkJCW9TdHlsZS5zZXRBdHRyaWJ1dGUoJ3R5
cGUnLCAndGV4dC9jc3MnKTsKCgkJCQkvL0RvZXNudCB3b3JrISEhIQoJCQkJLy9vU3R5bGUuYXBw
ZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoc1ZhbHVlKSk7CgkJCQkvL0RvZXNudCB3
b3JrISEhIQoJCQkJLy9vU3R5bGUuaW5uZXJUZXh0ID0gc1ZhbHVlOwoJCQkJLy9Eb2Vuc3Qgd29y
ayEhIQoJCQkJLy9vU3R5bGUudGV4dENvbnRlbnQgPSBzVmFsdWU7CgkJCQkvL0RvZW5zdCB3b3Jr
ISEhCgkJCQlvU3R5bGUudGV4dCA9IHNWYWx1ZTsKCQkJCS8vRG9lbnN0IHdvcmshISEKCQkJCW9T
dHlsZS5pbm5lckhUTUwgPSBzVmFsdWU7CgoJCQkJZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChv
U3R5bGUpOwoJCQl9CgkJPC9zY3JpcHQ+Cgk8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4591</attachid>
            <date>2005-11-04 08:03:09 -0800</date>
            <delta_ts>2005-11-04 08:03:09 -0800</delta_ts>
            <desc>Workaround - append to head element</desc>
            <filename>dynostyleWorks.html</filename>
            <type>text/html</type>
            <size>1031</size>
            <attacher name="Mark Malone">markmalone</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIGh0bWwgUFVC
TElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgU3RyaWN0Ly9FTiIgImh0dHA6Ly93d3cudzMub3Jn
L1RSL3hodG1sMS9EVEQveGh0bWwxLXN0cmljdC5kdGQiPgo8aHRtbCB4bWxucz0iaHR0cDovL3d3
dy53My5vcmcvMTk5OS94aHRtbCI+Cgk8aGVhZD4KCQk8dGl0bGU+RHluYW1pYyBBZGRpbmcgU3R5
bGUgVGFnPC90aXRsZT4KCQk8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCIgbGFuZ3VhZ2U9
ImphdmFzY3JpcHQiIGNoYXJzZXQ9InV0Zi04Ij4KCQkJCQlmdW5jdGlvbiBtYWtlU3R5bGUoc1Zh
bHVlKXsKCQkJCQkJdmFyIG9TdHlsZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3N0eWxlJyk7
CgkJCQkJCW9TdHlsZS5zZXRBdHRyaWJ1dGUoJ3R5cGUnLCAndGV4dC9jc3MnKTsKCQkJCQkJCgkJ
CQkJCW9TdHlsZS5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShzVmFsdWUpKTsK
CgkJCQkJCWRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJoZWFkIilbMF0uYXBwZW5kQ2hp
bGQob1N0eWxlKTsKCQkJCQl9CgkJPC9zY3JpcHQ+CgkJPHN0eWxlIHR5cGU9InRleHQvY3NzIj4K
CQkJLmNvbnRhaW5lciB7CgkJCQl3aWR0aDoyMDBweDsKCQkJCWhlaWdodDozMDBweDsKCQkJCWJv
cmRlcjoxcHggZG90dGVkIGdyZWVuOwoJCQl9CgkJPC9zdHlsZT4KCTwvaGVhZD4KCTxib2R5PgoJ
CTxkaXYgY2xhc3M9ImNvbnRhaW5lciI+Q2xpY2sgYmVsb3cgdG8gY29sb3IgbWU8L2Rpdj4KCQk8
aW5wdXQgdHlwZT0iYnV0dG9uIiBvbmNsaWNrPSJtYWtlU3R5bGUoJy5jb250YWluZXIgeyBiYWNr
Z3JvdW5kLWNvbG9yOiNGMDA7IH0nKTsiIHZhbHVlPSJDaGFuZ2UgdG8gUmVkIj4KCQk8aW5wdXQg
IHR5cGU9ImJ1dHRvbiIgb25jbGljaz0ibWFrZVN0eWxlKCcuY29udGFpbmVyIHtiYWNrZ3JvdW5k
LWNvbG9yOiMwMEY7IH0nKTsiIHZhbHVlPSJBbmQgYmFjayB0byBCbHVlIj4KCTwvYm9keT4KPC9o
dG1sPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>