https://bugs.webkit.org/show_bug.cgi?id=83535
Reviewed by Kentaro Hara.
No new tests / code cleanup only.
currentNode cannot be null within the loop body.
It is dereferenced before and after the removed line without checking.
Additionally I have added an assertion to express this loop invariant.
* editing/SimplifyMarkupCommand.cpp:
(WebCore::SimplifyMarkupCommand::doApply):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113737
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-04-10 Luke Macpherson <macpherson@chromium.org>
+
+ Remove unnecessary null check in void SimplifyMarkupCommand::doApply().
+ https://bugs.webkit.org/show_bug.cgi?id=83535
+
+ Reviewed by Kentaro Hara.
+
+ No new tests / code cleanup only.
+
+ currentNode cannot be null within the loop body.
+ It is dereferenced before and after the removed line without checking.
+ Additionally I have added an assertion to express this loop invariant.
+
+ * editing/SimplifyMarkupCommand.cpp:
+ (WebCore::SimplifyMarkupCommand::doApply):
+
2012-04-10 David Dorwin <ddorwin@chromium.org>
Add Encrypted Media Extensions methods to HTMLMediaElement
nodesToRemove.append(currentNode);
currentNode = currentNode->parentNode();
+ ASSERT(currentNode);
+
if (!currentNode->renderer() || !currentNode->renderer()->isRenderInline() || toRenderInline(currentNode->renderer())->alwaysCreateLineBoxes())
continue;
- if (currentNode && currentNode->firstChild() != currentNode->lastChild()) {
+ if (currentNode->firstChild() != currentNode->lastChild()) {
topNodeWithStartingStyle = 0;
break;
}