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

Unified Diff: Source/core/editing/DeleteSelectionCommand.cpp

Issue 189773005: Revert of Have Position deal with more references (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/FormatBlockCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/DeleteSelectionCommand.cpp
diff --git a/Source/core/editing/DeleteSelectionCommand.cpp b/Source/core/editing/DeleteSelectionCommand.cpp
index 2209f90e16f89616fad9613a33287b2e1dd22c98..459fe2f2c787627401d15fe302a421b8dfab9a4e 100644
--- a/Source/core/editing/DeleteSelectionCommand.cpp
+++ b/Source/core/editing/DeleteSelectionCommand.cpp
@@ -112,9 +112,9 @@
// For HRs, we'll get a position at (HR,1) when hitting delete from the beginning of the previous line, or (HR,0) when forward deleting,
// but in these cases, we want to delete it, so manually expand the selection
if (start.deprecatedNode()->hasTagName(hrTag))
- start = positionBeforeNode(*start.deprecatedNode());
+ start = positionBeforeNode(start.deprecatedNode());
else if (end.deprecatedNode()->hasTagName(hrTag))
- end = positionAfterNode(*end.deprecatedNode());
+ end = positionAfterNode(end.deprecatedNode());
// FIXME: This is only used so that moveParagraphs can avoid the bugs in special element expansion.
if (!m_expandForSpecialElements)
@@ -315,7 +315,7 @@
// FIXME: This code doesn't belong in here.
// We detect the case where the start is an empty line consisting of BR not wrapped in a block element.
- if (upstreamStartIsBR && downstreamStartIsBR && !(isStartOfBlock(VisiblePosition(positionBeforeNode(*nodeAfterUpstreamStart))) && isEndOfBlock(VisiblePosition(positionAfterNode(*nodeAfterUpstreamStart))))) {
+ if (upstreamStartIsBR && downstreamStartIsBR && !(isStartOfBlock(VisiblePosition(positionBeforeNode(nodeAfterUpstreamStart))) && isEndOfBlock(VisiblePosition(positionAfterNode(nodeAfterUpstreamStart))))) {
m_startsAtEmptyLine = true;
m_endingPosition = m_downstreamEnd;
}
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/FormatBlockCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698