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

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

Issue 20294002: Fix trailing whitespace in .cpp, .h, and .idl files (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 5 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/IndentOutdentCommand.h ('k') | Source/core/editing/InsertIntoTextNodeCommand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/IndentOutdentCommand.cpp
diff --git a/Source/core/editing/IndentOutdentCommand.cpp b/Source/core/editing/IndentOutdentCommand.cpp
index 348f012b6f6f50e0b3259c33643db8b3f5a4993e..da3dbb63ab3a394d7ba2e1c5b95b095aa7aa8a97 100644
--- a/Source/core/editing/IndentOutdentCommand.cpp
+++ b/Source/core/editing/IndentOutdentCommand.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -64,7 +64,7 @@ bool IndentOutdentCommand::tryIndentingAsListItem(const Position& start, const P
// FIXME: we need to deal with the case where there is no li (malformed HTML)
if (!selectedListItem->hasTagName(liTag))
return false;
-
+
// FIXME: previousElementSibling does not ignore non-rendered content like <span></span>. Should we?
Element* previousList = selectedListItem->previousElementSibling();
Element* nextList = selectedListItem->nextElementSibling();
@@ -126,13 +126,13 @@ void IndentOutdentCommand::outdentParagraph()
// Use InsertListCommand to remove the selection from the list
if (enclosingNode->hasTagName(olTag)) {
applyCommandToComposite(InsertListCommand::create(document(), InsertListCommand::OrderedList));
- return;
+ return;
}
if (enclosingNode->hasTagName(ulTag)) {
applyCommandToComposite(InsertListCommand::create(document(), InsertListCommand::UnorderedList));
return;
}
-
+
// The selection is inside a blockquote i.e. enclosingNode is a blockquote
VisiblePosition positionInEnclosingBlock = VisiblePosition(firstPositionInNode(enclosingNode));
// If the blockquote is inline, the start of the enclosing block coincides with
@@ -189,7 +189,7 @@ void IndentOutdentCommand::outdentRegion(const VisiblePosition& startOfSelection
outdentParagraph();
return;
}
-
+
Position originalSelectionEnd = endingSelection().end();
VisiblePosition endOfCurrentParagraph = endOfParagraph(startOfSelection);
VisiblePosition endAfterSelection = endOfParagraph(endOfParagraph(endOfSelection).next());
@@ -200,15 +200,15 @@ void IndentOutdentCommand::outdentRegion(const VisiblePosition& startOfSelection
setEndingSelection(VisibleSelection(originalSelectionEnd, DOWNSTREAM));
else
setEndingSelection(endOfCurrentParagraph);
-
+
outdentParagraph();
-
+
// outdentParagraph could move more than one paragraph if the paragraph
// is in a list item. As a result, endAfterSelection and endOfNextParagraph
// could refer to positions no longer in the document.
if (endAfterSelection.isNotNull() && !endAfterSelection.deepEquivalent().anchorNode()->inDocument())
break;
-
+
if (endOfNextParagraph.isNotNull() && !endOfNextParagraph.deepEquivalent().anchorNode()->inDocument()) {
endOfCurrentParagraph = endingSelection().end();
endOfNextParagraph = endOfParagraph(endOfCurrentParagraph.next());
« no previous file with comments | « Source/core/editing/IndentOutdentCommand.h ('k') | Source/core/editing/InsertIntoTextNodeCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698