OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 enum class PositionAnchorType : unsigned { | 45 enum class PositionAnchorType : unsigned { |
46 kOffsetInAnchor, | 46 kOffsetInAnchor, |
47 kBeforeAnchor, | 47 kBeforeAnchor, |
48 kAfterAnchor, | 48 kAfterAnchor, |
49 kBeforeChildren, | 49 kBeforeChildren, |
50 kAfterChildren, | 50 kAfterChildren, |
51 }; | 51 }; |
52 | 52 |
53 // Instances of |PositionTemplate<Strategy>| are immutable. | 53 // Instances of |PositionTemplate<Strategy>| are immutable. |
| 54 // TODO(editing-dev): Make constructor of |PositionTemplate| take |const Node*|. |
54 template <typename Strategy> | 55 template <typename Strategy> |
55 class CORE_TEMPLATE_CLASS_EXPORT PositionTemplate { | 56 class CORE_TEMPLATE_CLASS_EXPORT PositionTemplate { |
56 DISALLOW_NEW(); | 57 DISALLOW_NEW(); |
57 | 58 |
58 public: | 59 public: |
59 PositionTemplate() | 60 PositionTemplate() |
60 : offset_(0), anchor_type_(PositionAnchorType::kOffsetInAnchor) {} | 61 : offset_(0), anchor_type_(PositionAnchorType::kOffsetInAnchor) {} |
61 | 62 |
62 static const TreeScope* CommonAncestorTreeScope( | 63 static const TreeScope* CommonAncestorTreeScope( |
63 const PositionTemplate<Strategy>&, | 64 const PositionTemplate<Strategy>&, |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 278 |
278 } // namespace blink | 279 } // namespace blink |
279 | 280 |
280 #ifndef NDEBUG | 281 #ifndef NDEBUG |
281 // Outside the WebCore namespace for ease of invocation from gdb. | 282 // Outside the WebCore namespace for ease of invocation from gdb. |
282 void showTree(const blink::Position&); | 283 void showTree(const blink::Position&); |
283 void showTree(const blink::Position*); | 284 void showTree(const blink::Position*); |
284 #endif | 285 #endif |
285 | 286 |
286 #endif // Position_h | 287 #endif // Position_h |
OLD | NEW |