Changeset 167584 in webkit
- Timestamp:
- Apr 20, 2014 11:08:05 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r167583 r167584 1 2014-04-20 Benjamin Poulain <benjamin@webkit.org> 2 3 Add Element.matches, the standard name for webkitMatchesSelector 4 https://bugs.webkit.org/show_bug.cgi?id=131922 5 6 Reviewed by Andreas Kling. 7 8 Update the tests to verify both Element.matches and Element.webkitMatchesSelector 9 10 * fast/dom/SelectorAPI/attrname-case-insensitive-expected.txt: 11 * fast/dom/SelectorAPI/attrname-case-insensitive.html: 12 * fast/dom/SelectorAPI/attrname-case-sensitive-expected.txt: 13 * fast/dom/SelectorAPI/attrname-case-sensitive.xhtml: 14 * fast/dom/SelectorAPI/caseID-almost-strict-expected.txt: 15 * fast/dom/SelectorAPI/caseID-almost-strict.html: 16 * fast/dom/SelectorAPI/caseID-expected.txt: 17 * fast/dom/SelectorAPI/caseID-strict-expected.txt: 18 * fast/dom/SelectorAPI/caseID-strict.html: 19 * fast/dom/SelectorAPI/caseID.html: 20 * fast/dom/SelectorAPI/caseTag-expected.txt: 21 * fast/dom/SelectorAPI/caseTag.html: 22 * fast/dom/SelectorAPI/caseTagX-expected.txt: 23 * fast/dom/SelectorAPI/caseTagX.xhtml: 24 * fast/dom/SelectorAPI/detached-element-expected.txt: 25 * fast/dom/SelectorAPI/not-supported-namespace-in-selector-expected.txt: 26 * fast/dom/SelectorAPI/not-supported-namespace-in-selector.html: 27 * fast/dom/SelectorAPI/script-tests/detached-element.js: 28 * fast/dom/SelectorAPI/script-tests/undefined-null-stringify.js: 29 * fast/dom/SelectorAPI/script-tests/viewless-document.js: 30 * fast/dom/SelectorAPI/undefined-null-stringify-expected.txt: 31 * fast/dom/SelectorAPI/viewless-document-expected.txt: 32 * fast/forms/radio/radio-live-validation-style-expected.txt: 33 * fast/forms/radio/radio-live-validation-style.html: 34 * fast/harness/results.html: 35 1 36 2014-04-20 Alexey Proskuryakov <ap@apple.com> 2 37 -
trunk/LayoutTests/fast/dom/SelectorAPI/attrname-case-insensitive-expected.txt
r153631 r167584 1 1 PASS document.querySelector('div[baR]') is document.getElementById('bar') 2 PASS document.getElementById('bar').matches('div[baR]') is true 2 3 PASS document.getElementById('bar').webkitMatchesSelector('div[baR]') is true 3 4 PASS document.querySelector('div[bar]') is document.getElementById('bar') 5 PASS document.getElementById('bar').matches('div[bar]') is true 4 6 PASS document.getElementById('bar').webkitMatchesSelector('div[bar]') is true 5 7 PASS document.querySelector('div[BAR]') is document.getElementById('bar') 8 PASS document.getElementById('bar').matches('div[BAR]') is true 6 9 PASS document.getElementById('bar').webkitMatchesSelector('div[BAR]') is true 7 10 PASS document.querySelector('div[bAR]') is document.getElementById('bar') 11 PASS document.getElementById('bar').matches('div[bAR]') is true 8 12 PASS document.getElementById('bar').webkitMatchesSelector('div[bAR]') is true 9 13 PASS document.querySelector('div[baR="10"]') is document.getElementById('bar') 14 PASS document.getElementById('bar').matches('div[baR="10"]') is true 10 15 PASS document.getElementById('bar').webkitMatchesSelector('div[baR="10"]') is true 11 16 PASS document.querySelector('div[bar="10"]') is document.getElementById('bar') 17 PASS document.getElementById('bar').matches('div[bar="10"]') is true 12 18 PASS document.getElementById('bar').webkitMatchesSelector('div[bar="10"]') is true 13 19 PASS document.querySelector('div[BAR="10"]') is document.getElementById('bar') 20 PASS document.getElementById('bar').matches('div[BAR="10"]') is true 14 21 PASS document.getElementById('bar').webkitMatchesSelector('div[BAR="10"]') is true 15 22 PASS document.querySelector('div[bAR="10"]') is document.getElementById('bar') 23 PASS document.getElementById('bar').matches('div[bAR="10"]') is true 16 24 PASS document.getElementById('bar').webkitMatchesSelector('div[bAR="10"]') is true 17 25 PASS document.querySelector('path[pathLength]') is document.getElementById('pa') 26 PASS document.getElementById('pa').matches('path[pathLength]') is true 18 27 PASS document.getElementById('pa').webkitMatchesSelector('path[pathLength]') is true 19 28 PASS content.querySelector('path[pathlength]') is null 20 29 PASS content.querySelector('path[pathLengTh]') is null 21 30 PASS document.querySelector('path[pathLength="200"]') is document.getElementById('pa') 31 PASS document.getElementById('pa').matches('path[pathLength="200"]') is true 22 32 PASS document.getElementById('pa').webkitMatchesSelector('path[pathLength="200"]') is true 23 33 PASS content.querySelector('path[pathlength="200"]') is null -
trunk/LayoutTests/fast/dom/SelectorAPI/attrname-case-insensitive.html
r155265 r167584 19 19 function checkMatchingSelector(selector, elementId) { 20 20 shouldBe("document.querySelector('" + selector + "')", "document.getElementById('" + elementId + "')"); 21 shouldBeTrue("document.getElementById('" + elementId + "').matches('" + selector + "')"); 21 22 shouldBeTrue("document.getElementById('" + elementId + "').webkitMatchesSelector('" + selector + "')"); 22 23 } -
trunk/LayoutTests/fast/dom/SelectorAPI/attrname-case-sensitive-expected.txt
r153631 r167584 1 1 PASS document.querySelector('div[baR]') is document.getElementById('bar') 2 PASS document.getElementById('bar').matches('div[baR]') is true 2 3 PASS document.getElementById('bar').webkitMatchesSelector('div[baR]') is true 3 4 PASS content.querySelector('div[bar]') is null … … 5 6 PASS content.querySelector('div[bAR]') is null 6 7 PASS document.querySelector('div[baR="10"]') is document.getElementById('bar') 8 PASS document.getElementById('bar').matches('div[baR="10"]') is true 7 9 PASS document.getElementById('bar').webkitMatchesSelector('div[baR="10"]') is true 8 10 PASS content.querySelector('div[bar="10"]') is null … … 10 12 PASS content.querySelector('div[bAR="10"]') is null 11 13 PASS document.querySelector('path[pathLength]') is document.getElementById('pa') 14 PASS document.getElementById('pa').matches('path[pathLength]') is true 12 15 PASS document.getElementById('pa').webkitMatchesSelector('path[pathLength]') is true 13 16 PASS content.querySelector('path[pathlength]') is null 14 17 PASS content.querySelector('path[pathLengTh]') is null 15 18 PASS document.querySelector('path[pathLength="200"]') is document.getElementById('pa') 19 PASS document.getElementById('pa').matches('path[pathLength="200"]') is true 16 20 PASS document.getElementById('pa').webkitMatchesSelector('path[pathLength="200"]') is true 17 21 PASS content.querySelector('path[pathlength="200"]') is null -
trunk/LayoutTests/fast/dom/SelectorAPI/attrname-case-sensitive.xhtml
r155265 r167584 22 22 function checkMatchingSelector(selector, elementId) { 23 23 shouldBe("document.querySelector('" + selector + "')", "document.getElementById('" + elementId + "')"); 24 shouldBeTrue("document.getElementById('" + elementId + "').matches('" + selector + "')"); 24 25 shouldBeTrue("document.getElementById('" + elementId + "').webkitMatchesSelector('" + selector + "')"); 25 26 } -
trunk/LayoutTests/fast/dom/SelectorAPI/caseID-almost-strict-expected.txt
r48723 r167584 3 3 PASS document.querySelector('#UPPER1').textContent is 'UPPER 1' 4 4 PASS document.querySelector('#upper2') is null 5 PASS document.getElementById('lower1').matches('#lower1') is true 6 PASS document.getElementById('lower2').matches('#LOWER2') is false 7 PASS document.getElementById('UPPER1').matches('#UPPER1') is true 8 PASS document.getElementById('UPPER2').matches('#upper2') is false 5 9 PASS document.getElementById('lower1').webkitMatchesSelector('#lower1') is true 6 10 PASS document.getElementById('lower2').webkitMatchesSelector('#LOWER2') is false -
trunk/LayoutTests/fast/dom/SelectorAPI/caseID-almost-strict.html
r155265 r167584 17 17 shouldBeNull("document.querySelector('#upper2')"); 18 18 19 shouldBeTrue("document.getElementById('lower1').matches('#lower1')"); 20 shouldBeFalse("document.getElementById('lower2').matches('#LOWER2')"); 21 shouldBeTrue("document.getElementById('UPPER1').matches('#UPPER1')"); 22 shouldBeFalse("document.getElementById('UPPER2').matches('#upper2')"); 19 23 shouldBeTrue("document.getElementById('lower1').webkitMatchesSelector('#lower1')"); 20 24 shouldBeFalse("document.getElementById('lower2').webkitMatchesSelector('#LOWER2')"); -
trunk/LayoutTests/fast/dom/SelectorAPI/caseID-expected.txt
r48723 r167584 3 3 PASS document.querySelector('#UPPER1').textContent is 'UPPER 1' 4 4 PASS document.querySelector('#upper2').textContent is 'UPPER 2' 5 PASS document.getElementById('lower1').matches('#lower1') is true 6 PASS document.getElementById('lower2').matches('#LOWER2') is true 7 PASS document.getElementById('UPPER1').matches('#UPPER1') is true 8 PASS document.getElementById('UPPER2').matches('#upper2') is true 5 9 PASS document.getElementById('lower1').webkitMatchesSelector('#lower1') is true 6 10 PASS document.getElementById('lower2').webkitMatchesSelector('#LOWER2') is true -
trunk/LayoutTests/fast/dom/SelectorAPI/caseID-strict-expected.txt
r48723 r167584 3 3 PASS document.querySelector('#UPPER1').textContent is 'UPPER 1' 4 4 PASS document.querySelector('#upper2') is null 5 PASS document.getElementById('lower1').matches('#lower1') is true 6 PASS document.getElementById('lower2').matches('#LOWER2') is false 7 PASS document.getElementById('UPPER1').matches('#UPPER1') is true 8 PASS document.getElementById('UPPER2').matches('#upper2') is false 5 9 PASS document.getElementById('lower1').webkitMatchesSelector('#lower1') is true 6 10 PASS document.getElementById('lower2').webkitMatchesSelector('#LOWER2') is false -
trunk/LayoutTests/fast/dom/SelectorAPI/caseID-strict.html
r155265 r167584 17 17 shouldBeNull("document.querySelector('#upper2')"); 18 18 19 shouldBeTrue("document.getElementById('lower1').matches('#lower1')"); 20 shouldBeFalse("document.getElementById('lower2').matches('#LOWER2')"); 21 shouldBeTrue("document.getElementById('UPPER1').matches('#UPPER1')"); 22 shouldBeFalse("document.getElementById('UPPER2').matches('#upper2')"); 19 23 shouldBeTrue("document.getElementById('lower1').webkitMatchesSelector('#lower1')"); 20 24 shouldBeFalse("document.getElementById('lower2').webkitMatchesSelector('#LOWER2')"); -
trunk/LayoutTests/fast/dom/SelectorAPI/caseID.html
r155265 r167584 16 16 shouldBe("document.querySelector('#upper2').textContent", "'UPPER 2'"); 17 17 18 shouldBeTrue("document.getElementById('lower1').matches('#lower1')"); 19 shouldBeTrue("document.getElementById('lower2').matches('#LOWER2')"); 20 shouldBeTrue("document.getElementById('UPPER1').matches('#UPPER1')"); 21 shouldBeTrue("document.getElementById('UPPER2').matches('#upper2')"); 18 22 shouldBeTrue("document.getElementById('lower1').webkitMatchesSelector('#lower1')"); 19 23 shouldBeTrue("document.getElementById('lower2').webkitMatchesSelector('#LOWER2')"); -
trunk/LayoutTests/fast/dom/SelectorAPI/caseTag-expected.txt
r48723 r167584 1 1 PASS document.querySelector('div SPAN').textContent is 'lower' 2 2 PASS document.querySelector('div p').textContent is 'UPPER' 3 PASS document.getElementById('lower1').matches('div SPAN') is true 4 PASS document.getElementById('UPPER1').matches('div p') is true 3 5 PASS document.getElementById('lower1').webkitMatchesSelector('div SPAN') is true 4 6 PASS document.getElementById('UPPER1').webkitMatchesSelector('div p') is true -
trunk/LayoutTests/fast/dom/SelectorAPI/caseTag.html
r155265 r167584 12 12 shouldBe("document.querySelector('div p').textContent", "'UPPER'"); 13 13 14 shouldBeTrue("document.getElementById('lower1').matches('div SPAN')"); 15 shouldBeTrue("document.getElementById('UPPER1').matches('div p')"); 14 16 shouldBeTrue("document.getElementById('lower1').webkitMatchesSelector('div SPAN')"); 15 17 shouldBeTrue("document.getElementById('UPPER1').webkitMatchesSelector('div p')"); -
trunk/LayoutTests/fast/dom/SelectorAPI/caseTagX-expected.txt
r48723 r167584 1 1 PASS document.querySelector('div SPAN') is null 2 PASS document.getElementById('lower1').matches('div SPAN') is false 2 3 PASS document.getElementById('lower1').webkitMatchesSelector('div SPAN') is false 3 4 PASS successfullyParsed is true -
trunk/LayoutTests/fast/dom/SelectorAPI/caseTagX.xhtml
r155265 r167584 16 16 shouldBeNull("document.querySelector('div SPAN')"); 17 17 18 shouldBeFalse("document.getElementById('lower1').matches('div SPAN')"); 18 19 shouldBeFalse("document.getElementById('lower1').webkitMatchesSelector('div SPAN')"); 19 20 ]]> -
trunk/LayoutTests/fast/dom/SelectorAPI/detached-element-expected.txt
r48723 r167584 12 12 PASS noChild.querySelector('div') is null 13 13 PASS noChild.querySelectorAll('div').length is 0 14 PASS correctNode.matches('div') is true 15 PASS correctNode.matches('#testId') is true 14 16 PASS correctNode.webkitMatchesSelector('div') is true 15 17 PASS correctNode.webkitMatchesSelector('#testId') is true -
trunk/LayoutTests/fast/dom/SelectorAPI/not-supported-namespace-in-selector-expected.txt
r134879 r167584 3 3 PASS: document.querySelector('bbb|pre') throws: Error: NamespaceError: DOM Exception 14 4 4 PASS: document.querySelectorAll('bbb|pre') throws: Error: NamespaceError: DOM Exception 14 5 PASS: document.body.matches('bbb|pre') throws: Error: NamespaceError: DOM Exception 14 5 6 PASS: document.body.webkitMatchesSelector('bbb|pre') throws: Error: NamespaceError: DOM Exception 14 6 7 PASS: document.querySelector('*|pre') did not throw 7 8 PASS: document.querySelectorAll('*|pre') did not throw 9 PASS: document.body.matches('*|pre') did not throw 8 10 PASS: document.body.webkitMatchesSelector('*|pre') did not throw 9 11 PASS: document.querySelector('|pre') did not throw 10 12 PASS: document.querySelectorAll('|pre') did not throw 13 PASS: document.body.matches('|pre') did not throw 11 14 PASS: document.body.webkitMatchesSelector('|pre') did not throw 12 15 PASS: document.querySelector('div bbb|pre') throws: Error: NamespaceError: DOM Exception 14 13 16 PASS: document.querySelectorAll('div bbb|pre') throws: Error: NamespaceError: DOM Exception 14 17 PASS: document.body.matches('div bbb|pre') throws: Error: NamespaceError: DOM Exception 14 14 18 PASS: document.body.webkitMatchesSelector('div bbb|pre') throws: Error: NamespaceError: DOM Exception 14 15 19 PASS: document.querySelector('div *|pre') did not throw 16 20 PASS: document.querySelectorAll('div *|pre') did not throw 21 PASS: document.body.matches('div *|pre') did not throw 17 22 PASS: document.body.webkitMatchesSelector('div *|pre') did not throw 18 23 PASS: document.querySelector('div |pre') did not throw 19 24 PASS: document.querySelectorAll('div |pre') did not throw 25 PASS: document.body.matches('div |pre') did not throw 20 26 PASS: document.body.webkitMatchesSelector('div |pre') did not throw 21 27 PASS: document.querySelector('[bbb|name=value]') throws: Error: NamespaceError: DOM Exception 14 22 28 PASS: document.querySelectorAll('[bbb|name=value]') throws: Error: NamespaceError: DOM Exception 14 29 PASS: document.body.matches('[bbb|name=value]') throws: Error: NamespaceError: DOM Exception 14 23 30 PASS: document.body.webkitMatchesSelector('[bbb|name=value]') throws: Error: NamespaceError: DOM Exception 14 24 31 PASS: document.querySelector('[*|name=value]') did not throw 25 32 PASS: document.querySelectorAll('[*|name=value]') did not throw 33 PASS: document.body.matches('[*|name=value]') did not throw 26 34 PASS: document.body.webkitMatchesSelector('[*|name=value]') did not throw 27 35 PASS: document.querySelector('[|name=value]') did not throw 28 36 PASS: document.querySelectorAll('[|name=value]') did not throw 37 PASS: document.body.matches('[|name=value]') did not throw 29 38 PASS: document.body.webkitMatchesSelector('[|name=value]') did not throw 30 39 PASS: document.querySelector(':-webkit-any(bbb|pre)') throws: Error: NamespaceError: DOM Exception 14 31 40 PASS: document.querySelector('div [bbb|name=value]') throws: Error: NamespaceError: DOM Exception 14 32 41 PASS: document.querySelectorAll('div [bbb|name=value]') throws: Error: NamespaceError: DOM Exception 14 42 PASS: document.body.matches('div [bbb|name=value]') throws: Error: NamespaceError: DOM Exception 14 33 43 PASS: document.body.webkitMatchesSelector('div [bbb|name=value]') throws: Error: NamespaceError: DOM Exception 14 34 44 PASS: document.querySelector('div [*|name=value]') did not throw 35 45 PASS: document.querySelectorAll('div [*|name=value]') did not throw 46 PASS: document.body.matches('div [*|name=value]') did not throw 36 47 PASS: document.body.webkitMatchesSelector('div [*|name=value]') did not throw 37 48 PASS: document.querySelector('div [|name=value]') did not throw 38 49 PASS: document.querySelectorAll('div [|name=value]') did not throw 50 PASS: document.body.matches('div [|name=value]') did not throw 39 51 PASS: document.body.webkitMatchesSelector('div [|name=value]') did not throw 40 52 -
trunk/LayoutTests/fast/dom/SelectorAPI/not-supported-namespace-in-selector.html
r120792 r167584 34 34 shouldThrow("document.querySelector('bbb|pre')"); 35 35 shouldThrow("document.querySelectorAll('bbb|pre')"); 36 shouldThrow("document.body.matches('bbb|pre')"); 36 37 shouldThrow("document.body.webkitMatchesSelector('bbb|pre')"); 37 38 shouldNotThrow("document.querySelector('*|pre')"); 38 39 shouldNotThrow("document.querySelectorAll('*|pre')"); 40 shouldNotThrow("document.body.matches('*|pre')"); 39 41 shouldNotThrow("document.body.webkitMatchesSelector('*|pre')"); 40 42 shouldNotThrow("document.querySelector('|pre')"); 41 43 shouldNotThrow("document.querySelectorAll('|pre')"); 44 shouldNotThrow("document.body.matches('|pre')"); 42 45 shouldNotThrow("document.body.webkitMatchesSelector('|pre')"); 43 46 44 47 shouldThrow("document.querySelector('div bbb|pre')"); 45 48 shouldThrow("document.querySelectorAll('div bbb|pre')"); 49 shouldThrow("document.body.matches('div bbb|pre')"); 46 50 shouldThrow("document.body.webkitMatchesSelector('div bbb|pre')"); 47 51 shouldNotThrow("document.querySelector('div *|pre')"); 48 52 shouldNotThrow("document.querySelectorAll('div *|pre')"); 53 shouldNotThrow("document.body.matches('div *|pre')"); 49 54 shouldNotThrow("document.body.webkitMatchesSelector('div *|pre')"); 50 55 shouldNotThrow("document.querySelector('div |pre')"); 51 56 shouldNotThrow("document.querySelectorAll('div |pre')"); 57 shouldNotThrow("document.body.matches('div |pre')"); 52 58 shouldNotThrow("document.body.webkitMatchesSelector('div |pre')"); 53 59 54 60 shouldThrow("document.querySelector('[bbb|name=value]')"); 55 61 shouldThrow("document.querySelectorAll('[bbb|name=value]')"); 62 shouldThrow("document.body.matches('[bbb|name=value]')"); 56 63 shouldThrow("document.body.webkitMatchesSelector('[bbb|name=value]')"); 57 64 shouldNotThrow("document.querySelector('[*|name=value]')"); 58 65 shouldNotThrow("document.querySelectorAll('[*|name=value]')"); 66 shouldNotThrow("document.body.matches('[*|name=value]')"); 59 67 shouldNotThrow("document.body.webkitMatchesSelector('[*|name=value]')"); 60 68 shouldNotThrow("document.querySelector('[|name=value]')"); 61 69 shouldNotThrow("document.querySelectorAll('[|name=value]')"); 70 shouldNotThrow("document.body.matches('[|name=value]')"); 62 71 shouldNotThrow("document.body.webkitMatchesSelector('[|name=value]')"); 63 72 … … 66 75 shouldThrow("document.querySelector('div [bbb|name=value]')"); 67 76 shouldThrow("document.querySelectorAll('div [bbb|name=value]')"); 77 shouldThrow("document.body.matches('div [bbb|name=value]')"); 68 78 shouldThrow("document.body.webkitMatchesSelector('div [bbb|name=value]')"); 69 79 shouldNotThrow("document.querySelector('div [*|name=value]')"); 70 80 shouldNotThrow("document.querySelectorAll('div [*|name=value]')"); 81 shouldNotThrow("document.body.matches('div [*|name=value]')"); 71 82 shouldNotThrow("document.body.webkitMatchesSelector('div [*|name=value]')"); 72 83 shouldNotThrow("document.querySelector('div [|name=value]')"); 73 84 shouldNotThrow("document.querySelectorAll('div [|name=value]')"); 85 shouldNotThrow("document.body.matches('div [|name=value]')"); 74 86 shouldNotThrow("document.body.webkitMatchesSelector('div [|name=value]')"); 75 87 } -
trunk/LayoutTests/fast/dom/SelectorAPI/script-tests/detached-element.js
r98407 r167584 20 20 shouldBe("noChild.querySelectorAll('div').length", "0"); 21 21 22 shouldBeTrue("correctNode.matches('div')"); 23 shouldBeTrue("correctNode.matches('#testId')"); 22 24 shouldBeTrue("correctNode.webkitMatchesSelector('div')"); 23 25 shouldBeTrue("correctNode.webkitMatchesSelector('#testId')"); -
trunk/LayoutTests/fast/dom/SelectorAPI/script-tests/undefined-null-stringify.js
r98407 r167584 18 18 shouldBe("document.querySelectorAll(undefined).item(0)", "undefinedNode"); 19 19 20 shouldBeTrue("nullNode.matches(null)"); 21 shouldBeTrue("undefinedNode.matches(undefined)"); 20 22 shouldBeTrue("nullNode.webkitMatchesSelector(null)"); 21 23 shouldBeTrue("undefinedNode.webkitMatchesSelector(undefined)"); -
trunk/LayoutTests/fast/dom/SelectorAPI/script-tests/viewless-document.js
r98407 r167584 21 21 shouldBe("testDoc.querySelectorAll('p span').length", "1"); 22 22 23 shouldBeTrue("p1.matches('p')"); 24 shouldBeTrue("s1.matches('p span')"); 25 shouldBeTrue("s2.matches('#s2')"); 26 shouldBeTrue("d1.matches('.d1')"); 23 27 shouldBeTrue("p1.webkitMatchesSelector('p')"); 24 28 shouldBeTrue("s1.webkitMatchesSelector('p span')"); -
trunk/LayoutTests/fast/dom/SelectorAPI/undefined-null-stringify-expected.txt
r48723 r167584 10 10 PASS document.querySelectorAll(undefined).length is 1 11 11 PASS document.querySelectorAll(undefined).item(0) is undefinedNode 12 PASS nullNode.matches(null) is true 13 PASS undefinedNode.matches(undefined) is true 12 14 PASS nullNode.webkitMatchesSelector(null) is true 13 15 PASS undefinedNode.webkitMatchesSelector(undefined) is true -
trunk/LayoutTests/fast/dom/SelectorAPI/viewless-document-expected.txt
r48723 r167584 9 9 PASS testDoc.querySelector('.d1') is d1 10 10 PASS testDoc.querySelectorAll('p span').length is 1 11 PASS p1.matches('p') is true 12 PASS s1.matches('p span') is true 13 PASS s2.matches('#s2') is true 14 PASS d1.matches('.d1') is true 11 15 PASS p1.webkitMatchesSelector('p') is true 12 16 PASS s1.webkitMatchesSelector('p span') is true -
trunk/LayoutTests/fast/forms/radio/radio-live-validation-style-expected.txt
r137565 r167584 7 7 PASS backgroundOf($("radio1")) is validColor 8 8 PASS parent.removeChild($("radio2")); backgroundOf($("radio1")) is invalidColor 9 PASS $("radio1").remove(); radio2.webkitMatchesSelector(":valid") is false 9 PASS $("radio1").remove(); radio2.matches(":valid") is false 10 PASS radio2.remove(); radio2.matches(":valid") is true 11 FAIL $("radio1").remove(); radio2.webkitMatchesSelector(":valid") should be false. Threw exception TypeError: null is not an object (evaluating '$("radio1").remove') 10 12 PASS radio2.remove(); radio2.webkitMatchesSelector(":valid") is true 11 13 -
trunk/LayoutTests/fast/forms/radio/radio-live-validation-style.html
r155268 r167584 35 35 '<input type=radio name=group1 required id=radio3>'; 36 36 var radio2 = $('radio2'); 37 shouldBeFalse('$("radio1").remove(); radio2.matches(":valid")'); 38 shouldBeTrue('radio2.remove(); radio2.matches(":valid")'); 37 39 shouldBeFalse('$("radio1").remove(); radio2.webkitMatchesSelector(":valid")'); 38 40 shouldBeTrue('radio2.remove(); radio2.webkitMatchesSelector(":valid")'); -
trunk/LayoutTests/fast/harness/results.html
r159374 r167584 274 274 function matchesSelector(node, selector) 275 275 { 276 if (node.matches) 277 return node.matches(selector); 278 276 279 if (node.webkitMatchesSelector) 277 280 return node.webkitMatchesSelector(selector); -
trunk/Source/WebCore/ChangeLog
r167582 r167584 1 2014-04-20 Benjamin Poulain <benjamin@webkit.org> 2 3 Add Element.matches, the standard name for webkitMatchesSelector 4 https://bugs.webkit.org/show_bug.cgi?id=131922 5 6 Reviewed by Andreas Kling. 7 8 This patch just renames webkitMatchesSelector() to matches(). 9 10 * bindings/scripts/CodeGeneratorObjC.pm: 11 (GenerateImplementation): 12 The Objective-C binding generator only supported ImplementedAs for getters and setters. 13 This adds support for the option so that Element.matches can be generated for Obj-C. 14 15 * dom/Element.cpp: 16 (WebCore::Element::matches): 17 (WebCore::Element::webkitMatchesSelector): Deleted. 18 * dom/Element.h: 19 * dom/Element.idl: 20 * inspector/InspectorCSSAgent.cpp: 21 (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList): 22 1 23 2014-04-20 Zalan Bujtas <zalan@apple.com> 2 24 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm
r165676 r167584 1560 1560 $content = "${implementedBy}::" . $codeGenerator->WK_lcfirst($functionName) . "(" . join(", ", @parameterNames) . ")"; 1561 1561 } else { 1562 $content = "$caller->" . $codeGenerator->WK_lcfirst($functionName) . "(" . join(", ", @parameterNames) . ")"; 1562 my $functionImplementationName = $function->signature->extendedAttributes->{"ImplementedAs"} || $codeGenerator->WK_lcfirst($functionName); 1563 $content = "$caller->" . $functionImplementationName . "(" . join(", ", @parameterNames) . ")"; 1563 1564 } 1564 1565 -
trunk/Source/WebCore/dom/Element.cpp
r167560 r167584 2297 2297 } 2298 2298 2299 bool Element:: webkitMatchesSelector(const String& selector, ExceptionCode& ec)2299 bool Element::matches(const String& selector, ExceptionCode& ec) 2300 2300 { 2301 2301 SelectorQuery* selectorQuery = document().selectorQueryForString(selector, ec); -
trunk/Source/WebCore/dom/Element.h
r167210 r167584 457 457 virtual bool matchesReadOnlyPseudoClass() const; 458 458 virtual bool matchesReadWritePseudoClass() const; 459 bool webkitMatchesSelector(const String& selectors, ExceptionCode&);459 bool matches(const String& selectors, ExceptionCode&); 460 460 virtual bool shouldAppearIndeterminate() const; 461 461 -
trunk/Source/WebCore/dom/Element.idl
r167466 r167584 108 108 [RaisesException] NodeList querySelectorAll(DOMString selectors); 109 109 110 // WebKit extension, pending specification.111 [ RaisesException] boolean webkitMatchesSelector([Default=Undefined] optional DOMString selectors);110 [RaisesException] boolean matches([Default=Undefined] optional DOMString selectors); 111 [ImplementedAs=matches, RaisesException] boolean webkitMatchesSelector([Default=Undefined] optional DOMString selectors); 112 112 113 113 // ElementTraversal API -
trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp
r167571 r167584 1159 1159 long index = 0; 1160 1160 for (const CSSSelector* selector = selectorList.first(); selector; selector = CSSSelectorList::next(selector)) { 1161 bool matched = element-> webkitMatchesSelector(selector->selectorText(), IGNORE_EXCEPTION);1161 bool matched = element->matches(selector->selectorText(), IGNORE_EXCEPTION); 1162 1162 if (matched) 1163 1163 matchingSelectors->addItem(index);
Note: See TracChangeset
for help on using the changeset viewer.