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

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

Issue 330383004: Oilpan: Introduce TempRangeScope to avoid needless Range attaches on Document. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments. Created 6 years, 6 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 if (isNone() || !node.inActiveDocument()) 322 if (isNone() || !node.inActiveDocument())
323 return; 323 return;
324 324
325 respondToNodeModification(node, removingNodeRemovesPosition(node, m_selectio n.base()), removingNodeRemovesPosition(node, m_selection.extent()), 325 respondToNodeModification(node, removingNodeRemovesPosition(node, m_selectio n.base()), removingNodeRemovesPosition(node, m_selection.extent()),
326 removingNodeRemovesPosition(node, m_selection.start()), removingNodeRemo vesPosition(node, m_selection.end())); 326 removingNodeRemovesPosition(node, m_selection.start()), removingNodeRemo vesPosition(node, m_selection.end()));
327 } 327 }
328 328
329 void FrameSelection::respondToNodeModification(Node& node, bool baseRemoved, boo l extentRemoved, bool startRemoved, bool endRemoved) 329 void FrameSelection::respondToNodeModification(Node& node, bool baseRemoved, boo l extentRemoved, bool startRemoved, bool endRemoved)
330 { 330 {
331 ASSERT(node.document().isActive()); 331 ASSERT(node.document().isActive());
332 TemporaryRangeScope scope;
yosin_UTC9 2014/06/25 01:22:20 It seems tempoary new Range object is created by |
Mads Ager (chromium) 2014/06/25 11:41:42 It seems that all the comparison logic is all hidd
332 333
333 bool clearRenderTreeSelection = false; 334 bool clearRenderTreeSelection = false;
334 bool clearDOMTreeSelection = false; 335 bool clearDOMTreeSelection = false;
335 336
336 if (startRemoved || endRemoved) { 337 if (startRemoved || endRemoved) {
337 Position start = m_selection.start(); 338 Position start = m_selection.start();
338 Position end = m_selection.end(); 339 Position end = m_selection.end();
339 if (startRemoved) 340 if (startRemoved)
340 updatePositionForNodeRemoval(start, node); 341 updatePositionForNodeRemoval(start, node);
341 if (endRemoved) 342 if (endRemoved)
(...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 sel.showTreeForThis(); 1888 sel.showTreeForThis();
1888 } 1889 }
1889 1890
1890 void showTree(const WebCore::FrameSelection* sel) 1891 void showTree(const WebCore::FrameSelection* sel)
1891 { 1892 {
1892 if (sel) 1893 if (sel)
1893 sel->showTreeForThis(); 1894 sel->showTreeForThis();
1894 } 1895 }
1895 1896
1896 #endif 1897 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698