mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #16883 - jdm:mutationobserver, r=jdm
Mutation Observer API Rebased from #16668. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix (partially) #6633 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16883) <!-- Reviewable:end -->
This commit is contained in:
commit
5da0aa9f11
15 changed files with 432 additions and 180 deletions
|
@ -30,13 +30,13 @@ macro_rules! sizeof_checker (
|
|||
|
||||
// Update the sizes here
|
||||
sizeof_checker!(size_event_target, EventTarget, 40);
|
||||
sizeof_checker!(size_node, Node, 152);
|
||||
sizeof_checker!(size_element, Element, 320);
|
||||
sizeof_checker!(size_htmlelement, HTMLElement, 336);
|
||||
sizeof_checker!(size_div, HTMLDivElement, 336);
|
||||
sizeof_checker!(size_span, HTMLSpanElement, 336);
|
||||
sizeof_checker!(size_text, Text, 184);
|
||||
sizeof_checker!(size_characterdata, CharacterData, 184);
|
||||
sizeof_checker!(size_node, Node, 184);
|
||||
sizeof_checker!(size_element, Element, 352);
|
||||
sizeof_checker!(size_htmlelement, HTMLElement, 368);
|
||||
sizeof_checker!(size_div, HTMLDivElement, 368);
|
||||
sizeof_checker!(size_span, HTMLSpanElement, 368);
|
||||
sizeof_checker!(size_text, Text, 216);
|
||||
sizeof_checker!(size_characterdata, CharacterData, 216);
|
||||
sizeof_checker!(size_servothreadsafelayoutnode, ServoThreadSafeLayoutNode, 16);
|
||||
|
||||
// We use these types in the parallel traversal. They should stay pointer-sized.
|
||||
|
|
|
@ -1,114 +1,27 @@
|
|||
[MutationObserver-attributes.html]
|
||||
type: testharness
|
||||
[attributes Element.id: update, no oldValue, mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.id: update mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.id: empty string update mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.id: same value mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.unknown: IDL attribute no mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes HTMLInputElement.type: type update mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.className: new value mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.className: empty string update mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.className: same value mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.className: same multiple values mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.classList.add: single token addition mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.classList.add: multiple tokens addition mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.classList.add: syntax err/no mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.classList.add: invalid character/no mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.classList.add: same value mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.classList.remove: single token removal mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.classList.remove: multiple tokens removal mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.classList.remove: missing token removal mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.classList.toggle: token removal mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.classList.toggle: token addition mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.classList.toggle: forced token removal mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.classList.toggle: forced missing token removal no mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.classList.toggle: forced existing token addition no mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.classList.toggle: forced token addition mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.attributes.value: update mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.attributes.value: same id mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.setAttribute: id mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.setAttribute: same class mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.setAttribute: classname mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.removeAttribute: removal mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.removeAttribute: removal no mutation]
|
||||
expected: FAIL
|
||||
|
||||
[childList HTMLInputElement.removeAttribute: type removal mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.setAttributeNS: creation mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.setAttributeNS: prefixed attribute creation mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.removeAttributeNS: removal mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.removeAttributeNS: removal no mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes Element.removeAttributeNS: prefixed attribute removal no mutation]
|
||||
[attributes Element.className: empty string update mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributes/attributeFilter Element.id/Element.className: update mutation]
|
||||
|
@ -117,12 +30,6 @@
|
|||
[attributes/attributeFilter Element.id/Element.className: multiple filter update mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributeOldValue alone Element.id: update mutation]
|
||||
expected: FAIL
|
||||
|
||||
[attributeFilter alone Element.id/Element.className: multiple filter update mutation]
|
||||
expected: FAIL
|
||||
|
||||
[childList false: no childList mutation]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,59 +1,60 @@
|
|||
[MutationObserver-characterData.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[characterData Text.data: simple mutation without oldValue]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Text.data: simple mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Text.appendData: simple mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Text.appendData: empty string mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Text.appendData: null string mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Text.insertData: simple mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Text.insertData: empty string mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Text.insertData: null string mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Text.deleteData: simple mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Text.deleteData: empty mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Text.replaceData: simple mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Text.replaceData: empty mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData ProcessingInstruction: data mutations]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Comment: data mutations]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Range.deleteContents: child and data removal mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Range.deleteContents: child and data removal mutation (2)]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Range.extractContents: child and data removal mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData Range.extractContents: child and data removal mutation (2)]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[characterData/characterDataOldValue alone Text.data: simple mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,95 +1,90 @@
|
|||
[MutationObserver-childList.html]
|
||||
type: testharness
|
||||
[childList Node.nodeValue: no mutation]
|
||||
expected: FAIL
|
||||
|
||||
expected: TIMEOUT
|
||||
[childList Node.textContent: replace content mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.textContent: no previous content mutation]
|
||||
expected: FAIL
|
||||
|
||||
[childList Node.textContent: textContent no mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.textContent: empty string mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.normalize mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.normalize mutations]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.insertBefore: addition mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.insertBefore: removal mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.insertBefore: removal and addition mutations]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.insertBefore: fragment addition mutations]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.insertBefore: fragment removal mutations]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.insertBefore: last child addition mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.appendChild: addition mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.appendChild: removal mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.appendChild: removal and addition mutations]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.appendChild: fragment addition mutations]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.appendChild: fragment removal mutations]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.appendChild: addition outside document tree mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.replaceChild: replacement mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.replaceChild: removal mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.replaceChild: internal replacement mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.removeChild: removal mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Range.deleteContents: child removal mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Range.deleteContents: child and data removal mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Range.extractContents: child removal mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Range.extractContents: child and data removal mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Range.insertNode: child insertion mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Range.insertNode: children insertion mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Range.surroundContents: children removal and addition mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[childList Node.replaceChild: self internal replacement mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
[MutationObserver-inner-outer.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[innerHTML mutation]
|
||||
expected: FAIL
|
||||
|
||||
[innerHTML with 2 children mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[outerHTML mutation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -2,3 +2,4 @@
|
|||
type: testharness
|
||||
[Adopting a node should make it same-origin-domain.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue