OLD | NEW |
---|---|
(Empty) | |
1 <script> | |
yosin_UTC9
2014/10/15 01:26:41
Could you simplify this test case?
We can have sta
rhogan
2014/10/15 20:20:30
I've reduced it down to a more manageable size.
| |
2 // crbug.com/339185: If we create an anchor element using execCommand('CreateLin k') in an SVG namespace it won't get a renderer because the command will create | |
3 // an HTML rather than an SVG anchor. Our subsequent attempt to apply an inline style on the should fail rather than result in a crash. | |
4 onload = function() { | |
5 var xs=[ | |
6 "el0=document.createElementNS('http://www.w3.org/2000/svg', 'svg'); document.bod y.appendChild(el0); ", | |
7 "el1=document.createElementNS('http://www.w3.org/2000/svg', 'svg'); ", | |
8 "el2=document.createElementNS('http://www.w3.org/2000/svg', 'text'); el0.append Child(el2); ", | |
9 "el3=document.createElementNS('http://www.w3.org/2000/svg', 'font'); ", | |
10 "el4=document.createElementNS('http://www.w3.org/2000/svg', 'switch'); ", | |
11 "el6=document.createElement('ruby'); if(!el4.parentNode) { document.body.append Child(el4) }; el4.parentNode.insertBefore(el6, el4); ", | |
12 "el7=document.createElementNS('http://www.w3.org/2000/svg', 'tspan'); el2.appen dChild(el7); ", | |
13 "el9=document.createElementNS('http://www.w3.org/2000/svg', 'tspan'); el7.appen dChild(el9); ", | |
14 "el10=document.createElementNS('http://www.w3.org/2000/svg', 'circle'); ", | |
15 "el11=document.createElementNS('http://www.w3.org/2000/svg', 'circle'); el11.se tAttribute('ry', '186em'); ", | |
16 "el12=document.createElementNS('http://www.w3.org/2000/svg', 'polygon'); ", | |
17 "el9.appendChild(document.createTextNode(unescape('%uef5f%u9776%u638a'))); ", | |
18 "el13=document.createElementNS('http://www.w3.org/2000/svg', 'desc'); ", | |
19 "el14=document.createElementNS('http://www.w3.org/2000/svg', 'textPath'); el7.a ppendChild(el14); ", | |
20 "el15=document.createElementNS('http://www.w3.org/2000/svg', 'missing_glyph'); ", | |
21 "el17=document.createElementNS('http://www.w3.org/2000/svg', 'polyline'); ", | |
22 "el18=document.createElementNS('http://www.w3.org/2000/svg', 'altGlyphDef'); ", | |
23 "el19=document.createElementNS('http://www.w3.org/2000/svg', 'animateMotion'); ", | |
24 "el22=document.createElementNS('http://www.w3.org/2000/svg', 'use'); ", | |
25 "el23=document.createElementNS('http://www.w3.org/2000/svg', 'color_profile'); ", | |
26 "el24=document.createElement('li'); el23.appendChild(el24); ", | |
27 "el25=document.createElementNS('http://www.w3.org/2000/svg', 'line'); ", | |
28 "el26=document.createElementNS('http://www.w3.org/2000/svg', 'glyph'); ", | |
29 "el27=document.createElementNS('http://www.w3.org/2000/svg', 'symbol'); ", | |
30 "el28=document.createElementNS('http://www.w3.org/2000/svg', 'altGlyphDef'); ", | |
31 "el30=document.createElementNS('http://www.w3.org/2000/svg', 'filter'); el30.se tAttribute('enable-background', '93');", | |
32 "el31=document.createElement('meter'); ", | |
33 "el50=document.createElement('rp'); ", | |
34 "el52=document.createElement('input'); el14.parentNode.insertBefore(el52, el14) ; ", | |
35 "document.designMode='on'; ", | |
36 "el60=document.createElement('style'); ", | |
37 "el64=document.createElementNS('http://www.w3.org/2000/svg', 'feBlend'); el64.s etAttribute('mode', 'lighten'); ", | |
38 "document.designMode='on'; window.getSelection().setBaseAndExtent(el52, 4); doc ument.execCommand('Transpose'); document.designMode='off'", | |
39 "el66=document.createElement('input'); ", | |
40 "document.implementation.createDocument('' ,'' ,null).adoptNode(el23)", | |
41 "document.designMode='on'; window.getSelection().setBaseAndExtent(el25, 0, el14 , 4); document.execCommand('InsertNewlineInQuotedContent'); document.execCommand ('selectall'); document.execCommand('insertText', 'LOL'); document.execCommand(' Undo'); document.execCommand('CreateLink', 0, '#'); document.designMode='off'", | |
42 "document.designMode='on'; document.execCommand('CreateLink', 0, '#'); document .execCommand('FormatBlock', ''); document.execCommand('Undo'); document.designMo de='off'", | |
43 "document.execCommand('FormatBlock', ''); document.execCommand('Undo');", | |
44 "document.execCommand('FormatBlock', ''); document.execCommand('Undo'); documen t.execCommand('insertText', 'LOL'); document.execCommand('Undo'); document.desig nMode='off'", | |
45 "document.designMode='on'; window.getSelection().setBaseAndExtent(el24, 3); doc ument.execCommand('italic'); document.designMode='off'", | |
46 ]; | |
47 function next0() { for(var i=0; i<15; i++) { var xy=xs.shift(); eval(xy); }; set Timeout(next0,0) } | |
48 setTimeout(next0,0) | |
49 } | |
50 </script> | |
OLD | NEW |