13:12
<mrkishi>

hey, folks! i think there's a couple of issues with the named character reference state in the html spec but i wanted to check i'm not missing anything before filing an issue...

  • the example says character references are not parsed in attributes, but this is not reflected in the algorithm. wouldn't a properly matched name fall in the if there's a match > otherwise branch? (if inside attribute AND last not a semicolon AND followed by either equals or alphanumeric, then flush it, otherwise...)
  • while browsers will indeed not parse &notit; in attributes, they'll parse at least &amp;, &quot; and &apos;, so even if the example is right it doesn't seem to be the whole story

does this seem right?

14:35
<Yaser Nojavan gol>
Hi
14:35
<vrafaeli>
Anyone knows what the hack is going on with iframe: https://codesandbox.io/s/iframe-size-bug-bb3hgi?file=/src/App.tsx Why is it 10% bigger than the defined size? same in Chrome and Mozilla (The space on the right seems to be of the size of the vetical scrollbar, which is not there. Perhaps the same is true for the bottom excessive size.)
14:52
<emilio>
Without having looked in depth (on the phone) iframes have borders by default, and the default box-sizing is content-box, so the width is what you specified plus borders
15:03
<vrafaeli>
You are correct about the fact that borders do exist. I noticed that also. But the borders are only 2px big and removing them does reduce the size by negligible amount.
15:05
<vrafaeli>
Seems like the additional size is (borders +) scrollbar
15:06
<vrafaeli>
first is with the 2px iframe border, second is without that
15:50
<emilio>
vrafaeli: ok at the computer now. Other than the border, what you're seeing is that the iframe is baseline-aligned by default. You can avoid that with display: block, for example
15:51
<emilio>
<iframe> is display: inline by default, like <img> and other replaced elements
15:52
<emilio>
Also vertical-align: top would work in your example
15:52
<emilio>
Anyways that's all behaving as expected
15:57
<vrafaeli>
vrafaeli: ok at the computer now. Other than the border, what you're seeing is that the iframe is baseline-aligned by default. You can avoid that with display: block, for example
I see. Thanks a lot.
17:11
<annevk>
mrkishi: it's an example, by necessity it's not the whole story; and it's an example about a very specific instance so generalizing from it in that way would be wrong
17:13
<mrkishi>
mrkishi: it's an example, by necessity it's not the whole story; and it's an example about a very specific instance so generalizing from it in that way would be wrong
right, but the example isn't reflected in the algorithm, and neither is current browser behavior... unless i'm missing something?
17:14
<mrkishi>
i know examples aren't normative :p
17:14
<annevk>
mrkishi: I'm pretty sure the example is correct
17:16
<mrkishi>
mrkishi: I'm pretty sure the example is correct

what's your interpretation of this, then?

If the character reference was consumed as part of an attribute, and the last character matched is not a U+003B SEMICOLON character (;), and the next input character is either a U+003D EQUALS SIGN character (=) or an ASCII alphanumeric, then, for historical reasons, flush code points consumed as a character reference and switch to the return state.

Otherwise:

and where is the &amp;, &apos; and &quot; exceptions handled?

17:17
<annevk>
Well, you need to start with the first paragraph of https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
17:17
<annevk>
For &notit; that gives you not in the table, as the example says. So you have a match.
17:18
<annevk>
But say you're parsing an attribute it won't work as it doesn't end in ;
17:18
<annevk>
But if the input was &quot; it would, since that does end in ;
17:18
<mrkishi>
oh, i'm an idiot.
17:19
<mrkishi>
this whole time i thought not's named reference was &notit;
17:19
<annevk>
Well, I wouldn't go that far; reading specifications is a skill you need to learn
17:20
<mrkishi>
Well, I wouldn't go that far; reading specifications is a skill you need to learn
i have some other pretty convincing rationale, but i'll spare you the details
17:20
<annevk>
And even then it can be involved 🙂
17:20
<mrkishi>
thanks for taking a look and so sorry for wasting your time.
17:20
<annevk>
No worries, was fun to learn this again!
20:53
<Yaser Nojavan gol>
vrafaeli:
20:55
<Yaser Nojavan gol>
💛🤍💜
20:55
<Yaser Nojavan gol>
Hi