Changeset 130041 in webkit
- Timestamp:
- Oct 1, 2012 5:46:56 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r130040 r130041 1 2012-10-01 Andrei Bucur <abucur@adobe.com> 2 3 [CSS Regions] Remove the deprecated API Document.webkitGetFlowByName 4 https://bugs.webkit.org/show_bug.cgi?id=97657 5 6 Reviewed by Andreas Kling. 7 8 To minimize the code change impact, I've created a new method in helper.js getFlowByName() that emulates the 9 behaviour of Document.webkitGetFlowByName(). All the occurrences of Document.webkitGetFlowByName in the tests/expected results 10 have been replaced with getFlowByName. 11 12 * fast/regions/get-regions-by-content-horiz-bt.html: 13 * fast/regions/get-regions-by-content-horiz-tb.html: 14 * fast/regions/get-regions-by-content-vert-lr.html: 15 * fast/regions/get-regions-by-content-vert-rl.html: 16 * fast/regions/get-regions-by-content.html: 17 * fast/regions/get-regions-by-content2.html: 18 * fast/regions/resources/helper.js: 19 (getFlowByName): 20 * fast/regions/webkit-named-flow-event-add-to-flow.html: 21 * fast/regions/webkit-named-flow-event-no-regions.html: 22 * fast/regions/webkit-named-flow-event-remove-from-dom.html: 23 * fast/regions/webkit-named-flow-event-remove-from-flow.html: 24 * fast/regions/webkit-named-flow-event-target-expected.txt: 25 * fast/regions/webkit-named-flow-event-target.html: 26 * fast/regions/webkit-named-flow-event-to-null.html: 27 * fast/regions/webkit-named-flow-event.html: 28 * fast/regions/webkit-named-flow-existing-flow.html: 29 * fast/regions/webkit-named-flow-first-empty-region-index.html: 30 * fast/regions/webkit-named-flow-flow-added.html: 31 * fast/regions/webkit-named-flow-get-content-expected.txt: 32 * fast/regions/webkit-named-flow-get-content.html: 33 * fast/regions/webkit-named-flow-get-regions.html: 34 * fast/regions/webkit-named-flow-invalid-name.html: 35 * fast/regions/webkit-named-flow-modified-flow.html: 36 * fast/regions/webkit-named-flow-name.html: 37 * fast/regions/webkit-named-flow-non-existing-flow.html: 38 * fast/regions/webkit-named-flow-overset.html: 39 * fast/regions/webkit-named-flow-removed-flow.html: 40 * fast/regions/webkit-named-flow-same-object.html: 41 1 42 2012-10-01 Christophe Dumez <christophe.dumez@intel.com> 2 43 -
trunk/LayoutTests/fast/regions/get-regions-by-content-horiz-bt.html
r124410 r130041 3 3 <head> 4 4 <script src="../../fast/js/resources/js-test-pre.js"></script> 5 <script src="resources/helper.js"></script> 5 6 <style> 6 7 html { -webkit-writing-mode: horizontal-bt; } … … 38 39 window.testRunner.dumpAsText(); 39 40 description("Test for 90759: [CSSRegions] Rename NamedFlow::getRegionsByContentNode to NamedFlow::getRegionsByContent"); 40 var namedFlow = document.webkitGetFlowByName("flow");41 var namedFlow = getFlowByName("flow"); 41 42 42 43 function hideRegions() … … 111 112 shouldBeEqualToString("regionListTextNode32.item(0).id", "region3"); 112 113 113 var namedFlow2 = document.webkitGetFlowByName("flow2");114 var namedFlow2 = getFlowByName("flow2"); 114 115 var regionListP1 = namedFlow2.getRegionsByContent(document.getElementById("p1")); 115 116 shouldBeNonNull("regionListP1"); -
trunk/LayoutTests/fast/regions/get-regions-by-content-horiz-tb.html
r124410 r130041 3 3 <head> 4 4 <script src="../../fast/js/resources/js-test-pre.js"></script> 5 <script src="resources/helper.js"></script> 5 6 <style> 6 7 body { font-family: monospace; } … … 51 52 } 52 53 53 var namedFlow = document.webkitGetFlowByName("flow");54 var namedFlow = getFlowByName("flow"); 54 55 55 56 var regionListArticle = namedFlow.getRegionsByContent(document.getElementById("article")); … … 113 114 shouldBeEqualToString("regionListTextNode32.item(0).id", "region3"); 114 115 115 var namedFlow2 = document.webkitGetFlowByName("flow2");116 var namedFlow2 = getFlowByName("flow2"); 116 117 var regionListP1 = namedFlow2.getRegionsByContent(document.getElementById("p1")); 117 118 shouldBeNonNull("regionListP1"); -
trunk/LayoutTests/fast/regions/get-regions-by-content-vert-lr.html
r124410 r130041 3 3 <head> 4 4 <script src="../../fast/js/resources/js-test-pre.js"></script> 5 <script src="resources/helper.js"></script> 5 6 <style> 6 7 html { -webkit-writing-mode: vertical-lr; } … … 39 40 window.testRunner.dumpAsText(); 40 41 description("Test for 90759: [CSSRegions] Rename NamedFlow::getRegionsByContentNode to NamedFlow::getRegionsByContent"); 41 var namedFlow = document.webkitGetFlowByName("flow");42 var namedFlow = getFlowByName("flow"); 42 43 43 44 function hideRegions() … … 113 114 shouldBeEqualToString("regionListTextNode32.item(0).id", "region3"); 114 115 115 var namedFlow2 = document.webkitGetFlowByName("flow2");116 var namedFlow2 = getFlowByName("flow2"); 116 117 var regionListP1 = namedFlow2.getRegionsByContent(document.getElementById("p1")); 117 118 shouldBeNonNull("regionListP1"); -
trunk/LayoutTests/fast/regions/get-regions-by-content-vert-rl.html
r124410 r130041 3 3 <head> 4 4 <script src="../../fast/js/resources/js-test-pre.js"></script> 5 <script src="resources/helper.js"></script> 5 6 <style> 6 7 html { -webkit-writing-mode: vertical-rl; } … … 39 40 window.testRunner.dumpAsText(); 40 41 description("Test for 90759: [CSSRegions] Rename NamedFlow::getRegionsByContentNode to NamedFlow::getRegionsByContent"); 41 var namedFlow = document.webkitGetFlowByName("flow");42 var namedFlow = getFlowByName("flow"); 42 43 43 44 function hideRegions() … … 113 114 shouldBeEqualToString("regionListTextNode32.item(0).id", "region3"); 114 115 115 var namedFlow2 = document.webkitGetFlowByName("flow2");116 var namedFlow2 = getFlowByName("flow2"); 116 117 var regionListP1 = namedFlow2.getRegionsByContent(document.getElementById("p1")); 117 118 shouldBeNonNull("regionListP1"); -
trunk/LayoutTests/fast/regions/get-regions-by-content.html
r124410 r130041 3 3 <head> 4 4 <script src="../../fast/js/resources/js-test-pre.js"></script> 5 <script src="resources/helper.js"></script> 5 6 <style> 6 7 body { font-family: monospace; } … … 31 32 description("Test for 90759: [CSSRegions] Rename NamedFlow::getRegionsByContentNode to NamedFlow::getRegionsByContent."); 32 33 33 var namedFlow = document.webkitGetFlowByName("flow");34 var namedFlow = getFlowByName("flow"); 34 35 var targetNode = document.getElementById("p1"); 35 36 var regionList = namedFlow.getRegionsByContent(targetNode); … … 38 39 shouldBeEqualToString("regionList.item(0).id", "region"); 39 40 40 namedFlow = document.webkitGetFlowByName("flow2");41 namedFlow = getFlowByName("flow2"); 41 42 // Test that the p2 element is flown into 2 regions 42 43 targetNode = document.getElementById("p2"); -
trunk/LayoutTests/fast/regions/get-regions-by-content2.html
r124410 r130041 3 3 <head> 4 4 <script src="../../fast/js/resources/js-test-pre.js"></script> 5 <script src="resources/helper.js"></script> 5 6 <style> 6 7 body { font-family: monospace; } … … 23 24 description("Test for 90759: [CSSRegions] Rename NamedFlow::getRegionsByContentNode to NamedFlow::getRegionsByContent"); 24 25 25 var namedFlow = document.webkitGetFlowByName("flow");26 var namedFlow = getFlowByName("flow"); 26 27 27 28 // Getting the regions for a non existant node should return null. … … 74 75 // Move the article to another named flow, the region list should be empty. 75 76 document.getElementById("article").className = "article2"; 76 var namedFlow2 = document.webkitGetFlowByName("flow2");77 var namedFlow2 = getFlowByName("flow2"); 77 78 var regionList8 = namedFlow2.getRegionsByContent(pElement); 78 79 shouldBeNonNull("regionList8"); -
trunk/LayoutTests/fast/regions/resources/helper.js
r128416 r130041 3 3 // Add #debug at the end of the url to visually debug the test case. 4 4 return window.location.hash == "#debug"; 5 } 6 7 function getFlowByName(name) 8 { 9 var namedFlows = document.webkitGetNamedFlows(); 10 return namedFlows[name] ? namedFlows[name] : null; 5 11 } 6 12 -
trunk/LayoutTests/fast/regions/webkit-named-flow-event-add-to-flow.html
r124410 r130041 2 2 <head> 3 3 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 <script src="resources/helper.js"></script> 4 5 <style> 5 6 #article { … … 61 62 62 63 function startTest() { 63 var flow = document.webkitGetFlowByName("article");64 var flow = getFlowByName("article"); 64 65 flow.addEventListener("webkitRegionLayoutUpdate", regionLayoutUpdated); 65 66 -
trunk/LayoutTests/fast/regions/webkit-named-flow-event-no-regions.html
r124410 r130041 4 4 <meta charset="utf-8"> 5 5 <script src="../js/resources/js-test-pre.js"></script> 6 <script src="resources/helper.js"></script> 6 7 <style> 7 8 #article { … … 67 68 68 69 function startTest() { 69 var flow = document.webkitGetFlowByName("article");70 var flow = getFlowByName("article"); 70 71 flow.addEventListener("webkitRegionLayoutUpdate", regionLayoutUpdated); 71 72 -
trunk/LayoutTests/fast/regions/webkit-named-flow-event-remove-from-dom.html
r124410 r130041 2 2 <head> 3 3 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 <script src="resources/helper.js"></script> 4 5 <style> 5 6 #article { … … 66 67 67 68 function startTest() { 68 var flow = document.webkitGetFlowByName("article");69 var flow = getFlowByName("article"); 69 70 flow.addEventListener("webkitRegionLayoutUpdate", regionLayoutUpdated); 70 71 -
trunk/LayoutTests/fast/regions/webkit-named-flow-event-remove-from-flow.html
r124410 r130041 2 2 <head> 3 3 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 <script src="resources/helper.js"></script> 4 5 <style> 5 6 #article { … … 64 65 65 66 function startTest() { 66 var flow = document.webkitGetFlowByName("article");67 var flow = getFlowByName("article"); 67 68 flow.addEventListener("webkitRegionLayoutUpdate", regionLayoutUpdated); 68 69 -
trunk/LayoutTests/fast/regions/webkit-named-flow-event-target-expected.txt
r124350 r130041 7 7 PASS event.target.name is "article" 8 8 PASS 2 is >= updatedCount 9 PASS document.webkitGetFlowByName("article") is non-null.9 PASS getFlowByName("article") is non-null. 10 10 PASS recreated is false 11 PASS document.webkitGetFlowByName("article") is null11 PASS getFlowByName("article") is null 12 12 PASS event.target.name is "article" 13 13 PASS 2 is >= updatedCount 14 14 PASS recreated is true 15 PASS document.webkitGetFlowByName("article") is non-null.15 PASS getFlowByName("article") is non-null. 16 16 PASS successfullyParsed is true 17 17 -
trunk/LayoutTests/fast/regions/webkit-named-flow-event-target.html
r124410 r130041 4 4 <meta charset="utf-8"> 5 5 <script src="../js/resources/js-test-pre.js"></script> 6 <script src="resources/helper.js"></script> 6 7 <style> 7 8 #article { … … 49 50 50 51 function makeFlowNull() { 51 shouldBeNonNull(' document.webkitGetFlowByName("article")');52 shouldBeNonNull('getFlowByName("article")'); 52 53 53 54 var el = document.getElementById("region_1"); … … 61 62 var recreated = false; 62 63 function makeFlowCreated() { 63 shouldBeNull(' document.webkitGetFlowByName("article")');64 shouldBeNull('getFlowByName("article")'); 64 65 gc(); 65 66 … … 97 98 98 99 function startTest() { 99 var flowThread = document.webkitGetFlowByName("article");100 var flowThread = getFlowByName("article"); 100 101 flowThread.addEventListener("webkitRegionLayoutUpdate", flowThreadUpdated); 101 102 -
trunk/LayoutTests/fast/regions/webkit-named-flow-event-to-null.html
r124410 r130041 4 4 <meta charset="utf-8"> 5 5 <script src="../js/resources/js-test-pre.js"></script> 6 <script src="resources/helper.js"></script> 6 7 <style> 7 8 #article { … … 80 81 81 82 function startTest() { 82 var flow = document.webkitGetFlowByName("article");83 var flow = getFlowByName("article"); 83 84 flow.addEventListener("webkitRegionLayoutUpdate", regionLayoutUpdated); 84 85 -
trunk/LayoutTests/fast/regions/webkit-named-flow-event.html
r124410 r130041 2 2 <head> 3 3 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 <script src="resources/helper.js"></script> 4 5 <style> 5 6 #article { … … 55 56 56 57 function startTest() { 57 var flowThread = document.webkitGetFlowByName("article");58 var flowThread = getFlowByName("article"); 58 59 flowThread.addEventListener("webkitRegionLayoutUpdate", flowThreadUpdated); 59 60 -
trunk/LayoutTests/fast/regions/webkit-named-flow-existing-flow.html
r124410 r130041 7 7 --> 8 8 <head> 9 <script src="resources/helper.js"></script> 9 10 <style> 10 11 .pass { … … 33 34 testRunner.dumpAsText(); 34 35 35 var namedFlow = document.webkitGetFlowByName("flow");36 var namedFlow = getFlowByName("flow"); 36 37 if (namedFlow) { 37 38 document.getElementById("result").innerText = "PASS"; -
trunk/LayoutTests/fast/regions/webkit-named-flow-first-empty-region-index.html
r124771 r130041 4 4 <meta charset="utf-8"> 5 5 <script src="../../fast/js/resources/js-test-pre.js"></script> 6 <script src="resources/helper.js"></script> 6 7 <style> 7 8 body { font-family: monospace } … … 22 23 23 24 // Named flow does not have any regions yet 24 var namedFlow = document.webkitGetFlowByName("flow");25 var namedFlow = getFlowByName("flow"); 25 26 26 27 // FirstEmptyRegionIndex should be -1 for an empty named flow -
trunk/LayoutTests/fast/regions/webkit-named-flow-flow-added.html
r124410 r130041 7 7 --> 8 8 <head> 9 <script src="resources/helper.js"></script> 9 10 <style> 10 11 .pass { … … 38 39 39 40 // Get the named flow object before adding the flow thread. 40 var namedFlow = document.webkitGetFlowByName("flow");41 var namedFlow = getFlowByName("flow"); 41 42 var namedFlow2; 42 43 43 44 function test() 44 45 { 45 namedFlow2 = document.webkitGetFlowByName("flow");46 namedFlow2 = getFlowByName("flow"); 46 47 if (!namedFlow && namedFlow2) { 47 48 document.getElementById("result").innerText = "PASS"; -
trunk/LayoutTests/fast/regions/webkit-named-flow-get-content-expected.txt
r122556 r130041 4 4 5 5 6 PASS document.webkitGetFlowByName("flow") is null6 PASS getFlowByName("flow") is null 7 7 PASS namedFlowContent3.length is 1 8 8 PASS namedFlowContent3.item(0).id is "article" … … 27 27 PASS namedFlowContent12.length is 1 28 28 PASS namedFlowContent12.item(0).id is "article" 29 PASS document.webkitGetFlowByName("flow2") is null29 PASS getFlowByName("flow2") is null 30 30 PASS namedFlowContent13.length is 0 31 31 PASS namedFlowContent14.length is 0 -
trunk/LayoutTests/fast/regions/webkit-named-flow-get-content.html
r124410 r130041 3 3 <head> 4 4 <script src="../../fast/js/resources/js-test-pre.js"></script> 5 <script src="resources/helper.js"></script> 5 6 <style> 6 7 #region { -webkit-flow-from: flow; width: 250px; height: 150px; } … … 27 28 article.style.webkitFlowInto = "flow"; 28 29 29 shouldBeNull(' document.webkitGetFlowByName("flow")');30 shouldBeNull('getFlowByName("flow")'); 30 31 31 32 // Append the above element to the DOM. It will be collected by the flow, therefore the contentNodes should have 1 element. 32 33 document.body.appendChild(article); 33 var namedFlowContent3 = document.webkitGetFlowByName("flow").getContent();34 var namedFlowContent3 = getFlowByName("flow").getContent(); 34 35 shouldEvaluateTo("namedFlowContent3.length", 1); 35 36 shouldBeEqualToString("namedFlowContent3.item(0).id", "article"); … … 40 41 pNode.id = "p1"; 41 42 document.getElementById("article").appendChild(pNode); 42 var namedFlowContent4 = document.webkitGetFlowByName("flow").getContent();43 var namedFlowContent4 = getFlowByName("flow").getContent(); 43 44 shouldEvaluateTo("namedFlowContent4.length", 1); 44 45 shouldBeEqualToString("namedFlowContent4.item(0).id", "article"); … … 51 52 document.body.insertBefore(article2, article); 52 53 53 var namedFlowContent5 = document.webkitGetFlowByName("flow").getContent();54 var namedFlowContent5 = getFlowByName("flow").getContent(); 54 55 shouldEvaluateTo("namedFlowContent5.length", 2); 55 56 shouldBeEqualToString("namedFlowContent5.item(0).id", "article2"); … … 60 61 regionNode.id = "region"; 61 62 document.body.appendChild(regionNode); 62 var namedFlowContent6 = document.webkitGetFlowByName("flow").getContent();63 var namedFlowContent6 = getFlowByName("flow").getContent(); 63 64 shouldEvaluateTo("namedFlowContent6.length", 2); 64 65 65 66 // Change display:none for the 'article2' element, the list of contentNodes should stay the same 66 67 document.getElementById("article2").style.display = "block"; 67 var namedFlowContent7 = document.webkitGetFlowByName("flow").getContent();68 var namedFlowContent7 = getFlowByName("flow").getContent(); 68 69 shouldEvaluateTo("namedFlowContent7.length", 2); 69 70 … … 77 78 document.getElementById("article2").appendChild(pNode); 78 79 79 var namedFlowContent8 = document.webkitGetFlowByName("flow").getContent();80 var namedFlowContent8 = getFlowByName("flow").getContent(); 80 81 shouldEvaluateTo("namedFlowContent8.length", 3); 81 82 82 83 // Change display of article node to none, the collection should still have 3 elements. 83 84 document.getElementById("article").style.display = "none"; 84 var namedFlowContent9 = document.webkitGetFlowByName("flow").getContent();85 var namedFlowContent9 = getFlowByName("flow").getContent(); 85 86 shouldEvaluateTo("namedFlowContent9.length", 3); 86 87 shouldBeEqualToString("namedFlowContent9.item(0).id", "article2"); … … 91 92 article = document.getElementById("article"); 92 93 document.body.insertBefore(document.body.removeChild(article), article2); 93 var namedFlowContent10 = document.webkitGetFlowByName("flow").getContent();94 var namedFlowContent10 = getFlowByName("flow").getContent(); 94 95 shouldEvaluateTo("namedFlowContent10.length", 3); 95 96 shouldBeEqualToString("namedFlowContent10.item(0).id", "article"); … … 98 99 var article2Clone = document.getElementById("article2").cloneNode(true); 99 100 document.body.appendChild(article2Clone); 100 var namedFlowContent11 = document.webkitGetFlowByName("flow").getContent();101 var namedFlowContent11 = getFlowByName("flow").getContent(); 101 102 shouldEvaluateTo("namedFlowContent11.length", 5); 102 103 // Remove article2 nodes from document, they should be removed from flow. 103 104 document.body.removeChild(article2); 104 105 document.body.removeChild(article2Clone); 105 var namedFlowContent12 = document.webkitGetFlowByName("flow").getContent();106 var namedFlowContent12 = getFlowByName("flow").getContent(); 106 107 shouldEvaluateTo("namedFlowContent12.length", 1); 107 108 shouldBeEqualToString("namedFlowContent12.item(0).id", "article"); … … 109 110 // Move the content node 'article' from named flow 'flow' to named flow 'flow2' 110 111 document.getElementById("article").style.webkitFlowInto = "flow2"; 111 var flow2 = document.webkitGetFlowByName("flow2");112 var namedFlowContent11 = document.webkitGetFlowByName("flow").getContent();113 var namedFlowContent12 = document.webkitGetFlowByName("flow2").getContent();112 var flow2 = getFlowByName("flow2"); 113 var namedFlowContent11 = getFlowByName("flow").getContent(); 114 var namedFlowContent12 = getFlowByName("flow2").getContent(); 114 115 shouldEvaluateTo("namedFlowContent11.length", "0"); 115 116 shouldEvaluateTo("namedFlowContent12.length", "1"); … … 118 119 // Remove the content node from dom, content nodes for both 'flow' and 'flow2' should be empty 119 120 document.body.removeChild(document.getElementById("article")); 120 shouldBeNull(' document.webkitGetFlowByName("flow2")');121 shouldBeNull('getFlowByName("flow2")'); 121 122 122 var namedFlowContent13 = document.webkitGetFlowByName("flow").getContent();123 var namedFlowContent13 = getFlowByName("flow").getContent(); 123 124 shouldEvaluateTo("namedFlowContent13.length", "0"); 124 125 -
trunk/LayoutTests/fast/regions/webkit-named-flow-get-regions.html
r124772 r130041 2 2 <head> 3 3 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 <script src="resources/helper.js"></script> 4 5 <style> 5 6 #article { … … 34 35 35 36 function getRegionAt(index) { 36 var flow = document.webkitGetFlowByName("article");37 var flow = getFlowByName("article"); 37 38 var regions = flow.getRegions(); 38 39 if (regions.length <= index) -
trunk/LayoutTests/fast/regions/webkit-named-flow-invalid-name.html
r124410 r130041 19 19 var arrLen = arrFlowInvalidNames.length; 20 20 for (var i = 0; i < arrLen; ++i) { 21 var nullNamedFlow = document.webkitGetFlowByName(arrFlowInvalidNames[i]);21 var nullNamedFlow = getFlowByName(arrFlowInvalidNames[i]); 22 22 assert(nullNamedFlow == null, "Named flow for " + arrFlowInvalidNames[i] + " should be null"); 23 23 } 24 24 25 25 // It should not be possible to get the NamedFlow object for a missing flow. 26 var namedFlow = document.webkitGetFlowByName("flow");26 var namedFlow = getFlowByName("flow"); 27 27 assert(namedFlow == null, "Named flow for flow should be null"); 28 28 </script> -
trunk/LayoutTests/fast/regions/webkit-named-flow-modified-flow.html
r124410 r130041 9 9 --> 10 10 <head> 11 <script src="resources/helper.js"></script> 11 12 <style> 12 13 .pass { … … 46 47 function test() 47 48 { 48 var namedFlow = document.webkitGetFlowByName("flow");49 var namedFlow2 = document.webkitGetFlowByName("flow2");49 var namedFlow = getFlowByName("flow"); 50 var namedFlow2 = getFlowByName("flow2"); 50 51 if (!namedFlow && namedFlow2) { 51 52 document.getElementById("result").innerText = "PASS"; -
trunk/LayoutTests/fast/regions/webkit-named-flow-name.html
r124410 r130041 4 4 <meta charset="utf-8"> 5 5 <script src="../js/resources/js-test-pre.js"></script> 6 <script src="resources/helper.js"></script> 6 7 <style> 7 8 .flow { -webkit-flow-into: flow-name; } … … 21 22 22 23 // Flow article does not have any regions yet 23 var namedFlow = document.webkitGetFlowByName("flow-name");24 var namedFlow = getFlowByName("flow-name"); 24 25 25 26 // The name should be 'flow-name' when there are no regions to flow into -
trunk/LayoutTests/fast/regions/webkit-named-flow-non-existing-flow.html
r124410 r130041 7 7 --> 8 8 <head> 9 <script src="resources/helper.js"></script> 9 10 <style> 10 11 .pass { … … 29 30 testRunner.dumpAsText(); 30 31 31 var namedFlow = document.webkitGetFlowByName("flow");32 var namedFlow = getFlowByName("flow"); 32 33 if (!namedFlow) { 33 34 document.getElementById("result").innerText = "PASS"; -
trunk/LayoutTests/fast/regions/webkit-named-flow-overset.html
r124410 r130041 4 4 <meta charset="utf-8"> 5 5 <script src="../js/resources/js-test-pre.js"></script> 6 <script src="resources/helper.js"></script> 6 7 <style> 7 8 body { font-family: monospace; } … … 25 26 26 27 // Flow article does not have any regions yet 27 var namedFlow = document.webkitGetFlowByName("flow");28 var namedFlow = getFlowByName("flow"); 28 29 29 30 // Overset should be false for a flow without regions -
trunk/LayoutTests/fast/regions/webkit-named-flow-removed-flow.html
r124410 r130041 7 7 --> 8 8 <head> 9 <script src="resources/helper.js"></script> 9 10 <style> 10 11 .pass { … … 38 39 39 40 // Get the named flow object before removing the flow thread. 40 var namedFlow = document.webkitGetFlowByName("flow");41 var namedFlow = getFlowByName("flow"); 41 42 var namedFlow2; 42 43 43 44 function test() 44 45 { 45 namedFlow2 = document.webkitGetFlowByName("flow");46 namedFlow2 = getFlowByName("flow"); 46 47 if (namedFlow && !namedFlow2) { 47 48 document.getElementById("result").innerText = "PASS"; -
trunk/LayoutTests/fast/regions/webkit-named-flow-same-object.html
r124410 r130041 7 7 --> 8 8 <head> 9 <script src="resources/helper.js"></script> 9 10 <style> 10 11 .pass { … … 33 34 testRunner.dumpAsText(); 34 35 35 var namedFlow = document.webkitGetFlowByName("flow");36 var namedFlow2 = document.webkitGetFlowByName("flow");36 var namedFlow = getFlowByName("flow"); 37 var namedFlow2 = getFlowByName("flow"); 37 38 if (namedFlow === namedFlow2) { 38 39 document.getElementById("result").innerText = "PASS"; -
trunk/Source/WebCore/ChangeLog
r130032 r130041 1 2012-10-01 Andrei Bucur <abucur@adobe.com> 2 3 [CSS Regions] Remove the deprecated API Document.webkitGetFlowByName 4 https://bugs.webkit.org/show_bug.cgi?id=97657 5 6 Reviewed by Andreas Kling. 7 8 The Document.getFlowByName() API has been deprecated in favor of the NamedFlowCollection.namedItem(DOMString). 9 Link to spec: http://www.w3.org/TR/css3-regions/#the-namedflow-interface 10 11 Tests: The old tests have been adapted to use the new API. 12 13 * dom/Document.cpp: 14 (WebCore): 15 * dom/Document.h: 16 (Document): 17 * dom/Document.idl: 18 1 19 2012-09-27 Jocelyn Turcotte <jocelyn.turcotte@digia.com> 2 20 -
trunk/Source/WebCore/dom/Document.cpp
r129903 r130041 1143 1143 #if ENABLE(CSS_REGIONS) 1144 1144 1145 PassRefPtr<WebKitNamedFlow> Document::webkitGetFlowByName(const String& flowName)1146 {1147 if (!cssRegionsEnabled() || !renderer())1148 return 0;1149 1150 // It's possible to have pending styles not applied that affect the existing flows.1151 updateStyleIfNeeded();1152 1153 return namedFlows()->flowByName(flowName);1154 }1155 1156 1145 PassRefPtr<DOMNamedFlowCollection> Document::webkitGetNamedFlows() 1157 1146 { -
trunk/Source/WebCore/dom/Document.h
r129903 r130041 360 360 bool cssRegionsEnabled() const; 361 361 #if ENABLE(CSS_REGIONS) 362 PassRefPtr<WebKitNamedFlow> webkitGetFlowByName(const String&);363 362 PassRefPtr<DOMNamedFlowCollection> webkitGetNamedFlows(); 364 363 #endif -
trunk/Source/WebCore/dom/Document.idl
r128374 r130041 269 269 readonly attribute [Conditional=POINTER_LOCK, V8EnabledAtRuntime=pointerLock] Element webkitPointerLockElement; 270 270 271 [Conditional=CSS_REGIONS] WebKitNamedFlow webkitGetFlowByName(in DOMString name);272 271 [Conditional=CSS_REGIONS] DOMNamedFlowCollection webkitGetNamedFlows(); 273 272
Note: See TracChangeset
for help on using the changeset viewer.