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

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

Issue 182383012: Have positionInParentBeforeNode() / positionInParentAfterNode() take a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2008, 2009, 2010 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 { 318 {
319 ASSERT(node.document().isActive()); 319 ASSERT(node.document().isActive());
320 320
321 bool clearRenderTreeSelection = false; 321 bool clearRenderTreeSelection = false;
322 bool clearDOMTreeSelection = false; 322 bool clearDOMTreeSelection = false;
323 323
324 if (startRemoved || endRemoved) { 324 if (startRemoved || endRemoved) {
325 Position start = m_selection.start(); 325 Position start = m_selection.start();
326 Position end = m_selection.end(); 326 Position end = m_selection.end();
327 if (startRemoved) 327 if (startRemoved)
328 updatePositionForNodeRemoval(start, &node); 328 updatePositionForNodeRemoval(start, node);
329 if (endRemoved) 329 if (endRemoved)
330 updatePositionForNodeRemoval(end, &node); 330 updatePositionForNodeRemoval(end, node);
331 331
332 if (start.isNotNull() && end.isNotNull()) { 332 if (start.isNotNull() && end.isNotNull()) {
333 if (m_selection.isBaseFirst()) 333 if (m_selection.isBaseFirst())
334 m_selection.setWithoutValidation(start, end); 334 m_selection.setWithoutValidation(start, end);
335 else 335 else
336 m_selection.setWithoutValidation(end, start); 336 m_selection.setWithoutValidation(end, start);
337 } else 337 } else
338 clearDOMTreeSelection = true; 338 clearDOMTreeSelection = true;
339 339
340 clearRenderTreeSelection = true; 340 clearRenderTreeSelection = true;
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 sel.showTreeForThis(); 1830 sel.showTreeForThis();
1831 } 1831 }
1832 1832
1833 void showTree(const WebCore::FrameSelection* sel) 1833 void showTree(const WebCore::FrameSelection* sel)
1834 { 1834 {
1835 if (sel) 1835 if (sel)
1836 sel->showTreeForThis(); 1836 sel->showTreeForThis();
1837 } 1837 }
1838 1838
1839 #endif 1839 #endif
OLDNEW
« no previous file with comments | « Source/core/editing/FormatBlockCommand.cpp ('k') | Source/core/editing/IndentOutdentCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698