Bug 42594 - Include attributes when reconstructing elements in HTML5 tree builder
Summary: Include attributes when reconstructing elements in HTML5 tree builder
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-19 14:38 PDT by Adam Barth
Modified: 2010-07-20 19:30 PDT (History)
2 users (show)

See Also:


Attachments
Patch (4.48 KB, patch)
2010-07-19 14:40 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch for landing (8.19 KB, patch)
2010-07-20 19:11 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-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.