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

Unified Diff: LayoutTests/fast/shapes/resources/simple-rectangle.js

Issue 772523003: Remove unused shape test resources (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/shapes/resources/simple-rectangle.js
diff --git a/LayoutTests/fast/shapes/resources/simple-rectangle.js b/LayoutTests/fast/shapes/resources/simple-rectangle.js
deleted file mode 100644
index 79c706525f730798afba00967a5bdf7b70360d34..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/shapes/resources/simple-rectangle.js
+++ /dev/null
@@ -1,65 +0,0 @@
-function createRectangleTest(elementId, stylesheetId, bounds, shapeBounds, units, content) {
- var elem;
- if (elementId)
- elem = document.getElementById(elementId);
- else {
- elem = document.createElement('div');
- elem.setAttribute('id', elementId);
- document.appendChild(elem);
- }
-
- var stylesheet = document.getElementById(stylesheetId).sheet;
- var rules = [];
- for (var i in bounds)
- rules.push(i + ':' + bounds[i] + units);
- var rectangleBounds = {
- top: shapeBounds.x + units,
- left: shapeBounds.y + units,
- bottom: (shapeBounds.y + shapeBounds.height) + units,
- right: (shapeBounds.x + shapeBounds.width) + units
- };
- rules.push('-webkit-shape-inside: polygon(' +
- rectangleBounds.left + " " + rectangleBounds.top + "," +
- rectangleBounds.right + " " + rectangleBounds.top + "," +
- rectangleBounds.right + " " + rectangleBounds.bottom + "," +
- rectangleBounds.left + " " + rectangleBounds.bottom + ')');
- rules.push('position: relative');
- rules.push('overflow-wrap: break-word');
- stylesheet.insertRule('#' + elementId + '{' + rules.join(';') + '}', 0);
-
- rules = [];
- rules.push('left: ' + (shapeBounds.x - 1) + units, 'top: ' + (shapeBounds.y - 1) + units, 'width: ' + shapeBounds.width + units, 'height: ' + shapeBounds.height + units);
- rules.push('position: absolute', 'display: block', 'content: \' \'');
- rules.push('border: 1px solid blue');
- stylesheet.insertRule('#' + elementId + ':before{' + rules.join(';') + '}', 0);
- if (content)
- elem.innerHTML = content;
-}
-
-function createRectangleTestResult(elementId, stylesheetId, bounds, shapeBounds, units, content) {
- var elem;
- if (elementId)
- elem = document.getElementById(elementId);
- else {
- elem = document.createElement('div');
- elem.setAttribute('id', elementId);
- document.appendChild(elem);
- }
-
- var stylesheet = document.getElementById(stylesheetId).sheet;
- var rules = [];
- rules.push('width: ' + shapeBounds.width + units, 'height: ' + shapeBounds.height + units);
- rules.push('padding-left: ' + shapeBounds.x + units, 'padding-right: ' + (bounds.width - shapeBounds.width - shapeBounds.x) + units);
- rules.push('padding-top: ' + shapeBounds.y + units, 'padding-bottom: ' + (bounds.height - shapeBounds.height - shapeBounds.y) + units);
- rules.push('position: relative');
- rules.push('overflow-wrap: break-word');
- stylesheet.insertRule('#' + elementId + '{' + rules.join(';') + '}', 0);
-
- rules = [];
- rules.push('left: ' + (shapeBounds.x - 1) + units, 'top: ' + (shapeBounds.y - 1) + units, 'width: ' + shapeBounds.width + units, 'height: ' + shapeBounds.height + units);
- rules.push('position: absolute', 'display: block', 'content: \' \'');
- rules.push('border: 1px solid blue');
- stylesheet.insertRule('#' + elementId + ':before{' + rules.join(';') + '}', 0);
- if (content)
- elem.innerHTML = content;
-}
« no previous file with comments | « LayoutTests/fast/shapes/resources/simple-polygon.js ('k') | LayoutTests/fast/shapes/resources/svg-shape-001.svg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698