Title: [113737] trunk/Source/WebCore
- Revision
- 113737
- Author
- macpher...@chromium.org
- Date
- 2012-04-10 11:10:45 -0700 (Tue, 10 Apr 2012)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (113736 => 113737)
--- trunk/Source/WebCore/ChangeLog 2012-04-10 17:47:50 UTC (rev 113736)
+++ trunk/Source/WebCore/ChangeLog 2012-04-10 18:10:45 UTC (rev 113737)
@@ -1,3 +1,19 @@
+2012-04-10 Luke Macpherson <macpher...@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 <ddor...@chromium.org>
Add Encrypted Media Extensions methods to HTMLMediaElement
Modified: trunk/Source/WebCore/editing/SimplifyMarkupCommand.cpp (113736 => 113737)
--- trunk/Source/WebCore/editing/SimplifyMarkupCommand.cpp 2012-04-10 17:47:50 UTC (rev 113736)
+++ trunk/Source/WebCore/editing/SimplifyMarkupCommand.cpp 2012-04-10 18:10:45 UTC (rev 113737)
@@ -62,10 +62,12 @@
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;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes