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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // Example of affinity: | 62 // Example of affinity: |
63 // abc^def where "^" represent |Position| | 63 // abc^def where "^" represent |Position| |
64 // When above text line wrapped after "abc" | 64 // When above text line wrapped after "abc" |
65 // abc| UPSTREAM |VisiblePosition| | 65 // abc| UPSTREAM |VisiblePosition| |
66 // |def DOWNSTREAM |VisiblePosition| | 66 // |def DOWNSTREAM |VisiblePosition| |
67 // | 67 // |
68 // NOTE: UPSTREAM affinity will be used only if pos is at end of a wrapped line, | 68 // NOTE: UPSTREAM affinity will be used only if pos is at end of a wrapped line, |
69 // otherwise it will be converted to DOWNSTREAM. | 69 // otherwise it will be converted to DOWNSTREAM. |
70 template <typename Strategy> | 70 template <typename Strategy> |
71 class CORE_TEMPLATE_CLASS_EXPORT VisiblePositionTemplate final { | 71 class CORE_TEMPLATE_CLASS_EXPORT VisiblePositionTemplate final { |
72 DISALLOW_ALLOCATION(); | 72 DISALLOW_NEW(); |
73 public: | 73 public: |
74 VisiblePositionTemplate(); | 74 VisiblePositionTemplate(); |
75 | 75 |
76 // Node: Other than |createVisiblePosition()|, we should not use | 76 // Node: Other than |createVisiblePosition()|, we should not use |
77 // |create()|. | 77 // |create()|. |
78 static VisiblePositionTemplate create(const PositionWithAffinityTemplate<Str
ategy>&); | 78 static VisiblePositionTemplate create(const PositionWithAffinityTemplate<Str
ategy>&); |
79 | 79 |
80 // Intentionally delete |operator==()| and |operator!=()| for reducing | 80 // Intentionally delete |operator==()| and |operator!=()| for reducing |
81 // compilation error message. | 81 // compilation error message. |
82 // TODO(yosin) We'll have |equals()| when we have use cases of checking | 82 // TODO(yosin) We'll have |equals()| when we have use cases of checking |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 } // namespace blink | 129 } // namespace blink |
130 | 130 |
131 #ifndef NDEBUG | 131 #ifndef NDEBUG |
132 // Outside the WebCore namespace for ease of invocation from gdb. | 132 // Outside the WebCore namespace for ease of invocation from gdb. |
133 void showTree(const blink::VisiblePosition*); | 133 void showTree(const blink::VisiblePosition*); |
134 void showTree(const blink::VisiblePosition&); | 134 void showTree(const blink::VisiblePosition&); |
135 #endif | 135 #endif |
136 | 136 |
137 #endif // VisiblePosition_h | 137 #endif // VisiblePosition_h |
OLD | NEW |