LibWeb: Remove non-standard ReturnNullIfCrossOrigin IDL attribute

This is no longer needed as BrowsingContextContainer::content_document()
now does the right thing, and HTMLIFrameElement.contentDocument is the
only user of this attribute. Let's not invent our own mechanisms for
things that are important to get right, like same origin comparisons.
This commit is contained in:
Linus Groh 2022-02-14 22:05:31 +00:00 committed by Andreas Kling
parent 75dd4fbd16
commit 24d5ca4a9d
Notes: sideshowbarker 2024-07-17 18:47:50 +09:00
2 changed files with 1 additions and 8 deletions

View file

@ -3894,13 +3894,6 @@ JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::@attribute.getter_callback@)
auto* impl = TRY(impl_from(vm, global_object));
)~~~");
if (attribute.extended_attributes.contains("ReturnNullIfCrossOrigin")) {
attribute_generator.append(R"~~~(
if (!impl->may_access_from_origin(static_cast<WindowObject&>(global_object).origin()))
return JS::js_null();
)~~~");
}
if (attribute.extended_attributes.contains("Reflect")) {
if (attribute.type->name != "boolean") {
attribute_generator.append(R"~~~(

View file

@ -8,7 +8,7 @@ interface HTMLIFrameElement : HTMLElement {
[Reflect] attribute DOMString height;
[Reflect=allowfullscreen] attribute boolean allowFullscreen;
[ReturnNullIfCrossOrigin] readonly attribute Document? contentDocument;
readonly attribute Document? contentDocument;
[Reflect] attribute DOMString align;
[Reflect] attribute DOMString scrolling;