/* * Copyright (C) 2005, 2007, 2015 Apple Inc. All rights reserved. * Copyright (C) 2006 Jon Shier (jshier@iastate.edu) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ #pragma once // #include "ThreadGlobalData.h" #include "EventTarget.h" #include #include #include namespace WebCore { #define DOM_EVENT_NAMES_FOR_EACH(macro) \ macro(error) \ macro(abort) \ macro(close) \ macro(open) \ macro(message) \ macro(messageerror) // macro(DOMActivate) \ // macro(DOMCharacterDataModified) \ // macro(DOMContentLoaded) \ // macro(DOMNodeInserted) \ // macro(DOMNodeInsertedIntoDocument) \ // macro(DOMNodeRemoved) \ // macro(DOMNodeRemovedFromDocument) \ // macro(DOMSubtreeModified) \ // macro(abort) \ // macro(activate) \ // macro(active) \ // macro(addsourcebuffer) \ // macro(addstream) \ // macro(addtrack) \ // macro(afterprint) \ // macro(animationcancel) \ // macro(animationend) \ // macro(animationiteration) \ // macro(animationstart) \ // macro(audioend) \ // macro(audioprocess) \ // macro(audiostart) \ // macro(autocomplete) \ // macro(autocompleteerror) \ // macro(beforecopy) \ // macro(beforecut) \ // macro(beforeinput) \ // macro(beforeload) \ // macro(beforepaste) \ // macro(beforeprint) \ // macro(beforeunload) \ // macro(beginEvent) \ // macro(blocked) \ // macro(blur) \ // macro(boundary) \ // macro(bufferedamountlow) \ // macro(cached) \ // macro(cancel) \ // macro(canplay) \ // macro(canplaythrough) \ // macro(change) \ // macro(chargingchange) \ // macro(chargingtimechange) \ // macro(checking) \ // macro(click) \ // macro(close) \ // macro(closing) \ // macro(complete) \ // macro(compositionend) \ // macro(compositionstart) \ // macro(compositionupdate) \ // macro(connect) \ // macro(connectionstatechange) \ // macro(connecting) \ // macro(contextmenu) \ // macro(controllerchange) \ // macro(coordinatorstatechange) \ // macro(copy) \ // macro(cuechange) \ // macro(cut) \ // macro(dataavailable) \ // macro(datachannel) \ // macro(dblclick) \ // macro(devicechange) \ // macro(devicemotion) \ // macro(deviceorientation) \ // macro(dischargingtimechange) \ // macro(disconnect) \ // macro(downloading) \ // macro(drag) \ // macro(dragend) \ // macro(dragenter) \ // macro(dragleave) \ // macro(dragover) \ // macro(dragstart) \ // macro(drop) \ // macro(durationchange) \ // macro(emptied) \ // macro(encrypted) \ // macro(end) \ // macro(endEvent) \ // macro(ended) \ // macro(enter) \ // macro(enterpictureinpicture) \ // macro(error) \ // macro(exit) \ // macro(fetch) \ // macro(finish) \ // macro(focus) \ // macro(focusin) \ // macro(focusout) \ // macro(formdata) \ // macro(gamepadconnected) \ // macro(gamepaddisconnected) \ // macro(gatheringstatechange) \ // macro(gesturechange) \ // macro(gestureend) \ // macro(gesturescrollend) \ // macro(gesturescrollstart) \ // macro(gesturescrollupdate) \ // macro(gesturestart) \ // macro(gesturetap) \ // macro(gesturetapdown) \ // macro(gotpointercapture) \ // macro(hashchange) \ // macro(icecandidate) \ // macro(icecandidateerror) \ // macro(iceconnectionstatechange) \ // macro(icegatheringstatechange) \ // macro(inactive) \ // macro(input) \ // macro(inputsourceschange) \ // macro(install) \ // macro(invalid) \ // macro(keydown) \ // macro(keypress) \ // macro(keystatuseschange) \ // macro(keyup) \ // macro(languagechange) \ // macro(leavepictureinpicture) \ // macro(levelchange) \ // macro(load) \ // macro(loadeddata) \ // macro(loadedmetadata) \ // macro(loadend) \ // macro(loading) \ // macro(loadingdone) \ // macro(loadingerror) \ // macro(loadstart) \ // macro(lostpointercapture) \ // macro(mark) \ // macro(merchantvalidation) \ // macro(message) \ // macro(messageerror) \ // macro(mousedown) \ // macro(mouseenter) \ // macro(mouseleave) \ // macro(mousemove) \ // macro(mouseout) \ // macro(mouseover) \ // macro(mouseup) \ // macro(mousewheel) \ // macro(mute) \ // macro(negotiationneeded) \ // macro(nexttrack) \ // macro(nomatch) \ // macro(notificationclick) \ // macro(notificationclose) \ // macro(noupdate) \ // macro(obsolete) \ // macro(offline) \ // macro(online) \ // macro(orientationchange) \ // macro(overflowchanged) \ // macro(pagehide) \ // macro(pageshow) \ // macro(paste) \ // macro(pause) \ // macro(payerdetailchange) \ // macro(paymentauthorized) \ // macro(paymentmethodchange) \ // macro(paymentmethodselected) \ // macro(play) \ // macro(playing) \ // macro(pointerlockchange) \ // macro(pointerlockerror) \ // macro(pointercancel) \ // macro(pointerdown) \ // macro(pointerenter) \ // macro(pointerleave) \ // macro(pointermove) \ // macro(pointerout) \ // macro(pointerover) \ // macro(pointerup) \ // macro(popstate) \ // macro(previoustrack) \ // macro(processorerror) \ // macro(progress) \ // macro(push) \ // macro(pushsubscriptionchange) \ // macro(ratechange) \ // macro(readystatechange) \ // macro(rejectionhandled) \ // macro(remove) \ // macro(removesourcebuffer) \ // macro(removestream) \ // macro(removetrack) \ // macro(reset) \ // macro(resize) \ // macro(resourcetimingbufferfull) \ // macro(result) \ // macro(resume) \ // macro(rtctransform) \ // macro(scroll) \ // macro(search) \ // macro(securitypolicyviolation) \ // macro(seeked) \ // macro(seeking) \ // macro(select) \ // macro(selectend) \ // macro(selectionchange) \ // macro(selectstart) \ // macro(shippingaddresschange) \ // macro(shippingcontactselected) \ // macro(shippingmethodselected) \ // macro(shippingoptionchange) \ // macro(show) \ // macro(signalingstatechange) \ // macro(slotchange) \ // macro(soundend) \ // macro(soundstart) \ // macro(sourceclose) \ // macro(sourceended) \ // macro(sourceopen) \ // macro(speechend) \ // macro(speechstart) \ // macro(squeeze) \ // macro(squeezestart) \ // macro(squeezeend) \ // macro(stalled) \ // macro(start) \ // macro(started) \ // macro(statechange) \ // macro(stop) \ // macro(storage) \ // macro(submit) \ // macro(success) \ // macro(suspend) \ // macro(textInput) \ // macro(timeout) \ // macro(timeupdate) \ // macro(toggle) \ // macro(tonechange) \ // macro(touchcancel) \ // macro(touchend) \ // macro(touchforcechange) \ // macro(touchmove) \ // macro(touchstart) \ // macro(track) \ // macro(transitioncancel) \ // macro(transitionend) \ // macro(transitionrun) \ // macro(transitionstart) \ // macro(uncapturederror) \ // macro(unhandledrejection) \ // macro(unload) \ // macro(unmute) \ // macro(update) \ // macro(updateend) \ // macro(updatefound) \ // macro(updateready) \ // macro(updatestart) \ // macro(upgradeneeded) \ // macro(validatemerchant) \ // macro(versionchange) \ // macro(visibilitychange) \ // macro(voiceschanged) \ // macro(volumechange) \ // macro(waiting) \ // macro(waitingforkey) \ // macro(webglcontextchanged) \ // macro(webglcontextcreationerror) \ // macro(webglcontextlost) \ // macro(webglcontextrestored) \ // macro(webkitAnimationEnd) \ // macro(webkitAnimationIteration) \ // macro(webkitAnimationStart) \ // macro(webkitBeforeTextInserted) \ // macro(webkitTransitionEnd) \ // macro(webkitbeginfullscreen) \ // macro(webkitcurrentplaybacktargetiswirelesschanged) \ // macro(webkitendfullscreen) \ // macro(webkitfullscreenchange) \ // macro(webkitfullscreenerror) \ // macro(webkitkeyadded) \ // macro(webkitkeyerror) \ // macro(webkitkeymessage) \ // macro(webkitmouseforcechanged) \ // macro(webkitmouseforcedown) \ // macro(webkitmouseforcewillbegin) \ // macro(webkitmouseforceup) \ // macro(webkitneedkey) \ // macro(webkitnetworkinfochange) \ // macro(webkitplaybacktargetavailabilitychanged) \ // macro(webkitpresentationmodechanged) \ // macro(webkitremovesourcebuffer) \ // macro(webkitsourceclose) \ // macro(webkitsourceended) \ // macro(webkitsourceopen) \ macro(wheel) \ macro(write) \ macro(writeend) \ macro(writestart) \ macro(zoom) \ // end of DOM_EVENT_NAMES_FOR_EACH struct EventNames { WTF_MAKE_NONCOPYABLE(EventNames); WTF_MAKE_FAST_ALLOCATED; public: #define DOM_EVENT_NAMES_DECLARE(name) const AtomString name##Event; DOM_EVENT_NAMES_FOR_EACH(DOM_EVENT_NAMES_DECLARE) #undef DOM_EVENT_NAMES_DECLARE // FIXME: The friend declaration to makeUnique below does not work in windows port. // // template // friend typename std::_Unique_if::_Single_object makeUnique(Args&&...); // // This create function should be deleted later and is only for keeping EventNames as private. // makeUnique should be used instead. // template static std::unique_ptr create(Args&&... args) { return std::unique_ptr(new EventNames(std::forward(args)...)); } // FIXME: Inelegant to call these both event names and event types. // We should choose one term and stick to it. bool isWheelEventType(const AtomString& eventType) const; bool isGestureEventType(const AtomString& eventType) const; bool isTouchRelatedEventType(const AtomString& eventType, EventTarget&) const; bool isTouchScrollBlockingEventType(const AtomString& eventType) const; #if ENABLE(GAMEPAD) bool isGamepadEventType(const AtomString& eventType) const; #endif std::array, 0> touchRelatedEventNames() const; std::array, 0> extendedTouchRelatedEventNames() const; std::array, 0> gestureEventNames() const; private: EventNames(); // Private to prevent accidental call to EventNames() instead of eventNames(). // friend class ThreadGlobalData; // Allow ThreadGlobalData to create the per-thread EventNames object. int dummy; // Needed to make initialization macro work. }; const EventNames& eventNames(); inline bool EventNames::isGestureEventType(const AtomString& eventType) const { return false; // eventType == gesturestartEvent || eventType == gesturechangeEvent || eventType == gestureendEvent; } inline bool EventNames::isTouchScrollBlockingEventType(const AtomString& eventType) const { return false; } inline bool EventNames::isTouchRelatedEventType(const AtomString& eventType, EventTarget& target) const { return false; } inline bool EventNames::isWheelEventType(const AtomString& eventType) const { return false; } inline std::array, 0> EventNames::touchRelatedEventNames() const { return { {} }; } inline std::array, 0> EventNames::extendedTouchRelatedEventNames() const { return { {} }; } inline std::array, 0> EventNames::gestureEventNames() const { return { {} }; } // inline std::array, 13> EventNames::touchRelatedEventNames() const // { // return { { touchstartEvent, touchmoveEvent, touchendEvent, touchcancelEvent, touchforcechangeEvent, pointeroverEvent, pointerenterEvent, pointerdownEvent, pointermoveEvent, pointerupEvent, pointeroutEvent, pointerleaveEvent, pointercancelEvent } }; // } // inline std::array, 16> EventNames::extendedTouchRelatedEventNames() const // { // return { { touchstartEvent, touchmoveEvent, touchendEvent, touchcancelEvent, touchforcechangeEvent, pointeroverEvent, pointerenterEvent, pointerdownEvent, pointermoveEvent, pointerupEvent, pointeroutEvent, pointerleaveEvent, pointercancelEvent, mousedownEvent, mousemoveEvent, mouseupEvent } }; // } // inline std::array, 3> EventNames::gestureEventNames() const // { // return { { gesturestartEvent, gesturechangeEvent, gestureendEvent } }; // } } // namespace WebCore >framework-agnostic-astro-components Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-06-30Ci: improve times, reduce delay (#3780)Gravatar Fred K. Schott 1-14/+10
* improve CI times * improve CI times
2022-06-30await error reporter (#3779)Gravatar Fred K. Schott 2-10/+25
2022-06-30[ci] formatGravatar natemoo-re 14-99/+95
2022-06-30MDX support (#3706)Gravatar Nate Moore 63-57/+1153
* feat: first pass at MDX support * fix: move built-in JSX renderer to come first * chore: remove jsx example * chore: update lockfile * chore: cleanup example * fix: missing deps * refactor: move component render logic to `renderPage` * chore: update HMR script * chore: update MDX example * refactor: prefer unshit * refactor: remove TODO comment * fix: remove duplicate identifier * refactor: cleanup mdx entrypoint * fix: better html handling * fix: add tsconfig to mdx package * chore: update lockfile * fix: do not sort plugins unless mdx is enabled * chore: update compiler * fix(hmr): maybe render head for non-Astro pages * fix: set initial pageExtensions * refactor: cleanup addPageExtension * refactor: remove addPageExtensions from types * refactor: expose HookParameters type * fix: only default to astro for MDX * test: pick up jsx support in test fixtures * refactor: simplify mdx entrypoint * test: add basic MDX tests * test(e2e): add mdx + framework tests * chore: update lockfile * test(e2e): fix preact mdx e2e test * fix(mdx): disable .md support * test(e2e): fix vue-component test missing mdx * test(e2e): fix solid component needing import * fix: allow `client:only="solid"` as an alias to `solid-js` * chore: move to with-mdx example * chore: update MDX readme * chore: update example readme * chore: bump astro version * chore: update lockfile * Update mod.d.ts * feat: support `export const components` in MDX pages * chore: update mdx example * fix: update jsx-runtime with better slot support * refactor: remove object style support * chore: cleanup package exports * chore: add todo comment * refactor: improve isPage function, move to utils * refactor: dry up manual HMR updates * chore: add dev tests for MDX * chore: prefer set to array * chore: add changesets * fix(hmr): flip public/private route Co-authored-by: Nate Moore <nate@astro.build>
2022-06-30Fix integration name (`prefetch` instead of `lit`) (#3778)Gravatar hippotastic 2-1/+6
2022-06-30[ci] update lockfile (#3771)Gravatar Fred K. Bot 1-114/+112
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-06-30Integration Docs Next Steps (#3677)Gravatar Dan Jutan 11-314/+666
* sitemap readme skeleton + first sections * Revert "sitemap readme skeleton + first sections" This reverts commit cc55b312b6dc95522645002806d63f32c33d1956. * sitemap readme skeleton + first sections * remove canonicalURL option from sitemap * add customPages option to readme * sitemap examples * partytown * deno run command * reference deno example * node readme * netlify & vercel readmes * note that telemetry is installed * telemetry is *enabled*, not installed * Update packages/integrations/vercel/README.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Update packages/integrations/vercel/README.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * readme -> README * Update packages/integrations/deno/readme.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Update packages/integrations/deno/readme.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * qualify they * Update packages/integrations/sitemap/README.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Uppercase README names * Update packages/integrations/partytown/README.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * imports -> import typo * update changeset Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2022-06-30[ci] formatGravatar tony-sull 1-2/+2
2022-06-30refactor to provide better cli error handling (#3768)Gravatar Fred K. Schott 2-43/+37
2022-06-30[ci] release (#3772)@astrojs/preact@0.3.1Gravatar Fred K. Bot 12-22/+23
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-30Added Cloudflare adapter to README.md (#3773)Gravatar Isaac McFadyen 1-0/+1
2022-06-30[ci] formatGravatar hippotastic 1-5/+4
2022-06-30Fix "Invalid hook call" warning (#3769)Gravatar hippotastic 2-9/+79
* Fix "Invalid hook call" warning * Fix eslint warnings * Apply code review suggestions
2022-06-29[ci] release (#3759)astro@1.0.0-beta.59@astrojs/telemetry@0.2.2@astrojs/preact@0.3.0Gravatar Fred K. Bot 42-121/+117
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-29[ci] formatGravatar FredKSchott 8-35/+36
2022-06-29manual lockfile update (#3751)Gravatar Fred K. Schott 3-2659/+2871
* lockfile update * update lockfile gen script * Update index.ts
2022-06-29add error event to telemetry (#3750)Gravatar Fred K. Schott 16-85/+270