| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 // from the root frame down to us. For this path to be unique, each set of s
iblings must | 133 // from the root frame down to us. For this path to be unique, each set of s
iblings must |
| 134 // contribute a unique name to the path, which can't collide with any HTML-a
ssigned names. | 134 // contribute a unique name to the path, which can't collide with any HTML-a
ssigned names. |
| 135 // We generate this path component by index in the child list along with an
unlikely | 135 // We generate this path component by index in the child list along with an
unlikely |
| 136 // frame name that can't be set in HTML because it collides with comment syn
tax. | 136 // frame name that can't be set in HTML because it collides with comment syn
tax. |
| 137 | 137 |
| 138 const char framePathPrefix[] = "<!--framePath "; | 138 const char framePathPrefix[] = "<!--framePath "; |
| 139 const int framePathPrefixLength = 14; | 139 const int framePathPrefixLength = 14; |
| 140 const int framePathSuffixLength = 3; | 140 const int framePathSuffixLength = 3; |
| 141 | 141 |
| 142 // Find the nearest parent that has a frame with a path in it. | 142 // Find the nearest parent that has a frame with a path in it. |
| 143 WillBeHeapVector<RawPtrWillBeMember<Frame>, 16> chain; | 143 HeapVector<Member<Frame>, 16> chain; |
| 144 Frame* frame; | 144 Frame* frame; |
| 145 for (frame = m_thisFrame; frame; frame = frame->tree().parent()) { | 145 for (frame = m_thisFrame; frame; frame = frame->tree().parent()) { |
| 146 if (frame->tree().uniqueName().startsWith(framePathPrefix)) | 146 if (frame->tree().uniqueName().startsWith(framePathPrefix)) |
| 147 break; | 147 break; |
| 148 chain.append(frame); | 148 chain.append(frame); |
| 149 } | 149 } |
| 150 StringBuilder name; | 150 StringBuilder name; |
| 151 name.append(framePathPrefix); | 151 name.append(framePathPrefix); |
| 152 if (frame) { | 152 if (frame) { |
| 153 name.append(frame->tree().uniqueName().string().substring(framePathPrefi
xLength, | 153 name.append(frame->tree().uniqueName().string().substring(framePathPrefi
xLength, |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 { | 402 { |
| 403 if (!frame) { | 403 if (!frame) { |
| 404 printf("Null input frame\n"); | 404 printf("Null input frame\n"); |
| 405 return; | 405 return; |
| 406 } | 406 } |
| 407 | 407 |
| 408 printFrames(frame->tree().top(), frame, 0); | 408 printFrames(frame->tree().top(), frame, 0); |
| 409 } | 409 } |
| 410 | 410 |
| 411 #endif | 411 #endif |
| OLD | NEW |