webapi: don't upgrade custom elements in a windowless document
A custom element created in a windowless document (think DOMParser, or new Document(), ...) doesn't have a custom element registry and thus should remain undefined. This repurposes the existing Frame._skip_custom_element_upgrade boolean into a tri-state enum to capture the 3 possible states: `construct` and `bare_context` capture the previous boolean state, and `undefined` is now used for this third state. This fixes (non-fatal) errors on decathlon.com. It also fixes a few WPT cases and advances a few more (which are now failing for a different reason).
K
Karl Seguin committed
523494ffe3240e8fbe0f7a506dc8f9c37c984359
Parent: c5aaafe