-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clicking on save button dispatches a MouseEvent, button location in element's saveButtonClientRect #10703
Clicking on save button dispatches a MouseEvent, button location in element's saveButtonClientRect #10703
Conversation
EWS run on previous version of this PR (hash b559cda) |
b559cda
to
977ead6
Compare
EWS run on previous version of this PR (hash 977ead6) |
Dear reviewers: @nt1m suggested I should try to use a standard |
977ead6
to
ab03e0d
Compare
EWS run on previous version of this PR (hash ab03e0d) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, would be nice to have test coverage
You can manually enable flags in tests fwiw: |
Tests to be added in rdar://105474304 . |
ab03e0d
to
7feb57b
Compare
EWS run on previous version of this PR (hash 7feb57b) |
7feb57b
to
176a7b7
Compare
EWS run on previous version of this PR (hash 176a7b7) |
auto copiedEvent = MouseEvent::create( | ||
m_attachment->attributeWithoutSynchronization(saveAttr()), Event::CanBubble::No, Event::IsCancelable::No, Event::IsComposed::No, | ||
mouseEvent.view(), mouseEvent.detail(), mouseEvent.screenX(), mouseEvent.screenY(), mouseEvent.clientX(), mouseEvent.clientY(), | ||
mouseEvent.modifierKeys(), mouseEvent.button(), mouseEvent.buttons(), mouseEvent.syntheticClickType(), mouseEvent.relatedTarget()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relatedTarget() should probably be nullptr, see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/relatedTarget
176a7b7
to
f9644dc
Compare
EWS run on current version of this PR (hash f9644dc) |
β¦lement's saveButtonClientRect https://bugs.webkit.org/show_bug.cgi?id=252967 rdar://problem/105952126 Reviewed by Tim Nguyen. Instead of sending a CustomEvent with some hand-picked details, a click on the save button now dispatches a full copy of the original MouseEvent, and the location of the (shadow) save button can be found the element's saveButtonClientRect property. * Source/WebCore/html/HTMLAttachmentElement.cpp: (WebCore::HTMLAttachmentElement::saveButtonClientRect const): * Source/WebCore/html/HTMLAttachmentElement.h: * Source/WebCore/html/HTMLAttachmentElement.idl: Canonical link: https://commits.webkit.org/261101@main
f9644dc
to
b9dad07
Compare
Committed 261101@main (b9dad07): https://commits.webkit.org/261101@main Reviewed commits have been landed. Closing PR #10703 and removing active labels. |
b9dad07
f9644dc