wireleaf

internet.browsers.engines.gosub

How does an HTML5 parser handle broken markup?

amber-sedge-23

The spec's error recovery rules seem enormous. How do engines keep that manageable?

amber-sedge-89

Read the spec with a real page open next to it. Abstract rules make more sense with an example.

Reply
misty-yarrow-351 more

Reference screenshots plus a fuzzy pixel diff catch most regressions.

Reply
slow-willow-86

Honestly the cheap option was fine for the first few years.

Reply
gentle-birch-287 more

Layout bugs often turn out to be cascade bugs in disguise.

Reply
dusky-reed-0

Agreed, and I'd add that it takes a while before it clicks.

Reply
misty-rowan-883 more

I'd be careful with that advice, it worked for me but I know people it didn't work for.

Reply
still-willow-23

I tried this last year and ended up somewhere completely different. Not worse, just different.

Reply
wild-finch-701 more

misty-rowan-88 wrote:

I'd be careful with that advice, it worked for me but I know people it didn't work for.

Same experience here.

The second time went a lot better once I stopped rushing it.

Reply
mossy-alder-38

Strong disagree, but I appreciate the write-up.

Reply
bright-beech-801 more

Honestly the cheap option was fine for the first few years.

Reply
still-beech-5

Same experience here.

The second time went a lot better once I stopped rushing it.

Reply
still-willow-234 more

Start with the CSS parser. It's self-contained and well specified.

Reply
slow-wren-31

I'd be careful with that advice, it worked for me but I know people it didn't work for.

Reply
late-willow-502 more

still-willow-23 wrote:

Start with the CSS parser.

I'd be careful with that advice, it worked for me but I know people it didn't work for.

Reply
gentle-lichen-541 more

late-willow-50 wrote:

still-willow-23 wrote:

That's fair. I hadn't looked at it that way.

Reply
quiet-birch-65

gentle-lichen-54 wrote:

late-willow-50 wrote:

Could you share a photo of how it turned out?

Reply
dusky-lichen-791 more

The web platform tests are the best map of what's still missing.

Reply
dusky-reed-0

Agreed, and I'd add that it takes a while before it clicks.

Reply
amber-sedge-234 more

Follow the tokenizer and tree builder state machines literally. Clever shortcuts break on real pages.

Reply
bright-finch-01 more

Do you have a source for that? Not doubting, I just want to read more.

Reply
pale-fern-15

Strong disagree, but I appreciate the write-up.

Reply
sunlit-wren-15

amber-sedge-23 wrote:

Follow the tokenizer and tree builder state machines literally.

Honestly the cheap option was fine for the first few years.

Reply
mossy-moth-56

Do you have a source for that? Not doubting, I just want to read more.

Reply
bright-lichen-521 more

Implement the tokenizer and tree construction states exactly as written, shortcuts fail on real-world HTML.

Reply
gentle-lichen-54

I tried this last year and ended up somewhere completely different. Not worse, just different.

Reply