| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2008 Apple 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 DECLARE_TRACE(); | 105 DECLARE_TRACE(); |
| 106 | 106 |
| 107 #ifndef NDEBUG | 107 #ifndef NDEBUG |
| 108 void debugPosition(const char* msg = "") const; | 108 void debugPosition(const char* msg = "") const; |
| 109 void formatForDebugger(char* buffer, unsigned length) const; | 109 void formatForDebugger(char* buffer, unsigned length) const; |
| 110 void showTreeForThis() const; | 110 void showTreeForThis() const; |
| 111 #endif | 111 #endif |
| 112 | 112 |
| 113 private: | 113 private: |
| 114 void init(const Position&, EAffinity); | 114 void init(const Position&, EAffinity); |
| 115 Position canonicalPosition(const Position&); | |
| 116 | 115 |
| 117 Position leftVisuallyDistinctCandidate() const; | 116 Position leftVisuallyDistinctCandidate() const; |
| 118 Position rightVisuallyDistinctCandidate() const; | 117 Position rightVisuallyDistinctCandidate() const; |
| 119 | 118 |
| 120 Position m_deepPosition; | 119 Position m_deepPosition; |
| 121 EAffinity m_affinity; | 120 EAffinity m_affinity; |
| 122 }; | 121 }; |
| 123 | 122 |
| 124 // FIXME: This shouldn't ignore affinity. | 123 // FIXME: This shouldn't ignore affinity. |
| 125 inline bool operator==(const VisiblePosition& a, const VisiblePosition& b) | 124 inline bool operator==(const VisiblePosition& a, const VisiblePosition& b) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 144 | 143 |
| 145 } // namespace blink | 144 } // namespace blink |
| 146 | 145 |
| 147 #ifndef NDEBUG | 146 #ifndef NDEBUG |
| 148 // Outside the WebCore namespace for ease of invocation from gdb. | 147 // Outside the WebCore namespace for ease of invocation from gdb. |
| 149 void showTree(const blink::VisiblePosition*); | 148 void showTree(const blink::VisiblePosition*); |
| 150 void showTree(const blink::VisiblePosition&); | 149 void showTree(const blink::VisiblePosition&); |
| 151 #endif | 150 #endif |
| 152 | 151 |
| 153 #endif // VisiblePosition_h | 152 #endif // VisiblePosition_h |
| OLD | NEW |