Bug 11744 - Setting the 'content' property dynamically has no effect
Summary: Setting the 'content' property dynamically has no effect
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-03 08:00 PST by mitz
Modified: 2007-01-03 21:39 PST (History)
1 user (show)

See Also:


Attachments
Test case (650 bytes, text/html)
2006-12-03 08:03 PST, mitz
no flags Details
Compare content data when computing style diff (8.60 KB, patch)
2007-01-02 23:50 PST, mitz
no flags Details | Formatted Diff | Diff
Now with extra parentheses for better readability! (8.60 KB, patch)
2007-01-03 01:03 PST, mitz
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2006-12-03 08:00:19 PST
The attached test case demonstrates that changing the 'content' CSS property of an element does not replace its content with the specified content. Toggling the 'display' property to 'none' and back causes the new content to show.

RenderStyle already has a contentDataEquivalent() method (used for pseudo elements), but RenderStyle::diff doesn't check it.
Comment 1 mitz 2006-12-03 08:03:11 PST
Created attachment 11720 [details]
Test case
Comment 2 mitz 2006-12-03 08:53:39 PST
(In reply to comment #0)
> RenderStyle::diff doesn't check it.

Oops, make that Node::diff :-)
Comment 3 mitz 2007-01-02 23:50:18 PST
Created attachment 12180 [details]
Compare content data when computing style diff
Comment 4 mitz 2007-01-03 01:03:31 PST
Created attachment 12182 [details]
Now with extra parentheses for better  readability!
Comment 5 Dave Hyatt 2007-01-03 01:04:13 PST
Comment on attachment 12182 [details]
Now with extra parentheses for better  readability!

r=me
Comment 6 David Kilzer (:ddkilzer) 2007-01-03 21:39:31 PST
Committed revision 18572.