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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp

Issue 1997563002: Get rid of a redundant function alias positionBeforeNode() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-05-19T22:35:34 rebase Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008 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 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 // Only move forward if there's nothing before the caret, or if there's unqu oted content before it. 1478 // Only move forward if there's nothing before the caret, or if there's unqu oted content before it.
1479 if (enclosingNodeOfType(previous.deepEquivalent(), &isMailHTMLBlockquoteElem ent)) 1479 if (enclosingNodeOfType(previous.deepEquivalent(), &isMailHTMLBlockquoteElem ent))
1480 return false; 1480 return false;
1481 1481
1482 HTMLBRElement* br = HTMLBRElement::create(document()); 1482 HTMLBRElement* br = HTMLBRElement::create(document());
1483 // We want to replace this quoted paragraph with an unquoted one, so insert a br 1483 // We want to replace this quoted paragraph with an unquoted one, so insert a br
1484 // to hold the caret before the highest blockquote. 1484 // to hold the caret before the highest blockquote.
1485 insertNodeBefore(br, highestBlockquote, editingState); 1485 insertNodeBefore(br, highestBlockquote, editingState);
1486 if (editingState->isAborted()) 1486 if (editingState->isAborted())
1487 return false; 1487 return false;
1488 VisiblePosition atBR = createVisiblePosition(positionBeforeNode(br)); 1488 VisiblePosition atBR = createVisiblePosition(Position::beforeNode(br));
1489 // If the br we inserted collapsed, for example foo<br><blockquote>...</bloc kquote>, insert 1489 // If the br we inserted collapsed, for example foo<br><blockquote>...</bloc kquote>, insert
1490 // a second one. 1490 // a second one.
1491 if (!isStartOfParagraph(atBR)) { 1491 if (!isStartOfParagraph(atBR)) {
1492 insertNodeBefore(HTMLBRElement::create(document()), br, editingState); 1492 insertNodeBefore(HTMLBRElement::create(document()), br, editingState);
1493 if (editingState->isAborted()) 1493 if (editingState->isAborted())
1494 return false; 1494 return false;
1495 } 1495 }
1496 setEndingSelection(VisibleSelection(atBR, endingSelection().isDirectional()) ); 1496 setEndingSelection(VisibleSelection(atBR, endingSelection().isDirectional()) );
1497 1497
1498 // If this is an empty paragraph there must be a line break here. 1498 // If this is an empty paragraph there must be a line break here.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1617 } 1617 }
1618 1618
1619 DEFINE_TRACE(CompositeEditCommand) 1619 DEFINE_TRACE(CompositeEditCommand)
1620 { 1620 {
1621 visitor->trace(m_commands); 1621 visitor->trace(m_commands);
1622 visitor->trace(m_composition); 1622 visitor->trace(m_composition);
1623 EditCommand::trace(visitor); 1623 EditCommand::trace(visitor);
1624 } 1624 }
1625 1625
1626 } // namespace blink 1626 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698