Bug 22188 - Smear some lipstick on the HTMLTokenizer pig.
Summary: Smear some lipstick on the HTMLTokenizer pig.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-11 15:17 PST by Eric Seidel (no email)
Modified: 2008-11-11 17:54 PST (History)
2 users (show)

See Also:


Attachments
Rename pendingScripts to m_pendingScripts (5.78 KB, patch)
2008-11-11 15:17 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename scriptNode to m_scriptNode make the type specific (3.08 KB, patch)
2008-11-11 15:17 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename pendingSrc to m_pendingSrc (5.58 KB, patch)
2008-11-11 15:17 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename currentPrependingSrc to m_currentPrependingSrc (4.79 KB, patch)
2008-11-11 15:17 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename noMoreData to m_noMoreData and cBuffer to m_cBuffer (12.06 KB, patch)
2008-11-11 15:17 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Remove long-since-dead kdDebug and qDebug calls (5.90 KB, patch)
2008-11-11 15:17 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename brokenComments to m_brokenComments (2.51 KB, patch)
2008-11-11 15:17 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Remove HTMLTokenizer includes and document the rest (2.48 KB, patch)
2008-11-11 15:17 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename src to m_src (10.43 KB, patch)
2008-11-11 15:17 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename parser to m_parser and make it an OwnPtr (4.36 KB, patch)
2008-11-11 15:17 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename inWrite to m_inWrite and jsProxy to scriptController (4.62 KB, patch)
2008-11-11 15:17 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename brokenServer to m_brokenServer (1.60 KB, patch)
2008-11-11 15:17 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename buffer to m_buffer and dest to m_dest (16.37 KB, patch)
2008-11-11 15:17 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename size to m_bufferSize (1.89 KB, patch)
2008-11-11 15:18 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename attrName to m_attrName (6.56 KB, patch)
2008-11-11 15:18 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename searchStopper to m_searchStopper and searchStopperLen to m_searchStopperLen (4.72 KB, patch)
2008-11-11 15:18 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename scriptCode* to m_scriptCode* and change scriptCodeMax to m_scriptCodeCapacity (15.75 KB, patch)
2008-11-11 15:18 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename scriptStartLineno to m_currentScriptTagStartLineNumber and tagStartLineno to m_currentTagStartLineNumber (3.71 KB, patch)
2008-11-11 15:18 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename scriptSrc to m_scriptTagSrcAttrValue and scriptSrcCharset to m_scriptTagCharsetAttrValue -- a bit unwieldy, but more precise (3.93 KB, patch)
2008-11-11 15:18 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename flat to selfClosingTag (3.00 KB, patch)
2008-11-11 15:18 PST, Eric Seidel (no email)
koivisto: review+
Details | Formatted Diff | Diff
Rename currToken to m_currentToken (16.16 KB, patch)
2008-11-11 15:18 PST, Eric Seidel (no email)
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2008-11-11 15:17:04 PST
So scary.  But I need to fix a crasher in HTMLTokenizer... so let's clean'er up first.

I'm about to attach like 10 git patches.  I will squash them down and land them as one large patch, but reviewing all the little pieces is likely easier (certainly safer).
Comment 1 Eric Seidel (no email) 2008-11-11 15:17:27 PST
Created attachment 25056 [details]
Rename pendingScripts to m_pendingScripts

 WebCore/html/HTMLTokenizer.cpp |   35 +++++++++++++++++------------------
 WebCore/html/HTMLTokenizer.h   |    2 +-
 2 files changed, 18 insertions(+), 19 deletions(-)
Comment 2 Eric Seidel (no email) 2008-11-11 15:17:29 PST
Created attachment 25057 [details]
Rename scriptNode to m_scriptNode make the type specific

 WebCore/html/HTMLTokenizer.cpp |   18 +++++++++---------
 WebCore/html/HTMLTokenizer.h   |    3 ++-
 2 files changed, 11 insertions(+), 10 deletions(-)
Comment 3 Eric Seidel (no email) 2008-11-11 15:17:31 PST
Created attachment 25058 [details]
Rename pendingSrc to m_pendingSrc

 WebCore/html/HTMLTokenizer.cpp |   34 +++++++++++++++++-----------------
 WebCore/html/HTMLTokenizer.h   |    2 +-
 2 files changed, 18 insertions(+), 18 deletions(-)
