Bug 9509

Summary: Would like a way to pause/resume XML parsing
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: XMLAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Bug Depends on:    
Bug Blocks: 6058    
Attachments:
Description Flags
Patch
mjs: review-
Address comments ggaren: review+

Anders Carlsson
Reported 2006-06-19 15:36:44 PDT
This is needed to be able to load external DTD definitions without blocking, as well as external scripts (if a <script src=""> tag is encountered, parsing should pause until the file has loaded and then resume.
Attachments
Patch (20.10 KB, patch)
2006-06-19 16:27 PDT, Anders Carlsson
mjs: review-
Address comments (20.42 KB, patch)
2006-06-20 09:08 PDT, Anders Carlsson
ggaren: review+
Anders Carlsson
Comment 1 2006-06-19 16:27:22 PDT
Created attachment 8925 [details] Patch Unfortunately there's no way to pause/resume the libxml SAX parser (it's possible with expat) so a rather kludgey workaround is used. I've verified that it works by calling pause before parsing and resume inside ::finish.
Maciej Stachowiak
Comment 2 2006-06-20 02:41:01 PDT
Comment on attachment 8925 [details] Patch On the substance this looks ok, but I think it would be better to use subclasses instead of just a tagged union for PendingCallbacks, this would allow elimination of most of the switch statements also. Suggest rewriting along theselines.
Anders Carlsson
Comment 3 2006-06-20 09:08:04 PDT
Created attachment 8933 [details] Address comments
Geoffrey Garen
Comment 4 2006-06-20 14:24:47 PDT
Comment on attachment 8933 [details] Address comments union gone. band happy. r me.
Note You need to log in before you can comment on or make changes to this bug.