Web monetization prototype [chromium/src : main]

92 views
Skip to first unread message

Alexander Surkov (Gerrit)

unread,
Dec 12, 2023, 3:29:41 AM12/12/23
to blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org

Attention is currently required from: Alexander Surkov.

Alexander Surkov uploaded patch set #8 to this change.

View Change

Web monetization prototype

This a WM skeleton with boilerplate code for WM implementation.
It consist of webmonetization blink module which is supposed to
implement a web monetization session flow and HTML link rel=monetization
extension which starts a web monetization session.

WM spec: https://webmonetization.org/specification/

Bug: 1031476
Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
---
M third_party/blink/renderer/bindings/generated_in_modules.gni
M third_party/blink/renderer/bindings/idl_in_modules.gni
M third_party/blink/renderer/core/core_initializer.h
M third_party/blink/renderer/core/events/event_type_names.json5
M third_party/blink/renderer/core/frame/local_frame_client.h
M third_party/blink/renderer/core/frame/local_frame_client_impl.cc
M third_party/blink/renderer/core/frame/local_frame_client_impl.h
M third_party/blink/renderer/core/html/build.gni
M third_party/blink/renderer/core/html/html_link_element.cc
A third_party/blink/renderer/core/html/link_monetization.cc
A third_party/blink/renderer/core/html/link_monetization.h
M third_party/blink/renderer/core/html/link_resource.h
M third_party/blink/renderer/core/html/link_style.cc
M third_party/blink/renderer/core/html/rel_list.cc
M third_party/blink/renderer/core/loader/link_loader.cc
M third_party/blink/renderer/modules/BUILD.gn
M third_party/blink/renderer/modules/modules_initializer.cc
M third_party/blink/renderer/modules/modules_initializer.h
A third_party/blink/renderer/modules/webmonetization/BUILD.gn
A third_party/blink/renderer/modules/webmonetization/monetization_configuration.h
A third_party/blink/renderer/modules/webmonetization/monetization_currency_amount.cc
A third_party/blink/renderer/modules/webmonetization/monetization_currency_amount.h
A third_party/blink/renderer/modules/webmonetization/monetization_currency_amount.idl
A third_party/blink/renderer/modules/webmonetization/monetization_event.cc
A third_party/blink/renderer/modules/webmonetization/monetization_event.h
A third_party/blink/renderer/modules/webmonetization/monetization_event.idl
A third_party/blink/renderer/modules/webmonetization/monetization_event_init.idl
A third_party/blink/renderer/modules/webmonetization/monetization_event_test.cc
A third_party/blink/renderer/modules/webmonetization/monetization_provider.cc
A third_party/blink/renderer/modules/webmonetization/monetization_provider.h
A third_party/blink/renderer/modules/webmonetization/monetization_session.cc
A third_party/blink/renderer/modules/webmonetization/monetization_session.h
A third_party/blink/renderer/modules/webmonetization/open_payments_amount.cc
A third_party/blink/renderer/modules/webmonetization/open_payments_amount.h
A third_party/blink/renderer/modules/webmonetization/open_payments_complete_incoming_payment.h
A third_party/blink/renderer/modules/webmonetization/open_payments_fetcher.cc
A third_party/blink/renderer/modules/webmonetization/open_payments_fetcher.h
A third_party/blink/renderer/modules/webmonetization/open_payments_incoming_payment.cc
A third_party/blink/renderer/modules/webmonetization/open_payments_incoming_payment.h
A third_party/blink/renderer/modules/webmonetization/open_payments_outgoing_payment.h
A third_party/blink/renderer/modules/webmonetization/open_payments_quote.cc
A third_party/blink/renderer/modules/webmonetization/open_payments_quote.h
M third_party/blink/renderer/platform/runtime_enabled_features.json5
43 files changed, 1,253 insertions(+), 12 deletions(-)

To view, visit change 4930834. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 8
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Alexander Surkov <asu...@igalia.com>

Alexander Surkov (Gerrit)

unread,
Dec 12, 2023, 7:53:38 PM12/12/23
to blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org

Attention is currently required from: Alexander Surkov.

Alexander Surkov uploaded patch set #9 to this change.

View Change

Web monetization prototype

This a WM skeleton with boilerplate code for WM implementation.
It consist of webmonetization blink module which is supposed to
implement a web monetization session flow and HTML link rel=monetization
extension which starts a web monetization session.

WM spec: https://webmonetization.org/specification/

Bug: 1031476
Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
---
M third_party/blink/renderer/bindings/generated_in_modules.gni
M third_party/blink/renderer/bindings/idl_in_modules.gni
M third_party/blink/renderer/core/core_initializer.h
M third_party/blink/renderer/core/events/event_type_names.json5
M third_party/blink/renderer/core/frame/local_frame_client.h
M third_party/blink/renderer/core/frame/local_frame_client_impl.cc
M third_party/blink/renderer/core/frame/local_frame_client_impl.h
M third_party/blink/renderer/core/html/build.gni
M third_party/blink/renderer/core/html/html_link_element.cc
A third_party/blink/renderer/core/html/link_monetization.cc
A third_party/blink/renderer/core/html/link_monetization.h
M third_party/blink/renderer/core/html/link_resource.h
M third_party/blink/renderer/core/html/rel_list.cc
41 files changed, 1,249 insertions(+), 10 deletions(-)

To view, visit change 4930834. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 9

Rouslan Solomakhin (Gerrit)

unread,
Dec 13, 2023, 2:23:15 PM12/13/23
to Alexander Surkov, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Kentaro Hara

Attention is currently required from: Alexander Surkov.

View Change

6 comments:

To view, visit change 4930834. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 9
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Alexander Surkov <asu...@igalia.com>
Gerrit-Comment-Date: Wed, 13 Dec 2023 19:23:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Alexander Surkov (Gerrit)

unread,
Dec 20, 2023, 1:46:15 AM12/20/23
to blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara

Attention is currently required from: Rouslan Solomakhin.

View Change

5 comments:

  • File third_party/blink/renderer/modules/webmonetization/BUILD.gn:

    • Done

  • File third_party/blink/renderer/modules/webmonetization/monetization_currency_amount.idl:

    • Patch Set #9, Line 8:

        required DOMString? amount;
      required DOMString? assetCode;
      required octet? assetScale;
      required DOMString? receipt;

    • The spec says: […]

      Done

To view, visit change 4930834. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 9
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Comment-Date: Wed, 20 Dec 2023 06:45:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Rouslan Solomakhin <rou...@chromium.org>

Alexander Surkov (Gerrit)

unread,
Dec 20, 2023, 1:55:19 AM12/20/23
to blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org

Attention is currently required from: Rouslan Solomakhin.

Alexander Surkov uploaded patch set #10 to this change.

