[webkit-changes] [WebKit/WebKit] 80993f: Avoid traversing the FrameTree up in FrameTree::top()
Ahmad Saleem
noreply at github.com
Fri Jan 19 11:13:33 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 80993fda030b571a3937b08f8809b50d72b61855
https://github.com/WebKit/WebKit/commit/80993fda030b571a3937b08f8809b50d72b61855
Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
Date: 2024-01-19 (Fri, 19 Jan 2024)
Changed paths:
M Source/WebCore/page/FrameTree.cpp
Log Message:
-----------
Avoid traversing the FrameTree up in FrameTree::top()
https://bugs.webkit.org/show_bug.cgi?id=185394
Reviewed by Chris Dumez.
Credits & Patch Authored by Chris Dumez.
Avoid traversing the FrameTree up in FrameTree::top() and rely on Frame::mainFrame() instead to get
the answer right away. There is a potential behavior change if calling FrameTree::top() on a detached
frame (it will keep return the main frame now instead of returning the frame itself). However, it
should not matter in practice as we should not be dealing with the FrameTree of a detached frame.
* Source/WebCore/page/FrameTree.cpp:
(FrameTree::top):
Canonical link: https://commits.webkit.org/273230@main
More information about the webkit-changes
mailing list