| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, 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 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 ASSERT(m_changeObserver); | 754 ASSERT(m_changeObserver); |
| 755 m_changeObserver = nullptr; | 755 m_changeObserver = nullptr; |
| 756 } | 756 } |
| 757 | 757 |
| 758 void VisibleSelection::didChange() | 758 void VisibleSelection::didChange() |
| 759 { | 759 { |
| 760 if (m_changeObserver) | 760 if (m_changeObserver) |
| 761 m_changeObserver->didChangeVisibleSelection(); | 761 m_changeObserver->didChangeVisibleSelection(); |
| 762 } | 762 } |
| 763 | 763 |
| 764 void VisibleSelection::trace(Visitor* visitor) | |
| 765 { | |
| 766 visitor->trace(m_base); | |
| 767 visitor->trace(m_extent); | |
| 768 visitor->trace(m_start); | |
| 769 visitor->trace(m_end); | |
| 770 visitor->trace(m_changeObserver); | |
| 771 } | |
| 772 | |
| 773 static bool isValidPosition(const Position& position) | 764 static bool isValidPosition(const Position& position) |
| 774 { | 765 { |
| 775 if (!position.inDocument()) | 766 if (!position.inDocument()) |
| 776 return false; | 767 return false; |
| 777 | 768 |
| 778 if (position.anchorType() != Position::PositionIsOffsetInAnchor) | 769 if (position.anchorType() != Position::PositionIsOffsetInAnchor) |
| 779 return true; | 770 return true; |
| 780 | 771 |
| 781 if (position.offsetInContainerNode() < 0) | 772 if (position.offsetInContainerNode() < 0) |
| 782 return false; | 773 return false; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 sel.showTreeForThis(); | 847 sel.showTreeForThis(); |
| 857 } | 848 } |
| 858 | 849 |
| 859 void showTree(const blink::VisibleSelection* sel) | 850 void showTree(const blink::VisibleSelection* sel) |
| 860 { | 851 { |
| 861 if (sel) | 852 if (sel) |
| 862 sel->showTreeForThis(); | 853 sel->showTreeForThis(); |
| 863 } | 854 } |
| 864 | 855 |
| 865 #endif | 856 #endif |
| OLD | NEW |