View Change

41 files changed, 1,244 insertions(+), 10 deletions(-)

To view, visit change 4930834. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 10

Alexander Surkov (Gerrit)

unread,
Dec 30, 2023, 3:02:36 AM12/30/23
to blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org

Attention is currently required from: Rouslan Solomakhin.

Alexander Surkov uploaded patch set #11 to this change.

View Change

Web monetization prototype

This a WM skeleton with boilerplate code for WM implementation.
It consist of webmonetization blink module which is supposed to
implement a web monetization session flow and HTML link rel=monetization
extension which starts a web monetization session.

WM spec: https://webmonetization.org/specification/

Bug: 1031476
Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
---
M third_party/blink/renderer/bindings/generated_in_modules.gni
M third_party/blink/renderer/bindings/idl_in_modules.gni
M third_party/blink/renderer/core/core_initializer.h
M third_party/blink/renderer/core/events/event_type_names.json5
M third_party/blink/renderer/core/frame/local_frame_client.h
M third_party/blink/renderer/core/frame/local_frame_client_impl.cc
M third_party/blink/renderer/core/frame/local_frame_client_impl.h
M third_party/blink/renderer/core/html/build.gni
M third_party/blink/renderer/core/html/html_link_element.cc
M third_party/blink/renderer/core/html/html_link_element.h
42 files changed, 1,453 insertions(+), 10 deletions(-)

To view, visit change 4930834. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 11

Alexander Surkov (Gerrit)

unread,
Dec 30, 2023, 3:20:40 AM12/30/23
to David Baron, Dmitry Gozman, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org

Attention is currently required from: David Baron, Dmitry Gozman, Rouslan Solomakhin.

Alexander Surkov would like David Baron and Dmitry Gozman to review this change.

Gerrit-MessageType: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 11
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>

Alexander Surkov (Gerrit)

unread,
Dec 30, 2023, 3:20:44 AM12/30/23
to blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara

Attention is currently required from: David Baron, Dmitry Gozman, Rouslan Solomakhin.

View Change

1 comment:

  • Patchset:

    • Patch Set #11:

      David, Dmitriy. Could you please provide some initial feedback on the implementation of the WebMonetization module? Although it's not yet complete, I would greatly appreciate your general thoughts on the approach I've taken and whether it aligns with the right direction.

To view, visit change 4930834. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 11
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Comment-Date: Sat, 30 Dec 2023 08:20:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

David Baron (Gerrit)

unread,
Jan 2, 2024, 10:38:08 AMJan 2
to Alexander Surkov, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara

Attention is currently required from: Alexander Surkov, David Baron, Dmitry Gozman, Rouslan Solomakhin.

View Change

8 comments:

  • Patchset:

    • Patch Set #11:

      One question below that would help provide some context here, and also a few comments from skimming parts of the page. I still need to provide more feedback later.

  • Commit Message:

    • Patch Set #11, Line 7: Web monetization prototype

      Is there a chromestatus entry and intent to prototype for this?

      (That would provide some context that would be helpful to give high-level feedback.)

    • Patch Set #11, Line 16: Bug: 1031476

      This is an archived bug. It should probably have a different status if there's still active work.

  • File third_party/blink/renderer/core/html/html_link_element.cc:

  • File third_party/blink/renderer/modules/webmonetization/monetization_event.h:

    • Patch Set #11, Line 18: public GarbageCollectedMixin {

      I don't think you should need to inherit from `GarbageCollectedMixin`.

  • File third_party/blink/renderer/modules/webmonetization/monetization_event.cc:

    • Patch Set #11, Line 18: MonetizationEvent* MonetizationEvent::Create(

      This shouldn't ignore the string passed to it. (See other events for examples of how to deal with it; it probably needs a second constructor.)

  • File third_party/blink/renderer/modules/webmonetization/monetization_event.idl:

To view, visit change 4930834. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 11
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Attention: Alexander Surkov <asu...@igalia.com>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Comment-Date: Tue, 02 Jan 2024 15:37:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Alexander Surkov (Gerrit)

unread,
Jan 9, 2024, 1:20:23 AMJan 9
to blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara

Attention is currently required from: David Baron, Dmitry Gozman, Rouslan Solomakhin.

View Change

6 comments:

  • Commit Message:

    • Patch Set #11, Line 16: Bug: 1031476

      This is an archived bug. It should probably have a different status if there's still active work.

    • the status was changed

  • File third_party/blink/renderer/core/html/html_link_element.cc:

    • Please remove this `printf`.

    • I find them useful for debugging, so I would keep them for now if you're ok with it. I'll certainly will remove them once we get closer to the landing.

  • File third_party/blink/renderer/modules/webmonetization/monetization_event.h:

    • Patch Set #11, Line 18: public GarbageCollectedMixin {

      I don't think you should need to inherit from `GarbageCollectedMixin`.

    • Acknowledged

  • File third_party/blink/renderer/modules/webmonetization/monetization_event.cc:

To view, visit change 4930834. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 11
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Comment-Date: Tue, 09 Jan 2024 06:20:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: David Baron <dba...@chromium.org>

Alexander Surkov (Gerrit)

unread,
Jan 10, 2024, 3:19:50 AMJan 10
to Nate Chapin, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, David Baron, Dmitry Gozman

Attention is currently required from: David Baron, Dmitry Gozman, Nate Chapin, Rouslan Solomakhin.

Alexander Surkov would like Nate Chapin to review this change.

To view, visit change 4930834. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 11
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Attention: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>

Alexander Surkov (Gerrit)

unread,
Jan 10, 2024, 3:19:54 AMJan 10
to blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, Nate Chapin, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara

Attention is currently required from: David Baron, Dmitry Gozman, Nate Chapin, Rouslan Solomakhin.

View Change

1 comment:

  • Patchset:

    • Patch Set #11:

      Looping into Nate for review/feedback on OpenPaymentsFetcher implementation.

To view, visit change 4930834. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 11
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Attention: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Comment-Date: Wed, 10 Jan 2024 08:19:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

David Baron (Gerrit)

unread,
Jan 11, 2024, 10:34:59 AMJan 11
to Alexander Surkov, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, Nate Chapin, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara

Attention is currently required from: Alexander Surkov, Dmitry Gozman, Nate Chapin, Rouslan Solomakhin.

View Change

