mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 11:12:45 +00:00 
			
		
		
		
	|  f991e40d7f This change allows IDL interfaces to be compiled using new AK String
which have a attribute in the interface that may return null.
Without this change we would run into a compile error from code such as
the following example:
```
auto retval = impl->deprecated_attribute(HTML::AttributeNames::ref);
if (!retval.has_value()) {
    return JS::js_null();
 }
 return JS::PrimitiveString::create(vm, retval.release_value());
```
As `deprecated_attribute` returns a `DeprecatedString` instead of an
`Optional<String>`. Fix that by using the non-deprecated attribute
implementation, and falling back to the empty string for where we cannot
return null.
Also add a test here to cover a regression I almost introduced here
which was not previously covered by our test suite.
Ideally, all of this should actually just be calling
Element::get_attribute_value, but I'm not entirely sure at this stage
what the behavioral change would be to test for here. Since this
implementation preserves the previous behavior, stick with it, and add a
FIXME for now. | ||
|---|---|---|
| .. | ||
| canvas | ||
| css | ||
| geometry | ||
| hit_testing | ||
| HTML | ||
| PerformanceObserver | ||
| Streams | ||
| TextDecoder | ||
| URL | ||
| append-child-must-update-layout-tree.html | ||
| Attr-cloneNode.html | ||
| background-position-xy.html | ||
| basic.html | ||
| body-background-color-red.css | ||
| failed-img-should-not-delay-load-event-forever.html | ||
| html-form-controls-collection.html | ||
| html-parser-text-in-table-hoisting.html | ||
| idl-handling-of-null-attribute.html | ||
| include.js | ||
| input-element-file-value.html | ||
| internals.html | ||
| link-element-media-attribute.html | ||
| link-element-onload-attribute.html | ||
| link-element-rel-preload-load-event.html | ||
| link-element-search.html | ||
| ProcessingInstruction-cloneNode.html | ||
| radio-node-list.html | ||
| sameobject-behavior-for-htmlcollection-properties.html | ||
| scripted-dom-insertion-during-html-parse.html | ||
| setting-display-none-should-nuke-subtree.html | ||
| title.html | ||
| url-search-params-iterator-iterator.html | ||
| valid.css | ||
| window-proxy-numeric-own-property.html | ||
| window-proxy-property-inline-cache.html | ||