Summary: | Don't keep all newly created potential custom elements alive when the feature is disabled | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||
Component: | DOM | Assignee: | Ryosuke Niwa <rniwa> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cdumez, commit-queue, dbates, esprehn+autocc, kangil.han, kling, koivisto, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Ryosuke Niwa
2016-06-24 23:02:32 PDT
Created attachment 282047 [details]
Fixes the bug
Comment on attachment 282047 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=282047&action=review OK > Source/WebCore/ChangeLog:9 > + The custom elements spec has also been updated to not do this but we'll implement that behavior later. Maybe a better way to say this is: Ideally we want to conform to the behavior in the Custom Elements spec. and only upgrade an element that is inserted into the document. > Source/WebCore/dom/Document.cpp:900 > + if (RuntimeEnabledFeatures::sharedFeatures().customElementsEnabled() > + && Document::validateCustomElementName(localName) == CustomElementNameValidationStatus::Valid) { Can we/would it make sense to write a test for this change? I would hope that such a test could be updated once we implement the behavior defined in the spec. (In reply to comment #2) > Comment on attachment 282047 [details] > Fixes the bug > > View in context: > https://bugs.webkit.org/attachment.cgi?id=282047&action=review > > > Source/WebCore/dom/Document.cpp:900 > > + if (RuntimeEnabledFeatures::sharedFeatures().customElementsEnabled() > > + && Document::validateCustomElementName(localName) == CustomElementNameValidationStatus::Valid) { > > Can we/would it make sense to write a test for this change? I would hope > that such a test could be updated once we implement the behavior defined in > the spec. It's theoretically possible with GCController.collect() but I've never been able to write a test with that successfully with JSC in the past. The test always ends up being either flaky or not functional. Committed r202537: <http://trac.webkit.org/changeset/202537> |