[webkit-reviews] review requested: [Bug 90321] Convert HTML parser to handle 8-bit resources without converting to UChar* : [Attachment 152005] Updated patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 12 11:12:08 PDT 2012


Michael Saboff <msaboff at apple.com> has asked  for review:
Bug 90321: Convert HTML parser to handle 8-bit resources without converting to
UChar*
https://bugs.webkit.org/show_bug.cgi?id=90321

Attachment 152005: Updated patch
https://bugs.webkit.org/attachment.cgi?id=152005&action=review

------- Additional Comments from Michael Saboff <msaboff at apple.com>
(In reply to comment #8)
> (From update of attachment 151836 [details])
> View in context:
https://bugs.webkit.org/attachment.cgi?id=151836&action=review
> 
> > Source/WebCore/platform/text/SegmentedString.h:37
> > +	     , m_offset(-1)
> 
> Should this -1 be in a constant?

I checked all the cases that use m_offset, they are all protected by !m_length
so I changed this to m_offset(0).

> 
> > Source/WebCore/platform/text/SegmentedString.h:81
> >	 int m_length;
> > -	 const UChar* m_current;
> > +	 UChar m_currentChar;
> > +	 int m_offset;
> 
> With the bool below, I think this could be packed to not expand the size of
the class, at least on 64bit.

I moved the fields around a little to allow for better packing:

public:
    int m_length;
    int m_offset;
    UChar m_currentChar;
 
 private:
     bool m_doNotExcludeLineNumbers;
    String m_string;

I moved that WTFString::dataSize() change to this patch and now it builds
independent of the other two patches.  It still isn't useful without one or
both of the other two patches.


More information about the webkit-reviews mailing list