| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // from the root frame down to us. For this path to be unique, each set of s
iblings must | 153 // from the root frame down to us. For this path to be unique, each set of s
iblings must |
| 154 // contribute a unique name to the path, which can't collide with any HTML-a
ssigned names. | 154 // contribute a unique name to the path, which can't collide with any HTML-a
ssigned names. |
| 155 // We generate this path component by index in the child list along with an
unlikely | 155 // We generate this path component by index in the child list along with an
unlikely |
| 156 // frame name that can't be set in HTML because it collides with comment syn
tax. | 156 // frame name that can't be set in HTML because it collides with comment syn
tax. |
| 157 | 157 |
| 158 const char framePathPrefix[] = "<!--framePath "; | 158 const char framePathPrefix[] = "<!--framePath "; |
| 159 const int framePathPrefixLength = 14; | 159 const int framePathPrefixLength = 14; |
| 160 const int framePathSuffixLength = 3; | 160 const int framePathSuffixLength = 3; |
| 161 | 161 |
| 162 // Find the nearest parent that has a frame with a path in it. | 162 // Find the nearest parent that has a frame with a path in it. |
| 163 WillBeHeapVector<RawPtrWillBeMember<Frame>, 16> chain; | 163 HeapVector<Member<Frame>, 16> chain; |
| 164 Frame* frame; | 164 Frame* frame; |
| 165 for (frame = m_thisFrame; frame; frame = frame->tree().parent()) { | 165 for (frame = m_thisFrame; frame; frame = frame->tree().parent()) { |
| 166 if (frame->tree().uniqueName().startsWith(framePathPrefix)) | 166 if (frame->tree().uniqueName().startsWith(framePathPrefix)) |
| 167 break; | 167 break; |
| 168 chain.append(frame); | 168 chain.append(frame); |
| 169 } | 169 } |
| 170 StringBuilder uniqueName; | 170 StringBuilder uniqueName; |
| 171 uniqueName.append(framePathPrefix); | 171 uniqueName.append(framePathPrefix); |
| 172 if (frame) { | 172 if (frame) { |
| 173 uniqueName.append(frame->tree().uniqueName().getString().substring(frame
PathPrefixLength, | 173 uniqueName.append(frame->tree().uniqueName().getString().substring(frame
PathPrefixLength, |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 { | 422 { |
| 423 if (!frame) { | 423 if (!frame) { |
| 424 printf("Null input frame\n"); | 424 printf("Null input frame\n"); |
| 425 return; | 425 return; |
| 426 } | 426 } |
| 427 | 427 |
| 428 printFrames(frame->tree().top(), frame, 0); | 428 printFrames(frame->tree().top(), frame, 0); |
| 429 } | 429 } |
| 430 | 430 |
| 431 #endif | 431 #endif |
| OLD | NEW |