| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 const char framePathPrefix[] = "<!--framePath "; | 170 const char framePathPrefix[] = "<!--framePath "; |
| 171 const int framePathPrefixLength = 14; | 171 const int framePathPrefixLength = 14; |
| 172 const int framePathSuffixLength = 3; | 172 const int framePathSuffixLength = 3; |
| 173 | 173 |
| 174 // Find the nearest parent that has a frame with a path in it. | 174 // Find the nearest parent that has a frame with a path in it. |
| 175 HeapVector<Member<Frame>, 16> chain; | 175 HeapVector<Member<Frame>, 16> chain; |
| 176 Frame* frame; | 176 Frame* frame; |
| 177 for (frame = m_thisFrame; frame; frame = frame->tree().parent()) { | 177 for (frame = m_thisFrame; frame; frame = frame->tree().parent()) { |
| 178 if (frame->tree().uniqueName().startsWith(framePathPrefix)) | 178 if (frame->tree().uniqueName().startsWith(framePathPrefix)) |
| 179 break; | 179 break; |
| 180 chain.append(frame); | 180 chain.push_back(frame); |
| 181 } | 181 } |
| 182 StringBuilder uniqueName; | 182 StringBuilder uniqueName; |
| 183 uniqueName.append(framePathPrefix); | 183 uniqueName.append(framePathPrefix); |
| 184 if (frame) { | 184 if (frame) { |
| 185 uniqueName.append(frame->tree().uniqueName().getString().substring( | 185 uniqueName.append(frame->tree().uniqueName().getString().substring( |
| 186 framePathPrefixLength, frame->tree().uniqueName().length() - | 186 framePathPrefixLength, frame->tree().uniqueName().length() - |
| 187 framePathPrefixLength - | 187 framePathPrefixLength - |
| 188 framePathSuffixLength)); | 188 framePathSuffixLength)); |
| 189 } | 189 } |
| 190 for (int i = chain.size() - 1; i >= 0; --i) { | 190 for (int i = chain.size() - 1; i >= 0; --i) { |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 void showFrameTree(const blink::Frame* frame) { | 538 void showFrameTree(const blink::Frame* frame) { |
| 539 if (!frame) { | 539 if (!frame) { |
| 540 printf("Null input frame\n"); | 540 printf("Null input frame\n"); |
| 541 return; | 541 return; |
| 542 } | 542 } |
| 543 | 543 |
| 544 printFrames(frame->tree().top(), frame, 0); | 544 printFrames(frame->tree().top(), frame, 0); |
| 545 } | 545 } |
| 546 | 546 |
| 547 #endif | 547 #endif |
| OLD | NEW |