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 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 fprintf(stderr, "================================\n"); | 877 fprintf(stderr, "================================\n"); |
878 } | 878 } |
879 | 879 |
880 template <typename Strategy> | 880 template <typename Strategy> |
881 void VisibleSelectionTemplate<Strategy>::formatForDebugger(char* buffer, unsigne
d length) const | 881 void VisibleSelectionTemplate<Strategy>::formatForDebugger(char* buffer, unsigne
d length) const |
882 { | 882 { |
883 StringBuilder result; | 883 StringBuilder result; |
884 String s; | 884 String s; |
885 | 885 |
886 if (isNone()) { | 886 if (isNone()) { |
887 result.appendLiteral("<none>"); | 887 result.append("<none>"); |
888 } else { | 888 } else { |
889 const int FormatBufferSize = 1024; | 889 const int FormatBufferSize = 1024; |
890 char s[FormatBufferSize]; | 890 char s[FormatBufferSize]; |
891 result.appendLiteral("from "); | 891 result.append("from "); |
892 start().formatForDebugger(s, FormatBufferSize); | 892 start().formatForDebugger(s, FormatBufferSize); |
893 result.append(s); | 893 result.append(s); |
894 result.appendLiteral(" to "); | 894 result.append(" to "); |
895 end().formatForDebugger(s, FormatBufferSize); | 895 end().formatForDebugger(s, FormatBufferSize); |
896 result.append(s); | 896 result.append(s); |
897 } | 897 } |
898 | 898 |
899 strncpy(buffer, result.toString().utf8().data(), length - 1); | 899 strncpy(buffer, result.toString().utf8().data(), length - 1); |
900 } | 900 } |
901 | 901 |
902 template <typename Strategy> | 902 template <typename Strategy> |
903 void VisibleSelectionTemplate<Strategy>::showTreeForThis() const | 903 void VisibleSelectionTemplate<Strategy>::showTreeForThis() const |
904 { | 904 { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 { | 965 { |
966 sel.showTreeForThis(); | 966 sel.showTreeForThis(); |
967 } | 967 } |
968 | 968 |
969 void showTree(const blink::VisibleSelectionInFlatTree* sel) | 969 void showTree(const blink::VisibleSelectionInFlatTree* sel) |
970 { | 970 { |
971 if (sel) | 971 if (sel) |
972 sel->showTreeForThis(); | 972 sel->showTreeForThis(); |
973 } | 973 } |
974 #endif | 974 #endif |
OLD | NEW |