Comment 4 Eric Seidel (no email) 2008-11-11 15:17:37 PST
Created attachment 25059 [details]
Rename currentPrependingSrc to m_currentPrependingSrc

 WebCore/html/HTMLTokenizer.cpp |   30 +++++++++++++++---------------
 WebCore/html/HTMLTokenizer.h   |    2 +-
 2 files changed, 16 insertions(+), 16 deletions(-)
Comment 5 Eric Seidel (no email) 2008-11-11 15:17:40 PST
Created attachment 25060 [details]
Rename noMoreData to m_noMoreData and cBuffer to m_cBuffer

 WebCore/html/HTMLTokenizer.cpp |   68 +++++++++++++++++++--------------------
 WebCore/html/HTMLTokenizer.h   |    4 +-
 2 files changed, 35 insertions(+), 37 deletions(-)
Comment 6 Eric Seidel (no email) 2008-11-11 15:17:42 PST
Created attachment 25061 [details]
Remove long-since-dead kdDebug and qDebug calls

 WebCore/css/CSSParser.cpp         |   12 ------------
 WebCore/html/HTMLTokenizer.cpp    |   32 ++++----------------------------
 WebCore/rendering/RenderBlock.cpp |    7 ++-----
 3 files changed, 6 insertions(+), 45 deletions(-)
Comment 7 Eric Seidel (no email) 2008-11-11 15:17:48 PST
Created attachment 25062 [details]
Rename brokenComments to m_brokenComments

 WebCore/html/HTMLTokenizer.cpp |    8 ++++----
 WebCore/html/HTMLTokenizer.h   |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
Comment 8 Eric Seidel (no email) 2008-11-11 15:17:50 PST
Created attachment 25063 [details]
Remove HTMLTokenizer includes and document the rest

 WebCore/dom/XMLTokenizer.cpp            |    1 -
 WebCore/dom/XMLTokenizerLibxml2.cpp     |    2 +-
 WebCore/html/HTMLDocument.cpp           |    1 -
 WebCore/html/HTMLElement.cpp            |    2 +-
 WebCore/html/HTMLFormControlElement.cpp |    1 -
 WebCore/xml/XSLTProcessor.cpp           |    2 +-
 6 files changed, 3 insertions(+), 6 deletions(-)
Comment 9 Eric Seidel (no email) 2008-11-11 15:17:51 PST
Created attachment 25064 [details]
Rename src to m_src

 WebCore/html/HTMLTokenizer.cpp |   76 ++++++++++++++++++++--------------------
 WebCore/html/HTMLTokenizer.h   |    4 +-
 2 files changed, 40 insertions(+), 40 deletions(-)
Comment 10 Eric Seidel (no email) 2008-11-11 15:17:53 PST
Created attachment 25065 [details]
Rename parser to m_parser and make it an OwnPtr

 WebCore/html/HTMLTokenizer.cpp |   19 +++++++++----------
 WebCore/html/HTMLTokenizer.h   |    4 ++--
 2 files changed, 11 insertions(+), 12 deletions(-)
Comment 11 Eric Seidel (no email) 2008-11-11 15:17:55 PST
Created attachment 25066 [details]
Rename inWrite to m_inWrite and jsProxy to scriptController

 WebCore/html/HTMLTokenizer.cpp |   34 +++++++++++++++++-----------------
 WebCore/html/HTMLTokenizer.h   |    2 +-
 2 files changed, 18 insertions(+), 18 deletions(-)
Comment 12 Eric Seidel (no email) 2008-11-11 15:17:58 PST
Created attachment 25067 [details]
Rename brokenServer to m_brokenServer

 WebCore/html/HTMLTokenizer.cpp |    6 +++---
 WebCore/html/HTMLTokenizer.h   |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 13 Eric Seidel (no email) 2008-11-11 15:17:59 PST
Created attachment 25068 [details]
Rename buffer to m_buffer and dest to m_dest

 WebCore/html/HTMLTokenizer.cpp |  106 ++++++++++++++++++++--------------------
 WebCore/html/HTMLTokenizer.h   |   10 ++--
 2 files changed, 58 insertions(+), 58 deletions(-)
Comment 14 Eric Seidel (no email) 2008-11-11 15:18:01 PST
Created attachment 25069 [details]
Rename size to m_bufferSize

 WebCore/html/HTMLTokenizer.cpp |    8 ++++----
 WebCore/html/HTMLTokenizer.h   |    6 ++----
 2 files changed, 6 insertions(+), 8 deletions(-)
