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

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

Issue 1285233004: Get rid of a redundant argument DOWNSTREAM from VisiblePosition constructor call sites (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-19T12:36:19 Rebase 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 | « Source/core/editing/EditingUtilities.cpp ('k') | Source/core/editing/SelectionController.cpp » ('j') | 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) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 { 248 {
249 Node* startContainer = range.startPosition().computeContainerNode(); 249 Node* startContainer = range.startPosition().computeContainerNode();
250 Node* endContainer = range.endPosition().computeContainerNode(); 250 Node* endContainer = range.endPosition().computeContainerNode();
251 if (!startContainer || !endContainer) 251 if (!startContainer || !endContainer)
252 return false; 252 return false;
253 253
254 if (!startContainer->hasEditableStyle() || !endContainer->hasEditableStyle() ) 254 if (!startContainer->hasEditableStyle() || !endContainer->hasEditableStyle() )
255 return false; 255 return false;
256 256
257 if (range.isCollapsed()) { 257 if (range.isCollapsed()) {
258 VisiblePosition start(range.startPosition(), DOWNSTREAM); 258 VisiblePosition start(range.startPosition());
259 VisiblePosition previous = start.previous(); 259 VisiblePosition previous = start.previous();
260 // FIXME: We sometimes allow deletions at the start of editable roots, l ike when the caret is in an empty list item. 260 // FIXME: We sometimes allow deletions at the start of editable roots, l ike when the caret is in an empty list item.
261 if (previous.isNull() || previous.deepEquivalent().anchorNode()->rootEdi tableElement() != startContainer->rootEditableElement()) 261 if (previous.isNull() || previous.deepEquivalent().anchorNode()->rootEdi tableElement() != startContainer->rootEditableElement())
262 return false; 262 return false;
263 } 263 }
264 return true; 264 return true;
265 } 265 }
266 266
267 bool Editor::smartInsertDeleteEnabled() const 267 bool Editor::smartInsertDeleteEnabled() const
268 { 268 {
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 } 1296 }
1297 1297
1298 DEFINE_TRACE(Editor) 1298 DEFINE_TRACE(Editor)
1299 { 1299 {
1300 visitor->trace(m_frame); 1300 visitor->trace(m_frame);
1301 visitor->trace(m_lastEditCommand); 1301 visitor->trace(m_lastEditCommand);
1302 visitor->trace(m_mark); 1302 visitor->trace(m_mark);
1303 } 1303 }
1304 1304
1305 } // namespace blink 1305 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/editing/EditingUtilities.cpp ('k') | Source/core/editing/SelectionController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698