[Webkit-unassigned] [Bug 51311] SegmentedString should provide column position

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 21 00:50:08 PST 2010


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





--- Comment #5 from Adam Barth <abarth at webkit.org>  2010-12-21 00:50:08 PST ---
> 1. SegmentedString now uses WTH::ZeroBasedNumber, but it's a dependency on JavaScriptCode/wtf/text (from WebCore/platform/text).

That's fine.  JavaScriptCore/wtf is a very low-level library.

> 2. SegmentedString counts column number and also line number. We can remove this functionality from HTMLTokenizer now and stop passing lineNumber by reference to SegmentedString on each call.

Great.  We should only track this in one place.

> 3. I remember Adam was concerned about forks that appeared inside advance* methods. I'm afraid I don't see how I could do without them.

Can you run the benchmark with and without your patch so we can see how much performance we're talking about?  Per-character branches usually are visible on the benchmark.

> 4. HTMLTreeBuilder uses m_parser new field, but it has to upcast in order to call textPosition. I don't see how to make it better.

Can't you just pass in the textPosition instead of passing in the whole object?

In general, this looks pretty good.  There are just some details to square away.

-- 
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