Comment 15 Eric Seidel (no email) 2008-11-11 15:18:06 PST
Created attachment 25070 [details]
Rename attrName to m_attrName

 WebCore/html/HTMLTokenizer.cpp |   26 +++++++++++++-------------
 WebCore/html/HTMLTokenizer.h   |    2 +-
 2 files changed, 14 insertions(+), 14 deletions(-)
Comment 16 Eric Seidel (no email) 2008-11-11 15:18:09 PST
Created attachment 25071 [details]
Rename searchStopper to m_searchStopper and searchStopperLen to m_searchStopperLen

 WebCore/html/HTMLTokenizer.cpp |   32 ++++++++++++++++----------------
 WebCore/html/HTMLTokenizer.h   |    4 ++--
 2 files changed, 18 insertions(+), 18 deletions(-)
Comment 17 Eric Seidel (no email) 2008-11-11 15:18:10 PST
Created attachment 25072 [details]
Rename scriptCode* to m_scriptCode* and change scriptCodeMax to m_scriptCodeCapacity

 WebCore/html/HTMLTokenizer.cpp |  136 ++++++++++++++++++++--------------------
 WebCore/html/HTMLTokenizer.h   |   11 ++--
 2 files changed, 73 insertions(+), 74 deletions(-)
Comment 18 Eric Seidel (no email) 2008-11-11 15:18:12 PST
Created attachment 25073 [details]
Rename scriptStartLineno to m_currentScriptTagStartLineNumber and tagStartLineno to m_currentTagStartLineNumber

 WebCore/html/HTMLTokenizer.cpp |   19 ++++++++++---------
 WebCore/html/HTMLTokenizer.h   |    5 ++---
 2 files changed, 12 insertions(+), 12 deletions(-)
Comment 19 Eric Seidel (no email) 2008-11-11 15:18:16 PST
Created attachment 25074 [details]
Rename scriptSrc to m_scriptTagSrcAttrValue and scriptSrcCharset to m_scriptTagCharsetAttrValue -- a bit unwieldy, but more precise

 WebCore/html/HTMLTokenizer.cpp |   16 ++++++++--------
 WebCore/html/HTMLTokenizer.h   |    4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)
Comment 20 Eric Seidel (no email) 2008-11-11 15:18:17 PST
Created attachment 25075 [details]
Rename flat to selfClosingTag

 WebCore/html/HTMLTokenizer.cpp |    8 ++++----
 WebCore/html/HTMLTokenizer.h   |   11 ++++++++---
 2 files changed, 12 insertions(+), 7 deletions(-)
Comment 21 Eric Seidel (no email) 2008-11-11 15:18:19 PST
Created attachment 25076 [details]
Rename currToken to m_currentToken

 WebCore/html/HTMLTokenizer.cpp |  112 ++++++++++++++++++++--------------------
 WebCore/html/HTMLTokenizer.h   |    2 +-
 2 files changed, 57 insertions(+), 57 deletions(-)
Comment 22 Antti Koivisto 2008-11-11 15:42:30 PST
Comment on attachment 25060 [details]
Rename noMoreData to m_noMoreData and cBuffer to m_cBuffer

#define CBUFLEN 1024

could make this a static const with better name since you are here.
Comment 23 Antti Koivisto 2008-11-11 16:18:06 PST
Comment on attachment 25071 [details]
Rename searchStopper to m_searchStopper and searchStopperLen to m_searchStopperLen

Maybe m_searchStopperLenght instead of m_searchStopperLen?
Comment 24 Antti Koivisto 2008-11-11 16:25:15 PST
Comment on attachment 25075 [details]
Rename flat to selfClosingTag

This class nees some m_ consistency too. Maybe it should be a struct since fields are public? Then m_ can go too.
Comment 25 Eric Seidel (no email) 2008-11-11 17:54:37 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/css/CSSParser.cpp
	M	WebCore/dom/XMLTokenizer.cpp
	M	WebCore/dom/XMLTokenizerLibxml2.cpp
	M	WebCore/html/HTMLDocument.cpp
	M	WebCore/html/HTMLElement.cpp
	M	WebCore/html/HTMLFormControlElement.cpp
	M	WebCore/html/HTMLParser.cpp
	M	WebCore/html/HTMLParser.h
	M	WebCore/html/HTMLTokenizer.cpp
	M	WebCore/html/HTMLTokenizer.h
	M	WebCore/html/HTMLViewSourceDocument.h
	M	WebCore/rendering/RenderBlock.cpp
	M	WebCore/xml/XSLTProcessor.cpp
Committed r38327