[webkit-reviews] review granted: [Bug 26133] Adapt and import py-dom-xpath tests : [Attachment 30869] proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 2 10:27:37 PDT 2009


Sam Weinig <sam at webkit.org> has granted Alexey Proskuryakov <ap at webkit.org>'s
request for review:
Bug 26133: Adapt and import py-dom-xpath tests
https://bugs.webkit.org/show_bug.cgi?id=26133

Attachment 30869: proposed patch
https://bugs.webkit.org/attachment.cgi?id=30869&action=review

------- Additional Comments from Sam Weinig <sam at webkit.org>
> +	   Fix bugs found with this test suite:
> +	   - name and local-name were incorrect for processing instructions
(XPath expanded-name
> +	   doesn't match DOM exactly);
> +	   - name, local-name and namespace functions sould crash on attribute
nodes;

Typo: "sould"

> +	   which doesn't match anything available via DOM exactly. Calculate
the expanded name properly.
> +	   (WebCore::XPath::FunNamespaceURI::evaluate): This function could
crash if used with an
> +	   attribute node, because it released what was possibly the only
reference to attribute node
> +	   before using it. Changed the fucntion to avoid such situation.

Typo: "fucntion"

> +
> +	       // String::toDouble() supports exponential notation, which is
not allowed in XPath.
> +	       unsigned len = str.length();
> +	       for (unsigned i = 0; i < len; ++i) {
> +		   UChar c = str[i];
> +		   if ((c < '0' || c > '9') && c != '.'  && c != '-')

Can we use isASCIIDigit here?


r=me


More information about the webkit-reviews mailing list