mirror of
https://github.com/RGBCube/serenity
synced 2025-10-29 07:02:35 +00:00
We were previously setting the end position of attribute names in self-
closing HTML tags to the end of the attribute value. To illustrate the
previous behavior, consider this tag and its attribute's start and end
positions (shown inclusively below):
<meta charset="UTF-8" />
^ name start
^ value start
^ value end
^ name end
Rather than setting the end position of the attribute name when we parse
the closing slash, ensure the end position is already set while we are
in the AttributeName state. We now have:
<meta charset="UTF-8" />
^ name start
^ name end
^ value start
^ value end
The tokenizer unit test has been extended to test these positions.
|
||
|---|---|---|
| .. | ||
| Entities.cpp | ||
| Entities.h | ||
| HTMLEncodingDetection.cpp | ||
| HTMLEncodingDetection.h | ||
| HTMLParser.cpp | ||
| HTMLParser.h | ||
| HTMLToken.cpp | ||
| HTMLToken.h | ||
| HTMLTokenizer.cpp | ||
| HTMLTokenizer.h | ||
| ListOfActiveFormattingElements.cpp | ||
| ListOfActiveFormattingElements.h | ||
| StackOfOpenElements.cpp | ||
| StackOfOpenElements.h | ||