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

Unified Diff: LayoutTests/csswg/contributors/adobe/submitted/shapes/shape-outside/resources/subpixel-utils.js

Issue 200633005: [CSS Shapes] Remove deprecated shapes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test expectations Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/csswg/contributors/adobe/submitted/shapes/shape-outside/resources/subpixel-utils.js
diff --git a/LayoutTests/csswg/contributors/adobe/submitted/shapes/shape-outside/resources/subpixel-utils.js b/LayoutTests/csswg/contributors/adobe/submitted/shapes/shape-outside/resources/subpixel-utils.js
deleted file mode 100644
index 461d571ee42cf062e3c52461d4a9a330e56af7f8..0000000000000000000000000000000000000000
--- a/LayoutTests/csswg/contributors/adobe/submitted/shapes/shape-outside/resources/subpixel-utils.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var SubPixelLayout = (function() {
- var SUBPIXELS_PER_PIXEL = 64;
- var enabled = undefined;
-
- function isEnabled()
- {
- if (enabled === undefined) {
- var elem = document.createElement('div');
- elem.style.setProperty('width', '4.5px');
- document.body.appendChild(elem);
- var bounds = elem.getBoundingClientRect();
- enabled = (bounds.width != Math.floor(bounds.width));
- document.body.removeChild(elem);
- }
- return enabled;
- }
-
- return {
- isEnabled: isEnabled,
- snapToLayoutUnit: function(f) {
- return isEnabled() ? Math.floor(f * SUBPIXELS_PER_PIXEL) / SUBPIXELS_PER_PIXEL : Math.floor(f); // as in LayoutUnit(f).toFloat()
- },
- ceilSnapToLayoutUnit: function(f) {
- return isEnabled() ? Math.ceil(f * SUBPIXELS_PER_PIXEL) / SUBPIXELS_PER_PIXEL : Math.ceil(f); // see ceiledLayoutUnit(), LayoutUnit.h
- }
- }
-}());

Powered by Google App Engine
This is Rietveld 408576698