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

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

Issue 16415002: Remove some unused variable assignments (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: reduce scope of endOffset Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/editing/ReplaceSelectionCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/ApplyStyleCommand.cpp
diff --git a/Source/core/editing/ApplyStyleCommand.cpp b/Source/core/editing/ApplyStyleCommand.cpp
index 1929775ec3b7519e5cef479c717fd7a6d3b77552..53ba1cd829e3c1590c636959a8d5b60405bba579 100644
--- a/Source/core/editing/ApplyStyleCommand.cpp
+++ b/Source/core/editing/ApplyStyleCommand.cpp
@@ -1292,18 +1292,16 @@ bool ApplyStyleCommand::mergeStartWithPreviousIfIdentical(const Position& start,
bool ApplyStyleCommand::mergeEndWithNextIfIdentical(const Position& start, const Position& end)
{
Node* endNode = end.containerNode();
- int endOffset = end.computeOffsetInContainerNode();
if (isAtomicNode(endNode)) {
+ int endOffset = end.computeOffsetInContainerNode();
if (offsetIsBeforeLastNodeOffset(endOffset, endNode))
return false;
- unsigned parentLastOffset = end.deprecatedNode()->parentNode()->childNodes()->length() - 1;
if (end.deprecatedNode()->nextSibling())
return false;
endNode = end.deprecatedNode()->parentNode();
- endOffset = parentLastOffset;
}
if (!endNode->isElementNode() || endNode->hasTagName(brTag))
« no previous file with comments | « no previous file | Source/core/editing/ReplaceSelectionCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698