13 comments:

  • Patchset:

    • Patch Set #11:

      I took a somewhat more detailed look this time, although still not (given what you asked for) a full code review.

      Comments below -- but one theme that came up a few times is that it would probably be useful for the code to have comments pointing to the parts of the spec that it's implementing. When specs are reasonably algorithmic (as this one is, at least in parts), it often makes sense for the code to resemble the spec and have comments pointing to the parts of the spec that the code is implementing.

  • Commit Message:

    • We have a PRD https://docs.google. […]

      That's useful -- but if you're prototyping something you should also be creating a chromestatus entry and sending an intent to prototype -- that's a part of our process and it helps the community understand what work is happening and gives folks a chance to comment early if they want to.

  • File third_party/blink/renderer/core/html/link_monetization.cc:

    • Patch Set #11, Line 24:

        if (LocalFrame* frame = owner_->GetDocument().GetFrame()) {
      frame->Client()->StartMonetizationSession(*owner_);
      }

      At least with the current code, I don't see any reason for this to go through `LocalFrame`. (It looks like it's modeled on `DidChangeManifest` / `DispatchDidChangeManifest`, but in that case the code in `LocalFrameClientImpl` attaches additional information to it.) Could this just call `CoreInitializer::GetInstance` directly?

      (That said, maybe there's a reason you would want to go through `LocalFrame` in the future?)

    • Patch Set #11, Line 45: owner_->ScheduleEvent();

      Does this match the spec's description of when to fire load/error events at the link element? At the very least, it's hard for me to confirm that it does -- it might be good if the code looked more like the spec's description of how things should work.

  • File third_party/blink/renderer/core/html/rel_list.cc:

    • Patch Set #11, Line 43: tokens.insert(AtomicString("monetization"));

      It might be nice to find a way to do this only once rather than every time `SupportedTokensLink` is called.)

  • File third_party/blink/renderer/modules/webmonetization/monetization_configuration.h:

    • Patch Set #11, Line 14: class MODULES_EXPORT MonetizationConfiguration final {

      Does this (or anything other than `MonetizationCurrencyAmount` and `MonetizationEvent`) need `MODULES_EXPORT`?

    • Patch Set #11, Line 27:

        MonetizationConfiguration(MonetizationConfiguration&& o)
      : userWalletPaymentPointer_(o.userWalletPaymentPointer_),
      maxAmount_(o.maxAmount_),
      expiresAt_(o.expiresAt_) {}

      Can this just use `= default` rather than defining it?

    • Patch Set #11, Line 35:

        blink::KURL UserWalletPaymentPointer() const {
      return userWalletPaymentPointer_;
      }

      OpenPaymentsAmount MaxAmount() const { return maxAmount_; }

      String ExpiresAt() { return expiresAt_; }

      Might it be better for these to return const references rather than returning by value?

      (Also, should `ExpiresAt` also be a `const` method?)

  • File third_party/blink/renderer/modules/webmonetization/monetization_currency_amount.h:

    • Patch Set #11, Line 29:

        String currency() const { return currency_; }
      String value() const { return value_; }

      These could likely also return const references rather than copies.

  • File third_party/blink/renderer/modules/webmonetization/monetization_event.cc:

    • There's a second constructor provided which takes the init object only. […]

      I think third_party/blink/renderer/core/events/progress_event.h is a reasonably typical example. (Why do you need the `Create` method that *doesn't* take the name?)

  • File third_party/blink/renderer/modules/webmonetization/monetization_provider.cc:

    • Patch Set #11, Line 11: const KURL& paymentPointer) {

      I think one of the interesting questions with this design is likely about how this handles permissions for different URLs, including any necessary requests for permission and persisting those permissions. It looks like that part isn't implemented yet.

      One thing I'd note, however, is that things that require requesting permission often have to be asynchronous, to account for the time to ask the user a question and await a response. They might even need to be asynchronous just to ask the browser process for persisted data relevant to the site. This makes me a little worried about the code here all looking like it's going to be synchronous.

  • File third_party/blink/renderer/modules/webmonetization/monetization_session.cc:

    • Patch Set #11, Line 25: const HTMLLinkElement& link_element) {

      It feels a little bit fragile for the API to be passing an `HTMLLinkElement` through all these layers. However, on the other hand, if there's a future mechanism that involves starting monetization through something other than a `<link>`, you could change it then. So there's probably no need to change it now, although it also might be worth thinking about if you end up adding even *more* code that passes `HTMLLinkElement`s around.

      (Another thing here that could possibly be an advantage of such a change is that it would avoid exposing `LinkResource` which currently appears to be mainly internal to how we handle links, but which your change is exposing externally.)

    • Patch Set #11, Line 51: base::OnceCallback<void()> sending_wallet_address =

      It would generally be useful to have more specific links to the spec in this sort of code that point to the parts of the spec that code like this is implementing.

To view, visit change 4930834. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 11
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Alexander Surkov <asu...@igalia.com>
Gerrit-Attention: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Comment-Date: Thu, 11 Jan 2024 15:34:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: David Baron <dba...@chromium.org>
Comment-In-Reply-To: Alexander Surkov <asu...@igalia.com>

Alexander Surkov (Gerrit)

unread,
Jan 26, 2024, 5:22:40 AMJan 26
to blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Alexander Surkov, Dmitry Gozman, Nate Chapin and Rouslan Solomakhin

Alexander Surkov uploaded new patchset

Alexander Surkov uploaded patch set #12 to this change.
Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Surkov
  • Dmitry Gozman
  • Nate Chapin
  • Rouslan Solomakhin
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 12
satisfied_requirement
unsatisfied_requirement
open
diffy

Alexander Surkov (Gerrit)

unread,
Jan 26, 2024, 5:24:07 AMJan 26
to blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, Nate Chapin, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara
Attention needed from David Baron, Dmitry Gozman, Nate Chapin and Rouslan Solomakhin

Alexander Surkov added 11 comments

File third_party/blink/renderer/core/html/link_monetization.cc
Line 24, Patchset 11: if (LocalFrame* frame = owner_->GetDocument().GetFrame()) {
frame->Client()->StartMonetizationSession(*owner_);
}
David Baron . resolved

At least with the current code, I don't see any reason for this to go through `LocalFrame`. (It looks like it's modeled on `DidChangeManifest` / `DispatchDidChangeManifest`, but in that case the code in `LocalFrameClientImpl` attaches additional information to it.) Could this just call `CoreInitializer::GetInstance` directly?

(That said, maybe there's a reason you would want to go through `LocalFrame` in the future?)

Alexander Surkov

yep, it seems so

Line 45, Patchset 11: owner_->ScheduleEvent();
David Baron . unresolved

Does this match the spec's description of when to fire load/error events at the link element? At the very least, it's hard for me to confirm that it does -- it might be good if the code looked more like the spec's description of how things should work.

Alexander Surkov

Do you mean HTML spec or WM spec? If HTML spec, then does it has generic recommendations for HTML:link load/error events that would be applicable to rel=monetization? WM specs out the load/error events here https://webmonetization-preview.netlify.app/specification/#link-type-monetization.

File third_party/blink/renderer/core/html/rel_list.cc
Line 43, Patchset 11: tokens.insert(AtomicString("monetization"));
David Baron . resolved

It might be nice to find a way to do this only once rather than every time `SupportedTokensLink` is called.)

Alexander Surkov

thank you for the catch

File third_party/blink/renderer/modules/webmonetization/monetization_configuration.h
Line 35, Patchset 11: blink::KURL UserWalletPaymentPointer() const {

return userWalletPaymentPointer_;
}

OpenPaymentsAmount MaxAmount() const { return maxAmount_; }

String ExpiresAt() { return expiresAt_; }
David Baron . resolved

Might it be better for these to return const references rather than returning by value?

(Also, should `ExpiresAt` also be a `const` method?)

Alexander Surkov

Acknowledged

Line 27, Patchset 11: MonetizationConfiguration(MonetizationConfiguration&& o)
: userWalletPaymentPointer_(o.userWalletPaymentPointer_),
maxAmount_(o.maxAmount_),
expiresAt_(o.expiresAt_) {}
David Baron . unresolved

Can this just use `= default` rather than defining it?

Alexander Surkov

hm, it complains that only special member functions and comparison operators may be defaulted

Line 14, Patchset 11:class MODULES_EXPORT MonetizationConfiguration final {
David Baron . resolved

Does this (or anything other than `MonetizationCurrencyAmount` and `MonetizationEvent`) need `MODULES_EXPORT`?

Alexander Surkov

Acknowledged

File third_party/blink/renderer/modules/webmonetization/monetization_currency_amount.h
Line 29, Patchset 11: String currency() const { return currency_; }

String value() const { return value_; }
David Baron . resolved

These could likely also return const references rather than copies.

Alexander Surkov

Acknowledged

File third_party/blink/renderer/modules/webmonetization/monetization_event.cc
Line 18, Patchset 11:MonetizationEvent* MonetizationEvent::Create(
David Baron . unresolved

This shouldn't ignore the string passed to it. (See other events for examples of how to deal with it; it probably needs a second constructor.)

Alexander Surkov

There's a second constructor provided which takes the init object only. but ok, I will keep using the given string. I couldn't find a good example in the codebase, the closest thing was BeforeUnloadEvent (https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/events/before_unload_event.h;l=34;drc=67d90538f11c6b232dbfd716075db52aeb34fd15) but it doesn't provide that constructor at all. Can you think of a more suitable example?

David Baron

I think third_party/blink/renderer/core/events/progress_event.h is a reasonably typical example. (Why do you need the `Create` method that *doesn't* take the name?)

Alexander Surkov

Do you mean event type?

ProgressEvent can have multiple event type such as loadstart, abort or progress (according to MDN https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/ProgressEvent), while MonetizationEvent can only be of 'monetization' type. I was thinking how should I hardcode the 'monetization' type into MonetizationEvent class, and came with that hacky approach. Do you have recommendations how to workaround this?

File third_party/blink/renderer/modules/webmonetization/monetization_provider.cc
Line 11, Patchset 11: const KURL& paymentPointer) {
David Baron . unresolved

I think one of the interesting questions with this design is likely about how this handles permissions for different URLs, including any necessary requests for permission and persisting those permissions. It looks like that part isn't implemented yet.

One thing I'd note, however, is that things that require requesting permission often have to be asynchronous, to account for the time to ask the user a question and await a response. They might even need to be asynchronous just to ask the browser process for persisted data relevant to the site. This makes me a little worried about the code here all looking like it's going to be synchronous.

Alexander Surkov

Correct. This is part is tbd. It will involve UI to request permissions which is a chunk of work I suspect. In this patch I kept focus on implementing a dummy part but that one giving a good understanding of the architecture of the backend part. Once this part is done I was planning to start the user faced part.

Having said that you have a good point on asynchronous nature of the monetization configuration. I might need to rethink the thing now.

File third_party/blink/renderer/modules/webmonetization/monetization_session.cc
Line 25, Patchset 11: const HTMLLinkElement& link_element) {
David Baron . unresolved

It feels a little bit fragile for the API to be passing an `HTMLLinkElement` through all these layers. However, on the other hand, if there's a future mechanism that involves starting monetization through something other than a `<link>`, you could change it then. So there's probably no need to change it now, although it also might be worth thinking about if you end up adding even *more* code that passes `HTMLLinkElement`s around.

(Another thing here that could possibly be an advantage of such a change is that it would avoid exposing `LinkResource` which currently appears to be mainly internal to how we handle links, but which your change is exposing externally.)

Alexander Surkov

It might be a good idea to keep a monetization session separate from a HTML:link, but the spec currently bonds these two things together, HTML:link is a target for error and monetization events sent by a monetization session. I'm not sure if I have other ideas how to improve it.

Line 51, Patchset 11: base::OnceCallback<void()> sending_wallet_address =
David Baron . unresolved

It would generally be useful to have more specific links to the spec in this sort of code that point to the parts of the spec that code like this is implementing.

Alexander Surkov

I'm not sure if the flow is outlined by the spec somewhere. I was guided by an example of https://github.com/interledger/web-monetization-extension/blob/main/src/background/grantFlow.ts. I'll rise a question about that in the group. Having said that the methods like GetSendingWalletAddress have a spec link in a header file.

Open in Gerrit

Related details

Attention is currently required from:
  • David Baron
  • Dmitry Gozman
  • Nate Chapin
  • Rouslan Solomakhin
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 11
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Attention: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Comment-Date: Fri, 26 Jan 2024 10:23:55 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

David Baron (Gerrit)

unread,
Jan 26, 2024, 11:35:40 AMJan 26
to Alexander Surkov, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, Nate Chapin, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara
Attention needed from Alexander Surkov, Dmitry Gozman, Nate Chapin and Rouslan Solomakhin

David Baron added 4 comments

File third_party/blink/renderer/core/html/link_monetization.cc
Line 45, Patchset 11: owner_->ScheduleEvent();
David Baron . unresolved

Does this match the spec's description of when to fire load/error events at the link element? At the very least, it's hard for me to confirm that it does -- it might be good if the code looked more like the spec's description of how things should work.

Alexander Surkov

Do you mean HTML spec or WM spec? If HTML spec, then does it has generic recommendations for HTML:link load/error events that would be applicable to rel=monetization? WM specs out the load/error events here https://webmonetization-preview.netlify.app/specification/#link-type-monetization.

David Baron

I think I meant the Web Monetization spec.

That said, I think https://html.spec.whatwg.org/multipage/semantics.html#fetching-and-processing-a-resource-from-a-link-element is relevant, and defining steps that integrate properly into that section would be the correct way for the Web Monetization spec to define the behavior.

File third_party/blink/renderer/modules/webmonetization/monetization_configuration.h
Line 27, Patchset 11: MonetizationConfiguration(MonetizationConfiguration&& o)
: userWalletPaymentPointer_(o.userWalletPaymentPointer_),
maxAmount_(o.maxAmount_),
expiresAt_(o.expiresAt_) {}
David Baron . unresolved

Can this just use `= default` rather than defining it?

Alexander Surkov

hm, it complains that only special member functions and comparison operators may be defaulted

David Baron

A move constructor should count as a special member function, I think. There are plenty of examples in the code now, such as https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/style/filter_operations.h;l=49;drc=a8c7ce4436274b29971e4a8a95522ab96c3ed088

File third_party/blink/renderer/modules/webmonetization/monetization_event.cc
Line 18, Patchset 11:MonetizationEvent* MonetizationEvent::Create(
David Baron . unresolved

This shouldn't ignore the string passed to it. (See other events for examples of how to deal with it; it probably needs a second constructor.)

Alexander Surkov

There's a second constructor provided which takes the init object only. but ok, I will keep using the given string. I couldn't find a good example in the codebase, the closest thing was BeforeUnloadEvent (https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/events/before_unload_event.h;l=34;drc=67d90538f11c6b232dbfd716075db52aeb34fd15) but it doesn't provide that constructor at all. Can you think of a more suitable example?

David Baron

I think third_party/blink/renderer/core/events/progress_event.h is a reasonably typical example. (Why do you need the `Create` method that *doesn't* take the name?)

Alexander Surkov

Do you mean event type?

ProgressEvent can have multiple event type such as loadstart, abort or progress (according to MDN https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/ProgressEvent), while MonetizationEvent can only be of 'monetization' type. I was thinking how should I hardcode the 'monetization' type into MonetizationEvent class, and came with that hacky approach. Do you have recommendations how to workaround this?

David Baron

I think the norm is not to hard code it; see third_party/blink/renderer/core/events/overscroll_event.h as an example.

(I think Web pages can still create such an event with a different name if they want to, although I'm not 100% sure about that.)

File third_party/blink/renderer/modules/webmonetization/monetization_session.cc
Line 51, Patchset 11: base::OnceCallback<void()> sending_wallet_address =
David Baron . unresolved

It would generally be useful to have more specific links to the spec in this sort of code that point to the parts of the spec that code like this is implementing.

Alexander Surkov

I'm not sure if the flow is outlined by the spec somewhere. I was guided by an example of https://github.com/interledger/web-monetization-extension/blob/main/src/background/grantFlow.ts. I'll rise a question about that in the group. Having said that the methods like GetSendingWalletAddress have a spec link in a header file.

David Baron

That might be a sign that the spec needs to be more precise about how things work. On the other hand, it's often OK to be doing prototypes when the spec isn't that precise, but by the time we think about shipping a feature it probably should have a sufficiently precise spec.

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Surkov
  • Dmitry Gozman
  • Nate Chapin
  • Rouslan Solomakhin
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 12
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Alexander Surkov <asu...@igalia.com>
Gerrit-Attention: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Comment-Date: Fri, 26 Jan 2024 16:35:31 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Alexander Surkov (Gerrit)

unread,
Feb 13, 2024, 8:39:06 AMFeb 13
to blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, Nate Chapin, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara
Attention needed from David Baron, Dmitry Gozman and Nate Chapin

Alexander Surkov added 1 comment

Commit Message
Line 7, Patchset 11:Web monetization prototype
David Baron . resolved

Is there a chromestatus entry and intent to prototype for this?

(That would provide some context that would be helpful to give high-level feedback.)

Alexander Surkov

We have a PRD https://docs.google.com/document/d/1TXXnoRNhlkVjeMX434ajUVQW3AB3k-iuznJTJbNdlis/edit?usp=sharing which is supposed to give an overview of the project. Is that something you look for?

David Baron

That's useful -- but if you're prototyping something you should also be creating a chromestatus entry and sending an intent to prototype -- that's a part of our process and it helps the community understand what work is happening and gives folks a chance to comment early if they want to.

Attention is currently required from:
  • David Baron
  • Dmitry Gozman
  • Nate Chapin
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 12
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Attention: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Comment-Date: Tue, 13 Feb 2024 13:38:57 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Alexander Surkov (Gerrit)

unread,
Feb 28, 2024, 8:30:04 PMFeb 28
to Nate Chapin, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from David Baron, Dmitry Gozman and Nate Chapin

Alexander Surkov added 2 comments

File third_party/blink/renderer/modules/webmonetization/monetization_configuration.h
Line 27, Patchset 11: MonetizationConfiguration(MonetizationConfiguration&& o)
: userWalletPaymentPointer_(o.userWalletPaymentPointer_),
maxAmount_(o.maxAmount_),
expiresAt_(o.expiresAt_) {}
David Baron . resolved

Can this just use `= default` rather than defining it?

Alexander Surkov

hm, it complains that only special member functions and comparison operators may be defaulted

David Baron

A move constructor should count as a special member function, I think. There are plenty of examples in the code now, such as https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/style/filter_operations.h;l=49;drc=a8c7ce4436274b29971e4a8a95522ab96c3ed088

Alexander Surkov

weird, no error, seems working now

File third_party/blink/renderer/modules/webmonetization/monetization_event.cc
Line 18, Patchset 11:MonetizationEvent* MonetizationEvent::Create(
David Baron . resolved

This shouldn't ignore the string passed to it. (See other events for examples of how to deal with it; it probably needs a second constructor.)

Alexander Surkov

There's a second constructor provided which takes the init object only. but ok, I will keep using the given string. I couldn't find a good example in the codebase, the closest thing was BeforeUnloadEvent (https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/events/before_unload_event.h;l=34;drc=67d90538f11c6b232dbfd716075db52aeb34fd15) but it doesn't provide that constructor at all. Can you think of a more suitable example?

David Baron

I think third_party/blink/renderer/core/events/progress_event.h is a reasonably typical example. (Why do you need the `Create` method that *doesn't* take the name?)

Alexander Surkov

Do you mean event type?

ProgressEvent can have multiple event type such as loadstart, abort or progress (according to MDN https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent/ProgressEvent), while MonetizationEvent can only be of 'monetization' type. I was thinking how should I hardcode the 'monetization' type into MonetizationEvent class, and came with that hacky approach. Do you have recommendations how to workaround this?

David Baron

I think the norm is not to hard code it; see third_party/blink/renderer/core/events/overscroll_event.h as an example.

(I think Web pages can still create such an event with a different name if they want to, although I'm not 100% sure about that.)

Alexander Surkov

ok, will change that

Gerrit-Comment-Date: Thu, 29 Feb 2024 01:29:56 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Alexander Surkov (Gerrit)

unread,
Feb 28, 2024, 9:07:01 PMFeb 28
to Takashi Toyoshima, AyeAye, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara, kinuko...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from David Baron, Dmitry Gozman and Takashi Toyoshima

Alexander Surkov added 1 comment

Patchset-level comments
File-level comment, Patchset 13 (Latest):
Alexander Surkov . resolved

Nate -> Takashi per Nate/Takashi recommendations

Open in Gerrit

Related details

Attention is currently required from:
  • David Baron
  • Dmitry Gozman
  • Takashi Toyoshima
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 13
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Comment-Date: Thu, 29 Feb 2024 02:06:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Takashi Toyoshima (Gerrit)

unread,
Feb 29, 2024, 3:16:46 AMFeb 29
to Alexander Surkov, AyeAye, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara, kinuko...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Alexander Surkov, David Baron and Dmitry Gozman

Takashi Toyoshima added 6 comments

Patchset-level comments
Takashi Toyoshima . resolved

I feel it's difficult to review many classes that are almost empty for now.
Can we review the high-level design in a design doc, and go details in the code review, prefering per-class CL with actual implementation.
Or if this is just a prototype, and want a feedback, which is the point you have a concern, or need a help?

File third_party/blink/renderer/core/core_initializer.h
Line 148, Patchset 13 (Latest): virtual void StartMonetizationSession(const HTMLLinkElement&) = 0;
Takashi Toyoshima . unresolved

why we need this here?

File third_party/blink/renderer/core/html/link_monetization.cc
Line 18, Patchset 13 (Latest): if (!owner_) {
Takashi Toyoshima . unresolved

could this be nullptr? or can we have CHECK(owner) in the constructor?

File third_party/blink/renderer/core/html/link_resource.h
Line 49, Patchset 13 (Latest): enum LinkResourceType { kStyle, kManifest, kMonetization, kOther };
Takashi Toyoshima . unresolved

maybe good to have a spec link here until it gets standardized

File third_party/blink/renderer/core/html/rel_list.cc
Line 20, Patchset 13 (Latest):static HashSet<AtomicString> SupportedTokensLink() {
Takashi Toyoshima . unresolved

Can you rename as GenerateSupportedTokensLink?

File third_party/blink/renderer/modules/webmonetization/monetization_provider.cc
Line 16, Patchset 13 (Latest): const KURL payerPointer{"https://ilp.rafiki.money/petro"};
const OpenPaymentsAmount amount{"1", "USD", 2};
const String expiresAt{"2024-12-25"};
Takashi Toyoshima . unresolved

Where do these hardcoded values come from?
Can you document it?

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Surkov
  • David Baron
  • Dmitry Gozman
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 13
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Attention: Alexander Surkov <asu...@igalia.com>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Comment-Date: Thu, 29 Feb 2024 08:16:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Alexander Surkov (Gerrit)

unread,
Mar 10, 2024, 7:29:32 AMMar 10
to Takashi Toyoshima, AyeAye, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara, kinuko...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Dmitry Gozman and Takashi Toyoshima

Alexander Surkov added 5 comments

File third_party/blink/renderer/core/core_initializer.h
Line 148, Patchset 13: virtual void StartMonetizationSession(const HTMLLinkElement&) = 0;
Takashi Toyoshima . resolved

why we need this here?

Alexander Surkov

it is used by LinkMonetization
CoreInitializer::GetInstance().StartMonetizationSession(*owner_);

File third_party/blink/renderer/core/html/link_monetization.cc
Line 18, Patchset 13: if (!owner_) {
Takashi Toyoshima . unresolved

could this be nullptr? or can we have CHECK(owner) in the constructor?

Alexander Surkov

I copied this pattern. LinkMonetization has OwnerRemoved() which nullifies the owner. I don't see a reason why link monetization would exist with no owner though, perhaps something cc related.

File third_party/blink/renderer/core/html/link_resource.h
Line 49, Patchset 13: enum LinkResourceType { kStyle, kManifest, kMonetization, kOther };
Takashi Toyoshima . resolved

maybe good to have a spec link here until it gets standardized

Alexander Surkov

Acknowledged

File third_party/blink/renderer/core/html/rel_list.cc
Line 20, Patchset 13:static HashSet<AtomicString> SupportedTokensLink() {
Takashi Toyoshima . resolved

Can you rename as GenerateSupportedTokensLink?

Alexander Surkov

Acknowledged

File third_party/blink/renderer/modules/webmonetization/monetization_provider.cc

const OpenPaymentsAmount amount{"1", "USD", 2};
const String expiresAt{"2024-12-25"};
Takashi Toyoshima . resolved

Where do these hardcoded values come from?
Can you document it?

Alexander Surkov

It's my personal wallet used for testing purpose only to implement the minimal working version. It will be replaced on user's wallet the next phase. I'll add a comment.

Open in Gerrit

Related details

Attention is currently required from:
  • Dmitry Gozman
  • Takashi Toyoshima
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 14
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Comment-Date: Sun, 10 Mar 2024 11:29:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Takashi Toyoshima (Gerrit)

unread,
Mar 11, 2024, 10:40:00 AMMar 11
to Alexander Surkov, AyeAye, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara, kinuko...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Alexander Surkov and Dmitry Gozman

Takashi Toyoshima added 1 comment

Patchset-level comments
File-level comment, Patchset 13:
Takashi Toyoshima . unresolved

I feel it's difficult to review many classes that are almost empty for now.
Can we review the high-level design in a design doc, and go details in the code review, prefering per-class CL with actual implementation.
Or if this is just a prototype, and want a feedback, which is the point you have a concern, or need a help?

Takashi Toyoshima

Let me repeat this.
Did you already get your design doc reviewed by a senior project member?
Or, can you prepare it? It should not be well prepared, but just I want to know the whole design pictures, e.g. a block diagram that shows class structures, and what kind of browser side services are needed, and how each process communicates.

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Surkov
  • Dmitry Gozman
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 14
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-Attention: Alexander Surkov <asu...@igalia.com>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Comment-Date: Mon, 11 Mar 2024 14:39:48 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Stephen McGruer (Gerrit)

unread,
Mar 11, 2024, 12:52:36 PMMar 11
to Alexander Surkov, Stephen McGruer, Takashi Toyoshima, AyeAye, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara, kinuko...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Alexander Surkov, Dmitry Gozman and Takashi Toyoshima

Stephen McGruer added 1 comment

Patchset-level comments
Takashi Toyoshima . unresolved

I feel it's difficult to review many classes that are almost empty for now.
Can we review the high-level design in a design doc, and go details in the code review, prefering per-class CL with actual implementation.
Or if this is just a prototype, and want a feedback, which is the point you have a concern, or need a help?

Takashi Toyoshima

Let me repeat this.
Did you already get your design doc reviewed by a senior project member?
Or, can you prepare it? It should not be well prepared, but just I want to know the whole design pictures, e.g. a block diagram that shows class structures, and what kind of browser side services are needed, and how each process communicates.

Stephen McGruer

Hey folks; I think there's been some confusion on the purpose of this CL. From the Chrome Payments side, we have been providing guidance to Alex as they have been looking at Web Monetization. As part of that guidance, we suggested building a prototype CL in order to determine whether the envisaged approach was possible. It was our intent that the CL be used to learn and then discarded, being followed by a design doc. And then after the design doc was approved, 'proper' implementation CLs would follow.

I see at the start of this CL, alexs did ask David and Dimitry for:

```


David, Dmitriy. Could you please provide some initial feedback on the implementation of the WebMonetization module? Although it's not yet complete, I would greatly appreciate your general thoughts on the approach I've taken and whether it aligns with the right direction.

```

And then later it looks like Nate was brought in for feedback on OpenPaymentsFetcher:

```


Looping into Nate for review/feedback on OpenPaymentsFetcher implementation.

```

(I don't know myself if there was a specific question for that module).

Later, looks like Nate redirected Alex to Takashi for the same:

```


Nate -> Takashi per Nate/Takashi recommendations

```

But I think the context of 'this is a prototype CL just for high-level feedback' was maybe lost there?


So Alex, from my side I would ask - do you think there are still outstanding high-level issues to be figured out via iterating on this prototype, or do you feel you have enough knowledge to build a design doc now?

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Surkov
  • Dmitry Gozman
  • Takashi Toyoshima
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 14
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-CC: Stephen McGruer <smcg...@chromium.org>
Gerrit-Attention: Alexander Surkov <asu...@igalia.com>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Comment-Date: Mon, 11 Mar 2024 16:52:26 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Dmitry Gozman (Gerrit)

unread,
Mar 11, 2024, 2:10:33 PMMar 11
to Alexander Surkov, Stephen McGruer, Takashi Toyoshima, AyeAye, David Baron, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara, kinuko...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Alexander Surkov, Stephen McGruer and Takashi Toyoshima

Dmitry Gozman added 1 comment

Patchset-level comments
Takashi Toyoshima . unresolved

I feel it's difficult to review many classes that are almost empty for now.
Can we review the high-level design in a design doc, and go details in the code review, prefering per-class CL with actual implementation.
Or if this is just a prototype, and want a feedback, which is the point you have a concern, or need a help?

Takashi Toyoshima

Let me repeat this.
Did you already get your design doc reviewed by a senior project member?
Or, can you prepare it? It should not be well prepared, but just I want to know the whole design pictures, e.g. a block diagram that shows class structures, and what kind of browser side services are needed, and how each process communicates.

Stephen McGruer

Hey folks; I think there's been some confusion on the purpose of this CL. From the Chrome Payments side, we have been providing guidance to Alex as they have been looking at Web Monetization. As part of that guidance, we suggested building a prototype CL in order to determine whether the envisaged approach was possible. It was our intent that the CL be used to learn and then discarded, being followed by a design doc. And then after the design doc was approved, 'proper' implementation CLs would follow.

I see at the start of this CL, alexs did ask David and Dimitry for:

```
David, Dmitriy. Could you please provide some initial feedback on the implementation of the WebMonetization module? Although it's not yet complete, I would greatly appreciate your general thoughts on the approach I've taken and whether it aligns with the right direction.
```

And then later it looks like Nate was brought in for feedback on OpenPaymentsFetcher:

```
Looping into Nate for review/feedback on OpenPaymentsFetcher implementation.
```

(I don't know myself if there was a specific question for that module).

Later, looks like Nate redirected Alex to Takashi for the same:

```
Nate -> Takashi per Nate/Takashi recommendations
```

But I think the context of 'this is a prototype CL just for high-level feedback' was maybe lost there?


So Alex, from my side I would ask - do you think there are still outstanding high-level issues to be figured out via iterating on this prototype, or do you feel you have enough knowledge to build a design doc now?

Dmitry Gozman

My bad, I did not understand this CL is here to have some high-level overview. The plumbing between core and modules looks fine, as well as using ResourceFetcher to load the links. That's pretty much all the high-level details I can speak of. Shall I look at something specific, or perhaps you have some questions that need to be answered?

I am not qualified to comment on the spec or whether this fits the <link> model, and it seems more appropriate to send an Intent to Prototype email to blink-dev and seek feedback from API owners and other folks writing specs.

Let me know what you think. Sorry for not being very useful here!

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Surkov
  • Stephen McGruer
  • Takashi Toyoshima
Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Comment-Date: Mon, 11 Mar 2024 18:08:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Stephen McGruer <smcg...@chromium.org>
Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Takashi Toyoshima (Gerrit)

unread,
Mar 11, 2024, 7:21:23 PMMar 11
to Alexander Surkov, Stephen McGruer, AyeAye, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara, kinuko...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Alexander Surkov, Dmitry Gozman and Stephen McGruer

Takashi Toyoshima added 1 comment

Patchset-level comments
Takashi Toyoshima

Thank you for the context.
So, I guess I was invited for advice around CORS problems Alex saw in this prototype. May I ask specific code points to know what the problem is now, and what kind of advice is needed?

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Surkov
  • Dmitry Gozman
  • Stephen McGruer
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
Gerrit-Comment-Date: Mon, 11 Mar 2024 23:21:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Dmitry Gozman <dgo...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Alexander Surkov (Gerrit)

unread,
Mar 13, 2024, 2:54:47 AMMar 13
to Stephen McGruer, Takashi Toyoshima, AyeAye, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara, kinuko...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Dmitry Gozman, Stephen McGruer and Takashi Toyoshima

Alexander Surkov added 1 comment

Patchset-level comments
Alexander Surkov

Takashi: right, that was my original intention to get some help with CORS. However we were able to fix the CORS problem (both the CL and the server side fixes applied), so now the CL would benefit from generic networking guidance/review. Also, I need to implement GNAP support (https://oauth.net/gnap/) for OpenPayments API which involves public/private keys generation on the browser side, so if you have any input on this (such as whether any libraries/classes/code snippets in chromium are available that I could use or get inspired by), it'd be very helpful.

Stephen: so far, there are two important pieces not yet covered by the patch:

  • chrome:webmonetization page for Web Monetization UI
  • GNAP implementation for OpenPayments

I'm not quite sure, but probably I should figure out those in this CL before moving it into the design doc. Having said that, I think I can start adding classes into the doc for the part coded in this CL.

Also, I wasn't quite sure about the purpose of this CL. We could use it as the one to prototype the ideas and develop the architecture, then put it into the design doc, get it approved, and get the CL landed as the first stage. And then, as the second stage, I could send more CLs with the actual implementation for all moving parts (such as OpenPayments API implementation and chrome:webmonetization UI).

What do you think?

Open in Gerrit

Related details

Attention is currently required from:
  • Dmitry Gozman
  • Stephen McGruer
  • Takashi Toyoshima
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 14
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-CC: Stephen McGruer <smcg...@chromium.org>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Comment-Date: Wed, 13 Mar 2024 06:54:39 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Stephen McGruer (Gerrit)

unread,
Mar 15, 2024, 9:36:50 AMMar 15
to Alexander Surkov, Stephen McGruer, Takashi Toyoshima, AyeAye, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara, kinuko...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Alexander Surkov, Dmitry Gozman and Takashi Toyoshima

Stephen McGruer added 1 comment

Patchset-level comments
Stephen McGruer

Apologies for the delay in replying!

Stephen: so far, there are two important pieces not yet covered by the patch:
> chrome:webmonetization page for Web Monetization UI
GNAP implementation for OpenPayments
> I'm not quite sure, but probably I should figure out those in this CL before moving it into the design doc. Having said that, I think I can start adding classes into the doc for the part coded in this CL.

That sounds good to me; both looking at these two additional parts in this CL, as well as starting on the design doc.

For the design doc, https://docs.google.com/document/d/14YBYKgk-uSfjfwpKFlp_omgUq5hwMVazy_M965s_1KA/edit#heading=h.7nki9mck5t64 may be useful as the general Chromium template.

Also, I wasn't quite sure about the purpose of this CL. We could use it as the one to prototype the ideas and develop the architecture, then put it into the design doc, get it approved, and get the CL landed as the first stage. And then, as the second stage, I could send more CLs with the actual implementation for all moving parts (such as OpenPayments API implementation and chrome:webmonetization UI).
> What do you think?

In Chrome, we tend to bias towards tightly scoped and concrete CLs for actual landing, rather than very broad and 'skeletal' CLs that are later filled in. (This isn't absolute, just a general bias! 😊). What I tend to do for projects like this is to never land the prototype CL, but to use it as a basis from which I start pulling off small, concrete pieces to send separately as individual CLs. This makes the CLs easier to understand, and reduces the number of OWNERS needed - while still having the original end to end prototype for folks to understand the bigger picture.

Does that sound reasonable to you?

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Surkov
  • Dmitry Gozman
  • Takashi Toyoshima
Gerrit-Attention: Alexander Surkov <asu...@igalia.com>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Comment-Date: Fri, 15 Mar 2024 13:36:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Alexander Surkov <asu...@igalia.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Alexander Surkov (Gerrit)

unread,
Mar 15, 2024, 9:56:30 AMMar 15
to Stephen McGruer, Takashi Toyoshima, AyeAye, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, Rouslan Solomakhin, chromium...@chromium.org, Kentaro Hara, kinuko...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Dmitry Gozman, Stephen McGruer and Takashi Toyoshima

Alexander Surkov added 1 comment

Patchset-level comments
Alexander Surkov

Yep. That sounds good to me. Then I'll start sketching out the classes in the design doc and will continue to prototype the missing parts here.

Open in Gerrit

Related details

Attention is currently required from:
  • Dmitry Gozman
  • Stephen McGruer
  • Takashi Toyoshima
Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Comment-Date: Fri, 15 Mar 2024 13:56:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Alexander Surkov <asu...@igalia.com>
Comment-In-Reply-To: Stephen McGruer <smcg...@chromium.org>
Comment-In-Reply-To: Dmitry Gozman <dgo...@chromium.org>
Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Rouslan Solomakhin (Gerrit)

unread,
Jun 20, 2024, 11:19:06 AM (9 days ago) Jun 20
to Alexander Surkov, Stephen McGruer, Takashi Toyoshima, AyeAye, David Baron, Dmitry Gozman, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Kentaro Hara, michaelpg+w...@chromium.org, srahim...@chromium.org, blundell+...@chromium.org, kinuko...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Alexander Surkov

Rouslan Solomakhin added 3 comments

Patchset-level comments
File-level comment, Patchset 22 (Latest):
Rouslan Solomakhin . resolved

Hi Alexander,

Disclaimer: I am operating under the assumption that this patch is a prototype to validate the feasibility of implementing your feature. We won't be able to give a thorough review on a single patch of 4k lines of code. That's when design docs come in handy.

It think it's time to take the lessons that you learned from this prototype and try to get a design doc written up. Please use [Chrome design doc template](https://docs.google.com/document/d/14YBYKgk-uSfjfwpKFlp_omgUq5hwMVazy_M965s_1KA/edit?usp=sharing) for this purpose.

Do you have a proposed directory layout documented anywhere? See [bit.ly/cc-number-validation-target-dd](bit.ly/cc-number-validation-target-dd) for example. Although it's not the same type of project, the doc aims to make the project easier to understand with:
- A list of modified files.
- A list of added files.
- A list of new build targets.
- A diagram that summarizes the code changes.

As a rule of thumb, the more diagrams, the better. This work will especially benefit from diagrams that describe flows of data.

High-level directional review for this patch:

1. Move as much code as possible from //chrome into //components/webmonetization. Then have a few places in //chrome make use of the //components/webmonetization code.
1. Check the feature flag status in the browser code.
1. Keep the screenshots in a Google Drive, Slides, or Doc, so that it's easier to quickly review the UI. Link to these screenshots for the patch description.

Cheers,
Rouslan

File chrome/app/generated_resources.grd
Line 362, Patchset 22 (Latest): <part file="webmonetization.grdp" />
Rouslan Solomakhin . unresolved

It's better to put strings in `//components`.

File chrome/app/webmonetization_grdp/IDS_WEBMONETIZATION_WALLETS_MENU_ITEM.png.sha1
Line 1, Patchset 22 (Latest):9eb8b392eec34553a507c45e0d48328a28a0aa14
Rouslan Solomakhin . unresolved

It may be helpful to keep the screenshots in a Google Drive, Slides, or Doc, so that it's easier to quickly review the UI.

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Surkov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6229515b594dc186cea87c9a1238e5f1614700ab
Gerrit-Change-Number: 4930834
Gerrit-PatchSet: 22
Gerrit-Owner: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: Alexander Surkov <asu...@igalia.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Rouslan Solomakhin <rou...@chromium.org>
Gerrit-CC: Stephen McGruer <smcg...@chromium.org>
Gerrit-Attention: Alexander Surkov <asu...@igalia.com>
Gerrit-Comment-Date: Thu, 20 Jun 2024 15:18:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages