| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 { | 46 { |
| 47 } | 47 } |
| 48 | 48 |
| 49 FrameTree::~FrameTree() | 49 FrameTree::~FrameTree() |
| 50 { | 50 { |
| 51 // FIXME: Why is this here? Doesn't this parallel what we already do in ~Loc
alFrame? | 51 // FIXME: Why is this here? Doesn't this parallel what we already do in ~Loc
alFrame? |
| 52 for (LocalFrame* child = firstChild(); child; child = child->tree().nextSibl
ing()) | 52 for (LocalFrame* child = firstChild(); child; child = child->tree().nextSibl
ing()) |
| 53 child->setView(nullptr); | 53 child->setView(nullptr); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void FrameTree::setName(const AtomicString& name) | 56 void FrameTree::setName(const AtomicString& name, const AtomicString& fallbackNa
me) |
| 57 { | 57 { |
| 58 m_name = name; | 58 m_name = name; |
| 59 if (!parent()) { | 59 if (!parent()) { |
| 60 m_uniqueName = name; | 60 m_uniqueName = name; |
| 61 return; | 61 return; |
| 62 } | 62 } |
| 63 m_uniqueName = AtomicString(); // Remove our old frame name so it's not cons
idered in uniqueChildName. | 63 m_uniqueName = AtomicString(); // Remove our old frame name so it's not cons
idered in uniqueChildName. |
| 64 m_uniqueName = parent()->tree().uniqueChildName(name); | 64 m_uniqueName = parent()->tree().uniqueChildName(name.isEmpty() ? fallbackNam
e : name); |
| 65 } | 65 } |
| 66 | 66 |
| 67 LocalFrame* FrameTree::parent() const | 67 LocalFrame* FrameTree::parent() const |
| 68 { | 68 { |
| 69 if (!m_thisFrame->loader().client()) | 69 if (!m_thisFrame->loader().client()) |
| 70 return 0; | 70 return 0; |
| 71 // FIXME: Temporary hack to stage converting locations that really should be
Frame. | 71 // FIXME: Temporary hack to stage converting locations that really should be
Frame. |
| 72 return toLocalFrame(m_thisFrame->loader().client()->parent()); | 72 return toLocalFrame(m_thisFrame->loader().client()->parent()); |
| 73 } | 73 } |
| 74 | 74 |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 { | 409 { |
| 410 if (!frame) { | 410 if (!frame) { |
| 411 printf("Null input frame\n"); | 411 printf("Null input frame\n"); |
| 412 return; | 412 return; |
| 413 } | 413 } |
| 414 | 414 |
| 415 printFrames(frame->tree().top(), frame, 0); | 415 printFrames(frame->tree().top(), frame, 0); |
| 416 } | 416 } |
| 417 | 417 |
| 418 #endif | 418 #endif |
| OLD | NEW |