Skip to content

Commit

Permalink
Make onfencedtreeclick a global event handler.
Browse files Browse the repository at this point in the history
The implementation of the onfencedtreeclick handler should now
match the explainer and design doc content, as requested in
WICG/fenced-frame#144 (comment)

I have also flag-gated it properly, which I guess I forgot I could
do before. Placing the attribute behind a flag should not
introduce web-visible breakage, because the method that fires
`fencedtreeclick` events (`window.fence.notifyEvent`) has not shipped.

Bug: 336318606
Change-Id: Ie49f9a78da2dd80b7777a597c9640b598d5e2846
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5479607
Reviewed-by: Dominic Farolino <[email protected]>
Commit-Queue: Andrew Verge <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1291612}
  • Loading branch information
VergeA authored and Chromium LUCI CQ committed Apr 23, 2024
1 parent f1f760c commit 22ea422
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions third_party/blink/renderer/core/dom/events/event_target.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ class CORE_EXPORT EventTarget : public ScriptWrappable {
DEFINE_ATTRIBUTE_EVENT_LISTENER(emptied, kEmptied)
DEFINE_ATTRIBUTE_EVENT_LISTENER(ended, kEnded)
DEFINE_ATTRIBUTE_EVENT_LISTENER(error, kError)
DEFINE_ATTRIBUTE_EVENT_LISTENER(fencedtreeclick, kFencedtreeclick)
DEFINE_ATTRIBUTE_EVENT_LISTENER(focus, kFocus)
DEFINE_ATTRIBUTE_EVENT_LISTENER(formdata, kFormdata)
DEFINE_ATTRIBUTE_EVENT_LISTENER(gotpointercapture, kGotpointercapture)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ interface mixin GlobalEventHandlers {
attribute EventHandler onemptied;
attribute EventHandler onended;
attribute OnErrorEventHandler onerror;
[RuntimeEnabled=FencedFramesLocalUnpartitionedDataAccess] attribute EventHandler onfencedtreeclick;
attribute EventHandler onfocus;
attribute EventHandler onformdata;
attribute EventHandler oninput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ class CORE_EXPORT HTMLFencedFrameElement : public HTMLFrameOwnerElement {
// owner, for reception by the embedder script.
void DispatchFencedEvent(const WTF::String& event_type);

// Defines attribute event listener `onfencedtreeclick`.
DEFINE_ATTRIBUTE_EVENT_LISTENER(fencedtreeclick, kFencedtreeclick)

private:
// This method will only navigate the underlying frame if the element
// `isConnected()`. It will be deferred if the page is currently prerendering.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ interface HTMLFencedFrameElement : HTMLElement {
// Feature Policy
[CEReactions, Reflect, RuntimeEnabled=FencedFramesAPIChanges] attribute DOMString allow;
[PutForwards=value] readonly attribute DOMTokenList sandbox;
attribute EventHandler onfencedtreeclick;
};
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,6 @@ html element fencedframe
property allow
property config
property height
property onfencedtreeclick
property sandbox
property width
html element fieldset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4107,14 +4107,12 @@ interface HTMLFencedFrameElement : HTMLElement
getter allow
getter config
getter height
getter onfencedtreeclick
getter sandbox
getter width
method constructor
setter allow
setter config
setter height
setter onfencedtreeclick
setter sandbox
setter width
interface HTMLFieldSetElement : HTMLElement
Expand Down

0 comments on commit 22ea422

Please sign in to comment.