<?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>6359</bug_id>
          
          <creation_ts>2006-01-03 14:29:58 -0800</creation_ts>
          <short_desc>- [DOMCSSStyleDeclaration cssText] returning empty string?</short_desc>
          <delta_ts>2006-02-18 11:53:33 -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>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>3893</dup_id>
          
          <bug_file_loc>http://ditchnet.org/styledeclaration/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Todd Ditchendorf">todd</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>27666</commentid>
    <comment_count>0</comment_count>
    <who name="Todd Ditchendorf">todd</who>
    <bug_when>2006-01-03 14:29:58 -0800</bug_when>
    <thetext>What is described here is a possible bug in Web Kit. I&apos;m running Mac OS X Tiger v10.4.3 on a 1.5Ghz 15 
inch powerbook. Safari reports version number 416.13.

I&apos;ve also posted this, and a Sample Xcode project/Reduction available for download (48kb) &lt;a 
href=&quot;http://ditchnet.org/styledeclaration/&quot;&gt;here&lt;/a&gt;.


The method in which the suspected bug appears involves two methods in Web Kit:

WebView.h:


@interface WebView (WebViewCSS)
- (DOMCSSStyleDeclaration *)computedStyleForElement:(DOMElement *)element pseudoElement:
(NSString *)pseudoElement;
@end

DOMCSS.h:


@interface DOMCSSStyleDeclaration : DOMObject
- (NSString *)cssText;

The DOMCSSStyleDeclaration being returned is behaving unexpectedly... the return value of its cssText 
method appears to always be an empty string. Is that expected?

However, accessing individual style properties DOES return expected values correctly.

Shouldn&apos;t the cssText method return a string containing the entire computed style of the given 
element?

===============================================
For example, the following HTML:
=================================================

&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Test&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;

	div {
		height:200px;
		background-color:orange;
	}

&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;div&gt;&lt;/div&gt;
	
&lt;/body&gt;
&lt;/html&gt;
==========================================
is Inspected via a WebUIDelegate:
===========================================

- (void)webView:(WebView *)sender mouseDidMoveOverElement:(NSDictionary *)elementInfo 
  modifierFlags:(unsigned int)modifierFlags 
{
	DOMElement *el = [elementInfo objectForKey:WebElementDOMNodeKey];
	DOMCSSStyleDeclaration *decl = [webView computedStyleForElement:el  pseudoElement:nil];
	
	NSLog(@&quot;decl : %@&quot;, decl);
	NSLog(@&quot;css text : %@&quot;,[decl cssText]);
	NSLog(@&quot;height: %@&quot;,[decl getPropertyValue:@&quot;height&quot;]);
	NSLog(@&quot;background-color: %@&quot;,[decl getPropertyValue:@&quot;background-color&quot;]);
}

===============================================
results in :
===============================================

2006-01-03 13:40:15.574 ComputedStyleTest[10038] decl : DOMCSSStyleDeclaration:
2006-01-03 13:40:15.574 ComputedStyleTest[10038] css text :
2006-01-03 13:40:15.574 ComputedStyleTest[10038] height: 200px
2006-01-03 13:40:15.574 ComputedStyleTest[10038] background-color: rgb(255, 165, 0)
================================================

See that empty css text value? Is that expected?

Thanks again!!!!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33278</commentid>
    <comment_count>1</comment_count>
    <who name="">mitz</who>
    <bug_when>2006-02-18 11:53:33 -0800</bug_when>
    <thetext>This is fixed in TOT.

*** This bug has been marked as a duplicate of 3893 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>