Closed Bug 1181965 Opened 5 years ago Closed 5 years ago

Remove uses of mozRequestAnimationFrame from DOM code

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

No description provided.
Comment on attachment 8631874 [details] [diff] [review]
Remove uses of mozRequestAnimationFrame from dom and parser tests

Review of attachment 8631874 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good with a couple nits.  I assume a later patch will remove the references in dom.properties once the code that generates the error message is removed?

::: dom/base/test/test_bug704063.html
@@ +22,5 @@
>      ok(Math.abs(time - Date.now()) > 3600000,
>         "More than an hour should have passed since 1970");
>    }
> +  function first(time) {
> +    is(secondRan, false, "Prefixed was called first");

nit: s/Prefixed/second()/g

::: dom/canvas/test/reftest/webgl-utils.js
@@ +61,5 @@
>    return gl;
>  }
>  
>  function rAF(func) {
> +  var raf = window.requestAnimationFrame;

nit: It seems like it would be better to remove the rAF() function and replace it with requestAnimationFrame() directly.

I see these references:

  https://dxr.mozilla.org/mozilla-central/source/dom/canvas/test/reftest/webgl-utils.js?from=webgl-utils.js&case=true#80
  https://dxr.mozilla.org/mozilla-central/source/dom/canvas/test/reftest/webgl-disable-test.html#56
  https://dxr.mozilla.org/mozilla-central/source/dom/canvas/test/reftest/webgl-hanging-fb-test.html#54
  https://dxr.mozilla.org/mozilla-central/source/dom/canvas/test/reftest/webgl-hanging-scissor-test.html#53
  https://dxr.mozilla.org/mozilla-central/source/dom/canvas/test/reftest/webgl-resize-test.html#54

I don't feel strongly about it, though.
Attachment #8631874 - Flags: review?(bkelly) → review+
> I assume a later patch will remove the references in dom.properties once the code that
> generates the error message is removed?

Yes, exactly.  That will happen in bug 909154.

> I don't feel strongly about it, though.

In that case, I'd rather leave this as-is, I think, on the assumption that the author of this code had a reason for doing it this way...

Fixed the other nit; good catch.
https://hg.mozilla.org/mozilla-central/rev/f25a915e59d9
Status: NEW → RESOLVED
Closed: 5 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.