[Webkit-unassigned] [Bug 39537] Teach HTML5 parser how to lex comments correctly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 23 13:25:18 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=39537


Eric Seidel <eric at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #56825|review?                     |review-
               Flag|                            |




--- Comment #3 from Eric Seidel <eric at webkit.org>  2010-05-23 13:25:18 PST ---
(From update of attachment 56825)
WebCore/html/HTML5Lexer.cpp:880
 +                      ASSERT(*source == '-');
We should add an advanceAndASSERT() method to SegmentedString which does this for you.

WebCore/html/HTML5Lexer.cpp:879
 +                  if (peek == SegmentedString::DidMatch) {
What does DidMatch mean?

WebCore/html/HTML5Lexer.cpp:915
 +                  m_token->appendToComment('-');
Where does the '-' come from?

WebCore/html/HTML5Token.h:167
 +          return String(StringImpl::adopt(m_data));
This method can't be called more than once.  That seems bad, no?  Should we ASSERT that m_data is non-empty here?

WebCore/html/HTML5Tokenizer.cpp:69
 +      default:
We should remove this default: and instead list all the missing states.

WebCore/platform/text/SegmentedString.h:120
 +          ASSERT_NOT_REACHED();
SegmentedString seems like a rather mature API, seems lame to add an imature method to it.


I think this needs one more round.  SEe above.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list