[webkit-reviews] review granted: [Bug 229204] PCM: Allow measurement of links in nested, cross-site iframes : [Attachment 440110] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 4 15:28:29 PDT 2021


Alex Christensen <achristensen at apple.com> has granted John Wilander
<wilander at apple.com>'s request for review:
Bug 229204: PCM: Allow measurement of links in nested, cross-site iframes
https://bugs.webkit.org/show_bug.cgi?id=229204

Attachment 440110: Patch

https://bugs.webkit.org/attachment.cgi?id=440110&action=review




--- Comment #3 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 440110
  --> https://bugs.webkit.org/attachment.cgi?id=440110
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=440110&action=review

> Source/WebCore/html/HTMLAnchorElement.cpp:446
> +    if (frame->isMainFrame())
> +	   mainDocumentRegistrableDomain = RegistrableDomain { document().url()
};
> +    else if (auto mainDocument = frame->mainFrame().document())
> +	   mainDocumentRegistrableDomain = RegistrableDomain {
mainDocument->url() };

I think you can simplify this because Frame::mainFrame() returns itself if it's
the main frame.


More information about the webkit-reviews mailing list