WebKit Bugzilla
Attachment 339754 Details for
Bug 185394
: Avoid traversing the FrameTree up in FrameTree::top()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185394-20180507143625.patch (text/plain), 1.67 KB, created by
Chris Dumez
on 2018-05-07 14:36:26 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2018-05-07 14:36:26 PDT
Size:
1.67 KB
patch
obsolete
>Subversion Revision: 231450 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 66ff6e1b12ea384860f809e7eb3ace0bb4d107f6..7aa4b381bca6cb51638e48b5d71f352d4830563e 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2018-05-07 Chris Dumez <cdumez@apple.com> >+ >+ Avoid traversing the FrameTree up in FrameTree::top() >+ https://bugs.webkit.org/show_bug.cgi?id=185394 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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. >+ >+ * page/FrameTree.cpp: >+ (WebCore::FrameTree::top const): >+ > 2018-05-03 Chris Dumez <cdumez@apple.com> > > Stop using an iframe's id as fallback if its name attribute is not set >diff --git a/Source/WebCore/page/FrameTree.cpp b/Source/WebCore/page/FrameTree.cpp >index 42cb333a0c09d514db0f17c7cf0db6f8766bfd30..97bac5fc772a3a1635932689d4325e58e26f0eda 100644 >--- a/Source/WebCore/page/FrameTree.cpp >+++ b/Source/WebCore/page/FrameTree.cpp >@@ -427,10 +427,7 @@ Frame* FrameTree::deepLastChild() const > > Frame& FrameTree::top() const > { >- Frame* frame = &m_thisFrame; >- for (Frame* parent = &m_thisFrame; parent; parent = parent->tree().parent()) >- frame = parent; >- return *frame; >+ return m_thisFrame.mainFrame(); > } > > } // namespace WebCore
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
sam
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185394
: 339754