OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 fprintf(stderr, "================================\n"); | 910 fprintf(stderr, "================================\n"); |
911 } | 911 } |
912 | 912 |
913 template <typename Strategy> | 913 template <typename Strategy> |
914 void VisibleSelectionTemplate<Strategy>::formatForDebugger(char* buffer, unsigne
d length) const | 914 void VisibleSelectionTemplate<Strategy>::formatForDebugger(char* buffer, unsigne
d length) const |
915 { | 915 { |
916 StringBuilder result; | 916 StringBuilder result; |
917 String s; | 917 String s; |
918 | 918 |
919 if (isNone()) { | 919 if (isNone()) { |
920 result.append("<none>"); | 920 result.appendLiteral("<none>"); |
921 } else { | 921 } else { |
922 const int FormatBufferSize = 1024; | 922 const int FormatBufferSize = 1024; |
923 char s[FormatBufferSize]; | 923 char s[FormatBufferSize]; |
924 result.append("from "); | 924 result.appendLiteral("from "); |
925 start().formatForDebugger(s, FormatBufferSize); | 925 start().formatForDebugger(s, FormatBufferSize); |
926 result.append(s); | 926 result.append(s); |
927 result.append(" to "); | 927 result.appendLiteral(" to "); |
928 end().formatForDebugger(s, FormatBufferSize); | 928 end().formatForDebugger(s, FormatBufferSize); |
929 result.append(s); | 929 result.append(s); |
930 } | 930 } |
931 | 931 |
932 strncpy(buffer, result.toString().utf8().data(), length - 1); | 932 strncpy(buffer, result.toString().utf8().data(), length - 1); |
933 } | 933 } |
934 | 934 |
935 template <typename Strategy> | 935 template <typename Strategy> |
936 void VisibleSelectionTemplate<Strategy>::showTreeForThis() const | 936 void VisibleSelectionTemplate<Strategy>::showTreeForThis() const |
937 { | 937 { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
998 { | 998 { |
999 sel.showTreeForThis(); | 999 sel.showTreeForThis(); |
1000 } | 1000 } |
1001 | 1001 |
1002 void showTree(const blink::VisibleSelectionInFlatTree* sel) | 1002 void showTree(const blink::VisibleSelectionInFlatTree* sel) |
1003 { | 1003 { |
1004 if (sel) | 1004 if (sel) |
1005 sel->showTreeForThis(); | 1005 sel->showTreeForThis(); |
1006 } | 1006 } |
1007 #endif | 1007 #endif |
OLD | NEW |