[webkit-reviews] review granted: [Bug 23389] Clean up ApplyStyleCommand and deploy a bit more PassRefPtr : [Attachment 26807] Small cleanups

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 16 14:43:21 PST 2009

Justin Garcia <justin.garcia at apple.com> has granted Eric Seidel
<eric at webkit.org>'s request for review:
Bug 23389: Clean up ApplyStyleCommand and deploy a bit more PassRefPtr

Attachment 26807: Small cleanups

------- Additional Comments from Justin Garcia <justin.garcia at apple.com>
-    if (styleChange.applyBold()) {
-	 RefPtr<Element> boldElement =
document()->createElementNS(xhtmlNamespaceURI, "b", ec);
-	 ASSERT(ec == 0);
-	 insertNodeBefore(boldElement.get(), startNode);
-	 surroundNodeRangeWithElement(startNode, endNode, boldElement.get());
-    }
+    if (styleChange.applyBold())
+	 surroundNodeRangeWithElement(startNode, endNode,
document()->createElementNS(xhtmlNamespaceURI, "b", ec));

You no longer ASSERT that createElementNS completed without error, I suppose if
it encounters an error it will return 0 and that will be caught by
surroundNodeRangeWithElement, ya?


More information about the webkit-reviews mailing list