NEW 26307
REGRESSION: Safari hangs while trying to edit the HTML source in sites rich text editor
https://bugs.webkit.org/show_bug.cgi?id=26307
Summary REGRESSION: Safari hangs while trying to edit the HTML source in sites rich t...
Venkat Karun
Reported 2009-06-10 17:22:14 PDT
1. Edit any google sites page 2. Click on the "edit html source" button in the toolbar Expected result: A tabbed dialog with HTML and preview tabs pops up without making the browser unresponsive. Actual result: The dialog appears but the browser stays unresponsive for about 15-20 seconds. Additional information: We were able to verify that this happened while installing CSS styles programatically in the preview iframe but couldn't reproduce this with a reduced case.
Attachments
shark sample (3.17 MB, application/octet-stream)
2009-06-10 17:31 PDT, Ojan Vafai
no flags
Ojan Vafai
Comment 1 2009-06-10 17:31:16 PDT
Created attachment 31148 [details] shark sample This is a 30 second shark sample from my Debug ToT build (synced to r44594).
Venkat Karun
Comment 2 2009-06-10 18:21:56 PDT
Please note that this doesn't happen with Safari 4 public beta (528.16)
Julie Parent
Comment 3 2009-06-10 18:35:28 PDT
But it does happen in the Safari 4.0 final release: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17
Julie Parent
Comment 4 2009-06-10 18:36:04 PDT
Marking as P1 since this is a regression.
Venkat Karun
Comment 6 2009-06-12 10:28:35 PDT
Just adding some metrics from tests that I performed by dividing the set of all CSS rulesets applied to the preview iframe into individual buckets. Each bucket corresponds to a 'style' element. These tests were performed on safari 4 (latest webkit nightly) Total ruleset size:- 3374 Number of buckets Time taken to install styles (ms) 1 4385 2 1839 4 1267 8 767 16 370 32 274
Venkat Karun
Comment 7 2009-06-16 14:50:31 PDT
We have a temporary workaround in place for this. Our previous code path revolved around creating a style element, appending the style element to the head and then setting styles in the content element. We swapped the order of the last two steps and this seemed to resolve this. From: var styleSheet = doc.createElement('style') head.appendChild(styleSheet); styleSheet.innerText = stylesString; To: var styleSheet = doc.createElement('style') styleSheet.innerText = stylesString; head.appendChild(styleSheet);
Note You need to log in before you can comment on or make changes to this bug.