Bug 42594

Summary: Include attributes when reconstructing elements in HTML5 tree builder
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Adam Barth <abarth>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 41123    
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Adam Barth 2010-07-19 14:38:53 PDT
Include attributes when reconstructing elements in HTML5 tree builder
Comment 1 Adam Barth 2010-07-19 14:40:28 PDT
Created attachment 61994 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-07-19 14:48:10 PDT
Comment on attachment 61994 [details]
Patch

I don't think this is nearly enough testing for those 2 code paths you're touching with this.

The reason why I left this is a FIXME was that I don't really understand what hits both of those code paths in the Adoption Agency.  You're changing both of them with this change, but only testing one of them.

Furthermore, the change is "wrong" in that createHTMLElementFromSavedElement doesn't  use the token, but instead clones the "saved element".  We should also create similar tests for each code path this touches where we change the attribute after creation of the element, but before the foster parent clone is created.
Comment 3 Adam Barth 2010-07-19 15:05:17 PDT
Is there another test you'd like me to add?  Is there a way to make a code change that effects just the tested path and not the other?
Comment 4 Eric Seidel (no email) 2010-07-19 17:57:58 PDT
Comment on attachment 61994 [details]
Patch

Were I attempting to solve this bug, I would reduce the test to find the exact markup needed to trigger each of the two AAA cases.  That's why I left this a FIXME, as I didnt' know what mark-up tiggered each.  Once we know that, writing the 2 or 4 tests is simple.
Comment 5 Eric Seidel (no email) 2010-07-20 15:56:12 PDT
The tests you want are now https://bugs.webkit.org/show_bug.cgi?id=42604#c4.
Comment 6 Eric Seidel (no email) 2010-07-20 15:58:38 PDT
Comment on attachment 61994 [details]
Patch

r=me if you add the two test cases I provided.
Comment 7 Adam Barth 2010-07-20 19:11:25 PDT
Created attachment 62140 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2010-07-20 19:30:32 PDT
Comment on attachment 62140 [details]
Patch for landing

Clearing flags on attachment: 62140

Committed r63798: <http://trac.webkit.org/changeset/63798>
Comment 9 WebKit Commit Bot 2010-07-20 19:30:37 PDT
All reviewed patches have been landed.  Closing bug.