Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Side by Side Diff: Source/core/editing/Position.h

Issue 1288063008: Move parentEditingBoundary() to VisibileUnits.cpp from Position.cpp. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-20T22:51:43 Rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/editing/Position.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 int m_offset; 231 int m_offset;
232 PositionAnchorType m_anchorType; 232 PositionAnchorType m_anchorType;
233 }; 233 };
234 234
235 extern template class CORE_EXTERN_TEMPLATE_EXPORT PositionAlgorithm<EditingStrat egy>; 235 extern template class CORE_EXTERN_TEMPLATE_EXPORT PositionAlgorithm<EditingStrat egy>;
236 extern template class CORE_EXTERN_TEMPLATE_EXPORT PositionAlgorithm<EditingInCom posedTreeStrategy>; 236 extern template class CORE_EXTERN_TEMPLATE_EXPORT PositionAlgorithm<EditingInCom posedTreeStrategy>;
237 237
238 using Position = PositionAlgorithm<EditingStrategy>; 238 using Position = PositionAlgorithm<EditingStrategy>;
239 using PositionInComposedTree = PositionAlgorithm<EditingInComposedTreeStrategy>; 239 using PositionInComposedTree = PositionAlgorithm<EditingInComposedTreeStrategy>;
240 240
241 // TODO(yosin) We should make |parentEditingBoundary()| as static function
242 // in "VisibleUnits.cpp", since it is used only there.
243 CORE_EXPORT Node* parentEditingBoundary(const Position&);
244 CORE_EXPORT Node* parentEditingBoundary(const PositionInComposedTree&);
245
246 template <typename Strategy> 241 template <typename Strategy>
247 bool operator==(const PositionAlgorithm<Strategy>& a, const PositionAlgorithm<St rategy>& b) 242 bool operator==(const PositionAlgorithm<Strategy>& a, const PositionAlgorithm<St rategy>& b)
248 { 243 {
249 if (a.isNull()) 244 if (a.isNull())
250 return b.isNull(); 245 return b.isNull();
251 246
252 if (a.anchorNode() != b.anchorNode() || a.anchorType() != b.anchorType()) 247 if (a.anchorNode() != b.anchorNode() || a.anchorType() != b.anchorType())
253 return false; 248 return false;
254 249
255 if (!a.isOffsetInAnchor()) { 250 if (!a.isOffsetInAnchor()) {
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 438
444 } // namespace blink 439 } // namespace blink
445 440
446 #ifndef NDEBUG 441 #ifndef NDEBUG
447 // Outside the WebCore namespace for ease of invocation from gdb. 442 // Outside the WebCore namespace for ease of invocation from gdb.
448 void showTree(const blink::Position&); 443 void showTree(const blink::Position&);
449 void showTree(const blink::Position*); 444 void showTree(const blink::Position*);
450 #endif 445 #endif
451 446
452 #endif // Position_h 447 #endif // Position_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/Position.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698