OLD | NEW |
1 if (window.internals) | |
2 window.internals.settings.setCSSExclusionsEnabled(true); | |
3 | |
4 function createRectangleTest(elementId, stylesheetId, bounds, shapeBounds, units
, content) { | 1 function createRectangleTest(elementId, stylesheetId, bounds, shapeBounds, units
, content) { |
5 var elem; | 2 var elem; |
6 if (elementId) | 3 if (elementId) |
7 elem = document.getElementById(elementId); | 4 elem = document.getElementById(elementId); |
8 else { | 5 else { |
9 elem = document.createElement('div'); | 6 elem = document.createElement('div'); |
10 elem.setAttribute('id', elementId); | 7 elem.setAttribute('id', elementId); |
11 document.appendChild(elem); | 8 document.appendChild(elem); |
12 } | 9 } |
13 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 stylesheet.insertRule('#' + elementId + '{' + rules.join(';') + '}'); | 47 stylesheet.insertRule('#' + elementId + '{' + rules.join(';') + '}'); |
51 | 48 |
52 rules = []; | 49 rules = []; |
53 rules.push('left: ' + (shapeBounds.x - 1) + units, 'top: ' + (shapeBounds.y
- 1) + units, 'width: ' + shapeBounds.width + units, 'height: ' + shapeBounds.he
ight + units); | 50 rules.push('left: ' + (shapeBounds.x - 1) + units, 'top: ' + (shapeBounds.y
- 1) + units, 'width: ' + shapeBounds.width + units, 'height: ' + shapeBounds.he
ight + units); |
54 rules.push('position: absolute', 'display: block', 'content: \' \''); | 51 rules.push('position: absolute', 'display: block', 'content: \' \''); |
55 rules.push('border: 1px solid blue'); | 52 rules.push('border: 1px solid blue'); |
56 stylesheet.insertRule('#' + elementId + ':before{' + rules.join(';') + '}'); | 53 stylesheet.insertRule('#' + elementId + ':before{' + rules.join(';') + '}'); |
57 if (content) | 54 if (content) |
58 elem.innerHTML = content; | 55 elem.innerHTML = content; |
59 } | 56 } |
OLD | NEW |