[webkit-reviews] review denied: [Bug 83438] querySelectorAll unable to find SVG camelCase elements imported into HTML : [Attachment 177850] Patch V3
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 5 16:27:35 PST 2012
Antti Koivisto <koivisto at iki.fi> has denied Alexandru Chiculita
<achicu at adobe.com>'s request for review:
Bug 83438: querySelectorAll unable to find SVG camelCase elements imported into
HTML
https://bugs.webkit.org/show_bug.cgi?id=83438
Attachment 177850: Patch V3
https://bugs.webkit.org/attachment.cgi?id=177850&action=review
------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
View in context: https://bugs.webkit.org/attachment.cgi?id=177850&action=review
> Source/WebCore/css/SelectorChecker.h:208
> - const AtomicString& localName = selector->tag().localName();
> - if (localName != starAtom && localName != element->localName())
> - return false;
> + const QualifiedName& selectorTag = selector->tag();
> + if (selectorTag.localName() != starAtom) {
> + if (element->document()->isHTMLDocument()) {
> + // All elements inside HTML documents will use case-insensitive
matching.
> + // That applies even to SVG and MathML elements embedded in
HTML. Other browsers
> + // match SVG using case-sensitive comparison, but WebKit has
always
> + // supported case-insensitive matching and we need to preserve
that behavior
> + // for backwards compatibility reasons.
> + if (selectorTag.localNameUpper() !=
element->tagQName().localNameUpper())
> + return false;
> + } else {
> + // XML based documents (XHTML and SVG) need to use case
sensitive matching.
> + if (selectorTag.localName() != element->tagQName().localName())
> + return false;
> + }
> + }
The code path here is very hot and this seems certain to regress performance. I
think you need to find more efficient ways to handle these rare edge cases.
More information about the webkit-reviews
mailing list