Bug 3893

Summary: -[DOMCSSStyleDeclaration cssText] is not implemented
Product: WebKit Reporter: Dan Wood <dwood>
Component: DOMAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: nagar28496, todd
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Implement cssText for most rules
hyatt: review-
Address comments darin: review+

Description Dan Wood 2005-07-07 11:00:51 PDT
The underlying implementation of -[DOMCSSStyleDeclaration cssText] is not implemented.

Test case.... Take a node and ask for its style, then print it out.
	DOMCSSStyleDeclaration *style = [[self DOMDocument] getComputedStyle:(DOMElement *)
node :@""];
	
	NSLog(@"cssText = %@", [style cssText]);

Result:
=================
ERROR: unimplemented
(/Volumes/dwood/dev/WK/WebCore/khtml/css/css_computedstyle.cpp:289 virtual DOM::DOMString 
DOM::CSSComputedStyleDeclarationImpl::cssText() const)
=================

Here is the offending code, in css_computedstyle.cpp:
DOMString CSSComputedStyleDeclarationImpl::cssText() const
{
    ERROR("unimplemented");
    return DOMString();
}
Comment 1 Anders Carlsson 2005-07-08 21:19:23 PDT
Created attachment 2875 [details]
Implement cssText for most rules
Comment 2 Dave Hyatt 2005-07-09 14:11:24 PDT
The cpp file uses namespace DOM so no need for DOM::DOMString there.  Can you attach a new patch 
that minimizes the extra DOM::? Thanks.
Comment 3 Anders Carlsson 2005-07-12 03:45:48 PDT
Created attachment 2921 [details]
Address comments
Comment 4 Darin Adler 2005-07-18 07:59:27 PDT
Comment on attachment 2921 [details]
Address comments

It's a little annoying that CSSComputedStyleDeclarationImpl::cssText returns
something with a trailing space.

Is there some better way to share the getPropertyName function than putting
this extern declaration in the .cpp file?

The test looks good to me.

I'm going to mark this review+ even though I have those two minor
questions/comments above.
Comment 5 mitz 2006-02-18 11:53:33 PST
*** Bug 6359 has been marked as a duplicate of this bug. ***