Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: third_party/WebKit/Source/core/page/FrameTree.h

Issue 1635873003: Replicating WebFrame::uniqueName across renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dump-render-tree3
Patch Set: Removed unnecessary crbug comment. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 Frame* find(const AtomicString& name) const; 63 Frame* find(const AtomicString& name) const;
64 unsigned childCount() const; 64 unsigned childCount() const;
65 65
66 Frame* scopedChild(unsigned index) const; 66 Frame* scopedChild(unsigned index) const;
67 Frame* scopedChild(const AtomicString& name) const; 67 Frame* scopedChild(const AtomicString& name) const;
68 unsigned scopedChildCount() const; 68 unsigned scopedChildCount() const;
69 void invalidateScopedChildCount(); 69 void invalidateScopedChildCount();
70 70
71 DECLARE_TRACE(); 71 DECLARE_TRACE();
72 72
73 AtomicString calculateUniqueNameForNewChildFrame(
74 const AtomicString& name,
75 const AtomicString& fallbackName = nullAtom) const;
76
73 private: 77 private:
74 Frame* deepLastChild() const; 78 Frame* deepLastChild() const;
75 AtomicString uniqueChildName(const AtomicString& requestedName) const; 79 AtomicString calculateUniqueNameForChildFrame(
80 bool existingChildFrame,
81 const AtomicString& requestedName,
82 const AtomicString& fallbackName = nullAtom) const;
76 bool uniqueNameExists(const AtomicString& name) const; 83 bool uniqueNameExists(const AtomicString& name) const;
77 84
78 RawPtrWillBeMember<Frame> m_thisFrame; 85 RawPtrWillBeMember<Frame> m_thisFrame;
79 86
80 AtomicString m_name; // The actual frame name (may be empty). 87 AtomicString m_name; // The actual frame name (may be empty).
81 AtomicString m_uniqueName; 88 AtomicString m_uniqueName;
82 89
83 mutable unsigned m_scopedChildCount; 90 mutable unsigned m_scopedChildCount;
84 }; 91 };
85 92
86 } // namespace blink 93 } // namespace blink
87 94
88 #ifndef NDEBUG 95 #ifndef NDEBUG
89 // Outside the WebCore namespace for ease of invocation from gdb. 96 // Outside the WebCore namespace for ease of invocation from gdb.
90 void showFrameTree(const blink::Frame*); 97 void showFrameTree(const blink::Frame*);
91 #endif 98 #endif
92 99
93 #endif // FrameTree_h 100 #endif // FrameTree_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698