[Webkit-unassigned] [Bug 63392] Indirectly including TextPosition.h and XPathGrammar.h causes compile errors

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 27 16:33:47 PDT 2011


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





--- Comment #11 from Peter Rybin <peter.rybin at gmail.com>  2011-06-27 16:33:46 PST ---
(In reply to comment #7)
> Yes, It's quite possible that I'm missing some design constraints, as I didn't look at call sites. However, fixing this seems incredibly trivial - in every place that creates TextPosition<OneBasedNumber>, subtract one when constructing. And make matching changes when looking at the values.

Alexey,

0 and 1 (as it is stated inside TextPostion.h) was meant as a part of transition phase -- the first step was to keep all integers values intact, only wrap them in annotation types. That would make the change less drastic and more safe. This way all the places that used to work with 1-based numbers now have OneBaseNumber, and the same with 0-based. As you see there has always been some kind of mixture of different number bases. In particular XMLDocumentParserQt.cpp source still contains incorrect 0 -> 1 reinterpertation, that is now revealed and documented and should be fixed.

You are absolutely right -- WebKit doesn't need to keep both types. In fact they are ready to be easily merged together. You just need to literally merge their interfaces, because all methods have prepared names and constructors are hidden (and decide on internals: 0 or 1). Everything should compile and work.

Unfortunately I'm not involved with WebKit so much to start doing this myself, at least doing this alone.

Peter

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