Bug 41397 - HTMLTokenizer should use fewer macros
Summary: HTMLTokenizer should use fewer macros
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:
 
Reported: 2010-06-30 02:25 PDT by Adam Barth
Modified: 2010-06-30 03:27 PDT (History)
2 users (show)

See Also:


Attachments
Patch (55.38 KB, patch)
2010-06-30 02:26 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch for landing (55.56 KB, patch)
2010-06-30 02:44 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-06-30 02:25:20 PDT
HTMLTokenizer should use fewer macros
Comment 1 Adam Barth 2010-06-30 02:26:15 PDT
Created attachment 60102 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-06-30 02:38:49 PDT
Comment on attachment 60102 [details]
Patch

I like this.  It's a bit subtle that we now always have to call "return emit*" and never just "emit*".  The macros were slightly nice for making sure folks didn't hit that error.

You might try searching for "  emit" just to make sure we didn't miss one.

"bufferCurrentToken" makes little sense. :)  It's an emit-helper, it doesn't do any buffering.  bufferCharacter on the other hand is a great name!

bufferEndOfFile also makes no sense.  it's just called by emitEndOfFile and can just be inlined.
Comment 3 Adam Barth 2010-06-30 02:44:51 PDT
Created attachment 60103 [details]
Patch for landing
Comment 4 WebKit Commit Bot 2010-06-30 03:27:15 PDT
Comment on attachment 60103 [details]
Patch for landing

Clearing flags on attachment: 60103

Committed r62175: <http://trac.webkit.org/changeset/62175>
Comment 5 WebKit Commit Bot 2010-06-30 03:27:20 PDT
All reviewed patches have been landed.  Closing bug.