[webkit-reviews] review granted: [Bug 187337] [WebVR] Fix VRDisplayEvent implementation : [Attachment 344313] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 5 02:56:14 PDT 2018


Zan Dobersek <zan at falconsigh.net> has granted Sergio Villar Senin
<svillar at igalia.com>'s request for review:
Bug 187337: [WebVR] Fix VRDisplayEvent implementation
https://bugs.webkit.org/show_bug.cgi?id=187337

Attachment 344313: Patch

https://bugs.webkit.org/attachment.cgi?id=344313&action=review




--- Comment #2 from Zan Dobersek <zan at falconsigh.net> ---
Comment on attachment 344313
  --> https://bugs.webkit.org/attachment.cgi?id=344313
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=344313&action=review

> Source/WebCore/Modules/webvr/VRDisplayEvent.h:36
> +    static Ref<VRDisplayEvent> create(const AtomicString& type, const
RefPtr<VRDisplay>& display, const std::optional<VRDisplayEventReason>& reason)

Can display and reason arguments be rvalue references, enabling moving them
down to the constructor and there into the member variables?

> Source/WebCore/Modules/webvr/VRDisplayEvent.h:54
> +    std::optional<VRDisplayEventReason> reason() const { return m_reason; }

Can this return a const reference to the std::optional<>? It would then be up
to the caller to copy it if necessary.


More information about the webkit-reviews mailing list