Bug 6999

Summary: Dynamically added link-tag disables the use of change styles dynamically
Product: WebKit Reporter: Sjoerd Mulder <sjoerdmulder>
Component: DOMAssignee: Alice Liu <alice.barraclough>
Status: RESOLVED FIXED    
Severity: Major CC: alice.barraclough, ddkilzer, hyatt
Priority: P2 Keywords: HasReduction, InRadar
Version: 420+   
Hardware: PC   
OS: Windows XP   
Bug Depends on:    
Bug Blocks: 6628    
Attachments:
Description Flags
Testcase
none
patch hyatt: review+

Description Sjoerd Mulder 2006-02-01 01:56:06 PST
If you dynamicly add a link-tag to the head, and after this change for example the href value of this link tag. Safari constantly seems to redraw elements which are change by changing a .style. propery through testcase.

For more info see attached testcase
Comment 1 Sjoerd Mulder 2006-02-01 01:56:38 PST
Created attachment 6178 [details]
Testcase
Comment 2 David Kilzer (:ddkilzer) 2006-02-01 04:36:09 PST
Confirmed bug.  Added HasReduction keyword.
Comment 3 Sjoerd Mulder 2006-02-03 00:39:36 PST
This bug is also in Radar: <rdar://4432162>
Comment 4 Alice Liu 2006-03-13 19:23:29 PST
I tried a test case where the link tag wasn't a style sheet but just an href with the href being updated after appendChild and the flickering isn't observed.  Looks like it needs to be a style sheet, but I haven't tried other types of link tags besides that one. 
Comment 5 Alice Liu 2006-03-16 20:08:54 PST
Created attachment 7122 [details]
patch

uploading patch
Comment 6 Alice Liu 2006-03-16 20:23:51 PST
hmm, i dont know if i chose the right settings when i uploaded the patch. 
Comment 7 Dave Hyatt 2006-03-17 00:36:35 PST
Comment on attachment 7122 [details]
patch

Looks good. One minor style quibble... we leave braces off single-line if statements, so:

+                if (m_loading) {
+                    getDocument()->stylesheetLoaded();
+                }

should lose the braces.

r=me
Comment 8 David Kilzer (:ddkilzer) 2006-03-17 05:38:12 PST
(In reply to comment #7)
> r=me

Doesn't this patch need a LayoutTest, or can this not be tested automatically?
Comment 9 David Kilzer (:ddkilzer) 2006-03-18 03:22:28 PST
This patch was applied as r13371.  Updating state to RESOLVED FIXED.