[Webkit-unassigned] [Bug 43354] Potential Null Crasher in ReplaceSelectionCommand

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 25 00:07:36 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=43354


Ryosuke Niwa <rniwa at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #4 from Ryosuke Niwa <rniwa at webkit.org>  2012-05-25 00:06:40 PST ---
Node* blockStart = enclosingBlock(insertionPos.deprecatedNode());

But 

bool isBlock(const Node* node)
{
    return node && node->renderer() && !node->renderer()->isInline() && !node->renderer()->isRubyText();
}

Element* enclosingBlock(Node* node, EditingBoundaryCrossingRule rule)
{
    Node* enclosingNode = enclosingNodeOfType(firstPositionInOrBeforeNode(node), isBlock, rule);
    return enclosingNode && enclosingNode->isElementNode() ? toElement(enclosingNode) : 0;
}

So this can never cause a crash.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list