haikuwebkit/LayoutTests/fast/css-custom-paint/registerPaintBindings.html

231 lines
8.3 KiB
HTML
Raw Permalink Normal View History

Remove experimental: and internal: prefixes from test header commands https://bugs.webkit.org/show_bug.cgi?id=218547 Reviewed by Wenson Hsieh. They are no longer necessary. LayoutTests/imported/w3c: * web-platform-tests/css/css-values/lh-rlh-on-root-001.html: * web-platform-tests/css/css-values/lh-unit-001.html: * web-platform-tests/css/css-values/lh-unit-002.html: * web-platform-tests/css/cssom-view/inheritance.html: * web-platform-tests/css/cssom-view/parsing/scroll-behavior-computed.html: * web-platform-tests/css/cssom-view/parsing/scroll-behavior-valid.html: * web-platform-tests/css/cssom-view/scroll-behavior-default-css.html: * web-platform-tests/css/cssom-view/scroll-behavior-element.html: * web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html: * web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html: * web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html: * web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html: * web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html: * web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html: * web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio.html: * web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/content-aspect-ratio.html: * web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html: * web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html: * web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-001.html: * web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html: * web-platform-tests/media-source/mediasource-changetype-play.html: * web-platform-tests/media-source/mediasource-changetype.html: * web-platform-tests/requestidlecallback/basic.html: * web-platform-tests/requestidlecallback/callback-exception.html: * web-platform-tests/requestidlecallback/callback-idle-periods.html: * web-platform-tests/requestidlecallback/callback-iframe.html: * web-platform-tests/requestidlecallback/callback-invoked.html: * web-platform-tests/requestidlecallback/callback-multiple-calls.html: * web-platform-tests/requestidlecallback/callback-removed-frame.html: * web-platform-tests/requestidlecallback/callback-suspended.html: * web-platform-tests/requestidlecallback/callback-timeout-when-busy.html: * web-platform-tests/requestidlecallback/callback-timeout.html: * web-platform-tests/requestidlecallback/callback-xhr-sync.html: * web-platform-tests/requestidlecallback/cancel-invoked.html: * web-platform-tests/requestidlecallback/idlharness.window.html: * web-platform-tests/resize-observer/eventloop.html: * web-platform-tests/resize-observer/idlharness.window.html: * web-platform-tests/resize-observer/notify.html: * web-platform-tests/resize-observer/observe.html: * web-platform-tests/resize-observer/svg.html: LayoutTests: * accessibility/ios-simulator/scroll-in-overflow-div.html: * compositing/backing/foreground-layer-no-paints-into-ancestor-expected.html: * compositing/backing/foreground-layer-no-paints-into-ancestor.html: * compositing/clipping/border-radius-async-overflow-clipping-layer.html: * compositing/clipping/border-radius-async-overflow-non-stacking.html: * compositing/clipping/border-radius-async-overflow-stacking.html: * compositing/clipping/nested-overflow-with-border-radius-expected.html: * compositing/clipping/nested-overflow-with-border-radius.html: * compositing/geometry/fixed-inside-overflow-scroll.html: * compositing/geometry/rtl-overflow-scroll-expected.html: * compositing/geometry/rtl-overflow-scroll.html: * compositing/ios/overflow-scroll-touch-tiles.html: * compositing/ios/overflow-scroll-update-overlap.html: * compositing/ios/rtl-overflow-scrolling-2.html: * compositing/layer-creation/absolute-in-async-overflow-scroll.html: * compositing/layer-creation/clipping-scope/nested-scroller-overlap.html: * compositing/layer-creation/clipping-scope/overlap-constrained-inside-scroller.html: * compositing/layer-creation/clipping-scope/overlap-constrained-inside-stacking-context-scroller.html: * compositing/layer-creation/clipping-scope/scroller-with-negative-z-children.html: * compositing/layer-creation/clipping-scope/shared-layers-in-scroller.html: * compositing/layer-creation/overlap-in-scroller-expected.html: * compositing/layer-creation/overlap-in-scroller.html: * compositing/overflow/absolute-in-overflow-expected.html: * compositing/overflow/absolute-in-overflow.html: * compositing/overflow/clipping-ancestor-with-accelerated-scrolling-ancestor.html: * compositing/overflow/iframe-inside-overflow-clipping.html: * compositing/overflow/nested-scrolling.html: * compositing/overflow/overflow-auto-with-touch-no-overflow.html: * compositing/overflow/overflow-auto-with-touch-toggle.html: * compositing/overflow/overflow-auto-with-touch.html: * compositing/overflow/overflow-clip-with-accelerated-scrolling-ancestor.html: * compositing/overflow/overflow-hidden-with-touch.html: * compositing/overflow/overflow-overlay-with-touch-no-overflow.html: * compositing/overflow/overflow-overlay-with-touch.html: * compositing/overflow/overflow-scroll-with-touch-no-overflow.html: * compositing/overflow/overflow-visible-with-touch.html: * compositing/overflow/remove-overflow-crash.html: * compositing/overflow/rtl-scrollbar-layer-positioning.html: * compositing/overflow/scrolling-content-clip-to-viewport.html: * compositing/overflow/scrolling-without-painting.html: * compositing/overflow/should-not-override-z-index-for-element-with-non-auto-z-index-and-overflow-scroll-and-touch.html: * compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases.html: * compositing/overflow/subpixel-overflow.html: * compositing/overflow/textarea-scroll-touch.html: * compositing/overflow/updating-scrolling-content.html: * compositing/repaint/compositing-toggle-in-overflow-scroll-repaint.html: * compositing/repaint/scroller-with-foreground-layer-repaints.html: * compositing/rtl/rtl-overflow-scrolling.html: * compositing/rtl/rtl-scrolling-with-transformed-descendants.html: * compositing/scrolling/async-overflow-scrolling/become-non-scrollable-with-child-expected.html: * compositing/scrolling/async-overflow-scrolling/become-non-scrollable-with-child.html: * compositing/scrolling/async-overflow-scrolling/become-non-scrollable.html: * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll.html: * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested.html: * compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow.html: * compositing/scrolling/async-overflow-scrolling/foreground-layer-paint-phase-expected.html: * compositing/scrolling/async-overflow-scrolling/foreground-layer-paint-phase.html: * compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller.html: * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden.html: * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible.html: * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer.html: * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped.html: * compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer.html: * compositing/scrolling/async-overflow-scrolling/layer-in-overflow.html: * compositing/scrolling/async-overflow-scrolling/mac/overflow-in-flex-empty-tiles-expected.html: * compositing/scrolling/async-overflow-scrolling/mac/overflow-in-flex-empty-tiles.html: * compositing/scrolling/async-overflow-scrolling/negative-z-in-scroller-expected.html: * compositing/scrolling/async-overflow-scrolling/negative-z-in-scroller.html: * compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment.html: * compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling-expected.html: * compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling.html: * compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-dynamic.html: * compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-inside-hidden.html: * compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar-nested.html: * compositing/scrolling/async-overflow-scrolling/overlapped-overlay-scrollbar.html: * compositing/scrolling/async-overflow-scrolling/position-inside-rtl-overflow.html: * compositing/scrolling/async-overflow-scrolling/toggle-visibility-on-scroller.html: * compositing/scrolling/async-overflow-scrolling/transform-change-scrollbar-position.html: * compositing/scrolling/async-overflow-scrolling/visibility-hidden-scrollers.html: * compositing/scrolling/fixed-inside-scroll-expected.html: * compositing/scrolling/fixed-inside-scroll.html: * compositing/scrolling/overflow-scrolling-layers-are-self-painting.html: * compositing/scrolling/touch-scroll-to-clip.html: * compositing/scrolling/touch-scrolling-repaint-expected.html: * compositing/scrolling/touch-scrolling-repaint-spans-expected.html: * compositing/scrolling/touch-scrolling-repaint-spans.html: * compositing/scrolling/touch-scrolling-repaint.html: * compositing/shared-backing/clipping-and-shared-backing-expected.html: * compositing/shared-backing/clipping-and-shared-backing.html: * compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html: * compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html: * compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html: * compositing/shared-backing/overflow-scroll/non-self-painting-layer-should-not-share.html: * compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html: * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html: * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html: * compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html: * compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll-expected.html: * compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll.html: * compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content.html: * compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip-expected.html: * compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html: * compositing/shared-backing/overflow-scroll/shared-layer-clipping-expected.html: * compositing/shared-backing/overflow-scroll/shared-layer-clipping.html: * compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html: * compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html: * compositing/shared-backing/overflow-scroll/shared-layer-repaint.html: * compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable-expected.html: * compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable.html: * compositing/shared-backing/repaint-into-shared-backing-expected.html: * compositing/shared-backing/repaint-into-shared-backing.html: * compositing/shared-backing/sharing-cached-clip-rects.html: * compositing/tiling/perspective-on-scroller-tile-coverage.html: * compositing/transforms/perspective-with-scrolling-expected.html: * compositing/transforms/perspective-with-scrolling.html: * contact-picker/contacts-interfaces.html: * contact-picker/contacts-manager-get-properties.html: * contact-picker/contacts-select-invalid-properties-and-options.html: * contact-picker/contacts-select-requires-user-gesture.html: * contact-picker/contacts-select-subframe.html: * css-custom-properties-api/crash.html: * css-custom-properties-api/cycles.html: * css-custom-properties-api/inherits.html: * css-custom-properties-api/initialValueJS.html: * css-custom-properties-api/inline.html: * css-custom-properties-api/length.html: * css-custom-properties-api/length2.html: * css-custom-properties-api/registerProperty.html: * css-typedom/attributeStyleMap.html: * css-typedom/sameobject.html: * css3/scroll-snap/nested-elements.html: * css3/scroll-snap/scroll-snap-children-with-overflow.html: * css3/scroll-snap/scroll-snap-offsets-mixed-rtl.html: * css3/scroll-snap/scroll-snap-offsets-rtl.html: * css3/scroll-snap/scroll-snap-offsets.html: * css3/scroll-snap/scroll-snap-positions.html: * css3/scroll-snap/scroll-snap-programmatic-overflow-scroll.html: * css3/scroll-snap/scroll-snap-style-changed-align.html: * editing/async-clipboard/clipboard-change-data-while-getting-type.html: * editing/async-clipboard/clipboard-change-data-while-reading.html: * editing/async-clipboard/clipboard-change-data-while-writing.html: * editing/async-clipboard/clipboard-do-not-read-text-from-platform-if-text-changes.html: * editing/async-clipboard/clipboard-get-type-with-old-items.html: * editing/async-clipboard/clipboard-interfaces.html: * editing/async-clipboard/clipboard-item-basic.html: * editing/async-clipboard/clipboard-item-get-type-basic.html: * editing/async-clipboard/clipboard-read-basic.html: * editing/async-clipboard/clipboard-read-text-from-platform.html: * editing/async-clipboard/clipboard-read-text-same-origin.html: * editing/async-clipboard/clipboard-read-text.html: * editing/async-clipboard/clipboard-read-while-pasting.html: * editing/async-clipboard/clipboard-read-write-images.html: * editing/async-clipboard/clipboard-wrapper-stays-alive.html: * editing/async-clipboard/clipboard-write-basic.html: * editing/async-clipboard/clipboard-write-in-copy-event-handler-in-subframe.html: * editing/async-clipboard/clipboard-write-in-copy-event-handler.html: * editing/async-clipboard/clipboard-write-items-twice.html: * editing/async-clipboard/clipboard-write-text-requires-user-gesture.html: * editing/async-clipboard/clipboard-write-text.html: * editing/async-clipboard/sanitize-when-reading-markup.html: * editing/async-clipboard/sanitize-when-writing-image.html: * editing/selection/expando.html: * editing/selection/ios/update-selection-after-iframe-scroll.html: * editing/selection/ios/update-selection-after-overflow-scroll.html: * editing/selection/overflow-scroll-while-selecting-text.html: * editing/undo-manager/undo-manager-add-item-exceptions.html: * editing/undo-manager/undo-manager-add-item.html: * editing/undo-manager/undo-manager-delete-stale-undo-items.html: * editing/undo-manager/undo-manager-interfaces.html: * editing/undo-manager/undo-manager-item-labels.html: * editing/undo-manager/undo-manager-keeps-wrapper-alive.html: * editing/undo-manager/undo-manager-undo-redo-after-garbage-collection.html: * fast/canvas/webgl/hide-some-renderer-info.html: * fast/css-custom-paint/animate-repaint.html: * fast/css-custom-paint/animate.html: * fast/css-custom-paint/arguments.html: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/constructor.html: * fast/css-custom-paint/delay-repaint.html: * fast/css-custom-paint/delay.html: * fast/css-custom-paint/image.html: * fast/css-custom-paint/leaks.html: * fast/css-custom-paint/multiple-worklets-isolation.html: * fast/css-custom-paint/multiple-worklets.html: * fast/css-custom-paint/properties-expected.html: * fast/css-custom-paint/properties.html: * fast/css-custom-paint/registerPaintBindings-expected.html: * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/leaks-frame.html: * fast/css-custom-paint/simple-hidpi.html: * fast/css-custom-paint/worklet-expected.html: * fast/css-custom-paint/worklet.html: * fast/events/drag-smooth-scroll-element.html: * fast/events/ios/ipad/fast-click-always-mobile-content-mode.html: * fast/events/ios/ipad/fast-click-not-always.html: * fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-overflow.html: * fast/events/ios/touch-events-during-scroll-deceleration-in-overflow.html: * fast/events/scroll-subframe-in-rendering-update.html: * fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-block.html: * fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-document.html: * fast/events/touch/ios/drag-block-without-overflow-scroll.html: * fast/events/touch/ios/mouse-events-dispatch-with-touch.html: * fast/events/touch/ios/prevent-default-on-touch-start-with-slow-event-listener.html: * fast/events/touch/ios/resources/finish-test-after-scrolling-with-touch-event-handlers.html: * fast/events/touch/ios/scroll-on-touch-start-with-slow-event-listener.html: * fast/events/touch/ios/touch-event-stall-after-navigating-with-pending-asynchronous-touch-start.html: * fast/layers/overflow-scroll-self-painting-expected.html: * fast/layers/overflow-scroll-self-painting.html: * fast/layoutformattingcontext/absolute-positioned-box-with-inline-sibling-expected.html: * fast/layoutformattingcontext/absolute-positioned-box-with-inline-sibling.html: * fast/layoutformattingcontext/absolute-positioned-simple-table-expected.html: * fast/layoutformattingcontext/absolute-positioned-simple-table.html: * fast/layoutformattingcontext/absolute-positioned-simple-table2-expected.html: * fast/layoutformattingcontext/absolute-positioned-simple-table2.html: * fast/layoutformattingcontext/absolute-positioned-simple-table3-expected.html: * fast/layoutformattingcontext/absolute-positioned-simple-table3.html: * fast/layoutformattingcontext/anonymous-inline-container-simple-expected.html: * fast/layoutformattingcontext/anonymous-inline-container-simple.html: * fast/layoutformattingcontext/block-only/abs-pos-with-border-padding-and-float-child-expected.html: * fast/layoutformattingcontext/block-only/abs-pos-with-border-padding-and-float-child.html: * fast/layoutformattingcontext/block-only/absolute-auto-with-sibling-margin-bottom.html: * fast/layoutformattingcontext/block-only/absolute-height-stretch.html: * fast/layoutformattingcontext/block-only/absolute-left-auto.html: * fast/layoutformattingcontext/block-only/absolute-left-right-top-bottom-auto.html: * fast/layoutformattingcontext/block-only/absolute-nested.html: * fast/layoutformattingcontext/block-only/absolute-nested2.html: * fast/layoutformattingcontext/block-only/absolute-position-left-right-margin.html: * fast/layoutformattingcontext/block-only/absolute-position-min-max-height.html: * fast/layoutformattingcontext/block-only/absolute-position-min-max-width.html: * fast/layoutformattingcontext/block-only/absolute-position-when-containing-block-is-not-in-the-formatting-context.html: * fast/layoutformattingcontext/block-only/absolute-position-when-containing-block-is-not-in-the-formatting-context2.html: * fast/layoutformattingcontext/block-only/absolute-position-with-margin-auto-simple-expected.html: * fast/layoutformattingcontext/block-only/absolute-position-with-margin-auto-simple.html: * fast/layoutformattingcontext/block-only/absolute-position-with-margin-auto-simple2-expected.html: * fast/layoutformattingcontext/block-only/absolute-position-with-margin-auto-simple2.html: * fast/layoutformattingcontext/block-only/absolute-positioned-min-max-percentage-with-parent-padding-expected.html: * fast/layoutformattingcontext/block-only/absolute-positioned-min-max-percentage-with-parent-padding.html: * fast/layoutformattingcontext/block-only/absolute-simple.html: * fast/layoutformattingcontext/block-only/absolute-width-shrink-to-fit.html: * fast/layoutformattingcontext/block-only/absolute-width-stretch.html: * fast/layoutformattingcontext/block-only/absolute-with-static-block-position-nested.html: * fast/layoutformattingcontext/block-only/almost-intruding-left-float-simple.html: * fast/layoutformattingcontext/block-only/block-replaced-with-vertical-margins-expected.html: * fast/layoutformattingcontext/block-only/block-replaced-with-vertical-margins.html: * fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top-expected.html: * fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top.html: * fast/layoutformattingcontext/block-only/body-height-with-auto-html-height-quirk.html: * fast/layoutformattingcontext/block-only/body-height-with-auto-html-height-quirk2.html: * fast/layoutformattingcontext/block-only/body-height-with-non-auto-html-height-quirk.html: * fast/layoutformattingcontext/block-only/body-height-with-non-auto-html-height-quirk2.html: * fast/layoutformattingcontext/block-only/border-simple.html: * fast/layoutformattingcontext/block-only/box-sizing-inflow-out-of-flow-simple.html: * fast/layoutformattingcontext/block-only/collapsed-margin-with-min-height.html: * fast/layoutformattingcontext/block-only/collapsed-through-siblings.html: * fast/layoutformattingcontext/block-only/collapsed-through-with-parent.html: * fast/layoutformattingcontext/block-only/fixed-nested.html: * fast/layoutformattingcontext/block-only/float-and-siblings-with-margins.html: * fast/layoutformattingcontext/block-only/float-avoider-multiple-roots.html: * fast/layoutformattingcontext/block-only/float-avoider-simple-left.html: * fast/layoutformattingcontext/block-only/float-avoider-simple-right.html: * fast/layoutformattingcontext/block-only/float-avoider-with-margins.html: * fast/layoutformattingcontext/block-only/float-clear-with-auto-width-expected.html: * fast/layoutformattingcontext/block-only/float-clear-with-auto-width.html: * fast/layoutformattingcontext/block-only/float-left-when-container-has-padding-margin.html: * fast/layoutformattingcontext/block-only/float-min-max-height.html: * fast/layoutformattingcontext/block-only/float-min-max-width.html: * fast/layoutformattingcontext/block-only/floating-and-next-previous-inflow-with-margin-with-no-border.html: * fast/layoutformattingcontext/block-only/floating-and-next-previous-inflow-with-margin.html: * fast/layoutformattingcontext/block-only/floating-box-clear-both-simple.html: * fast/layoutformattingcontext/block-only/floating-box-clear-right-simple.html: * fast/layoutformattingcontext/block-only/floating-box-left-and-right-multiple-with-top-offset.html: * fast/layoutformattingcontext/block-only/floating-box-left-and-right-multiple.html: * fast/layoutformattingcontext/block-only/floating-box-right-simple.html: * fast/layoutformattingcontext/block-only/floating-box-with-clear-siblings.html: * fast/layoutformattingcontext/block-only/floating-box-with-clear-simple.html: * fast/layoutformattingcontext/block-only/floating-box-with-new-formatting-context.html: * fast/layoutformattingcontext/block-only/floating-box-with-relative-positioned-sibling.html: * fast/layoutformattingcontext/block-only/floating-left-and-right-with-clearance.html: * fast/layoutformattingcontext/block-only/floating-left-right-simple.html: * fast/layoutformattingcontext/block-only/floating-left-right-with-all-margins.html: * fast/layoutformattingcontext/block-only/floating-lefts-and-rights-simple.html: * fast/layoutformattingcontext/block-only/floating-multiple-lefts-in-body.html: * fast/layoutformattingcontext/block-only/floating-multiple-lefts-multiple-lines.html: * fast/layoutformattingcontext/block-only/floating-multiple-lefts.html: * fast/layoutformattingcontext/block-only/floating-with-new-block-formatting-context.html: * fast/layoutformattingcontext/block-only/floats-and-block-formatting-roots-expected.html: * fast/layoutformattingcontext/block-only/floats-and-block-formatting-roots.html: * fast/layoutformattingcontext/block-only/inflow-min-max-height.html: * fast/layoutformattingcontext/block-only/inflow-min-max-width.html: * fast/layoutformattingcontext/block-only/margin-collapse-bottom-bottom.html: * fast/layoutformattingcontext/block-only/margin-collapse-bottom-nested.html: * fast/layoutformattingcontext/block-only/margin-collapse-first-last-are-floating.html: * fast/layoutformattingcontext/block-only/margin-collapse-simple.html: * fast/layoutformattingcontext/block-only/margin-collapse-top-nested.html: * fast/layoutformattingcontext/block-only/margin-collapse-when-child-has-padding-border.html: * fast/layoutformattingcontext/block-only/margin-collapse-with-block-formatting-context.html: * fast/layoutformattingcontext/block-only/margin-collapse-with-block-formatting-context2.html: * fast/layoutformattingcontext/block-only/margin-collapse-with-clearance.html: * fast/layoutformattingcontext/block-only/margin-left-right-sizing-out-of-flow.html: * fast/layoutformattingcontext/block-only/margin-left-right-sizing.html: * fast/layoutformattingcontext/block-only/margin-propagation-simple-content-height.html: * fast/layoutformattingcontext/block-only/margin-sibling-collapse-propagated.html: * fast/layoutformattingcontext/block-only/margin-simple.html: * fast/layoutformattingcontext/block-only/min-max-and-preferred-width-simple-expected.html: * fast/layoutformattingcontext/block-only/min-max-and-preferred-width-simple.html: * fast/layoutformattingcontext/block-only/min-max-height-percentage.html: * fast/layoutformattingcontext/block-only/negative-margin-simple.html: * fast/layoutformattingcontext/block-only/non-auto-top-bottom-height-with-auto-margins.html: * fast/layoutformattingcontext/block-only/non-auto-top-bottom-height-with-margins.html: * fast/layoutformattingcontext/block-only/non-auto-top-bottom-left-right-widht-height-out-of-flow.html: * fast/layoutformattingcontext/block-only/out-of-flow-is-never-float-box-expected.html: * fast/layoutformattingcontext/block-only/out-of-flow-is-never-float-box.html: * fast/layoutformattingcontext/block-only/out-of-flow-with-containing-block-border-padding.html: * fast/layoutformattingcontext/block-only/padding-nested.html: * fast/layoutformattingcontext/block-only/padding-simple.html: * fast/layoutformattingcontext/block-only/relative-auto-with-parent-offset.html: * fast/layoutformattingcontext/block-only/relative-auto.html: * fast/layoutformattingcontext/block-only/relative-bottom.html: * fast/layoutformattingcontext/block-only/relative-position-when-containing-block-is-not-in-the-formatting-context.html: * fast/layoutformattingcontext/block-only/relative-right.html: * fast/layoutformattingcontext/block-only/relative-siblings.html: * fast/layoutformattingcontext/block-only/relative-simple.html: * fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple-expected.html: * fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple.html: * fast/layoutformattingcontext/block-only/replaced-intrinsic-width-simple-expected.html: * fast/layoutformattingcontext/block-only/replaced-intrinsic-width-simple.html: * fast/layoutformattingcontext/br-and-wbr-simple-expected.html: * fast/layoutformattingcontext/br-and-wbr-simple.html: * fast/layoutformattingcontext/br-in-inline-content-simple-expected.html: * fast/layoutformattingcontext/br-in-inline-content-simple.html: * fast/layoutformattingcontext/center-alignment-with-block-content-simple-expected.html: * fast/layoutformattingcontext/center-alignment-with-block-content-simple.html: * fast/layoutformattingcontext/empty-block-level-box-with-clearance-expected.html: * fast/layoutformattingcontext/empty-block-level-box-with-clearance.html: * fast/layoutformattingcontext/empty-table-box-expected.html: * fast/layoutformattingcontext/empty-table-box.html: * fast/layoutformattingcontext/empty-table-with-specified-height-quirk-simple-expected.html: * fast/layoutformattingcontext/empty-table-with-specified-height-quirk-simple.html: * fast/layoutformattingcontext/empty-table-with-specified-height-standards-simple-expected.html: * fast/layoutformattingcontext/empty-table-with-specified-height-standards-simple.html: * fast/layoutformattingcontext/fit-content-width-simple-expected.html: * fast/layoutformattingcontext/fit-content-width-simple.html: * fast/layoutformattingcontext/flex-box-simple.html: * fast/layoutformattingcontext/float-and-br-inline-content-only-expected.html: * fast/layoutformattingcontext/float-and-br-inline-content-only.html: * fast/layoutformattingcontext/float-avoider-available-horizontal-space-expected.html: * fast/layoutformattingcontext/float-avoider-available-horizontal-space.html: * fast/layoutformattingcontext/float-avoider-available-horizontal-space2-expected.html: * fast/layoutformattingcontext/float-avoider-available-horizontal-space2.html: * fast/layoutformattingcontext/float-avoider-available-horizontal-space3-expected.html: * fast/layoutformattingcontext/float-avoider-available-horizontal-space3.html: * fast/layoutformattingcontext/float-avoider-with-inline-content-expected.html: * fast/layoutformattingcontext/float-avoider-with-inline-content.html: * fast/layoutformattingcontext/float-avoiding-br-last-line-expected.html: * fast/layoutformattingcontext/float-avoiding-br-last-line.html: * fast/layoutformattingcontext/float-avoiding-br-simple-expected.html: * fast/layoutformattingcontext/float-avoiding-br-simple.html: * fast/layoutformattingcontext/float-in-inline-context-simple-expected.html: * fast/layoutformattingcontext/float-in-inline-context-simple.html: * fast/layoutformattingcontext/float-inside-table-cell-simple-expected.html: * fast/layoutformattingcontext/float-inside-table-cell-simple.html: * fast/layoutformattingcontext/float-with-clear-simple-expected.html: * fast/layoutformattingcontext/float-with-clear-simple.html: * fast/layoutformattingcontext/floats-shrinking-line-simple-expected.html: * fast/layoutformattingcontext/floats-shrinking-line-simple.html: * fast/layoutformattingcontext/flow-integration-basic-paint.html: * fast/layoutformattingcontext/flow-integration-basic.html: * fast/layoutformattingcontext/height-percentage-quirk-to-icb-expected.html: * fast/layoutformattingcontext/height-percentage-quirk-to-icb.html: * fast/layoutformattingcontext/height-precentage-with-anonymous-wrapper-expected.html: * fast/layoutformattingcontext/height-precentage-with-anonymous-wrapper.html: * fast/layoutformattingcontext/horizontal-sizing-with-trailing-letter-spacing-expected.html: * fast/layoutformattingcontext/horizontal-sizing-with-trailing-letter-spacing.html: * fast/layoutformattingcontext/html-is-absolute-positioned-expected.html: * fast/layoutformattingcontext/html-is-absolute-positioned.html: * fast/layoutformattingcontext/inlin-box-content-fits-but-the-box-does-not-expected.html: * fast/layoutformattingcontext/inlin-box-content-fits-but-the-box-does-not.html: * fast/layoutformattingcontext/inline-box-overlaps-multiple-lines-expected.html: * fast/layoutformattingcontext/inline-box-overlaps-multiple-lines.html: * fast/layoutformattingcontext/inline-float-simple-expected.html: * fast/layoutformattingcontext/inline-float-simple.html: * fast/layoutformattingcontext/inline-max-width-height-simple-expected.html: * fast/layoutformattingcontext/inline-max-width-height-simple.html: * fast/layoutformattingcontext/inline-text-outside-of-inline-container-simple-expected.html: * fast/layoutformattingcontext/inline-text-outside-of-inline-container-simple.html: * fast/layoutformattingcontext/intrusive-floats-takes-entire-horizontal-space-expected.html: * fast/layoutformattingcontext/intrusive-floats-takes-entire-horizontal-space.html: * fast/layoutformattingcontext/line-heigt-when-text-is-inside-inline-container-expected.html: * fast/layoutformattingcontext/line-heigt-when-text-is-inside-inline-container.html: * fast/layoutformattingcontext/min-max-content-width-simple-expected.html: * fast/layoutformattingcontext/min-max-content-width-simple.html: * fast/layoutformattingcontext/min-max-content-width-simple2-expected.html: * fast/layoutformattingcontext/min-max-content-width-simple2.html: * fast/layoutformattingcontext/min-max-content-width-with-floats-simple-expected.html: * fast/layoutformattingcontext/min-max-content-width-with-floats-simple.html: * fast/layoutformattingcontext/min-max-content-width-with-nested-floats-simple-expected.html: * fast/layoutformattingcontext/min-max-content-width-with-nested-floats-simple.html: * fast/layoutformattingcontext/out-of-flow-html-and-body-stretches-to-viewport.html: * fast/layoutformattingcontext/out-of-flow-positioned-line-breaks.html: * fast/layoutformattingcontext/out-of-flow-with-non-fixed-height-simple-expected.html: * fast/layoutformattingcontext/out-of-flow-with-non-fixed-height-simple.html: * fast/layoutformattingcontext/quirk-margin-not-collapse-when-floating-expected.html: * fast/layoutformattingcontext/quirk-margin-not-collapse-when-floating.html: * fast/layoutformattingcontext/replaced-and-trailing-trimmable-content-expected.html: * fast/layoutformattingcontext/replaced-and-trailing-trimmable-content.html: * fast/layoutformattingcontext/replaced-box-with-margin-on-baseline-expected.html: * fast/layoutformattingcontext/replaced-box-with-margin-on-baseline.html: * fast/layoutformattingcontext/run-expansion-extends-line-content-width-expected.html: * fast/layoutformattingcontext/run-expansion-extends-line-content-width.html: * fast/layoutformattingcontext/simple-absolute-positioned-inline-element-expected.html: * fast/layoutformattingcontext/simple-absolute-positioned-inline-element.html: * fast/layoutformattingcontext/simple-absolute-positioned-replaced-inline-element-with-percentage-height-expected.html: * fast/layoutformattingcontext/simple-absolute-positioned-replaced-inline-element-with-percentage-height.html: * fast/layoutformattingcontext/simple-inline-block-expected.html: * fast/layoutformattingcontext/simple-inline-block.html: * fast/layoutformattingcontext/simple-table-with-empty-td.html: * fast/layoutformattingcontext/subframe-with-display-none-html-expected.html: * fast/layoutformattingcontext/subframe-with-display-none-html.html: * fast/layoutformattingcontext/table-basic-row-baseline-align.html: * fast/layoutformattingcontext/table-basic-row-baseline-with-nested-table.html: * fast/layoutformattingcontext/table-basic-row-vertical-align-baseline.html: * fast/layoutformattingcontext/table-cell-baseline-offset-simple-expected.html: * fast/layoutformattingcontext/table-cell-baseline-offset-simple.html: * fast/layoutformattingcontext/table-cell-baseline-offset-simple2-expected.html: * fast/layoutformattingcontext/table-cell-baseline-offset-simple2.html: * fast/layoutformattingcontext/table-cell-height-middle-align-simple-expected.html: * fast/layoutformattingcontext/table-cell-height-middle-align-simple.html: * fast/layoutformattingcontext/table-cell-vertical-alignment-simple-expected.html: * fast/layoutformattingcontext/table-cell-vertical-alignment-simple.html: * fast/layoutformattingcontext/table-colspan-simple-expected.html: * fast/layoutformattingcontext/table-colspan-simple.html: * fast/layoutformattingcontext/table-fixed-row-height-simple-expected.html: * fast/layoutformattingcontext/table-fixed-row-height-simple.html: * fast/layoutformattingcontext/table-fixed-width-colspans.html: * fast/layoutformattingcontext/table-fixed-width-with-max-distribution.html: * fast/layoutformattingcontext/table-flex-width-border-collapse.html: * fast/layoutformattingcontext/table-flex-width-colspans.html: * fast/layoutformattingcontext/table-min-max-flex-distribution-simple-expected.html: * fast/layoutformattingcontext/table-min-max-flex-distribution-simple.html: * fast/layoutformattingcontext/table-min-max-width-empty-content-simple-expected.html: * fast/layoutformattingcontext/table-min-max-width-empty-content-simple.html: * fast/layoutformattingcontext/table-min-max-width-simple-expected.html: * fast/layoutformattingcontext/table-min-max-width-simple.html: * fast/layoutformattingcontext/table-missing-cells-simple-expected.html: * fast/layoutformattingcontext/table-missing-cells-simple.html: * fast/layoutformattingcontext/table-quirk-vertical-margin-simple-expected.html: * fast/layoutformattingcontext/table-quirk-vertical-margin-simple.html: * fast/layoutformattingcontext/table-simple-border-collapse-expected.html: * fast/layoutformattingcontext/table-simple-border-collapse-with-padding-expected.html: * fast/layoutformattingcontext/table-simple-border-collapse-with-padding.html: * fast/layoutformattingcontext/table-simple-border-collapse.html: * fast/layoutformattingcontext/table-simple-border-collapse2-expected.html: * fast/layoutformattingcontext/table-simple-border-collapse2.html: * fast/layoutformattingcontext/table-simple-border-collapse3-expected.html: * fast/layoutformattingcontext/table-simple-border-collapse3.html: * fast/layoutformattingcontext/table-simple-collapsed-row-border-expected.html: * fast/layoutformattingcontext/table-simple-collapsed-row-border.html: * fast/layoutformattingcontext/table-simple-collapsed-row-border2-expected.html: * fast/layoutformattingcontext/table-simple-collapsed-row-border2.html: * fast/layoutformattingcontext/table-simple-collapsed-tbody-border-expected.html: * fast/layoutformattingcontext/table-simple-collapsed-tbody-border.html: * fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content-expected.html: * fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content.html: * fast/layoutformattingcontext/table-simple-multiple-sections-expected.html: * fast/layoutformattingcontext/table-simple-multiple-sections-with-border-spacing-and-collapse-expected.html: * fast/layoutformattingcontext/table-simple-multiple-sections-with-border-spacing-and-collapse.html: * fast/layoutformattingcontext/table-simple-multiple-sections.html: * fast/layoutformattingcontext/table-simple-row-border-expected.html: * fast/layoutformattingcontext/table-simple-row-border.html: * fast/layoutformattingcontext/table-simple-rowspan-with-spacing-expected.html: * fast/layoutformattingcontext/table-simple-rowspan-with-spacing.html: * fast/layoutformattingcontext/table-simple-tall-cell-content-with-fixed-height-expected.html: * fast/layoutformattingcontext/table-simple-tall-cell-content-with-fixed-height.html: * fast/layoutformattingcontext/table-simple-thead-border-ignore-expected.html: * fast/layoutformattingcontext/table-simple-thead-border-ignore.html: * fast/layoutformattingcontext/table-simple-with-border.html: * fast/layoutformattingcontext/table-simple-with-fixed-widht-and-inline-content.html: * fast/layoutformattingcontext/table-simple-with-padding.html: * fast/layoutformattingcontext/table-with-column-spanner-first-row.html: * fast/layoutformattingcontext/table-with-margin-content-simple-expected.html: * fast/layoutformattingcontext/table-with-margin-content-simple.html: * fast/layoutformattingcontext/table-with-margin-simple-expected.html: * fast/layoutformattingcontext/table-with-margin-simple.html: * fast/layoutformattingcontext/table-with-padding-and-border-simple-expected.html: * fast/layoutformattingcontext/table-with-padding-and-border-simple.html: * fast/layoutformattingcontext/vertical-align-bottom-nested-expected.html: * fast/layoutformattingcontext/vertical-align-bottom-nested.html: * fast/layoutformattingcontext/vertical-align-middle-nested-expected.html: * fast/layoutformattingcontext/vertical-align-middle-nested.html: * fast/layoutformattingcontext/vertical-align-middle-simple-expected.html: * fast/layoutformattingcontext/vertical-align-middle-simple.html: * fast/layoutformattingcontext/vertical-align-top-nested-expected.html: * fast/layoutformattingcontext/vertical-align-top-nested.html: * fast/layoutformattingcontext/wbr-simple-expected.html: * fast/layoutformattingcontext/wbr-simple.html: * fast/scrolling/ios/adjust-scroll-snap-during-gesture.html: * fast/scrolling/ios/body-overflow-hidden-expected.html: * fast/scrolling/ios/body-overflow-hidden-frame-expected.html: * fast/scrolling/ios/body-overflow-hidden-frame.html: * fast/scrolling/ios/body-overflow-hidden-height-100-percent-keyboard.html: * fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-1.html: * fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-2.html: * fast/scrolling/ios/body-overflow-hidden-keyboard-expected.html: * fast/scrolling/ios/body-overflow-hidden-keyboard.html: * fast/scrolling/ios/body-overflow-hidden.html: * fast/scrolling/ios/border-radius-event-region.html: * fast/scrolling/ios/change-scrollability-on-content-resize-nested.html: * fast/scrolling/ios/change-scrollability-on-content-resize.html: * fast/scrolling/ios/click-events-after-long-press-during-momentum-scroll-in-overflow.html: * fast/scrolling/ios/click-events-during-momentum-scroll-in-main-frame.html: * fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html: * fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow.html: * fast/scrolling/ios/clip-path-hit-test.html: * fast/scrolling/ios/clipping-ancestor-with-accelerated-scrolling-ancestor.html: * fast/scrolling/ios/event-region-float.html: * fast/scrolling/ios/event-region-pointer-events.html: * fast/scrolling/ios/event-region-scale-transform-shared.html: * fast/scrolling/ios/event-region-scrolled-contents-layer.html: * fast/scrolling/ios/event-region-translate-transform-shared.html: * fast/scrolling/ios/event-region-visibility-hidden.html: * fast/scrolling/ios/fixed-inside-overflow-inside-iframe-expected.html: * fast/scrolling/ios/fixed-inside-overflow-inside-iframe.html: * fast/scrolling/ios/frame-scrolling-no-expected.html: * fast/scrolling/ios/frame-scrolling-no.html: * fast/scrolling/ios/iframe-inside-overflow-clipping.html: * fast/scrolling/ios/non-invertible-transformed-over-scroller.html: * fast/scrolling/ios/non-invertible-transformed-scroller-ancestor.html: * fast/scrolling/ios/overflow-clip-with-accelerated-scrolling-ancestor.html: * fast/scrolling/ios/overflow-scroll-inherited.html: * fast/scrolling/ios/overflow-scroll-overlap-2.html: * fast/scrolling/ios/overflow-scroll-overlap-3.html: * fast/scrolling/ios/overflow-scroll-overlap-4.html: * fast/scrolling/ios/overflow-scroll-overlap-5.html: * fast/scrolling/ios/overflow-scroll-overlap-6.html: * fast/scrolling/ios/overflow-scroll-overlap.html: * fast/scrolling/ios/overflow-scroll-touch.html: * fast/scrolling/ios/overflow-scroll-user-interaction-disabled.html: * fast/scrolling/ios/overflow-scrolling-ancestor-clip-size.html: * fast/scrolling/ios/overflow-scrolling-ancestor-clip.html: * fast/scrolling/ios/overflow-scrolling-touch-disabled-stacking-expected.html: * fast/scrolling/ios/overflow-scrolling-touch-disabled-stacking.html: * fast/scrolling/ios/overflow-scrolling-touch-enabled-stacking-expected.html: * fast/scrolling/ios/overflow-scrolling-touch-enabled-stacking.html: * fast/scrolling/ios/programmatic-scroll-element-crash.html: * fast/scrolling/ios/programmatic-scroll-via-scrollIntoView-inside-iframe-should-clamp-top.html: * fast/scrolling/ios/reconcile-layer-position-recursive.html: * fast/scrolling/ios/remove-overflow-crash.html: * fast/scrolling/ios/reveal-focused-element-right-above-keyboard-on-ipad.html: * fast/scrolling/ios/scroll-into-view-with-top-content-inset.html: * fast/scrolling/ios/scrollbar-hiding-iframes.html: * fast/scrolling/ios/scrollbar-hiding.html: * fast/scrolling/ios/scrolling-content-clip-to-viewport.html: * fast/scrolling/ios/scrollview-adjusts-to-keyboard-insets.html: * fast/scrolling/ios/subpixel-overflow-scrolling-with-ancestor.html: * fast/scrolling/ios/table-cell-touch-scrolling.html: * fast/scrolling/ios/textarea-scroll-touch.html: * fast/scrolling/ios/touch-scroll-back-forward.html: * fast/scrolling/ios/touch-scroll-pointer-events-none.html: * fast/scrolling/ios/touch-stacking.html: * fast/scrolling/ios/user-then-programmatic-scroll-expected.html: * fast/scrolling/ios/user-then-programmatic-scroll.html: * fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode-expected.html: * fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html: * fast/scrolling/latching/iframe-latch-small-deltas.html: * fast/scrolling/latching/latched-scroll-into-nonfast-region.html: * fast/scrolling/latching/latching-stuck-to-main-page.html: * fast/scrolling/mac/absolute-in-overflow-scroll-dynamic-expected.html: * fast/scrolling/mac/absolute-in-overflow-scroll-dynamic.html: * fast/scrolling/mac/absolute-in-overflow-scroll.html: * fast/scrolling/mac/adjust-scroll-snap-after-gesture.html: * fast/scrolling/mac/adjust-scroll-snap-during-gesture.html: * fast/scrolling/mac/async-scroll-overflow-hidden-on-one-axis.html: * fast/scrolling/mac/async-scroll-overflow-rtl-zoomed.html: * fast/scrolling/mac/async-scroll-overflow-rtl.html: * fast/scrolling/mac/async-scroll-overflow-top-inset.html: * fast/scrolling/mac/async-scroll-overflow.html: * fast/scrolling/mac/border-radius-event-region.html: * fast/scrolling/mac/clip-path-hit-test.html: * fast/scrolling/mac/event-region-scrolled-contents-layer.html: * fast/scrolling/mac/event-region-subframe.html: * fast/scrolling/mac/event-region-subscroller-frame.html: * fast/scrolling/mac/event-region-subscroller-overflow.html: * fast/scrolling/mac/event-region-visibility-hidden.html: * fast/scrolling/mac/hit-test-overflow-tiled-layer.html: * fast/scrolling/mac/horizontal-overflow-trapping-small-deltas.html: * fast/scrolling/mac/mousewheel-over-scrollbar.html: * fast/scrolling/mac/move-node-in-overflow-scroll.html: * fast/scrolling/mac/negative-z-index-overflow-scroll.html: * fast/scrolling/mac/nested-overflow-proxy-node.html: * fast/scrolling/mac/non-invertible-transform-hit-testing.html: * fast/scrolling/mac/overflow-scrollbars-should-be-visible-expected-mismatch.html: * fast/scrolling/mac/overflow-scrollbars-should-be-visible.html: * fast/scrolling/mac/overflow-scrolled-document.html: * fast/scrolling/mac/overflow-zoomed-document.html: * fast/scrolling/mac/overlapped-overflow-scroll.html: * fast/scrolling/mac/rubberband-overflow-in-wheel-region-root-jiggle.html: * fast/scrolling/mac/rubberband-overflow-in-wheel-region.html: * fast/scrolling/mac/scroll-snapping-in-progress.html: * fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html: * fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal.html: * fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-hovered.html: * fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-reveal.html: * fast/scrolling/mac/scrollbars/overlay-scrollbar-hovered.html: * fast/scrolling/mac/scrollbars/overlay-scrollbar-reveal.html: * fast/scrolling/mac/scrollbars/overlay-scrollbar-state.html: * fast/scrolling/mac/scrollbars/select-overlay-scrollbar-hovered.html: * fast/scrolling/mac/scrollbars/select-overlay-scrollbar-reveal.html: * fast/scrolling/mac/slow-scrolling-overflow.html: * fast/scrolling/mac/wheel-event-listener-region-basic.html: * fast/scrolling/mac/wheel-event-listener-region-document.html: * fast/scrolling/mac/wheel-event-listener-region-element-invalidation.html: * fast/scrolling/mac/wheel-event-listener-region-inside-overflow-scroll-clipped-out.html: * fast/scrolling/mac/wheel-event-listener-region-inside-overflow-scroll.html: * fast/scrolling/mac/wheel-event-listener-region-layer-offset.html: * fast/scrolling/mac/wheel-event-listener-region-root-invalidation.html: * fast/scrolling/mac/wheel-event-listener-region-window.html: * fast/scrolling/overflow-inside-foreignobject.html: * fast/scrolling/programmatic-scroll-to-negative-offset.html: * fast/scrolling/scroll-behavior-invalidate-if-disabled.html: * fast/scrolling/scroll-behavior-validate-if-enabled.html: * fast/scrolling/scrolling-event-target-gc.html: * fast/text/embed-at-end-of-pre-wrap-line-simple-lines-expected.html: * fast/text/embed-at-end-of-pre-wrap-line-simple-lines.html: * fast/text/simple-line-layout-leading-whitespace-with-soft-hard-linebreak-expected.html: * fast/text/simple-line-layout-leading-whitespace-with-soft-hard-linebreak.html: * fast/text/simple-lines-float-expected.html: * fast/text/simple-lines-float.html: * fast/text/whitespace/pre-wrap-long-word-simple-lines-expected.html: * fast/text/whitespace/pre-wrap-long-word-simple-lines.html: * fast/web-share/canShare-with-files-feature-disabled.html: * fast/web-share/share-with-files-feature-disabled.html: * highlight/highlight-interfaces.html: * highlight/highlight-map-and-group.html: * highlight/highlight-pseudo-element-style.html: * http/tests/adClickAttribution/anchor-tag-attributes-reflect.html: * http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html: * http/tests/adClickAttribution/attribution-conversion-through-image-redirect-in-new-window.html: * http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html: * http/tests/adClickAttribution/clear-through-website-data-removal.html: * http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html: * http/tests/webAPIStatistics/font-load-data-collection.html: * http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html: * http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html: * http/wpt/webauthn/ctap-hid-failure.https.html: * http/wpt/webauthn/ctap-hid-success.https.html: * http/wpt/webauthn/ctap-nfc-failure.https.html: * http/wpt/webauthn/idl.https.html: * http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html: * http/wpt/webauthn/public-key-credential-create-failure-hid.https.html: * http/wpt/webauthn/public-key-credential-create-failure-local-silent.https.html: * http/wpt/webauthn/public-key-credential-create-failure-local.https.html: * http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html: * http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html: * http/wpt/webauthn/public-key-credential-create-failure-u2f.https.html: * http/wpt/webauthn/public-key-credential-create-failure.https.html: * http/wpt/webauthn/public-key-credential-create-success-hid.https.html: * http/wpt/webauthn/public-key-credential-create-success-local.https.html: * http/wpt/webauthn/public-key-credential-create-success-nfc.https.html: * http/wpt/webauthn/public-key-credential-create-success-u2f.https.html: * http/wpt/webauthn/public-key-credential-create-with-invalid-parameters.https.html: * http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html: * http/wpt/webauthn/public-key-credential-get-failure-hid.https.html: * http/wpt/webauthn/public-key-credential-get-failure-local-silent.https.html: * http/wpt/webauthn/public-key-credential-get-failure-local.https.html: * http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html: * http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https.html: * http/wpt/webauthn/public-key-credential-get-failure-u2f.https.html: * http/wpt/webauthn/public-key-credential-get-failure.https.html: * http/wpt/webauthn/public-key-credential-get-success-hid.https.html: * http/wpt/webauthn/public-key-credential-get-success-local.https.html: * http/wpt/webauthn/public-key-credential-get-success-nfc.https.html: * http/wpt/webauthn/public-key-credential-get-success-u2f.https.html: * http/wpt/webauthn/public-key-credential-get-with-invalid-parameters.https.html: * http/wpt/webauthn/public-key-credential-ip-address.html: * http/wpt/webauthn/public-key-credential-is-user-verifying-platform-authenticator-available.html: * http/wpt/webauthn/public-key-credential-same-origin-with-ancestors.https.html: * http/wpt/webauthn/public-key-credential-unfocused-document.https.html: * intersection-observer/intersection-observer-callback-after-gc.html: * intersection-observer/intersection-observer-callback-leak.html: * mathml/mathml-overflow-crash.html: * mathml/non-core/frac-linethickness-001-expected.html: * mathml/non-core/frac-linethickness-001.html: * mathml/non-core/frac-linethickness-002-expected.html: * mathml/non-core/frac-linethickness-002.html: * mathml/non-core/frac-numalign-denomalign-001-expected.html: * mathml/non-core/frac-numalign-denomalign-001.html: * mathml/non-core/lengths-1-expected.html: * mathml/non-core/lengths-1.html: * mathml/non-core/lengths-2-expected.html: * mathml/non-core/lengths-2.html: * mathml/non-core/lengths-3.html: * mathml/presentation/attributes-background-color-expected.html: * mathml/presentation/attributes-background-color.html: * mathml/presentation/attributes-mathvariant.html: * mathml/presentation/mstyle-css-attributes.html: * platform/ios/fast/scrolling/find-text-in-overflow-node-indicator-position-limit.html: * platform/ios/fast/scrolling/find-text-in-overflow-node-indicator-position.html: * platform/ios/fast/scrolling/find-text-in-overflow-node.html: * platform/ios/media/video-play-glyph-composited-outside-overflow-scrolling-touch-container.html: * pointerevents/ios/touch-action-none-in-overflow-scrolling-touch.html: * pointerevents/ios/touch-action-none-no-scroll-indicators.html: * pointerevents/ios/touch-action-none-with-frame-inside.html: * pointerevents/ios/touch-action-pan-y-in-overflow-scroll-horizontal-gesture-prevents-vertical-scrolling.html: * pointerevents/ios/touch-action-region-backing-sharing.html: * pointerevents/ios/touch-action-region-clip-and-transform.html: * pointerevents/ios/touch-action-region-overflow.html: * printing/page-with-10mm-left-margin.html: * printing/page-with-zero-margin.html: * requestidlecallback/requestidlecallback-document-gc.html: * requestidlecallback/requestidlecallback-enabled.html: * requestidlecallback/requestidlecallback-id.html: * requestidlecallback/requestidlecallback-in-page-cache.html: * requestidlecallback/requestidlecallback-is-called.html: * requestidlecallback/requestidlecallback-is-not-called-when-canceled.html: * requestidlecallback/requestidlecallback-not-enabled.html: * resize-observer/delete-observers-in-callbacks.html: * resize-observer/element-leak.html: * resize-observer/modify-frametree-in-callback.html: * resize-observer/multi-frames.html: * resize-observer/observe-element-from-other-frame.html: * resize-observer/resize-observer-callback-leak.html: * resize-observer/resize-observer-entry-keeps-js-wrapper-of-target-alive.html: * resize-observer/resize-observer-keeps-js-wrapper-of-target-alive.html: * resize-observer/resize-observer-with-zoom.html: * scrollbars/async-overflow-custom-scrollbar-expected.html: * scrollbars/async-overflow-custom-scrollbar.html: * scrollingcoordinator/ios/absolute-layer-should-not-move-with-scroll-expected.html: * scrollingcoordinator/ios/absolute-layer-should-not-move-with-scroll.html: * scrollingcoordinator/ios/fixed-frame-overflow-swipe-expected.html: * scrollingcoordinator/ios/fixed-frame-overflow-swipe.html: * scrollingcoordinator/ios/fixed-in-overflow-scroll-expected.html: * scrollingcoordinator/ios/fixed-in-overflow-scroll-scrolling-tree.html: * scrollingcoordinator/ios/fixed-in-overflow-scroll.html: * scrollingcoordinator/ios/fixed-in-stacking-context-overflow-scroll-2-expected.html: * scrollingcoordinator/ios/fixed-in-stacking-context-overflow-scroll-2.html: * scrollingcoordinator/ios/fixed-in-stacking-context-overflow-scroll-expected.html: * scrollingcoordinator/ios/fixed-in-stacking-context-overflow-scroll.html: * scrollingcoordinator/ios/fixed-inside-overflow-inside-fixed-expected.html: * scrollingcoordinator/ios/fixed-inside-overflow-inside-fixed.html: * scrollingcoordinator/ios/fixed-inside-sticky-frame-expected.html: * scrollingcoordinator/ios/fixed-inside-sticky-frame.html: * scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context-2-expected.html: * scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context-2.html: * scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context-expected.html: * scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context.html: * scrollingcoordinator/ios/fixed-inside-sticky-stacking-context-expected.html: * scrollingcoordinator/ios/fixed-inside-sticky-stacking-context.html: * scrollingcoordinator/ios/fixed-overflow-no-stacking-context-1-expected.html: * scrollingcoordinator/ios/fixed-overflow-no-stacking-context-1.html: * scrollingcoordinator/ios/fixed-overflow-no-stacking-context-2-expected.html: * scrollingcoordinator/ios/fixed-overflow-no-stacking-context-2.html: * scrollingcoordinator/ios/fixed-overflow-stacking-context-stationary-expected.html: * scrollingcoordinator/ios/fixed-overflow-stacking-context-stationary.html: * scrollingcoordinator/ios/programmatic-frame-scroll-expected.html: * scrollingcoordinator/ios/programmatic-frame-scroll.html: * scrollingcoordinator/ios/programmatic-overflow-scroll-expected.html: * scrollingcoordinator/ios/programmatic-overflow-scroll.html: * scrollingcoordinator/ios/programmatic-page-scroll-expected.html: * scrollingcoordinator/ios/programmatic-page-scroll.html: * scrollingcoordinator/ios/relative-layer-should-move-with-scroll-expected.html: * scrollingcoordinator/ios/relative-layer-should-move-with-scroll.html: * scrollingcoordinator/ios/scroll-element-at-point.html: * scrollingcoordinator/ios/scroll-position-after-reattach-expected.html: * scrollingcoordinator/ios/scroll-position-after-reattach.html: * scrollingcoordinator/ios/scroller-initial-scroll-position-expected.html: * scrollingcoordinator/ios/scroller-initial-scroll-position.html: * scrollingcoordinator/ios/sticky-overflow-no-stacking-context-no-stick-1-expected.html: * scrollingcoordinator/ios/sticky-overflow-no-stacking-context-no-stick-1.html: * scrollingcoordinator/ios/sticky-overflow-no-stacking-context-no-stick-2-expected.html: * scrollingcoordinator/ios/sticky-overflow-no-stacking-context-no-stick-2.html: * scrollingcoordinator/ios/sticky-overflow-no-stacking-context-stick-1-expected.html: * scrollingcoordinator/ios/sticky-overflow-no-stacking-context-stick-1.html: * scrollingcoordinator/ios/sticky-overflow-no-stacking-context-stick-2-expected.html: * scrollingcoordinator/ios/sticky-overflow-no-stacking-context-stick-2.html: * scrollingcoordinator/ios/sticky-overflow-stacking-context-no-stick-expected.html: * scrollingcoordinator/ios/sticky-overflow-stacking-context-no-stick.html: * scrollingcoordinator/ios/sticky-overflow-stacking-context-stick-expected.html: * scrollingcoordinator/ios/sticky-overflow-stacking-context-stick.html: * scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-non-cb-overflow.html: * scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-overflow.html: * scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-overflow2.html: * scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-dynamic.html: * scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-repaint-expected.html: * scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-repaint.html: * scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow.html: * scrollingcoordinator/mac/fixed-backgrounds/fixed-background-on-overflow.html: * scrollingcoordinator/mac/latching/horizontal-overflow-back-swipe.html: * scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow.html: * scrollingcoordinator/mac/latching/scrolling-select-should-not-latch-mainframe.html: * scrollingcoordinator/mac/latching/zero-delta-began-should-not-latch.html: * scrollingcoordinator/mac/programmatic-frame-scroll-expected.html: * scrollingcoordinator/mac/programmatic-frame-scroll.html: * scrollingcoordinator/mac/programmatic-overflow-scroll-expected.html: * scrollingcoordinator/mac/programmatic-overflow-scroll.html: * scrollingcoordinator/mac/rtl-programmatic-overflow-scroll.html: * scrollingcoordinator/overflow-proxy-reattach-expected.html: * scrollingcoordinator/overflow-proxy-reattach.html: * scrollingcoordinator/scrolling-tree/absolute-in-nested-sc-scrollers.html: * scrollingcoordinator/scrolling-tree/absolute-inside-stacking-in-scroller.html: * scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested.html: * scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow.html: * scrollingcoordinator/scrolling-tree/composited-in-absolute-in-overflow.html: * scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow.html: * scrollingcoordinator/scrolling-tree/gain-scrolling-node-parent.html: * scrollingcoordinator/scrolling-tree/lose-scrolling-node-parent.html: * scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html: * scrollingcoordinator/scrolling-tree/nested-absolute-in-overflow.html: * scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html: * scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html: * scrollingcoordinator/scrolling-tree/nested-overflow-scroll.html: * scrollingcoordinator/scrolling-tree/overflow-in-fixed.html: * scrollingcoordinator/scrolling-tree/positioned-nodes-complex.html: * scrollingcoordinator/scrolling-tree/positioned-nodes.html: * scrollingcoordinator/scrolling-tree/remove-scrolling-role.html: * scrollingcoordinator/scrolling-tree/reparent-across-compositing-layers.html: * scrollingcoordinator/scrolling-tree/reparent-with-layer-removal.html: * scrollingcoordinator/scrolling-tree/resources/doc-with-sticky.html: * scrollingcoordinator/scrolling-tree/scroller-with-negative-z-child.html: * scrollingcoordinator/scrolling-tree/sticky-in-overflow.html: * tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage.html: * tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage.html: * tiled-drawing/scrolling/overflow/overflow-tile-coverage.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-async-iframe.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-async-overflow-stateless.html: * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-async-overflow.html: Canonical link: https://commits.webkit.org/231204@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-04 15:56:26 +00:00
<!DOCTYPE html><!-- webkit-test-runner [ CSSPaintingAPIEnabled=true ] -->
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
<meta name="author" title="Justin Michaud" href="mailto:justin_michaud@webkit.org">
<meta name="assert" content="registerPaint accesses arguments in the correct order">
<link rel="help" content="https://drafts.css-houdini.org/css-paint-api-1/">
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
<script src="resources/testharness.js"></script>
<style>
#paint {
background-image: paint(my-paint);
width: 150px;
height: 150px;
}
</style>
<div id="paint"></div>
<script id="code" type="text/worklet">
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
class MyPaint {
paint() { }
}
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
test(function() {
registerPaint('basic1', class {
static get inputProperties() { return ["--test"]; }
paint() { }
});
}, 'test that registerPaint runs');
[WebIDL] Remove [ImplicitThis] and [CustomProxyToJSObject] extended attributes https://bugs.webkit.org/show_bug.cgi?id=223758 Reviewed by Sam Weinig. LayoutTests/imported/w3c: * web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value.any-expected.txt: Added. * web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value.any.html: Added. * web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value.any.js: Added. * web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value.any.worker-expected.txt: Added. * web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value.any.worker.html: Added. * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-registerprocessor-called-on-globalthis.https-expected.txt: Added. * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-registerprocessor-called-on-globalthis.https.html: Added. * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/dummy-processor-globalthis.js: Added. Source/WebCore: This change introduces castThisValue<JSClass>, taking a step towards unification of |this| value casting between IDLAttribute and IDLOperation. The helper uses compile-time inheritance check to provide implicit |this| value for DOM global objects [1], replacing [ImplicitThis] extended attribute, which was removed from the spec [2] a while ago. IDLAttribute can't perform toThis() with ECMAMode::strict(), like IDLOperation now does, because CustomValue getters are called with |this| value of JSGlobalObject type, which gets tainted by JSScope::toThis(). #225397 will remove the need for toThis(), finally making |this| value casting consistent between attributes and operations. Also, this patch fixes `Object.create(window).location` to throw as per spec [1] by removing prototype chain traversal from toJSDOMWindow(), which aligns WebKit with Blink and Gecko. As DOM global objects are wrapped in proxies and require special casting, toJSDOMWindow() and friends are merged into toJSDOMGlobalObject<JSClass>, which is aware of inheritance / JSProxy. It replaces [CustomProxyToJSObject] extended attribute, which could be missed when adding new DOM global objects, fixing worklets' global functions not to throw when called on `globalThis`. This change reduces WebCore --release binary size by 0.2% (147 KB). [1] https://heycam.github.io/webidl/#dfn-attribute-getter (step 1.1.2.3) [2] https://github.com/heycam/webidl/pull/155 Tests: imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value.any.js imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-registerprocessor-called-on-globalthis.https.html fast/css-custom-paint/registerPaintBindings.html http/tests/security/listener/*.html * Headers.cmake: * Modules/webaudio/AudioWorkletGlobalScope.idl: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMAttribute.h: (WebCore::IDLAttribute::set): (WebCore::IDLAttribute::setPassingPropertyName): (WebCore::IDLAttribute::get): (WebCore::IDLAttribute::getPassingPropertyName): * bindings/js/JSDOMCastThisValue.h: Added. (WebCore::castThisValue): * bindings/js/JSDOMCastedThisErrorBehavior.h: Removed. * bindings/js/JSDOMGlobalObject.h: (WebCore::toJSDOMGlobalObject): * bindings/js/JSDOMOperation.h: (WebCore::IDLOperation::cast): * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSDOMWindowBase.h: (WebCore::toJSDOMWindow): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSC_DEFINE_CUSTOM_GETTER): (WebCore::IDLOperation<JSDOMWindow>::cast): Deleted. * bindings/js/JSDocumentCustom.cpp: (WebCore::cachedDocumentWrapper): * bindings/js/JSEventTargetCustom.cpp: (WebCore::jsEventTargetCast): * bindings/js/JSEventTargetCustom.h: (WebCore::IDLOperation<JSEventTarget>::call): * bindings/js/JSRemoteDOMWindowBase.cpp: (WebCore::toJSRemoteDOMWindow): Deleted. * bindings/js/JSRemoteDOMWindowBase.h: * bindings/js/JSWorkerGlobalScopeBase.cpp: (WebCore::toJSDedicatedWorkerGlobalScope): Deleted. (WebCore::toJSWorkerGlobalScope): Deleted. (WebCore::toJSServiceWorkerGlobalScope): Deleted. * bindings/js/JSWorkerGlobalScopeBase.h: * bindings/js/JSWorkletGlobalScopeBase.cpp: (WebCore::toJSWorkletGlobalScope): Deleted. * bindings/js/JSWorkletGlobalScopeBase.h: * bindings/scripts/CodeGeneratorJS.pm: (ShouldGenerateToJSDeclaration): (IsAcceleratedDOMAttribute): (GenerateImplementation): * bindings/scripts/IDLAttributes.json: * bindings/scripts/test/JS/*: Updated. * inspector/InspectorController.cpp: (WebCore::InspectorController::canAccessInspectedScriptState const): * page/DOMWindow.idl: * page/RemoteDOMWindow.idl: * workers/DedicatedWorkerGlobalScope.idl: * workers/WorkerGlobalScope.idl: * workers/service/ServiceWorkerGlobalScope.idl: * worklets/PaintWorkletGlobalScope.idl: * worklets/WorkletGlobalScope.idl: Source/WebKit: Use inherits<T> instead of toJSDOMWindow() if the value is never a JSProxy. * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::reportException): Source/WebKitLegacy/mac: Use inherits<T> instead of toJSDOMWindow() if the value is never a JSProxy. * WebView/WebView.mm: (+[WebView _reportException:inContext:]): Source/WebKitLegacy/win: Use inherits<T> instead of toJSDOMWindow() if the value is never a JSProxy. * WebView.cpp: (WebView::reportException): LayoutTests: * fast/css-custom-paint/registerPaintBindings.html: * http/tests/security/listener/*: This is a progression: Blink and Gecko don't call event listeners belonging to destroyed frames. * js/property-of-window-as-prototype-expected.txt: Removed. * js/property-of-window-as-prototype.html: Removed. Canonical link: https://commits.webkit.org/237976@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-20 22:25:01 +00:00
test(function() {
globalThis.registerPaint('basic1-globalThis', class {
static get inputProperties() { return ["--test"]; }
paint() { }
});
}, 'test that registerPaint runs (called on globalThis)');
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
test(function() {
registerPaint('basic2', class {
paint() { }
});
}, 'test that registerPaint runs without inputProperties');
test(function() {
registerPaint('basic3', class {
static get inputArguments() { return ["<length>"]; }
paint() { }
});
}, 'test that registerPaint runs with inputArguments');
test(function() {
registerPaint('basic4', class {
static get contextOptions() { return { alpha: true }; }
paint() { }
});
}, 'test that registerPaint runs with contextOptions');
test(function() {
registerPaint('basic5', MyPaint);
assert_throws({'name': 'InvalidModificationError'}, () => registerPaint('basic5', MyPaint));
registerPaint('basic6', class extends MyPaint { });
}, 'test that registerPaint runs with predefined class');
test(function() {
assert_throws({'name': 'TypeError'}, () => registerPaint('basic6', 'test'));
assert_throws(new TypeError(), () => registerPaint('basic8'));
assert_throws(new TypeError(), () => registerPaint('basic9', []));
assert_throws(new TypeError(), () => registerPaint('basic10', {}));
assert_throws(new TypeError(), () => registerPaint('basic11', 5));
assert_throws(new TypeError(), () => registerPaint('', 5));
}, 'test that registerPaint accepts only a string and a class constructor');
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
test(function () {
const calls = [];
const proxy = new Proxy(class extends MyPaint { }, {
get: function (target, name) {
calls.push(name);
return target[name];
}
});
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
registerPaint('test-proto', proxy);
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
assert_array_equals(calls, ["inputProperties", "inputArguments", "contextOptions", "prototype"]);
}, 'must get "prototype" property of the constructor');
test(function () {
const calls = [];
const proxy = new Proxy(class extends MyPaint { }, {
get: function (target, name) {
calls.push(name);
if (name == 'inputProperties')
throw {name: 'expectedError'};
return target[name];
}
});
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
assert_throws({'name': 'expectedError'}, function () { registerPaint('test-rethrow-inputProperties0', proxy); });
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
}, 'must rethrow an exception thrown while getting "inputProperties" property of the constructor');
test(function () {
const calls = [];
const proxy = new Proxy(class extends MyPaint { }, {
get: function (target, name) {
calls.push(name);
if (name == 'prototype')
throw {name: 'expectedError'};
return target[name];
}
});
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
assert_throws({'name': 'expectedError'}, function () { registerPaint('test-rethrow-proto', proxy); });
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
}, 'must rethrow an exception thrown while getting "prototype" property of the constructor');
test(function () {
let returnedValue;
const proxy = new Proxy(class extends MyPaint { }, {
get: function (target, name) {
if (name == 'prototype')
return returnedValue;
return target[name];
}
});
returnedValue = null;
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
assert_throws({'name': 'TypeError'}, function () { registerPaint('test-rethrow-proto-noobj1', proxy); },
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
'must throw when "prototype" property of the constructor is null');
returnedValue = undefined;
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
assert_throws({'name': 'TypeError'}, function () { registerPaint('test-rethrow-proto-noobj2', proxy); },
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
'must throw when "prototype" property of the constructor is undefined');
returnedValue = 'hello';
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
assert_throws({'name': 'TypeError'}, function () { registerPaint('test-rethrow-proto-noobj3', proxy);; },
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
'must throw when "prototype" property of the constructor is a string');
returnedValue = 1;
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
assert_throws({'name': 'TypeError'}, function () { registerPaint('test-rethrow-proto-noobj4', proxy);; },
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
'must throw when "prototype" property of the constructor is a number');
}, 'must throw when "prototype" property of the constructor is not an object');
test(function () {
const constructor = function () {}
constructor.prototype.paint = function() {}
const calls = [];
constructor.prototype = new Proxy(constructor.prototype, {
get: function (target, name) {
calls.push(name);
return target[name];
}
});
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
registerPaint('callbacks', constructor);
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
assert_array_equals(calls, ['paint']);
}, 'must get paint callback of the constructor prototype');
test(function () {
const constructor = function () {}
const calls = [];
constructor.prototype = new Proxy(constructor.prototype, {
get: function (target, name) {
calls.push(name);
if (name == 'paint')
throw {name: 'expectedError'};
return target[name];
}
});
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
assert_throws({'name': 'expectedError'}, function () { registerPaint('callbacks-throw', constructor); });
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
assert_array_equals(calls, ['paint']);
}, 'must rethrow an exception thrown while getting paint callback on the constructor prototype');
test(function () {
const constructor = function () {}
const calls = [];
constructor.prototype = new Proxy(constructor.prototype, {
get: function (target, name) {
calls.push(name);
if (name == 'paint')
return 1;
return target[name];
}
});
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
assert_throws({'name': 'TypeError'}, function () { registerPaint('callbacks-throw2', constructor); });
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
assert_array_equals(calls, ['paint']);
}, 'must rethrow an exception thrown while converting paint callback value to Function callback type');
test(function () {
const calls = [];
const proxy = new Proxy(class extends MyPaint { }, {
get: function (target, name) {
calls.push(name);
if (name == 'inputArguments')
return 1;
return target[name];
}
});
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
assert_throws({'name': 'TypeError'}, function () { registerPaint('sequence-throw', proxy); });
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
assert_array_equals(calls, ["inputProperties", "inputArguments"]);
}, 'must rethrow an exception thrown while converting the value of inputArguments to sequence<DOMString>');
test(function () {
const constructor = function () {}
constructor.inputArguments = {[Symbol.iterator]: function *() {
yield '<length>';
throw {name: 'SomeError'};
}};
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
assert_throws({'name': 'SomeError'}, function () { registerPaint('sequence-throw2', constructor); });
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
}, 'must rethrow an exception thrown while iterating over inputArguments to sequence<DOMString>');
test(function () {
const constructor = function () {}
constructor.inputArguments = {[Symbol.iterator]: 1};
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
assert_throws({'name': 'TypeError'}, function () { registerPaint('symbol-iterator-throw2', constructor); });
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
}, 'must rethrow an exception thrown while retrieving Symbol.iterator on inputArguments');
Add new global object and preliminary Worklets support for CSS painting api https://bugs.webkit.org/show_bug.cgi?id=190979 Reviewed by Chris Dumez. Source/WebCore: Test: fast/css-custom-paint/worklet.html Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are left as ASSERT_NOT_REACHED(). * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::scriptExecutionContext const): * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp. (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren): (WebCore::JSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSWorkletGlobalScopeBase.cpp: Added. (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase): (WebCore::JSWorkletGlobalScopeBase::finishCreation): (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects): (WebCore::JSWorkletGlobalScopeBase::visitChildren): (WebCore::JSWorkletGlobalScopeBase::destroy): (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const): (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript): (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout): (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags): (WebCore::toJS): (WebCore::toJSWorkletGlobalScope): * bindings/js/JSWorkletGlobalScopeBase.h: Added. (WebCore::JSWorkletGlobalScopeBase::wrapped const): (WebCore::JSWorkletGlobalScopeBase::proxy const): (WebCore::JSWorkletGlobalScopeBase::createStructure): (WebCore::toJS): * bindings/js/ScriptState.cpp: (WebCore::execStateFromWorkerGlobalScope): (WebCore::execStateFromWorkletGlobalScope): * bindings/js/ScriptState.h: * bindings/js/WebCoreBuiltinNames.h: * bindings/scripts/CodeGeneratorJS.pm: (IsDOMGlobalObject): (ShouldUseGlobalObjectPrototype): (GenerateHeader): (GenerateRuntimeEnableConditionalStringForExposed): (GenerateImplementation): * bindings/scripts/preprocess-idls.pl: * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::image): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet): (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted. * css/DOMCSSPaintWorklet.h: * css/DOMCSSPaintWorklet.idl: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorklet): (WebCore::Document::setCSSPaintWorkletGlobalScope): (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted. * dom/Document.h: (WebCore::Document::getCSSPaintWorkletGlobalScope): * dom/EventTargetFactory.in: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::vm): (WebCore::ScriptExecutionContext::execState): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::isWorkletGlobalScope const): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/agents/worker/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * platform/graphics/CustomPaintImage.cpp: (WebCore::CustomPaintImage::CustomPaintImage): (WebCore::CustomPaintImage::doCustomPaint): * platform/graphics/CustomPaintImage.h: * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::PaintWorkletGlobalScope::create): (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope): (WebCore::PaintWorkletGlobalScope::devicePixelRatio): (WebCore::PaintWorkletGlobalScope::addRegisteredPaint): * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h. * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. (WebCore::Worklet::create): (WebCore::Worklet::Worklet): (WebCore::Worklet::addModule): * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp. * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp. (WebCore::WorkletConsoleClient::WorkletConsoleClient): (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): (WebCore::WorkletConsoleClient::count): (WebCore::WorkletConsoleClient::time): (WebCore::WorkletConsoleClient::timeEnd): (WebCore::WorkletConsoleClient::profile): (WebCore::WorkletConsoleClient::profileEnd): (WebCore::WorkletConsoleClient::takeHeapSnapshot): (WebCore::WorkletConsoleClient::timeStamp): (WebCore::WorkletConsoleClient::record): (WebCore::WorkletConsoleClient::recordEnd): * worklets/WorkletConsoleClient.h: Added. * worklets/WorkletGlobalScope.cpp: Added. (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::~WorkletGlobalScope): (WebCore::WorkletGlobalScope::evaluate): (WebCore::WorkletGlobalScope::isJSExecutionForbidden const): (WebCore::WorkletGlobalScope::disableEval): (WebCore::WorkletGlobalScope::disableWebAssembly): (WebCore::WorkletGlobalScope::completeURL const): (WebCore::WorkletGlobalScope::logExceptionToConsole): (WebCore::WorkletGlobalScope::addConsoleMessage): (WebCore::WorkletGlobalScope::addMessage): * worklets/WorkletGlobalScope.h: Added. (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const): (WebCore::WorkletGlobalScope::identifier const): (WebCore::WorkletGlobalScope::script): (WebCore::WorkletGlobalScope::jsRuntimeFlags const): (isType): * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl. * worklets/WorkletScriptController.cpp: Added. (WebCore::WorkletScriptController::WorkletScriptController): (WebCore::WorkletScriptController::~WorkletScriptController): (WebCore::WorkletScriptController::forbidExecution): (WebCore::WorkletScriptController::isExecutionForbidden const): (WebCore::WorkletScriptController::disableEval): (WebCore::WorkletScriptController::disableWebAssembly): (WebCore::WorkletScriptController::initScriptWithSubclass): (WebCore::WorkletScriptController::initScript): (WebCore::WorkletScriptController::evaluate): (WebCore::WorkletScriptController::setException): * worklets/WorkletScriptController.h: Added. (WebCore::WorkletScriptController::workletGlobalScopeWrapper): (WebCore::WorkletScriptController::vm): (WebCore::WorkletScriptController::initScriptIfNeeded): Tools: * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_supplemental_dependency): (BindingsTests.main): LayoutTests: Add a new test harness for worklet tests, since they do not have access to the dom. * fast/css-custom-paint/basic-expected.txt: * fast/css-custom-paint/basic.html: * fast/css-custom-paint/registerPaintBindings-expected.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Removed. * fast/css-custom-paint/registerPaintBindings.html: * fast/css-custom-paint/resources/testharness-worklet.js: Added. (format_value): * fast/css-custom-paint/resources/testharness.js: Added. (async.importWorklet): * fast/css-custom-paint/worklet-expected.html: Added. * fast/css-custom-paint/worklet.html: Added. Canonical link: https://commits.webkit.org/206025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-03 04:01:29 +00:00
assert_true(PaintWorkletGlobalScope.hasRunATest);
if (PaintWorkletGlobalScope.errors) {
console.log("The following (" + PaintWorkletGlobalScope.errors.length + ") tests failed: ")
console.log(JSON.stringify(PaintWorkletGlobalScope.errors));
assert_true(false);
}
class MyPaint2 {
paint(ctx, geom, properties) {
for (var i = 0; i < 6; i++){
for (var j = 0; j < 6; j++){
ctx.fillStyle = 'rgb(' + Math.floor(255 - 42.5 * i) + ',' +
Math.floor(255 - 42.5 * j) + ',0)';
ctx.fillRect(j * 25, i * 25, 25, 25);
}
}
}
}
registerPaint('my-paint', MyPaint2);
</script>
<script>
importWorklet(CSS.paintWorklet, document.getElementById('code').textContent);
Implement feature flag and bindings for CSS Painting API https://bugs.webkit.org/show_bug.cgi?id=190237 Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16 Reviewed by Ryosuke Niwa. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: Add feature flag and bindings for CSS Painting API. This adds a new property, CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint worklet global scope untill CSS.paintWorklet is implemented. There are a few small changes, mostly adding headers and "using" declarations, that were required to get this to build. This is probably related to unified sources. Tests: fast/css-custom-paint/basic.html fast/css-custom-paint/registerPaintBindings.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added. (WebCore::throwInvalidModificationError): (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint): * bindings/js/JSEventListener.cpp: * bindings/js/JSRemoteDOMWindowCustom.cpp: * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: * bindings/js/WebCoreBuiltinNames.h: * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintCallback::~CSSPaintCallback): * css/CSSPaintCallback.idl: Added. * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::create): (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope): (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio): (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint): * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap): * css/CSSPaintWorkletGlobalScope.idl: Added. * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): (WebCore::DOMCSSPaintWorklet::from): (WebCore::DOMCSSPaintWorklet::supplementName): * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp. * css/DOMCSSPaintWorklet.idl: Added. * css/MediaQueryParserContext.cpp: * css/StyleBuilder.h: * dom/Document.cpp: (WebCore::Document::ensureCSSPaintWorkletGlobalScope): * dom/Document.h: * features.json: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled): (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: Add basic tests for the CSS Painting API registerPaint function, and test the custom bindings. * fast/css-custom-paint/basic-expected.txt: Added. * fast/css-custom-paint/basic.html: Added. * fast/css-custom-paint/registerPaintBindings-expected.txt: Added. * fast/css-custom-paint/registerPaintBindings.html: Added. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/205564@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 18:04:43 +00:00
</script>