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

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

Issue 25754003: Refactoring: Removing unused variables and duplicate function call. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | Source/core/editing/ApplyStyleCommand.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 bool atEnd = false; 123 bool atEnd = false;
124 Position end; 124 Position end;
125 while (endOfCurrentParagraph != endAfterSelection && !atEnd) { 125 while (endOfCurrentParagraph != endAfterSelection && !atEnd) {
126 if (endOfCurrentParagraph.deepEquivalent() == m_endOfLastParagraph) 126 if (endOfCurrentParagraph.deepEquivalent() == m_endOfLastParagraph)
127 atEnd = true; 127 atEnd = true;
128 128
129 rangeForParagraphSplittingTextNodesIfNeeded(endOfCurrentParagraph, start , end); 129 rangeForParagraphSplittingTextNodesIfNeeded(endOfCurrentParagraph, start , end);
130 endOfCurrentParagraph = end; 130 endOfCurrentParagraph = end;
131 131
132 Position afterEnd = end.next();
133 Node* enclosingCell = enclosingNodeOfType(start, &isTableCell); 132 Node* enclosingCell = enclosingNodeOfType(start, &isTableCell);
134 VisiblePosition endOfNextParagraph = endOfNextParagrahSplittingTextNodes IfNeeded(endOfCurrentParagraph, start, end); 133 VisiblePosition endOfNextParagraph = endOfNextParagrahSplittingTextNodes IfNeeded(endOfCurrentParagraph, start, end);
135 134
136 formatRange(start, end, m_endOfLastParagraph, blockquoteForNextIndent); 135 formatRange(start, end, m_endOfLastParagraph, blockquoteForNextIndent);
137 136
138 // Don't put the next paragraph in the blockquote we just created for th is paragraph unless 137 // Don't put the next paragraph in the blockquote we just created for th is paragraph unless
139 // the next paragraph is in the same cell. 138 // the next paragraph is in the same cell.
140 if (enclosingCell && enclosingCell != enclosingNodeOfType(endOfNextParag raph.deepEquivalent(), &isTableCell)) 139 if (enclosingCell && enclosingCell != enclosingNodeOfType(endOfNextParag raph.deepEquivalent(), &isTableCell))
141 blockquoteForNextIndent = 0; 140 blockquoteForNextIndent = 0;
142 141
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 279
281 PassRefPtr<Element> ApplyBlockElementCommand::createBlockElement() const 280 PassRefPtr<Element> ApplyBlockElementCommand::createBlockElement() const
282 { 281 {
283 RefPtr<Element> element = createHTMLElement(document(), m_tagName); 282 RefPtr<Element> element = createHTMLElement(document(), m_tagName);
284 if (m_inlineStyle.length()) 283 if (m_inlineStyle.length())
285 element->setAttribute(styleAttr, m_inlineStyle); 284 element->setAttribute(styleAttr, m_inlineStyle);
286 return element.release(); 285 return element.release();
287 } 286 }
288 287
289 } 288 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/ApplyStyleCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698