mirror of
https://github.com/RGBCube/serenity
synced 2025-07-07 23:27:37 +00:00
LibWeb: Make Element::tag_name() return a const FlyString&
The more generic virtual variant is renamed to node_name() and now only Element has tag_name(). This removes a huge amount of String ctor/dtor churn in selector matching.
This commit is contained in:
parent
ea1ebe8662
commit
6242e029ed
12 changed files with 13 additions and 12 deletions
|
@ -194,7 +194,7 @@ static bool parse_html_document(const StringView& html, Document& document, Pare
|
|||
case State::Free:
|
||||
if (ch == '<') {
|
||||
bool should_treat_as_text = false;
|
||||
if (node_stack.last().tag_name() == "script") {
|
||||
if (node_stack.last().node_name() == "script") {
|
||||
bool is_script_close_tag = peek(1) == '/'
|
||||
&& tolower(peek(2)) == 's'
|
||||
&& tolower(peek(3)) == 'c'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue