Changeset 249866 in webkit
- Timestamp:
- Sep 13, 2019, 6:57:35 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r249860 r249866 1 2019-09-13 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: HTML Formatting: Handle infinite loop for incomplete script data 4 https://bugs.webkit.org/show_bug.cgi?id=201769 5 6 Reviewed by Devin Rousso. 7 8 * inspector/formatting/formatting-html-expected.txt: 9 * inspector/formatting/formatting-html.html: 10 * inspector/formatting/resources/html-tests/eof-7-expected.html: Added. 11 * inspector/formatting/resources/html-tests/eof-7.html: Added. 12 * inspector/formatting/resources/html-tests/eof-8-expected.html: Added. 13 * inspector/formatting/resources/html-tests/eof-8.html: Added. 14 * inspector/formatting/resources/html-tests/eof-9-expected.html: Added. 15 * inspector/formatting/resources/html-tests/eof-9.html: Added. 16 1 17 2019-09-13 Russell Epstein <repstein@apple.com> 2 18 -
trunk/LayoutTests/inspector/formatting/formatting-html-expected.txt
r249831 r249866 15 15 PASS: eof-5.html 16 16 PASS: eof-6.html 17 PASS: eof-7.html 18 PASS: eof-8.html 19 PASS: eof-9.html 17 20 PASS: inline-script.html 18 21 PASS: inline-style.html -
trunk/LayoutTests/inspector/formatting/formatting-html.html
r249831 r249866 21 21 "resources/html-tests/eof-5.html", 22 22 "resources/html-tests/eof-6.html", 23 "resources/html-tests/eof-7.html", 24 "resources/html-tests/eof-8.html", 25 "resources/html-tests/eof-9.html", 23 26 "resources/html-tests/inline-script.html", 24 27 "resources/html-tests/inline-style.html", -
trunk/Source/WebInspectorUI/ChangeLog
r249863 r249866 1 2019-09-13 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: HTML Formatting: Handle infinite loop for incomplete script data 4 https://bugs.webkit.org/show_bug.cgi?id=201769 5 6 Reviewed by Devin Rousso. 7 8 * UserInterface/Workers/Formatter/HTMLParser.js: 9 (HTMLParser): 10 Handle EOF in the script data's loop. 11 Better handle EOF at the end of text data. 12 1 13 2019-09-13 Joseph Pecoraro <pecoraro@apple.com> 2 14 -
trunk/Source/WebInspectorUI/UserInterface/Workers/Formatter/HTMLParser.js
r249831 r249866 178 178 if (text) 179 179 this._push({type: HTMLParser.NodeType.Text, data: text, pos: startPos}); 180 this._handleEOF(this._pos - 1); 180 181 if (this._isEOF() && this._data.endsWith("<")) 182 this._handleEOF(this._pos - 1); 181 183 } 182 184 … … 194 196 break; 195 197 } 198 if (this._handleEOF(startPos)) 199 return; 196 200 scriptText += "<"; 197 201 } … … 434 438 { 435 439 if (!this._isEOF()) 436 return ;440 return false; 437 441 438 442 // End of document. Treat everything from the last position as error text. 439 443 this._push({type: HTMLParser.NodeType.ErrorText, data: this._data.substring(lastPosition), pos: lastPosition}); 444 return true; 440 445 } 441 446
Note:
See TracChangeset
for help on using the changeset viewer.