Skip to content

Commit

Permalink
Cherry-pick 273989@main (439730f). https://bugs.webkit.org/show_bug.c…
Browse files Browse the repository at this point in the history
…gi?id=268603

    Document::isFullyActive should return true for root frames in addition to main frames
    https://bugs.webkit.org/show_bug.cgi?id=268603
    rdar://122164616

    Reviewed by Charlie Wolfe.

    Before this change XMLHttpRequest::open would always throw an exception if called from a
    cross-site iframe with site isolation enabled.  This will probably fix a lot of behavior.

    * LayoutTests/platform/mac-site-isolation/TestExpectations:
    * Source/WebCore/dom/Document.cpp:
    (WebCore::Document::isFullyActive const):

    Canonical link: https://commits.webkit.org/273989@main

Canonical link: https://commits.webkit.org/266719.362@webkitglib/2.42
  • Loading branch information
achristensen07 authored and aperezdc committed Mar 14, 2024
1 parent 35a8305 commit 301a10b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/WebCore/dom/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3136,11 +3136,11 @@ bool Document::isFullyActive() const
if (!frame || frame->document() != this)
return false;

if (frame->isMainFrame())
auto* parentFrame = dynamicDowncast<LocalFrame>(frame->tree().parent());
if (!parentFrame)
return true;

auto* parentFrame = dynamicDowncast<LocalFrame>(frame->tree().parent());
return parentFrame && parentFrame->document() && parentFrame->document()->isFullyActive();
return parentFrame->document() && parentFrame->document()->isFullyActive();
}

void Document::detachParser()
Expand Down

0 comments on commit 301a10b

Please sign in to comment.