Re: [webkit-dev] HTML5 & MathML3 entities
On Sat, Jul 10, 2010 at 6:28 PM, Maciej Stachowiak wrote: > On Jul 10, 2010, at 11:10 AM, Sausset François wrote: >> I just saw that when looking at the code by myself. >> What do you exactly mean by a prefix tree? > > The data structure commonly called a "Trie" is a prefix tree: > http://en.wikipedia.org/wiki/Trie > > This data structure not only lets you tell if a particular key is present, > but it also lets you check if a string you have could possibly be the prefix > of any valid key. > > I think it is challenging, though, to make a trie structure that can be a > compile-time constant, and building one dynamically will cost runtime memory > per-process (whereas constant data would be in the data segment and shared). > > Another possibility is to make an array of all the entity names in sorted > order. Then lookup can use a binary search, and on a failed lookup, looking > to either side of the last key checked should determine whether it is a valid > prefix. > > I expect binary search would be slower than Trie lookup, though I don't know > by how much. Binary search will certainly be easier to implement. Let's start with that and experiment with prefix trees as a possible performance optimization. I'll give it a try now. Adam ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] HTML5 & MathML3 entities
My aim was not to rush. I'm currently looking at what needs to be implemented in WebKit to support MathML 3. I noticed that a lot of entities are not implemented and I first thought it was easy to implement. After this discussion on the mailing list, it appears not to be so simple. I filled a bug to continue the discussion and track the progresses in a refactoring of the entity parser: https://bugs.webkit.org/show_bug.cgi?id=42041 François Sausset Le 11 juil. 2010 à 04:21, Maciej Stachowiak a écrit : > > On Jul 10, 2010, at 9:36 AM, Alexey Proskuryakov wrote: > >> >> 10.07.2010, в 04:49, Maciej Stachowiak написал(а): >> >>> Go with the HTML5 / MathML 3 definitions for everything. Our XHTML >>> implementation targets XHTML5, not XHTML 1.0. >> >> >> I think that xml-entity-names and HTML5 made a poor choice changing the >> semantics of ⟩ and ⟨ (they used to be CJK punctuation, and now >> they are suddenly math). These are rendered differently. We should probably >> take a pragmatic approach, and avoid rushing to be the first to implement >> this aspect of the specs. > > I agree we shouldn't rush on potential compatibility-breaking changes, if we > can get someone else to do some testing for us first. However I believe > Firefox dev builds have the new meanings of ⟩ and ⟨. They haven't > discovered a problem yet, as far as I know. > > Regards, > Maciej > > ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev