Code:  int VRDisplay::requestAnimationFrame(FrameRequestCallback* callback) {
   Document* doc = this->GetDocument();
   if (!doc)
     return 0;
  pending_raf_ = true;
   if (!vr_v_sync_provider_.is_bound()) {
     ConnectVSyncProvider();
   } else if (!display_blurred_ && !pending_vsync_) {
    pending_vsync_ = true;
    vr_v_sync_provider_->GetVSync(ConvertToBaseCallback(
        WTF::Bind(&VRDisplay::OnVSync, WrapWeakPersistent(this))));
  }
  callback->use_legacy_time_base_ = false;
  return EnsureScriptedAnimationController(doc).RegisterCallback(callback);
 }

Commit Message: WebVR: fix initial vsync

Applications sometimes use window.rAF while not presenting, then switch to
vrDisplay.rAF after presentation starts. Depending on the animation loop's
timing, this can cause a race condition where presentation has been started
but there's no vrDisplay.rAF pending yet. Ensure there's at least vsync
being processed after presentation starts so that a queued window.rAF
can run and schedule a vrDisplay.rAF.

BUG=711789

Review-Url: https://codereview.chromium.org/2848483003
Cr-Commit-Position: refs/heads/master@{#468167}
CWE ID: 
 int VRDisplay::requestAnimationFrame(FrameRequestCallback* callback) {
  DVLOG(2) << __FUNCTION__;
   Document* doc = this->GetDocument();
   if (!doc)
     return 0;
  pending_vrdisplay_raf_ = true;
   if (!vr_v_sync_provider_.is_bound()) {
     ConnectVSyncProvider();
   } else if (!display_blurred_ && !pending_vsync_) {
    pending_vsync_ = true;
    vr_v_sync_provider_->GetVSync(ConvertToBaseCallback(
        WTF::Bind(&VRDisplay::OnVSync, WrapWeakPersistent(this))));
  }
  callback->use_legacy_time_base_ = false;
  return EnsureScriptedAnimationController(doc).RegisterCallback(callback);
 }
