|
Lines 23-28
a/Source/WebCore/page/FrameTree.cpp_sec1
|
| 23 |
|
23 |
|
| 24 |
#include "Frame.h" |
24 |
#include "Frame.h" |
| 25 |
#include "FrameView.h" |
25 |
#include "FrameView.h" |
|
|
26 |
#include "HTMLFrameOwnerElement.h" |
| 26 |
#include "Page.h" |
27 |
#include "Page.h" |
| 27 |
#include "PageGroup.h" |
28 |
#include "PageGroup.h" |
| 28 |
#include <stdarg.h> |
29 |
#include <stdarg.h> |
|
Lines 63-68
Frame* FrameTree::parent(bool checkForDisconnectedFrame) const
a/Source/WebCore/page/FrameTree.cpp_sec2
|
| 63 |
return m_parent; |
64 |
return m_parent; |
| 64 |
} |
65 |
} |
| 65 |
|
66 |
|
|
|
67 |
Frame* FrameTree::nextSibling() const |
| 68 |
{ |
| 69 |
Frame* frame = m_nextSibling.get(); |
| 70 |
while (frame->isInShadowTree()) |
| 71 |
frame = frame->tree()->m_nextSibling.get(); |
| 72 |
return frame; |
| 73 |
} |
| 74 |
|
| 75 |
Frame* FrameTree::previousSibling() const |
| 76 |
{ |
| 77 |
Frame* frame = m_previousSibling; |
| 78 |
while (frame->isInShadowTree()) |
| 79 |
frame = frame->tree()->m_previousSibling; |
| 80 |
return frame; |
| 81 |
} |
| 82 |
|
| 83 |
Frame* FrameTree::firstChild() const |
| 84 |
{ |
| 85 |
Frame* frame = m_firstChild.get(); |
| 86 |
if (frame->isInShadowTree()) |
| 87 |
frame = frame->tree()->nextSibling(); |
| 88 |
ASSERT(!frame->isInShadowTree()); |
| 89 |
return frame; |
| 90 |
} |
| 91 |
|
| 92 |
Frame* FrameTree::lastChild() const |
| 93 |
{ |
| 94 |
Frame* frame = m_lastChild; |
| 95 |
if (frame->isInShadowTree()) |
| 96 |
frame = frame->tree()->previousSibling(); |
| 97 |
ASSERT(!frame->isInShadowTree()); |
| 98 |
return frame; |
| 99 |
} |
| 100 |
|
| 66 |
bool FrameTree::transferChild(PassRefPtr<Frame> child) |
101 |
bool FrameTree::transferChild(PassRefPtr<Frame> child) |
| 67 |
{ |
102 |
{ |
| 68 |
Frame* oldParent = child->tree()->parent(); |
103 |
Frame* oldParent = child->tree()->parent(); |
|
Lines 102-107
void FrameTree::actuallyAppendChild(PassRefPtr<Frame> child)
a/Source/WebCore/page/FrameTree.cpp_sec3
|
| 102 |
m_firstChild = child; |
137 |
m_firstChild = child; |
| 103 |
|
138 |
|
| 104 |
m_childCount++; |
139 |
m_childCount++; |
|
|
140 |
if (m_lastChild->isInShadowTree()) |
| 141 |
m_shadowChildCount++; |
| 105 |
|
142 |
|
| 106 |
ASSERT(!m_lastChild->tree()->m_nextSibling); |
143 |
ASSERT(!m_lastChild->tree()->m_nextSibling); |
| 107 |
} |
144 |
} |
|
Lines 124-129
void FrameTree::removeChild(Frame* child)
a/Source/WebCore/page/FrameTree.cpp_sec4
|
| 124 |
child->tree()->m_nextSibling = 0; |
161 |
child->tree()->m_nextSibling = 0; |
| 125 |
|
162 |
|
| 126 |
m_childCount--; |
163 |
m_childCount--; |
|
|
164 |
if (child->isInShadowTree()) |
| 165 |
m_shadowChildCount--; |
| 127 |
} |
166 |
} |
| 128 |
|
167 |
|
| 129 |
AtomicString FrameTree::uniqueChildName(const AtomicString& requestedName) const |
168 |
AtomicString FrameTree::uniqueChildName(const AtomicString& requestedName) const |
|
Lines 286-291
Frame* FrameTree::traverseNext(const Frame* stayWithin) const
a/Source/WebCore/page/FrameTree.cpp_sec5
|
| 286 |
return 0; |
325 |
return 0; |
| 287 |
} |
326 |
} |
| 288 |
|
327 |
|
|
|
328 |
Frame* FrameTree::traverseNextIncludingShadows() const |
| 329 |
{ |
| 330 |
Frame* child = m_firstChild.get(); |
| 331 |
if (child) |
| 332 |
return child; |
| 333 |
|
| 334 |
Frame* sibling = m_nextSibling.get(); |
| 335 |
if (sibling) |
| 336 |
return sibling; |
| 337 |
|
| 338 |
Frame* frame = m_thisFrame; |
| 339 |
while (!sibling) { |
| 340 |
frame = frame->tree()->parent(); |
| 341 |
if (!frame) |
| 342 |
return 0; |
| 343 |
sibling = frame->tree()->m_nextSibling.get(); |
| 344 |
} |
| 345 |
|
| 346 |
if (frame) |
| 347 |
return sibling; |
| 348 |
|
| 349 |
return 0; |
| 350 |
} |
| 351 |
|
| 289 |
Frame* FrameTree::traverseNextWithWrap(bool wrap) const |
352 |
Frame* FrameTree::traverseNextWithWrap(bool wrap) const |
| 290 |
{ |
353 |
{ |
| 291 |
if (Frame* result = traverseNext()) |
354 |
if (Frame* result = traverseNext()) |