Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: LayoutTests/fast/shapes/resources/multi-segment-polygon.js

Issue 20806004: Remove Explicit Shapes Enablement in Tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Enabled by default, no need to call internals Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 function generatePolygon(width, height, fontSize, points, content, elementId) { 1 function generatePolygon(width, height, fontSize, points, content, elementId) {
2 if (window.internals)
3 window.internals.settings.setCSSExclusionsEnabled(true);
4 var div = createOrInsert(elementId); 2 var div = createOrInsert(elementId);
5 var polygon = points.map(function(elem, index, array) { 3 var polygon = points.map(function(elem, index, array) {
6 return elem.toString() + 'px' + (index < array.length - 1 && index % 2 = = 1 ? ',' : ''); 4 return elem.toString() + 'px' + (index < array.length - 1 && index % 2 = = 1 ? ',' : '');
7 }).join(' '); 5 }).join(' ');
8 polygon = 'polygon(' + polygon + ')'; 6 polygon = 'polygon(' + polygon + ')';
9 div.style.setProperty('-webkit-shape-inside', polygon); 7 div.style.setProperty('-webkit-shape-inside', polygon);
10 div.style.setProperty('width', width + 'px'); 8 div.style.setProperty('width', width + 'px');
11 div.style.setProperty('height', height + 'px'); 9 div.style.setProperty('height', height + 'px');
12 div.style.setProperty('font', fontSize + 'px/1 Ahem, sans-serif'); 10 div.style.setProperty('font', fontSize + 'px/1 Ahem, sans-serif');
13 div.style.setProperty('color', 'green'); 11 div.style.setProperty('color', 'green');
(...skipping 18 matching lines...) Expand all
32 if (elementId) 30 if (elementId)
33 return document.getElementById(elementId); 31 return document.getElementById(elementId);
34 32
35 var div = document.createElement('div'); 33 var div = document.createElement('div');
36 if (document.body.childNodes.length) 34 if (document.body.childNodes.length)
37 docuemnt.body.insertBefore(div, document.body.childNodes[0]); 35 docuemnt.body.insertBefore(div, document.body.childNodes[0]);
38 else 36 else
39 document.body.appendChild(div); 37 document.body.appendChild(div);
40 return div; 38 return div;
41 } 39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698