mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
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:
parent
75dd4fbd16
commit
24d5ca4a9d
Notes:
sideshowbarker
2024-07-17 18:47:50 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/24d5ca4a9d Pull-request: https://github.com/SerenityOS/serenity/pull/12531
2 changed files with 1 additions and 8 deletions
|
@ -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"~~~(
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue