| Index: third_party/WebKit/LayoutTests/intersection-observer/helper-functions.js
|
| diff --git a/third_party/WebKit/LayoutTests/intersection-observer/helper-functions.js b/third_party/WebKit/LayoutTests/intersection-observer/helper-functions.js
|
| deleted file mode 100644
|
| index 7e2612d49f5806c2244c5d96c295b16c54ef6a02..0000000000000000000000000000000000000000
|
| --- a/third_party/WebKit/LayoutTests/intersection-observer/helper-functions.js
|
| +++ /dev/null
|
| @@ -1,32 +0,0 @@
|
| -// Some of the js-test.js boilerplate will add stuff to the top of the document early
|
| -// enough to screw with frame offsets that are measured by the test. Delay all that
|
| -// jazz until the actual test code is finished.
|
| -setPrintTestResultsLazily();
|
| -self.jsTestIsAsync = true;
|
| -
|
| -function rectArea(rect) {
|
| - return (rect.left - rect.right) * (rect.bottom - rect.top);
|
| -}
|
| -
|
| -function rectToString(rect) {
|
| - return "[" + rect.left + ", " + rect.right + ", " + rect.top + ", " + rect.bottom + "]";
|
| -}
|
| -
|
| -function entryToString(entry) {
|
| - var ratio = ((entry.intersectionRect.width * entry.intersectionRect.height) /
|
| - (entry.boundingClientRect.width * entry.boundingClientRect.height));
|
| - return (
|
| - "boundingClientRect=" + rectToString(entry.boundingClientRect) + "\n" +
|
| - "intersectionRect=" + rectToString(entry.intersectionRect) + "\n" +
|
| - "visibleRatio=" + ratio + "\n" +
|
| - "rootBounds=" + rectToString(entry.rootBounds) + "\n" +
|
| - "target=" + entry.target + "\n" +
|
| - "time=" + entry.time);
|
| -}
|
| -
|
| -function intersectionRatio(entry) {
|
| - var targetArea = rectArea(entry.boundingClientRect);
|
| - if (!targetArea)
|
| - return 0;
|
| - return rectArea(entry.intersectionRect) / targetArea;
|
| -}
|
|
|