Chromium Code Reviews
DescriptionMerge all of the consumeNumber() logic and make a single call to getDouble.
We don't need to do all of the math manually to convert the string into a number
value, we can just validate the input and then call getDouble. This is still
slower than the fast path which optimistically attempts to parse the whole input
as a double followed by a length, but it makes the code simpler which is nice. It
also means we now call charactersToDouble the same number of times in the fast
and slow paths.
I also converted CSSTokenizerInputStream::skipWhilePredicate to branch once
on is8Bit so we're not checking every time inside the loop.
BUG=605792
Committed: https://crrev.com/37f87f519d4f1e6d43286e1e433b81e217d3b467
Cr-Commit-Position: refs/heads/master@{#410588}
Patch Set 1 #Patch Set 2 : hacky hack 2. #Patch Set 3 : hack. #Patch Set 4 : even better. #Patch Set 5 : add back CSSParserFastPath. #
Total comments: 2
Messages
Total messages: 15 (8 generated)
|
||||||||||||||||||||||||||||