1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:48:12 +00:00
serenity/Userland/Libraries/LibWeb/HTML/Parser
Karol Kosek fb5e2670d6 LibWeb: Fix highlighting HTML comments
Commit b193351a99 caused the HTML comments to flash when changing
the text cursor. Also, when double-clicking on a comment, the selection
started from the beginning of the file instead.

The following message was displaying when `TOKENIZER_TRACE_DEBUG`
was enabled:

    (Tokenizer::nth_last_position) Invalid position requested: 4th-last
    of 4. Returning (0-0).

Changing the `nth_last_position` to 3 fixes this. I'm guessing that's
because the parser is at that moment on the second hyphen of the `<!--`
string, so it has to go back only by three characters.
2022-02-14 12:50:44 +03:30
..
Entities.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
Entities.h Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
HTMLEncodingDetection.cpp LibWeb: Implement Attribute closer to the spec and with an IDL file 2021-10-17 13:51:10 +01:00
HTMLEncodingDetection.h LibWeb: Implement Attribute closer to the spec and with an IDL file 2021-10-17 13:51:10 +01:00
HTMLParser.cpp LibWeb: Introduce the Environment Settings Object 2022-02-08 17:47:44 +00:00
HTMLParser.h Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
HTMLToken.cpp LibWeb: Change HTMLToken storage architecture 2021-07-17 16:24:57 +04:30
HTMLToken.h Libraries: Use AK::Variant default initialization where appropriate 2021-09-21 04:22:52 +04:30
HTMLTokenizer.cpp LibWeb: Fix highlighting HTML comments 2022-02-14 12:50:44 +03:30
HTMLTokenizer.h Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
ListOfActiveFormattingElements.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ListOfActiveFormattingElements.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StackOfOpenElements.cpp LibWeb: Cast unused smart-pointer return values to void 2021-12-05 15:31:03 +01:00
StackOfOpenElements.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00