| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007 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 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1689 | 1689 |
| 1690 LayoutPoint selectionEndPoint = localPoint; | 1690 LayoutPoint selectionEndPoint = localPoint; |
| 1691 Element* editableElement = rootEditableElementOf(position); | 1691 Element* editableElement = rootEditableElementOf(position); |
| 1692 | 1692 |
| 1693 if (editableElement && !editableElement->contains(targetNode)) { | 1693 if (editableElement && !editableElement->contains(targetNode)) { |
| 1694 if (!editableElement->layoutObject()) | 1694 if (!editableElement->layoutObject()) |
| 1695 return PositionWithAffinity(); | 1695 return PositionWithAffinity(); |
| 1696 | 1696 |
| 1697 FloatPoint absolutePoint = targetNode->layoutObject()->localToAbsolute( | 1697 FloatPoint absolutePoint = targetNode->layoutObject()->localToAbsolute( |
| 1698 FloatPoint(selectionEndPoint)); | 1698 FloatPoint(selectionEndPoint)); |
| 1699 selectionEndPoint = roundedLayoutPoint( | 1699 selectionEndPoint = LayoutPoint( |
| 1700 editableElement->layoutObject()->absoluteToLocal(absolutePoint)); | 1700 editableElement->layoutObject()->absoluteToLocal(absolutePoint)); |
| 1701 targetNode = editableElement; | 1701 targetNode = editableElement; |
| 1702 } | 1702 } |
| 1703 | 1703 |
| 1704 return targetNode->layoutObject()->positionForPoint(selectionEndPoint); | 1704 return targetNode->layoutObject()->positionForPoint(selectionEndPoint); |
| 1705 } | 1705 } |
| 1706 | 1706 |
| 1707 void updatePositionForNodeRemoval(Position& position, Node& node) { | 1707 void updatePositionForNodeRemoval(Position& position, Node& node) { |
| 1708 if (position.isNull()) | 1708 if (position.isNull()) |
| 1709 return; | 1709 return; |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2105 return InputType::DeleteWordBackward; | 2105 return InputType::DeleteWordBackward; |
| 2106 if (granularity == LineBoundary) | 2106 if (granularity == LineBoundary) |
| 2107 return InputType::DeleteLineBackward; | 2107 return InputType::DeleteLineBackward; |
| 2108 return InputType::DeleteContentBackward; | 2108 return InputType::DeleteContentBackward; |
| 2109 default: | 2109 default: |
| 2110 return InputType::None; | 2110 return InputType::None; |
| 2111 } | 2111 } |
| 2112 } | 2112 } |
| 2113 | 2113 |
| 2114 } // namespace blink | 2114 } // namespace blink |
| OLD | NEW |