Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd a fast path in Element::SetInnerHTML when the value is small and trivial text #26398
Conversation
highfive
commented
May 3, 2020
|
Heads up! This PR modifies the following files:
|
highfive
commented
May 3, 2020
|
@bors-servo try=wpt |
|
|
I have no idea what this test is even supposed to be. There's a 18391 character long line in there with what looks like sha1sums everywhere... |
|
My guess is that gecko also blacklists https://searchfox.org/mozilla-central/source/dom/html/HTMLSharedElement.h#20 The documentation here is missing so I have no idea what they even are. |
4fec5d6
to
207c477
|
@bors-servo try=wpt |
|
Judging by https://searchfox.org/mozilla-central/rev/b9a814e53b3b6f5cb665a78f4777868e7a16bfcd/dom/html/HTMLSharedElement.cpp#273-293, HTMLSharedElement looks like a class that is used as the implementation for a bunch of HTML elements that each have one or two custom behaviours to reduce code duplication. |
|
I suspect that you're missing weird parsing mode for the head element, judging by https://searchfox.org/mozilla-central/rev/b9a814e53b3b6f5cb665a78f4777868e7a16bfcd/dom/html/HTMLSharedElement.h#25-27 and the test contents being (pre-decoded) |
|
I was actually missing it for HtmlHtmlElement. With my current patch the test seems to be ok. We'll see if something else is broken |
|
|
Hopefully unrelated :p |
|
I argue that you are also missing it from HTMLHeadElement given the code that I linked :) |
|
Oh wow I somehow missed those lines when I read it... Will add for htmlheadelement |
207c477
to
f01801d
|
@bors-servo r+ |
|
|
|
|
f01801d
to
1b2464b
|
@bors-servo r+ |
|
|
|
|


Eijebong commentedMay 3, 2020
Inspired from gecko which has a similar fast path. This makes innerHTML
more than 10 times faster for this case.
Fixes #25892