Bug 42654 - HTML5 tree builder needs to call dispatchDocumentElementAvailable
Summary: HTML5 tree builder needs to call dispatchDocumentElementAvailable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks: 41123
  Show dependency treegraph
 
Reported: 2010-07-20 11:32 PDT by Adam Barth
Modified: 2010-07-20 14:59 PDT (History)
2 users (show)

See Also:


Attachments
Patch (5.59 KB, patch)
2010-07-20 11:33 PDT, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2010-07-20 11:32:02 PDT
HTML5 tree builder needs to call dispatchDocumentElementAvailable
Comment 1 Adam Barth 2010-07-20 11:33:44 PDT
Created attachment 62095 [details]
Patch
Comment 2 Adam Barth 2010-07-20 11:35:13 PDT
The another option is to teach HTMLElementStack how to do this, but it doesn't have a notion of Document, so that seemed like it was too low a layer.  Similarly, we could do this work in HTMLTreeBuilder, but there are a lot more call sites, so that seemed too high level.
Comment 3 Eric Seidel (no email) 2010-07-20 11:42:46 PDT
Comment on attachment 62095 [details]
Patch

This is definitely the right layer. I hate that we duplicate this is parsing fragment state partially in the fragment scripting enum.
Comment 4 WebKit Commit Bot 2010-07-20 12:18:20 PDT
Comment on attachment 62095 [details]
Patch

Clearing flags on attachment: 62095

Committed r63762: <http://trac.webkit.org/changeset/63762>
Comment 5 WebKit Commit Bot 2010-07-20 12:18:25 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Adam Barth 2010-07-20 13:15:10 PDT
> This is definitely the right layer. I hate that we duplicate this is parsing fragment state partially in the fragment scripting enum.

Can we make the enum more awesome to include this bit?  It does seem really redundantly redundant.
Comment 7 Eric Seidel (no email) 2010-07-20 14:53:00 PDT
The enums are semantically different, I think.  One is used throughout the code to mean fragment stuff.  I think that the parser should probably have a separate state machine enum and know how to convert to the more generic one.  I'm not 100% sure.
Comment 8 Eric Seidel (no email) 2010-07-20 14:59:57 PDT
No, I take that back.  I think we could add a "NotFragment" value to the enum.  I think all parts in teh code will have his same problem (where they have both fragment and non-fragment code paths).  Or we could go the other way and remove the "fragment" part from the name if we want it to generically mean some scripting disable functionality.