Commit a6030bbf authored by Piotr Bialecki's avatar Piotr Bialecki Committed by Commit Bot

WebXR - hit test & DOM overlay - fix hit test results

Invisible input sources should not cause their hit test results to be
surfaced to the application.

Change-Id: Id6aff539db20981d78d57098b2f0335ca352319b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2098852
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Auto-Submit: Piotr Bialecki <bialpio@chromium.org>
Reviewed-by: default avatarKlaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749357}
parent cf922674
......@@ -53,6 +53,7 @@ void XRHitTestSource::Update(
last_frame_results_.push_back(*result);
}
}
void XRHitTestSource::Trace(Visitor* visitor) {
visitor->Trace(xr_session_);
ScriptWrappable::Trace(visitor);
......
......@@ -60,9 +60,12 @@ void XRTransientInputHitTestSource::Update(
if (!input_source)
continue;
current_frame_results_.push_back(
MakeGarbageCollected<XRTransientInputHitTestResult>(
input_source, source_id_and_results.value));
// If the input source is not visible, ignore it.
if (input_source->IsVisible()) {
current_frame_results_.push_back(
MakeGarbageCollected<XRTransientInputHitTestResult>(
input_source, source_id_and_results.value));
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment