| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 } | 100 } |
| 101 | 101 |
| 102 // TODO(lukasza): We would like to assert uniqueness below (i.e. by calling | 102 // TODO(lukasza): We would like to assert uniqueness below (i.e. by calling |
| 103 // setUniqueName), but | 103 // setUniqueName), but |
| 104 // 1) uniqueness is currently violated by provisional/old frame pairs. | 104 // 1) uniqueness is currently violated by provisional/old frame pairs. |
| 105 // 2) there is an unresolved race between 2 OOPIFs, that can result in a | 105 // 2) there is an unresolved race between 2 OOPIFs, that can result in a |
| 106 // non-unique |uniqueName| - see https://crbug.com/558680#c14. | 106 // non-unique |uniqueName| - see https://crbug.com/558680#c14. |
| 107 m_uniqueName = uniqueName; | 107 m_uniqueName = uniqueName; |
| 108 } | 108 } |
| 109 | 109 |
| 110 DISABLE_CFI_PERF |
| 110 Frame* FrameTree::parent() const { | 111 Frame* FrameTree::parent() const { |
| 111 if (!m_thisFrame->client()) | 112 if (!m_thisFrame->client()) |
| 112 return nullptr; | 113 return nullptr; |
| 113 return m_thisFrame->client()->parent(); | 114 return m_thisFrame->client()->parent(); |
| 114 } | 115 } |
| 115 | 116 |
| 116 Frame* FrameTree::top() const { | 117 Frame* FrameTree::top() const { |
| 117 // FIXME: top() should never return null, so here are some hacks to deal | 118 // FIXME: top() should never return null, so here are some hacks to deal |
| 118 // with EmptyFrameLoaderClient and cases where the frame is detached | 119 // with EmptyFrameLoaderClient and cases where the frame is detached |
| 119 // already... | 120 // already... |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 if (m_thisFrame->page() != ancestor->page()) | 449 if (m_thisFrame->page() != ancestor->page()) |
| 449 return false; | 450 return false; |
| 450 | 451 |
| 451 for (Frame* frame = m_thisFrame; frame; frame = frame->tree().parent()) { | 452 for (Frame* frame = m_thisFrame; frame; frame = frame->tree().parent()) { |
| 452 if (frame == ancestor) | 453 if (frame == ancestor) |
| 453 return true; | 454 return true; |
| 454 } | 455 } |
| 455 return false; | 456 return false; |
| 456 } | 457 } |
| 457 | 458 |
| 459 DISABLE_CFI_PERF |
| 458 Frame* FrameTree::traverseNext(const Frame* stayWithin) const { | 460 Frame* FrameTree::traverseNext(const Frame* stayWithin) const { |
| 459 Frame* child = firstChild(); | 461 Frame* child = firstChild(); |
| 460 if (child) { | 462 if (child) { |
| 461 ASSERT(!stayWithin || child->tree().isDescendantOf(stayWithin)); | 463 ASSERT(!stayWithin || child->tree().isDescendantOf(stayWithin)); |
| 462 return child; | 464 return child; |
| 463 } | 465 } |
| 464 | 466 |
| 465 if (m_thisFrame == stayWithin) | 467 if (m_thisFrame == stayWithin) |
| 466 return nullptr; | 468 return nullptr; |
| 467 | 469 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 void showFrameTree(const blink::Frame* frame) { | 538 void showFrameTree(const blink::Frame* frame) { |
| 537 if (!frame) { | 539 if (!frame) { |
| 538 printf("Null input frame\n"); | 540 printf("Null input frame\n"); |
| 539 return; | 541 return; |
| 540 } | 542 } |
| 541 | 543 |
| 542 printFrames(frame->tree().top(), frame, 0); | 544 printFrames(frame->tree().top(), frame, 0); |
| 543 } | 545 } |
| 544 | 546 |
| 545 #endif | 547 #endif |
| OLD | NEW |