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

Side by Side Diff: Source/core/editing/VisibleUnits.cpp

Issue 1259803008: Make nextLinePosition() not to use Position::deprecatedEditingOffset() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-03T15:19:27 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 | no next file » | 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, 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 * 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 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 if (box) { 1029 if (box) {
1030 root = box->root().nextRootBox(); 1030 root = box->root().nextRootBox();
1031 // We want to skip zero height boxes. 1031 // We want to skip zero height boxes.
1032 // This could happen in case it is a TrailingFloatsRootInlineBox. 1032 // This could happen in case it is a TrailingFloatsRootInlineBox.
1033 if (!root || !root->logicalHeight() || !root->firstLeafChild()) 1033 if (!root || !root->logicalHeight() || !root->firstLeafChild())
1034 root = 0; 1034 root = 0;
1035 } 1035 }
1036 1036
1037 if (!root) { 1037 if (!root) {
1038 // FIXME: We need do the same in previousLinePosition. 1038 // FIXME: We need do the same in previousLinePosition.
1039 Node* child = NodeTraversal::childAt(*node, p.deprecatedEditingOffset()) ; 1039 Node* child = NodeTraversal::childAt(*node, p.computeEditingOffset());
1040 node = child ? child : &NodeTraversal::lastWithinOrSelf(*node); 1040 node = child ? child : &NodeTraversal::lastWithinOrSelf(*node);
1041 Position position = nextRootInlineBoxCandidatePosition(node, visiblePosi tion, editableType); 1041 Position position = nextRootInlineBoxCandidatePosition(node, visiblePosi tion, editableType);
1042 if (position.isNotNull()) { 1042 if (position.isNotNull()) {
1043 RenderedPosition renderedPosition((VisiblePosition(position))); 1043 RenderedPosition renderedPosition((VisiblePosition(position)));
1044 root = renderedPosition.rootBox(); 1044 root = renderedPosition.rootBox();
1045 if (!root) 1045 if (!root)
1046 return VisiblePosition(position); 1046 return VisiblePosition(position);
1047 } 1047 }
1048 } 1048 }
1049 1049
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 HitTestRequest request = HitTestRequest::Move | HitTestRequest::ReadOnly | H itTestRequest::Active | HitTestRequest::IgnoreClipping; 1452 HitTestRequest request = HitTestRequest::Move | HitTestRequest::ReadOnly | H itTestRequest::Active | HitTestRequest::IgnoreClipping;
1453 HitTestResult result(request, contentsPoint); 1453 HitTestResult result(request, contentsPoint);
1454 frame->document()->layoutView()->hitTest(result); 1454 frame->document()->layoutView()->hitTest(result);
1455 1455
1456 if (Node* node = result.innerNode()) 1456 if (Node* node = result.innerNode())
1457 return frame->selection().selection().visiblePositionRespectingEditingBo undary(result.localPoint(), node); 1457 return frame->selection().selection().visiblePositionRespectingEditingBo undary(result.localPoint(), node);
1458 return VisiblePosition(); 1458 return VisiblePosition();
1459 } 1459 }
1460 1460
1461 } 1461 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698