| 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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 | 800 |
| 801 fprintf(stderr, "isDirectional=%s\n", isDirectional() ? "true" : "false"); | 801 fprintf(stderr, "isDirectional=%s\n", isDirectional() ? "true" : "false"); |
| 802 fprintf(stderr, "affinity=%s\n", affinity() == TextAffinity::Downstream ? "D
OWNSTREaM" : affinity() == TextAffinity::Upstream ? "UPSTREAM" : "UNKNOWN"); | 802 fprintf(stderr, "affinity=%s\n", affinity() == TextAffinity::Downstream ? "D
OWNSTREaM" : affinity() == TextAffinity::Upstream ? "UPSTREAM" : "UNKNOWN"); |
| 803 fprintf(stderr, "================================\n"); | 803 fprintf(stderr, "================================\n"); |
| 804 } | 804 } |
| 805 | 805 |
| 806 template <typename Strategy> | 806 template <typename Strategy> |
| 807 void VisibleSelectionTemplate<Strategy>::showTreeForThis() const | 807 void VisibleSelectionTemplate<Strategy>::showTreeForThis() const |
| 808 { | 808 { |
| 809 if (start().anchorNode()) { | 809 if (start().anchorNode()) { |
| 810 start().anchorNode()->showTreeAndMark(start().anchorNode(), "S", end().a
nchorNode(), "E"); | 810 // TODO(tkent): Replace WTFLogAlways with something else. |
| 811 WTFLogAlways("%s", start().anchorNode()->toMarkedTreeString(start().anch
orNode(), "S", end().anchorNode(), "E").utf8().data()); |
| 811 fputs("start: ", stderr); | 812 fputs("start: ", stderr); |
| 812 start().showAnchorTypeAndOffset(); | 813 start().showAnchorTypeAndOffset(); |
| 813 fputs("end: ", stderr); | 814 fputs("end: ", stderr); |
| 814 end().showAnchorTypeAndOffset(); | 815 end().showAnchorTypeAndOffset(); |
| 815 } | 816 } |
| 816 } | 817 } |
| 817 | 818 |
| 818 #endif | 819 #endif |
| 819 | 820 |
| 820 template <typename Strategy> | 821 template <typename Strategy> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 { | 870 { |
| 870 sel.showTreeForThis(); | 871 sel.showTreeForThis(); |
| 871 } | 872 } |
| 872 | 873 |
| 873 void showTree(const blink::VisibleSelectionInFlatTree* sel) | 874 void showTree(const blink::VisibleSelectionInFlatTree* sel) |
| 874 { | 875 { |
| 875 if (sel) | 876 if (sel) |
| 876 sel->showTreeForThis(); | 877 sel->showTreeForThis(); |
| 877 } | 878 } |
| 878 #endif | 879 #endif |
| OLD | NEW |