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

Side by Side Diff: third_party/WebKit/Source/core/editing/EditingUtilities.cpp

Issue 2491703004: Replace roundedLayoutPoint with LayoutPoint (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Touch.cpp ('k') | third_party/WebKit/Source/core/events/MouseRelatedEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698