haikuwebkit/LayoutTests/fast/dom/getElementsByTagName-localN...

48 lines
2.7 KiB
HTML
Raw Permalink Normal View History

getElementsByTagName unable to find SVG camelCase elements imported into HTML https://bugs.webkit.org/show_bug.cgi?id=46800 Reviewed by Nikolas Zimmermann. Source/WebCore: Implement getElementsByTagName according to the algorithm in http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-getelementsbytagname. If the owner document of the element is html, the new class HTMLTagNodeList deals with finding the match(es) based on this algorithm. If the owner document is non HTML, the existing TagNodeList is used. Implement getElementsByTagNameNS according to the algorithm in http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-getelementsbytagnamens. The existing TagNodeList implements this algorithm. Cached results may have less hits after this change. Tag names that are equal when case insensitive but different when case sensitive can't share the result due to above algorithms, i.e. they would match differently in the non html part of the document. Tests: fast/dom/getElementsByTagName-localName-matching.html fast/dom/getElementsByTagName-localName-matching2.xhtml svg/dom/getElementsByTagName-localName-matching.html * dom/Node.cpp: (WebCore::Node::getElementsByTagName): create TagNodeList depending on owner document type. (WebCore::Node::getElementsByTagNameNS): do not lowercase localName for html. * dom/TagNodeList.cpp: (WebCore::HTMLTagNodeList::HTMLTagNodeList): add specialized TagNodeList for html matching rules. (WebCore): (WebCore::HTMLTagNodeList::nodeMatches): * dom/TagNodeList.h: (TagNodeList): (HTMLTagNodeList): (WebCore::HTMLTagNodeList::create): LayoutTests: Add tests for getElementsByTagName(NS) in html, xhtml, and svg documents. * fast/dom/getElementsByTagName-localName-matching-expected.txt: Added. * fast/dom/getElementsByTagName-localName-matching.html: Added. * fast/dom/getElementsByTagName-localName-matching2-expected.txt: Added. * fast/dom/getElementsByTagName-localName-matching2.xhtml: Added. * svg/dom/getElementsByTagName-localName-matching-expected.txt: Added. * svg/dom/getElementsByTagName-localName-matching.html: Added. * svg/dom/script-tests/getElementsByTagName-localName-matching.js: Added. Canonical link: https://commits.webkit.org/101019@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-10 12:34:25 +00:00
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
Change fast/d* files to use pre and post js files in LayoutTests/resources. https://bugs.webkit.org/show_bug.cgi?id=120973. Rubber stamped by Filip Pizlo. * fast/dom/Attr/access-after-element-destruction.html: * fast/dom/Attr/change-id-via-attr-node-value.html: * fast/dom/Attr/invalidate-nodelist-after-attr-setvalue.html: * fast/dom/Attr/parent-adopt-node.html: * fast/dom/Attr/script-tests/TEMPLATE.html: * fast/dom/Attr/set-attribute-node-from-iframe.html: * fast/dom/CSSStyleDeclaration/access-longest-css-property.html: * fast/dom/CSSStyleDeclaration/css-computed-style-item.html: * fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html: * fast/dom/CSSStyleDeclaration/css-style-item.html: * fast/dom/CSSStyleDeclaration/script-tests/TEMPLATE.html: * fast/dom/CSSStyleDeclaration/transition-property-names.html: * fast/dom/Comment/remove.html: * fast/dom/DOMException/EventException.html: * fast/dom/DOMException/RangeException.html: * fast/dom/DOMException/XPathException.html: * fast/dom/DOMException/prototype-object.html: * fast/dom/DOMException/stack-trace.html: * fast/dom/DOMImplementation/createDocument-namespace-err.html: * fast/dom/DOMImplementation/createDocument-with-used-doctype.html: * fast/dom/DOMImplementation/createDocumentType-err.html: * fast/dom/DOMImplementation/createHTMLDocument-optional-title.html: * fast/dom/DOMImplementation/resources/createDocument-with-used-doctype-frame.html: * fast/dom/DOMImplementation/script-tests/TEMPLATE.html: * fast/dom/DOMURL/check-instanceof-domurl-functions.html: * fast/dom/DeviceMotion/create-event.html: * fast/dom/DeviceMotion/no-page-cache.html: * fast/dom/DeviceMotion/optional-event-properties.html: * fast/dom/DeviceMotion/script-tests/TEMPLATE.html: * fast/dom/DeviceMotion/window-property.html: * fast/dom/DeviceOrientation/add-listener-from-callback.html: * fast/dom/DeviceOrientation/basic-operation.html: * fast/dom/DeviceOrientation/create-event.html: * fast/dom/DeviceOrientation/event-after-navigation.html: * fast/dom/DeviceOrientation/multiple-frames.html: * fast/dom/DeviceOrientation/no-page-cache.html: * fast/dom/DeviceOrientation/no-synchronous-events.html: * fast/dom/DeviceOrientation/null-values.html: * fast/dom/DeviceOrientation/optional-event-properties.html: * fast/dom/DeviceOrientation/script-tests/TEMPLATE.html: * fast/dom/DeviceOrientation/updates.html: * fast/dom/DeviceOrientation/window-property.html: * fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll.html: * fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html: * fast/dom/Document/createAttributeNS-namespace-err.html: * fast/dom/Document/createElement-invalid-names.html: * fast/dom/Document/createElement-valid-names.html: * fast/dom/Document/createElementNS-namespace-err.html: * fast/dom/Document/document-current-script-async.html: * fast/dom/Document/document-current-script.html: * fast/dom/Document/document-title-get.html: * fast/dom/Document/document-write-doctype.html: * fast/dom/Document/invalid-domain-change-throws-exception.html: * fast/dom/Document/readystate.html: * fast/dom/Document/replace-child.html: * fast/dom/Document/replaceChild-null-oldChild.html: * fast/dom/Document/script-tests/TEMPLATE.html: * fast/dom/Document/title-with-multiple-children.html: * fast/dom/DocumentType/remove.html: * fast/dom/Element/attr-param-typechecking.html: * fast/dom/Element/attrisid-extra01.html: * fast/dom/Element/class-list-move-between-document-with-different-quirks-mode.html: * fast/dom/Element/class-list-update.html: * fast/dom/Element/class-list.html: * fast/dom/Element/class-name.html: * fast/dom/Element/dimension-properties-unrendered.html: * fast/dom/Element/element-traversal.html: * fast/dom/Element/getAttribute-case-insensitivity.html: * fast/dom/Element/getAttribute-check-case-sensitivity.html: * fast/dom/Element/getBoundingClientRect-getClientRects-relative-to-viewport.html: * fast/dom/Element/getBoundingClientRect.html: * fast/dom/Element/getClientRects.html: * fast/dom/Element/id-in-applet.html: * fast/dom/Element/id-in-formcollection.html: * fast/dom/Element/id-in-frame.html: * fast/dom/Element/id-in-getelement01.html: * fast/dom/Element/id-in-insert-hr.html: * fast/dom/Element/id-in-map.html: * fast/dom/Element/id-in-node-list-index01.html: * fast/dom/Element/id-in-param.html: * fast/dom/Element/node-list-identity.html: * fast/dom/Element/prefix-setter-exception.html: * fast/dom/Element/remove.html: * fast/dom/Element/script-tests/TEMPLATE.html: * fast/dom/Element/scrollLeft-Quirks.html: * fast/dom/Element/scrollLeft.html: * fast/dom/Element/scrollTop-Quirks.html: * fast/dom/Element/scrollTop.html: * fast/dom/Element/setAttributeNS-namespace-err.html: * fast/dom/Element/setAttributeNode-case-insensitivity.html: * fast/dom/EntityReference/readonly-exceptions.html: * fast/dom/EntityReference/script-tests/TEMPLATE.html: * fast/dom/Geolocation/argument-types.html: * fast/dom/Geolocation/cached-position-iframe.html: * fast/dom/Geolocation/callback-exception.html: * fast/dom/Geolocation/callback-to-deleted-context.html: * fast/dom/Geolocation/callback-to-remote-context.html: * fast/dom/Geolocation/callback-to-remote-context2.html: * fast/dom/Geolocation/clear-watch-invalid-id-crash.html: * fast/dom/Geolocation/coordinates-interface-attributes.html: * fast/dom/Geolocation/delayed-permission-allowed-for-multiple-requests.html: * fast/dom/Geolocation/delayed-permission-allowed.html: * fast/dom/Geolocation/delayed-permission-denied-for-multiple-requests.html: * fast/dom/Geolocation/delayed-permission-denied.html: * fast/dom/Geolocation/disconnected-frame-already.html: * fast/dom/Geolocation/disconnected-frame-permission-denied.html: * fast/dom/Geolocation/disconnected-frame.html: * fast/dom/Geolocation/enabled.html: * fast/dom/Geolocation/error-clear-watch.html: * fast/dom/Geolocation/error.html: * fast/dom/Geolocation/maximum-age.html: * fast/dom/Geolocation/multiple-requests.html: * fast/dom/Geolocation/no-page-cache.html: * fast/dom/Geolocation/not-enough-arguments.html: * fast/dom/Geolocation/notimer-after-unload.html: * fast/dom/Geolocation/page-reload-cancel-permission-requests.html: * fast/dom/Geolocation/permission-denied-already-clear-watch.html: * fast/dom/Geolocation/permission-denied-already-error.html: * fast/dom/Geolocation/permission-denied-already-success.html: * fast/dom/Geolocation/permission-denied-stops-watches.html: * fast/dom/Geolocation/permission-denied.html: * fast/dom/Geolocation/position-string.html: * fast/dom/Geolocation/reentrant-error.html: * fast/dom/Geolocation/reentrant-permission-denied.html: * fast/dom/Geolocation/reentrant-success.html: * fast/dom/Geolocation/remove-remote-context-in-error-callback-crash.html: * fast/dom/Geolocation/script-tests/TEMPLATE.html: * fast/dom/Geolocation/success-clear-watch.html: * fast/dom/Geolocation/success.html: * fast/dom/Geolocation/timeout-clear-watch.html: * fast/dom/Geolocation/timeout-zero.html: * fast/dom/Geolocation/timeout.html: * fast/dom/Geolocation/timestamp.html: * fast/dom/Geolocation/watch.html: * fast/dom/Geolocation/watchPosition-unique.html: * fast/dom/Geolocation/window-close-crash.html: * fast/dom/HTMLAnchorElement/anchor-ismap-crash.html: * fast/dom/HTMLAnchorElement/get-href-attribute-port.html: * fast/dom/HTMLAnchorElement/remove-rel-attribute.html: * fast/dom/HTMLAnchorElement/script-tests/TEMPLATE.html: * fast/dom/HTMLAnchorElement/set-href-attribute-hash.html: * fast/dom/HTMLAnchorElement/set-href-attribute-host.html: * fast/dom/HTMLAnchorElement/set-href-attribute-hostname.html: * fast/dom/HTMLAnchorElement/set-href-attribute-pathname.html: * fast/dom/HTMLAnchorElement/set-href-attribute-port.html: * fast/dom/HTMLAnchorElement/set-href-attribute-prevents-rebase.html: * fast/dom/HTMLAnchorElement/set-href-attribute-protocol.html: * fast/dom/HTMLAnchorElement/set-href-attribute-rebase.html: * fast/dom/HTMLAnchorElement/set-href-attribute-search.html: * fast/dom/HTMLAnchorElement/set-href-attribute-whitespace.html: * fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document.html: * fast/dom/HTMLBaseElement/multiple-base-elements.html: * fast/dom/HTMLBaseElement/script-tests/TEMPLATE.html: * fast/dom/HTMLButtonElement/change-type.html: * fast/dom/HTMLDocument/document-all.html: * fast/dom/HTMLDocument/named-item-multiple-match.html: * fast/dom/HTMLDocument/object-with-same-id-and-name.html: * fast/dom/HTMLDocument/set-focus-on-valid-element.html: * fast/dom/HTMLElement/attr-dir-auto-change-before-text-node.html: * fast/dom/HTMLElement/attr-dir-auto-change-child-node.html: * fast/dom/HTMLElement/attr-dir-auto-change-text-form-control.html: * fast/dom/HTMLElement/attr-dir-auto-change-text.html: * fast/dom/HTMLElement/attr-dir-auto-children.html: * fast/dom/HTMLElement/attr-dir-auto-remove-add-children.html: * fast/dom/HTMLElement/attr-dir-auto-text-form-control-child.html: * fast/dom/HTMLElement/attr-dir-auto-text-form-control.html: * fast/dom/HTMLElement/attr-dir-auto.html: * fast/dom/HTMLElement/attr-dir-value-change.html: * fast/dom/HTMLElement/attr-empty-string.html: * fast/dom/HTMLElement/attr-false-string.html: * fast/dom/HTMLElement/attr-invalid-string.html: * fast/dom/HTMLElement/attr-missing-ancestor-false.html: * fast/dom/HTMLElement/attr-missing-ancestor-true.html: * fast/dom/HTMLElement/attr-missing-parent-ancestor-missing.html: * fast/dom/HTMLElement/attr-missing-parent-false.html: * fast/dom/HTMLElement/attr-missing-parent-true.html: * fast/dom/HTMLElement/attr-true-string.html: * fast/dom/HTMLElement/class-list-gc.html: * fast/dom/HTMLElement/class-list-quirks.html: * fast/dom/HTMLElement/class-list.html: * fast/dom/HTMLElement/insertAdjacentHTML-errors.html: * fast/dom/HTMLElement/iscontenteditable-designmodeon-allinherit-subframe.html: * fast/dom/HTMLElement/iscontenteditable-designmodeon-allinherit.html: * fast/dom/HTMLElement/iscontenteditable-designmodeon-ancestor.html: * fast/dom/HTMLElement/iscontenteditable-designmodeon.html: * fast/dom/HTMLElement/script-tests/TEMPLATE.html: * fast/dom/HTMLElement/set-false.html: * fast/dom/HTMLElement/set-inherit-parent-false.html: * fast/dom/HTMLElement/set-inherit-parent-true.html: * fast/dom/HTMLElement/set-invalid-value.html: * fast/dom/HTMLElement/set-true.html: * fast/dom/HTMLElement/set-value-caseinsensitive.html: * fast/dom/HTMLElement/spellcheck.html: * fast/dom/HTMLElement/translate.html: * fast/dom/HTMLFontElement/script-tests/TEMPLATE.html: * fast/dom/HTMLFontElement/size-attribute.html: * fast/dom/HTMLFormElement/elements-not-in-document.html: * fast/dom/HTMLFormElement/htmlformelement-indexed-getter.html: * fast/dom/HTMLFormElement/invalid-form-field.html: * fast/dom/HTMLFormElement/move-option-between-documents.html: * fast/dom/HTMLFormElement/script-tests/TEMPLATE.html: * fast/dom/HTMLHeadElement/head-check.html: * fast/dom/HTMLImageElement/image-lowsrc-getset.html: * fast/dom/HTMLImageElement/parse-src.html: * fast/dom/HTMLImageElement/script-tests/TEMPLATE.html: * fast/dom/HTMLInputElement/checked-pseudo-selector.html: * fast/dom/HTMLInputElement/duplicate-element-names.html: * fast/dom/HTMLInputElement/input-size-attribute.html: * fast/dom/HTMLInputElement/script-tests/TEMPLATE.html: * fast/dom/HTMLInputElement/size-attribute.html: * fast/dom/HTMLIsIndexElement/prototype-chain.html: * fast/dom/HTMLKeygenElement/keygen.html: * fast/dom/HTMLLabelElement/label-control.html: * fast/dom/HTMLLabelElement/script-tests/TEMPLATE.html: * fast/dom/HTMLLinkElement/disabled-attribute.html: * fast/dom/HTMLLinkElement/prefetch-beforeload.html: * fast/dom/HTMLLinkElement/prefetch-onerror.html: * fast/dom/HTMLLinkElement/prefetch-too-many-clients.html: * fast/dom/HTMLLinkElement/subresource.html: * fast/dom/HTMLMeterElement/meter-clone.html: * fast/dom/HTMLMeterElement/script-tests/TEMPLATE.html: * fast/dom/HTMLMeterElement/set-meter-properties.html: * fast/dom/HTMLObjectElement/beforeload-set-text-crash.xhtml: * fast/dom/HTMLObjectElement/object-as-frame.html: * fast/dom/HTMLOptionElement/collection-setter-getter.html: * fast/dom/HTMLOutputElement/dom-settable-token-list.html: * fast/dom/HTMLOutputElement/htmloutputelement-children-removed.html: * fast/dom/HTMLOutputElement/htmloutputelement-reset-event.html: * fast/dom/HTMLOutputElement/htmloutputelement-validity.html: * fast/dom/HTMLOutputElement/htmloutputelement-value.html: * fast/dom/HTMLOutputElement/htmloutputelement.html: * fast/dom/HTMLProgressElement/progress-clone.html: * fast/dom/HTMLProgressElement/progress-element-indeterminate-crash.html: * fast/dom/HTMLProgressElement/script-tests/TEMPLATE.html: * fast/dom/HTMLProgressElement/set-progress-properties.html: * fast/dom/HTMLScriptElement/async-false-inside-async-false-load.html: * fast/dom/HTMLScriptElement/async-inline-script.html: * fast/dom/HTMLScriptElement/async-onbeforeload.html: * fast/dom/HTMLScriptElement/defer-inline-script.html: * fast/dom/HTMLScriptElement/defer-onbeforeload.html: * fast/dom/HTMLScriptElement/defer-script-invalid-url.html: * fast/dom/HTMLScriptElement/move-in-beforeload.html: * fast/dom/HTMLScriptElement/remove-in-beforeload.html: * fast/dom/HTMLScriptElement/resources/frame.html: * fast/dom/HTMLScriptElement/script-async-attr.html: * fast/dom/HTMLScriptElement/script-for-attribute-unexpected-execution.html: * fast/dom/HTMLSelectElement/change-multiple-preserve-selection.html: * fast/dom/HTMLSelectElement/click-size-zero-no-crash.html: * fast/dom/HTMLSelectElement/named-options.html: * fast/dom/HTMLSelectElement/option-add-crash.html: * fast/dom/HTMLSelectElement/script-tests/TEMPLATE.html: * fast/dom/HTMLSelectElement/select-element-item-argument.html: * fast/dom/HTMLSelectElement/select-selectedIndex-multiple.html: * fast/dom/HTMLSelectElement/select-selectedIndex-noAnchorIndex-crash.html: * fast/dom/HTMLSelectElement/select-selectedIndex.html: * fast/dom/HTMLSelectElement/select-selectedOptions.html: * fast/dom/HTMLSelectElement/selected-false.html: * fast/dom/HTMLSelectElement/selected-index-preserved-when-option-text-changes.html: * fast/dom/HTMLTableElement/cellpadding-attribute.html: * fast/dom/HTMLTableElement/early-acid3-65-excerpt.html: * fast/dom/HTMLTableElement/early-acid3-66-excerpt.html: * fast/dom/HTMLTableElement/rows.html: * fast/dom/HTMLTableElement/script-tests/TEMPLATE.html: * fast/dom/HTMLTableElement/tBodies.html: * fast/dom/HTMLTableElement/table-with-invalid-border.html: * fast/dom/HTMLTableRowElement/cells.html: * fast/dom/HTMLTableRowElement/script-tests/TEMPLATE.html: * fast/dom/HTMLTableSectionElement/rows.html: * fast/dom/HTMLTableSectionElement/script-tests/TEMPLATE.html: * fast/dom/HTMLTemplateElement/cloneNode.html: * fast/dom/HTMLTemplateElement/contentWrappers.html: * fast/dom/HTMLTemplateElement/cycles-in-shadow.html: * fast/dom/HTMLTemplateElement/cycles.html: * fast/dom/HTMLTemplateElement/inertContents.html: * fast/dom/HTMLTemplateElement/innerHTML-inert.html: * fast/dom/HTMLTemplateElement/ownerDocument-adoptNode.html: * fast/dom/HTMLTemplateElement/ownerDocument.html: * fast/dom/HTMLTemplateElement/ownerDocumentXHTML.xhtml: * fast/dom/MutationObserver/added-out-of-order.html: * fast/dom/MutationObserver/callback-arguments.html: * fast/dom/MutationObserver/clear-transient-without-delivery.html: * fast/dom/MutationObserver/create-during-delivery.html: * fast/dom/MutationObserver/cross-document.html: * fast/dom/MutationObserver/database-callback-delivery.html: * fast/dom/MutationObserver/delivery-order.html: * fast/dom/MutationObserver/disconnect-cancel-pending.html: * fast/dom/MutationObserver/document-fragment-insertion.html: * fast/dom/MutationObserver/filesystem-callback-delivery.html: * fast/dom/MutationObserver/mutate-during-delivery.html: * fast/dom/MutationObserver/mutation-observer-constructor.html: * fast/dom/MutationObserver/mutation-observer-prefix.html: * fast/dom/MutationObserver/mutation-record-constructor.html: * fast/dom/MutationObserver/mutation-record-nullity.html: * fast/dom/MutationObserver/observe-attributes.html: * fast/dom/MutationObserver/observe-characterdata.html: * fast/dom/MutationObserver/observe-childList.html: * fast/dom/MutationObserver/observe-exceptions.html: * fast/dom/MutationObserver/observe-subtree.html: * fast/dom/MutationObserver/observer-wrapper-dropoff-transient.html: * fast/dom/MutationObserver/observer-wrapper-dropoff.html: * fast/dom/MutationObserver/parser-mutations.html: * fast/dom/MutationObserver/removed-out-of-order.html: * fast/dom/MutationObserver/shadow-dom.html: * fast/dom/MutationObserver/takeRecords.html: * fast/dom/MutationObserver/transient-gc-crash.html: * fast/dom/Node/DOMNodeRemovedEvent.html: * fast/dom/Node/contains-method.html: * fast/dom/Node/initial-values.html: * fast/dom/Node/isEqualNode.html: * fast/dom/Node/normalize-with-cdata.html: * fast/dom/Node/script-tests/TEMPLATE.html: * fast/dom/NodeList/childNodes-reverse-iteration.html: * fast/dom/NodeList/nodelist-item-assignment.html: * fast/dom/NodeList/nodelist-item-call-as-function.html: * fast/dom/NodeList/nodelist-item-with-index.html: * fast/dom/NodeList/nodelist-item-with-name.html: * fast/dom/NodeList/nodelist-namespace-invalidation.html: * fast/dom/NodeList/nodelist-reachable.html: * fast/dom/NodeList/script-tests/TEMPLATE.html: * fast/dom/Orientation/create-event-orientationchange.html: * fast/dom/Range/31684.html: * fast/dom/Range/detach-range-during-deletecontents.html: * fast/dom/Range/getBoundingClientRect-getClientRects-relative-to-viewport.html: * fast/dom/Range/getBoundingClientRect.html: * fast/dom/Range/getClientRects-vertical.html: * fast/dom/Range/getClientRects.html: * fast/dom/Range/insertNode-empty-fragment-crash.html: * fast/dom/Range/mutation.html: * fast/dom/Range/range-clone-empty.html: * fast/dom/Range/range-exceptions.html: * fast/dom/Range/range-insertNode-assertion.html: * fast/dom/Range/range-insertNode-separate-endContainer.html: * fast/dom/Range/range-insertNode-splittext.html: * fast/dom/Range/range-intersectsNode-exception.html: * fast/dom/Range/range-intersectsNode.html: * fast/dom/Range/range-modifycontents.html: * fast/dom/Range/script-tests/TEMPLATE.html: * fast/dom/Range/select-node-different-document.html: * fast/dom/Range/set-wrong-document-err.html: * fast/dom/Range/split-text-in-range.html: * fast/dom/Selection/collapseToX-empty-selection.html: * fast/dom/Selection/getRangeAt.html: * fast/dom/Selection/script-tests/TEMPLATE.html: * fast/dom/SelectorAPI/attrname-case-insensitive.html: * fast/dom/SelectorAPI/attrname-case-sensitive.xhtml: * fast/dom/SelectorAPI/caseID-almost-strict.html: * fast/dom/SelectorAPI/caseID-strict.html: * fast/dom/SelectorAPI/caseID.html: * fast/dom/SelectorAPI/caseTag.html: * fast/dom/SelectorAPI/caseTagX.xhtml: * fast/dom/SelectorAPI/detached-element.html: * fast/dom/SelectorAPI/elementRoot.html: * fast/dom/SelectorAPI/id-fastpath-almost-strict.html: * fast/dom/SelectorAPI/id-fastpath-strict.html: * fast/dom/SelectorAPI/id-fastpath.html: * fast/dom/SelectorAPI/script-tests/TEMPLATE.html: * fast/dom/SelectorAPI/undefined-null-stringify.html: * fast/dom/SelectorAPI/viewless-document.html: * fast/dom/StyleSheet/css-medialist-item.html: * fast/dom/StyleSheet/detached-parent-rule-without-wrapper.html: * fast/dom/StyleSheet/detached-sheet-owner-node-link.html: * fast/dom/StyleSheet/detached-sheet-owner-node.html: * fast/dom/StyleSheet/detached-style-pi.xhtml: * fast/dom/StyleSheet/detached-style.html: * fast/dom/StyleSheet/detached-stylesheet-without-wrapper.html: * fast/dom/StyleSheet/gc-declaration-parent-rule.html: * fast/dom/StyleSheet/gc-inline-style-cssvalues.html: * fast/dom/StyleSheet/gc-parent-rule.html: * fast/dom/StyleSheet/gc-parent-stylesheet.html: * fast/dom/StyleSheet/gc-rule-children-wrappers.html: * fast/dom/StyleSheet/gc-styleheet-wrapper.xhtml: * fast/dom/StyleSheet/get-stylesheet-byname.html: * fast/dom/StyleSheet/script-tests/TEMPLATE.html: * fast/dom/Text/remove.html: * fast/dom/Text/replaceWholeText.html: * fast/dom/Text/script-tests/TEMPLATE.html: * fast/dom/Text/text-should-not-have-attributes.html: * fast/dom/TreeWalker/TreeWalker-currentNode.html: * fast/dom/TreeWalker/acceptNode-filter.html: * fast/dom/TreeWalker/filter-throw.html: * fast/dom/TreeWalker/previousNodeLastChildReject.html: * fast/dom/TreeWalker/previousSiblingLastChildSkip.html: * fast/dom/TreeWalker/script-tests/TEMPLATE.html: * fast/dom/TreeWalker/traversal-reject.html: * fast/dom/TreeWalker/traversal-skip-most.html: * fast/dom/TreeWalker/traversal-skip.html: * fast/dom/URL-attribute-reflection.html: * fast/dom/Window/HTMLBodyElement-window-eventListener-attributes.html: * fast/dom/Window/HTMLFrameSetElement-window-eventListener-attributes.html: * fast/dom/Window/Location/location-override-toString-on-proto-using-defineGetter.html: * fast/dom/Window/Location/location-override-toString-on-proto-using-with.html: * fast/dom/Window/Location/location-override-toString-on-proto.html: * fast/dom/Window/Location/location-override-toString-using-defineGetter.html: * fast/dom/Window/Location/location-override-toString-using-with.html: * fast/dom/Window/Location/location-override-toString.html: * fast/dom/Window/Location/location-override-valueOf-on-proto-using-defineGetter.html: * fast/dom/Window/Location/location-override-valueOf-on-proto-using-with.html: * fast/dom/Window/Location/location-override-valueOf-on-proto.html: * fast/dom/Window/Location/location-override-valueOf-using-defineGetter.html: * fast/dom/Window/Location/location-override-valueOf-using-with.html: * fast/dom/Window/Location/location-override-valueOf.html: * fast/dom/Window/Location/window-override-location-using-defineGetter.html: * fast/dom/Window/Location/window-override-window-using-defineGetter.html: * fast/dom/Window/Location/window-shadow-location-using-js-object-with-toString.html: * fast/dom/Window/Location/window-shadow-location-using-string.html: * fast/dom/Window/Location/window-shadow-window-using-js-object-with-location-field.html: * fast/dom/Window/atob-btoa.html: * fast/dom/Window/custom-constructors.html: * fast/dom/Window/customized-property-survives-gc.html: * fast/dom/Window/dispatchEvent.html: * fast/dom/Window/es52-globals.html: * fast/dom/Window/getMatchedCSSRules-with-invalid-pseudo-elements.html: * fast/dom/Window/getMatchedCSSRules-with-pseudo-elements.html: * fast/dom/Window/invalid-protocol.html: * fast/dom/Window/new-window-opener.html: * fast/dom/Window/open-window-min-size.html: * fast/dom/Window/querySelectorAll-with-pseudo-elements.html: * fast/dom/Window/replaceable.html: * fast/dom/Window/resources/window-appendages-cleared-results.html: * fast/dom/Window/script-tests/TEMPLATE.html: * fast/dom/Window/setTimeout-setInterval-unique.html: * fast/dom/Window/web-timing-minimal-performance-now.html: * fast/dom/Window/webkitConvertPoint.html: * fast/dom/Window/webkitConvertPointUpdateLayout.html: * fast/dom/Window/window-constructor-presence.html: * fast/dom/Window/window-custom-prototype.html: * fast/dom/Window/window-frames-self-referential.html: * fast/dom/Window/window-legacy-event-listener.html: * fast/dom/Window/window-lookup-precedence.html: * fast/dom/Window/window-property-shadowing-onclick.html: * fast/dom/Window/window-resize-and-move-arguments.html: * fast/dom/Window/window-resize-and-move-sub-frame.html: * fast/dom/Window/window-resize-nan.html-disabled: * fast/dom/Window/window-resize.html: * fast/dom/Window/window-scroll-arguments.html: * fast/dom/Window/window-xy-properties.html: * fast/dom/XMLHttpRequest-constants.html: * fast/dom/XMLHttpRequest-legacy-event-listener.html: * fast/dom/XMLSerializer-doctype2.html: * fast/dom/access-key-iframe.html: * fast/dom/adopt-node-prevented.html: * fast/dom/allowed-children.html: * fast/dom/attr-style-too-lazy.html: * fast/dom/attribute-legacy-colors.html: * fast/dom/body-clone-link-decl-parent-crash.html: * fast/dom/boolean-attribute-reflection.html: * fast/dom/call-a-constructor-as-a-function.html: * fast/dom/child-insertion-notify-crash.html: * fast/dom/click-method-on-html-element.html: * fast/dom/cloneNode-below-body-attribute-merging.html: * fast/dom/collection-idempotence.html: * fast/dom/collection-item.html: * fast/dom/collection-length-should-not-be-overridden.html: * fast/dom/collection-nameditem-move-between-documents.html: * fast/dom/compare-document-position-disconnected-nodes.html: * fast/dom/console-log-stack-overflow.html: * fast/dom/constructed-objects-prototypes.html: * fast/dom/constructor-proto.html: * fast/dom/constructors-cached-navigate.html: * fast/dom/constructors-cached.html: * fast/dom/createDocumentType-ownerDocument.html: * fast/dom/css-RGBValue.html: * fast/dom/css-delete-doc.html: * fast/dom/css-inline-style-declaration-crash.html: * fast/dom/css-inline-style-important.html: * fast/dom/css-mediarule-parentRule.html: * fast/dom/custom/document-register-basic.html: * fast/dom/custom/document-register-namespace.html: * fast/dom/custom/document-register-reentrant-null-constructor.html: * fast/dom/custom/document-register-reentrant-returning-fake.html: * fast/dom/custom/document-register-reentrant-throwing-constructor.html: * fast/dom/custom/document-register-type-extensions.html: * fast/dom/custom/lifecycle-ready-createElement-recursion.html: * fast/dom/custom/lifecycle-ready-createElement-reentrancy.html: * fast/dom/custom/lifecycle-ready-creation-api.html: * fast/dom/custom/lifecycle-ready-innerHTML.html: * fast/dom/custom/lifecycle-ready-parser-script.html: * fast/dom/custom/lifecycle-ready-paste.html: * fast/dom/dataset-gc.html: * fast/dom/dataset-xhtml.xhtml: * fast/dom/dataset.html: * fast/dom/document-all-select.html: * fast/dom/document-all-tags.html: * fast/dom/document-dir-property.html: * fast/dom/document-head.html: * fast/dom/document-importNode-arguments.html: * fast/dom/document-set-body.html: * fast/dom/dom-constructors.html: * fast/dom/dom-parse-serialize-xmldecl.html: * fast/dom/dom-serialize-namespace.html: * fast/dom/domListEnumeration.html: * fast/dom/domstring-attribute-reflection.html: * fast/dom/domtimestamp-is-number.html: * fast/dom/elementFromPoint-relative-to-viewport.html: * fast/dom/elementFromPoint-scaled-scrolled.html: * fast/dom/error-to-string-stack-overflow.html: * fast/dom/event-attribute-availability.html: * fast/dom/exception-in-binding.html: * fast/dom/fragment-activation-focuses-target.html: * fast/dom/gc-attribute-node.html: * fast/dom/gc-dom-tree-lifetime.html: * fast/dom/gc-image-element-2.html: * fast/dom/gc-image-element.html: * fast/dom/getElementById-consistency.html: * fast/dom/getElementById-consistency2.html: * fast/dom/getElementById-consistency3.html: * fast/dom/getElementById-consistency4.html: * fast/dom/getElementById-consistency5.html: * fast/dom/getElementsByTagName-localName-matching.html: * fast/dom/getElementsByTagName-localName-matching2.xhtml: * fast/dom/getelementsbyname-invalidation-cache.html: * fast/dom/getter-on-window-object2.html: * fast/dom/html-attribute-types.html: * fast/dom/html-collections-named-getter.html: * fast/dom/htmlallcollection-call-with-index-caching-bug.html: * fast/dom/htmlallcollection-detached-node-children.html: * fast/dom/htmlallcollection-reachable.html: * fast/dom/htmlcollection-length-after-item.html: * fast/dom/htmlcollection-namedItem.html: * fast/dom/htmlcollection-non-html.html: * fast/dom/htmlcollection-protects-base.html: * fast/dom/htmlcollection-reachable.html: * fast/dom/icon-size-property.html: * fast/dom/icon-url-change.html: * fast/dom/icon-url-list-apple-touch.html: * fast/dom/icon-url-list.html: * fast/dom/iframe-inner-size-scaling.html: * fast/dom/importNode-confusing-localName.html: * fast/dom/incompatible-operations.html: * fast/dom/inline-event-attributes-crash.html: * fast/dom/inline-event-attributes-event-param-name.html: * fast/dom/inline-event-attributes-lookup-removed-form.html: * fast/dom/inline-event-attributes-lookup-removed.html: * fast/dom/inline-event-attributes-lookup.html: * fast/dom/inline-event-attributes-moved.html: * fast/dom/inline-event-attributes-release.html: * fast/dom/inner-text-first-letter.html: * fast/dom/isEqualNode-after-removeAttribute.html: * fast/dom/javascript-url-exception-isolation.html: * fast/dom/location-new-window-no-crash.html: * fast/dom/mutation-event-listener-with-dirty-inline-style-crash.html: * fast/dom/node-childNodes-idempotence.html: * fast/dom/node-filter-detached-iframe-crash.html: * fast/dom/node-iterator-reference-node-removed.html: * fast/dom/node-iterator-with-doctype-root.html: * fast/dom/node-legacy-event-listener.html: * fast/dom/node-move-to-new-document-crash-main.html: * fast/dom/node-prefix-setter-namespace-exception.html: * fast/dom/nodelist-item-parameter.html: * fast/dom/nodesFromRect/nodesFromRect-basic.html: * fast/dom/nodesFromRect/nodesFromRect-child-frame-content.html: * fast/dom/nodesFromRect/nodesFromRect-culled-inline-with-linebreak.html: * fast/dom/nodesFromRect/nodesFromRect-culled-inlines.html: * fast/dom/nodesFromRect/nodesFromRect-embedded-frame-content.html: * fast/dom/nodesFromRect/nodesFromRect-inline-image.html: * fast/dom/nodesFromRect/nodesFromRect-inner-documents.html: * fast/dom/nodesFromRect/nodesFromRect-links-and-text.html: * fast/dom/nodesFromRect/nodesFromRect-rotate.html: * fast/dom/nodesFromRect/nodesFromRect-scale.html: * fast/dom/nodesFromRect/nodesFromRect-svg.html: * fast/dom/nodesFromRect/nodesFromRect-table.html: * fast/dom/non-numeric-values-numeric-parameters.html: * fast/dom/normalize-attributes-mutation-event-crash.html: * fast/dom/offset-position-writing-modes.html: * fast/dom/ping-attribute-dom-binding.html: * fast/dom/processing-instruction-appendChild-exceptions.xhtml: * fast/dom/prototype-property.html: * fast/dom/resources/navigation-type-matches-querystring.html: * fast/dom/script-tests/TEMPLATE.html: * fast/dom/script-tests/webtiming-document-open.js: (testTimingWithDocumentOpen): * fast/dom/scroll-element-to-rect-centered.html: * fast/dom/scroll-element-to-rect.html: * fast/dom/set-custom-validity-with-too-few-arguments.html: * fast/dom/setAttribute-using-initial-input-value.html: * fast/dom/setAttributeNS-prefix-and-null-namespace.html: * fast/dom/setPrimitiveValue-exceptions.html: * fast/dom/setter-type-enforcement.html: * fast/dom/shadow/access-key.html: * fast/dom/shadow/adopt-node-with-shadow-root.html: * fast/dom/shadow/athost-atrules.html: * fast/dom/shadow/base-in-shadow-tree.html: * fast/dom/shadow/caret-range-from-point-in-nested-shadow.html: * fast/dom/shadow/compare-document-position.html: * fast/dom/shadow/composed-shadow-tree-walker-shadow-reprojection.html: * fast/dom/shadow/composed-shadow-tree-walker.html: * fast/dom/shadow/content-element-api.html: * fast/dom/shadow/content-element-distributed-nodes.html: * fast/dom/shadow/content-element-includer.html: * fast/dom/shadow/content-element-outside-shadow.html: * fast/dom/shadow/content-element-user-agent-shadow.html: * fast/dom/shadow/content-reprojection-fallback-crash.html: * fast/dom/shadow/content-selector-query.html: * fast/dom/shadow/content-shadow-unknown.html: * fast/dom/shadow/cppevent-in-shadow.html: * fast/dom/shadow/cppevent-input-in-shadow.html: * fast/dom/shadow/css-hostrule-api.html: * fast/dom/shadow/distributed-pseudo-element-css-text.html: * fast/dom/shadow/distribution-crash.html: * fast/dom/shadow/drop-event-for-input-in-shadow.html: * fast/dom/shadow/drop-event-in-shadow.html: * fast/dom/shadow/element-from-point-in-nested-shadow.html: * fast/dom/shadow/element-name-in-shadow.html: * fast/dom/shadow/elementfrompoint.html: * fast/dom/shadow/elements-in-frameless-document.html: * fast/dom/shadow/events-stopped-at-shadow-boundary.html: * fast/dom/shadow/focus-navigation-with-distributed-nodes.html: * fast/dom/shadow/focus-navigation.html: * fast/dom/shadow/form-in-shadow.html: * fast/dom/shadow/gc-shadow.html: * fast/dom/shadow/gesture-tap.html: * fast/dom/shadow/get-distributed-nodes-orphan.html: * fast/dom/shadow/get-element-by-id-in-shadow-mutation.html: * fast/dom/shadow/get-element-by-id-in-shadow-root.html: * fast/dom/shadow/getelementbyid-in-orphan.html: * fast/dom/shadow/getelementbyid-shadow.html: * fast/dom/shadow/has-content-elements.html: * fast/dom/shadow/has-elementshadow.html: * fast/dom/shadow/has-shadow-insertion-point.html: * fast/dom/shadow/host-wrapper-reclaimed.html: * fast/dom/shadow/iframe-shadow.html: * fast/dom/shadow/input-shadow-nochange.html: * fast/dom/shadow/insertion-parent-shadow.html: * fast/dom/shadow/insertion-parent.html: * fast/dom/shadow/insertion-point-list-menu-crash.html: * fast/dom/shadow/insertion-point-resetStyleInheritance.html: * fast/dom/shadow/insertion-point-video-crash.html: * fast/dom/shadow/layout-tests-can-access-shadow.html: * fast/dom/shadow/link-in-shadow-tree.html: * fast/dom/shadow/multiple-shadowroot-adopt.html: * fast/dom/shadow/multiple-shadowroot.html: * fast/dom/shadow/nested-reprojection-inconsistent.html: * fast/dom/shadow/nodetype.html: * fast/dom/shadow/offset-parent-does-not-leak-ua-shadow.html: * fast/dom/shadow/olderShadowRoot-in-shadowelement.html: * fast/dom/shadow/parent-tree-scope-in-shadow.html: * fast/dom/shadow/pseudo-attribute.html: * fast/dom/shadow/pseudoclass-update-checked-option.html: * fast/dom/shadow/pseudoclass-update-disabled-optgroup.html: * fast/dom/shadow/pseudoclass-update-disabled-option.html: * fast/dom/shadow/pseudoclass-update-enabled-optgroup.html: * fast/dom/shadow/pseudoclass-update-enabled-option.html: * fast/dom/shadow/resize-in-shadow-dom.html: * fast/dom/shadow/select-in-shadowdom.html: * fast/dom/shadow/selection-in-nested-shadow.html: * fast/dom/shadow/selection-shouldnt-expose-shadow-dom.html: * fast/dom/shadow/selections-in-shadow.html: * fast/dom/shadow/shadow-aware-create-shadow-root.html: * fast/dom/shadow/shadow-aware-shadow-root.html: * fast/dom/shadow/shadow-boundary-events.html: * fast/dom/shadow/shadow-contents-event.html: * fast/dom/shadow/shadow-disable.html: * fast/dom/shadow/shadow-dom-enabled-flag-whitelist.html: * fast/dom/shadow/shadow-dom-event-dispatching-child-of-inactive-content.html: * fast/dom/shadow/shadow-dom-event-dispatching-details-summary.html: * fast/dom/shadow/shadow-dom-event-dispatching-distributed-child.html: * fast/dom/shadow/shadow-dom-event-dispatching-distributed-text-node.html: * fast/dom/shadow/shadow-dom-event-dispatching-fallback-nodes.html: * fast/dom/shadow/shadow-dom-event-dispatching-manually-fired-with-same-related-target.html: * fast/dom/shadow/shadow-dom-event-dispatching-manually-fired.html: * fast/dom/shadow/shadow-dom-event-dispatching-multiple-shadow-roots.html: * fast/dom/shadow/shadow-dom-event-dispatching-nested-shadow-roots.html: * fast/dom/shadow/shadow-dom-event-dispatching-non-distributed-nodes.html: * fast/dom/shadow/shadow-dom-event-dispatching-svg-in-shadow-subtree.html: * fast/dom/shadow/shadow-dom-event-dispatching-text-node-in-shadow-root.html: * fast/dom/shadow/shadow-dom-mouse-event-adjust-offset.html: * fast/dom/shadow/shadow-element.html: * fast/dom/shadow/shadow-hierarchy-exception.html: * fast/dom/shadow/shadow-nested-pseudo-id.html: * fast/dom/shadow/shadow-removechild-and-blur-event.html: * fast/dom/shadow/shadow-root-activeElement.html: * fast/dom/shadow/shadow-root-append.html: * fast/dom/shadow/shadow-root-attached.html: * fast/dom/shadow/shadow-root-blur.html: * fast/dom/shadow/shadow-root-innerHTML.html: * fast/dom/shadow/shadow-root-js-api.html: * fast/dom/shadow/shadow-root-new.html: * fast/dom/shadow/shadow-root-touch-listener-crash.html: * fast/dom/shadow/shadow-select-attribute-featureset.html: * fast/dom/shadow/shadow-tree-listener-clearance.html: * fast/dom/shadow/shadowdom-dynamic-styling.html: * fast/dom/shadow/shadowdom-for-form-associated-element-useragent.html: * fast/dom/shadow/shadowdom-for-image-event.html: * fast/dom/shadow/shadowdom-for-media.html: * fast/dom/shadow/shadowroot-clonenode.html: * fast/dom/shadow/shadowroot-type.html: * fast/dom/shadow/style-of-distributed-node.html: * fast/dom/shadow/style-scoped-not-enabled.html: * fast/dom/shadow/suppress-mutation-events-in-shadow-characterdata.html: * fast/dom/shadow/suppress-mutation-events-in-shadow.html: * fast/dom/shadow/tab-order-iframe-and-shadow.html: * fast/dom/shadow/title-element-in-shadow.html: * fast/dom/shadow/touch-event-retargeting.html: * fast/dom/shadow/touch-event.html: * fast/dom/shadow/user-modify-inheritance.html: * fast/dom/shadow/wheel-event-in-shadow-dom.html: * fast/dom/shadow/wheel-event-on-input-in-shadow-dom.html: * fast/dom/shared-inline-style-after-node-removal.html: * fast/dom/styled-clone-inline-style-decl-parent-crash.html: * fast/dom/styled-not-in-document-clone-inline-style-decl-parent-crash.html: * fast/dom/subtree-modified-attributes.html: * fast/dom/tabindex-defaults.html: * fast/dom/timer-throttling-hidden-page.html: * fast/dom/title-content-set-innerText-get.xhtml: * fast/dom/webtiming-document-open.html: * fast/dom/webtiming-navigate-within-document.html: * fast/dom/webtiming.html: * fast/dom/window-inner-size-scaling.html: * fast/dom/window-scroll-scaling.html: * fast/dom/wrapper-classes.html: * fast/dom/wrapper-identity.html: * fast/dom/wrapper-scope.html: * fast/dom/zoom-scroll-page-test.html: Canonical link: https://commits.webkit.org/138869@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-09-07 22:48:36 +00:00
<script src="../../resources/js-test-pre.js"></script>
getElementsByTagName unable to find SVG camelCase elements imported into HTML https://bugs.webkit.org/show_bug.cgi?id=46800 Reviewed by Nikolas Zimmermann. Source/WebCore: Implement getElementsByTagName according to the algorithm in http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-getelementsbytagname. If the owner document of the element is html, the new class HTMLTagNodeList deals with finding the match(es) based on this algorithm. If the owner document is non HTML, the existing TagNodeList is used. Implement getElementsByTagNameNS according to the algorithm in http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-getelementsbytagnamens. The existing TagNodeList implements this algorithm. Cached results may have less hits after this change. Tag names that are equal when case insensitive but different when case sensitive can't share the result due to above algorithms, i.e. they would match differently in the non html part of the document. Tests: fast/dom/getElementsByTagName-localName-matching.html fast/dom/getElementsByTagName-localName-matching2.xhtml svg/dom/getElementsByTagName-localName-matching.html * dom/Node.cpp: (WebCore::Node::getElementsByTagName): create TagNodeList depending on owner document type. (WebCore::Node::getElementsByTagNameNS): do not lowercase localName for html. * dom/TagNodeList.cpp: (WebCore::HTMLTagNodeList::HTMLTagNodeList): add specialized TagNodeList for html matching rules. (WebCore): (WebCore::HTMLTagNodeList::nodeMatches): * dom/TagNodeList.h: (TagNodeList): (HTMLTagNodeList): (WebCore::HTMLTagNodeList::create): LayoutTests: Add tests for getElementsByTagName(NS) in html, xhtml, and svg documents. * fast/dom/getElementsByTagName-localName-matching-expected.txt: Added. * fast/dom/getElementsByTagName-localName-matching.html: Added. * fast/dom/getElementsByTagName-localName-matching2-expected.txt: Added. * fast/dom/getElementsByTagName-localName-matching2.xhtml: Added. * svg/dom/getElementsByTagName-localName-matching-expected.txt: Added. * svg/dom/getElementsByTagName-localName-matching.html: Added. * svg/dom/script-tests/getElementsByTagName-localName-matching.js: Added. Canonical link: https://commits.webkit.org/101019@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-10 12:34:25 +00:00
</head>
<body>
<div id="container"><FOO><foo><linearGradient/></foo></FOO><img/></div>
<script><![CDATA[
Use testRunner instead of layoutTestController in fast/doctypes, dom, dynamic, encoding, events, eventsource, and exclusions tests https://bugs.webkit.org/show_bug.cgi?id=89438 Reviewed by Tony Chang. * fast/doctypes/005-case-preserving.html: * fast/doctypes/doctype-after-comment.html: * fast/doctypes/doctype-at-end.html: * fast/doctypes/doctype-in-element.html: * fast/doctypes/doctype-parsing.html: * fast/doctypes/html-doctype.html: * fast/doctypes/xhtml-with-xhtmlmp-doctype.xhtml: * fast/doctypes/xml-doctype.xhtml: * fast/dom/: * fast/dynamic/5872671.html: * fast/dynamic/ancestor-to-absolute.html: * fast/dynamic/checkbox-selection-crash.html: * fast/dynamic/containing-block-change.html: * fast/dynamic/crash-generated-counter.html: * fast/dynamic/crash-generated-image.html: * fast/dynamic/crash-generated-quote.html: * fast/dynamic/crash-generated-text.html: * fast/dynamic/crash-paint-no-documentElement-renderer.html-disabled: * fast/dynamic/float-remove-above-line-2.html: * fast/dynamic/float-remove-above-line.html: * fast/dynamic/hover-before-position-after-style-change.html: * fast/dynamic/hover-before-position-after-style-change2.html: * fast/dynamic/hover-style-recalc-crash.html: * fast/dynamic/hovered-detach.html: * fast/dynamic/inline-to-block-crash.html: * fast/dynamic/insertAdjacentElement.html: * fast/dynamic/insertAdjacentHTML-allowed-parents.html: * fast/dynamic/insertAdjacentHTML.html: * fast/dynamic/insertAdjacentText.html: * fast/dynamic/jQuery-animation-crash.html: * fast/dynamic/layer-hit-test-crash.html: * fast/dynamic/layer-no-longer-paginated.html: * fast/dynamic/outerHTML-no-element.html: * fast/dynamic/paused-event-dispatch.html: * fast/dynamic/position-absolute-to-fixed-crash.html: * fast/dynamic/position-change-layout.html: * fast/dynamic/recursive-layout.html: * fast/dynamic/style-access-late-stylesheet-load.html: * fast/dynamic/subtree-common-root.html: * fast/dynamic/subtree-table-cell-height.html: * fast/dynamic/subtree-unrooted.html: * fast/encoding/: * fast/events/: * platform/chromium/fast/events/drag-downloadURL.html: * platform/chromium/fast/events/intercept-postmessage.html: * platform/chromium/fast/events/rtl-scrollbar.html: * platform/gtk/fast/events/event-sender-metakey.html: * platform/mac/fast/dom/HTMLImageElement/dashboard-src-quirk.html: * platform/mac/fast/dom/character-index-for-point.html: * platform/mac/fast/dom/objc-wrapper-identity.html: * platform/mac/fast/dom/wrapper-classes-objc.html: * platform/mac/fast/dom/wrapper-round-tripping.html: * platform/mac/fast/events/objc-event-api.html: * platform/mac/fast/events/objc-keyboard-event-creation.html: * platform/qt/fast/events/event-sender-keydown-frame.html: * platform/win/fast/events/alt-numpad.html: * platform/win/fast/events/alt-space-scroll.html: * platform/win/fast/events/double-dead-char.html: * platform/win/fast/events/keyLocation-numpad.html: * platform/win/fast/events/panScroll-correct-direction.html: * platform/win/fast/events/panScroll-event-fired.html: * platform/win/fast/events/panScroll-image-no-scroll.html: * platform/win/fast/events/panScroll-imageMap-href-no-scroll.html: * platform/win/fast/events/panScroll-imageMap-noHref-scroll.html: * platform/win/fast/events/panScroll-nested-divs.html: * platform/win/fast/events/panScroll-no-iframe-jump.html: * platform/win/fast/events/panScroll-preventDefault.html: * platform/win/fast/events/script-tests/context-click-events.js: Canonical link: https://commits.webkit.org/107394@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-20 03:28:42 +00:00
if (window.testRunner)
testRunner.dumpAsText();
getElementsByTagName unable to find SVG camelCase elements imported into HTML https://bugs.webkit.org/show_bug.cgi?id=46800 Reviewed by Nikolas Zimmermann. Source/WebCore: Implement getElementsByTagName according to the algorithm in http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-getelementsbytagname. If the owner document of the element is html, the new class HTMLTagNodeList deals with finding the match(es) based on this algorithm. If the owner document is non HTML, the existing TagNodeList is used. Implement getElementsByTagNameNS according to the algorithm in http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-getelementsbytagnamens. The existing TagNodeList implements this algorithm. Cached results may have less hits after this change. Tag names that are equal when case insensitive but different when case sensitive can't share the result due to above algorithms, i.e. they would match differently in the non html part of the document. Tests: fast/dom/getElementsByTagName-localName-matching.html fast/dom/getElementsByTagName-localName-matching2.xhtml svg/dom/getElementsByTagName-localName-matching.html * dom/Node.cpp: (WebCore::Node::getElementsByTagName): create TagNodeList depending on owner document type. (WebCore::Node::getElementsByTagNameNS): do not lowercase localName for html. * dom/TagNodeList.cpp: (WebCore::HTMLTagNodeList::HTMLTagNodeList): add specialized TagNodeList for html matching rules. (WebCore): (WebCore::HTMLTagNodeList::nodeMatches): * dom/TagNodeList.h: (TagNodeList): (HTMLTagNodeList): (WebCore::HTMLTagNodeList::create): LayoutTests: Add tests for getElementsByTagName(NS) in html, xhtml, and svg documents. * fast/dom/getElementsByTagName-localName-matching-expected.txt: Added. * fast/dom/getElementsByTagName-localName-matching.html: Added. * fast/dom/getElementsByTagName-localName-matching2-expected.txt: Added. * fast/dom/getElementsByTagName-localName-matching2.xhtml: Added. * svg/dom/getElementsByTagName-localName-matching-expected.txt: Added. * svg/dom/getElementsByTagName-localName-matching.html: Added. * svg/dom/script-tests/getElementsByTagName-localName-matching.js: Added. Canonical link: https://commits.webkit.org/101019@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-10 12:34:25 +00:00
var container = document.getElementById('container');
var svgdoc = new DOMParser().parseFromString(
'<svg xmlns="http://www.w3.org/2000/svg"><linearGradient></linearGradient><img/></svg>', 'text/xml');
var elem = document.importNode(svgdoc.documentElement,true);
container.appendChild(elem);
shouldBe("container.getElementsByTagName('linearGradient').length", "2");
shouldBe("container.getElementsByTagName('lineargradient').length", "0");
shouldBe("container.getElementsByTagName('LINEARGRADIENT').length", "0");
shouldBe("container.getElementsByTagName('FOO').length", "1");
shouldBe("container.getElementsByTagName('foo').length", "1");
shouldBe("container.getElementsByTagName('Foo').length", "0");
shouldBe("container.getElementsByTagName('img').length", "2");
shouldBe("container.getElementsByTagName('IMG').length", "0");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'linearGradient').length", "1");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'lineargradient').length", "0");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'LINEARGRADIENT').length", "0");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'FOO').length", "0");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'foo').length", "0");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'Foo').length", "0");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'img').length", "1");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'IMG').length", "0");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/1999/xhtml', 'linearGradient').length", "1");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/1999/xhtml', 'lineargradient').length", "0");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/1999/xhtml', 'LINEARGRADIENT').length", "0");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/1999/xhtml', 'FOO').length", "1");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/1999/xhtml', 'foo').length", "1");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/1999/xhtml', 'Foo').length", "0");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/1999/xhtml', 'img').length", "1");
shouldBe("container.getElementsByTagNameNS('http://www.w3.org/1999/xhtml', 'IMG').length", "0");
]]></script>
</body>
</html>