Commit 243cbc9
John Messerly
remove most string concat, fixes flutter#7
This fixes most of the egregious cases of string concat in the HTML tokenizer:
* attribute names/values
* data/comments
* script/rawtext/rcdata
It also fixes adjacent text nodes in TreeBuilder, which happens whenever space characters are adjacent to characters.
There's still an issue of preserving char codes for longer, but this should get out of the O(N^2) at least.
[email protected]
Review URL: https://codereview.chromium.org//9874330051 parent a58a092 commit 243cbc9
File tree
5 files changed
+142
-97
lines changed- lib
- src
5 files changed
+142
-97
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
406 | 409 | | |
407 | | - | |
| 410 | + | |
408 | 411 | | |
409 | 412 | | |
410 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
411 | 419 | | |
412 | 420 | | |
413 | 421 | | |
414 | 422 | | |
415 | 423 | | |
416 | 424 | | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
417 | 431 | | |
418 | 432 | | |
419 | 433 | | |
| |||
539 | 553 | | |
540 | 554 | | |
541 | 555 | | |
542 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
543 | 559 | | |
544 | 560 | | |
545 | 561 | | |
546 | 562 | | |
547 | 563 | | |
548 | | - | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
549 | 569 | | |
550 | 570 | | |
551 | 571 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3395 | 3395 | | |
3396 | 3396 | | |
3397 | 3397 | | |
3398 | | - | |
| 3398 | + | |
3399 | 3399 | | |
3400 | 3400 | | |
3401 | 3401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
52 | 69 | | |
53 | 70 | | |
54 | 71 | | |
| |||
64 | 81 | | |
65 | 82 | | |
66 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
67 | 91 | | |
68 | 92 | | |
69 | 93 | | |
| |||
103 | 127 | | |
104 | 128 | | |
105 | 129 | | |
106 | | - | |
| 130 | + | |
107 | 131 | | |
108 | 132 | | |
109 | 133 | | |
| |||
0 commit comments