| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 3 * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved. | 3 * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 return prev; | 630 return prev; |
| 631 | 631 |
| 632 return next; | 632 return next; |
| 633 } | 633 } |
| 634 | 634 |
| 635 Position canonicalPositionOf(const Position& position) | 635 Position canonicalPositionOf(const Position& position) |
| 636 { | 636 { |
| 637 return canonicalPosition(position); | 637 return canonicalPosition(position); |
| 638 } | 638 } |
| 639 | 639 |
| 640 PositionInComposedTree canonicalPositionOf(const PositionInComposedTree& positio
n) |
| 641 { |
| 642 return canonicalPosition(position); |
| 643 } |
| 644 |
| 640 template<typename PositionType> | 645 template<typename PositionType> |
| 641 void VisiblePosition::init(const PositionType& position, EAffinity affinity) | 646 void VisiblePosition::init(const PositionType& position, EAffinity affinity) |
| 642 { | 647 { |
| 643 m_affinity = affinity; | 648 m_affinity = affinity; |
| 644 | 649 |
| 645 m_deepPosition = canonicalPosition(position); | 650 m_deepPosition = canonicalPosition(position); |
| 646 | 651 |
| 647 if (m_affinity != UPSTREAM) | 652 if (m_affinity != UPSTREAM) |
| 648 return; | 653 return; |
| 649 | 654 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 else | 830 else |
| 826 fprintf(stderr, "Cannot showTree for (nil) VisiblePosition.\n"); | 831 fprintf(stderr, "Cannot showTree for (nil) VisiblePosition.\n"); |
| 827 } | 832 } |
| 828 | 833 |
| 829 void showTree(const blink::VisiblePosition& vpos) | 834 void showTree(const blink::VisiblePosition& vpos) |
| 830 { | 835 { |
| 831 vpos.showTreeForThis(); | 836 vpos.showTreeForThis(); |
| 832 } | 837 } |
| 833 | 838 |
| 834 #endif | 839 #endif |
| OLD | NEW |