haikuwebkit/LayoutTests/performance-api/paint-timing/paint-timing-apis-expected.txt

14 lines
380 B
Plaintext
Raw Permalink Normal View History

Implement FCP (first contentful paint) https://bugs.webkit.org/show_bug.cgi?id=208499 Reviewed by Simon Fraser. LayoutTests/imported/w3c: Imported paint timing tests that don't require first-paint. * resources/import-expectations.json: * web-platform-tests/paint-timing: Added. * web-platform-tests/paint-timing/fcp-only: Added. * web-platform-tests/paint-timing/fcp-only/fcp-background-size-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-background-size.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-bg-image-set-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-bg-image-set.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-bg-image-two-steps-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-bg-image-two-steps.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-canvas-context-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-canvas-context.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-gradient-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-gradient.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-descendant-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-descendant.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-transition-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-transition.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-text-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-text.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-opacity-descendant-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-opacity-descendant.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-opacity-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-opacity.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-translate-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-translate.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-display-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-display.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-image-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-image.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-opacity-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-opacity.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-text-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-text.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-visibility-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-visibility.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-svg-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-svg.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-text-input-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-text-input.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-typographic-pseudo-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-typographic-pseudo.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-video-frame-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-video-frame.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-video-poster-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-video-poster.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-whitespace-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-whitespace.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-with-rtl-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-with-rtl.html: Added. * web-platform-tests/paint-timing/resources: Added. * web-platform-tests/paint-timing/resources/circle.svg: Added. * web-platform-tests/paint-timing/resources/circles.png: Added. * web-platform-tests/paint-timing/resources/subframe-painting.html: Added. * web-platform-tests/paint-timing/resources/subframe-sending-paint.html: Added. * web-platform-tests/paint-timing/resources/utils.js: Added. (waitForAnimationFrames): (async assertNoFirstContentfulPaint): (async assertFirstContentfulPaint.return.new.Promise): (async assertFirstContentfulPaint): (async test_fcp): Source/WebCore: Added the necessary interface, extensions to the performance interface and observer, new runtime flag. Detecting contentfulness after layout and before actual paint, by running a "dummy" paint, similar to invalidateControlTints() / invalidateImagesWithAsyncDecodes(). Save the result to the GraphicsContext and then to the document. This would run for every paint until we detect a contentful one. Note that it paints the entire frame contents, as FCP is not viewport-dependent. Also, paint timing is currently disabled for LFC (layout formatting context), and will be dealt with later. Tests: http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars.html http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-style.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-background-size.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-bg-image-set.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-bg-image-two-steps.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-canvas-context.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-gradient.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-descendant.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-transition.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-text.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-opacity-descendant.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-opacity.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-translate.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-display.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-image.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-opacity.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-text.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-visibility.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-svg.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-text-input.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-typographic-pseudo.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-video-frame.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-video-poster.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-whitespace.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-with-rtl.html performance-api/paint-timing/paint-timing-apis.html performance-api/paint-timing/paint-timing-frames.html performance-api/paint-timing/paint-timing-with-worker.html performance-api/paint-timing/performance-observer-first-contentful-paint.html * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSPerformanceEntryCustom.cpp: (WebCore::toJSNewlyCreated): * bindings/js/WebCoreBuiltinNames.h: Add PerformancePaintTiming interface. https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming * dom/Document.cpp: * dom/Document.h: (WebCore::Document::supportsPaintTiming const): We only report paint timing for document that can access the top level security origin, to avoid leakage of information to sandboxed iframes. (WebCore::Document::enqueuePaintTimingEntryIfNeeded): Enqueue a paint timing entry, according to https://w3c.github.io/paint-timing/#sec-reporting-paint-timing * page/FrameView.cpp: (WebCore::FrameView::paintContents): Disable FCP fake-paint in LFC mode. * page/Page.cpp: (WebCore::Page::doAfterUpdateRendering): * page/Performance.cpp: (WebCore::Performance::getEntries const): (WebCore::Performance::getEntriesByType const): (WebCore::Performance::getEntriesByName const): (WebCore::Performance::reportFirstContentfulPaint): * page/Performance.h: Support first-contentful-paint reporting. * page/PerformanceEntry.cpp: (WebCore::PerformanceEntry::parseEntryTypeString): * page/PerformanceEntry.h: (WebCore::PerformanceEntry::isPaint const): * page/PerformanceObserver.cpp: (WebCore::PerformanceObserver::supportedEntryTypes): * page/PerformanceObserver.h: * page/PerformanceObserver.idl: * page/PerformancePaintTiming.h: Added. (isType): * page/PerformancePaintTiming.idl: Added. Add paint performance entry type. * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setPaintTimingEnabled): (WebCore::RuntimeEnabledFeatures::paintTimingEnabled const): New runtime flag for paint timing. * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::detectingContentfulPaint const): (WebCore::GraphicsContext::setContentfulPaintDetected): (WebCore::GraphicsContext::contenfulPaintDetected const): Add a flag in GraphicsContext where different render operations can report if they're contentful. * rendering/ContentfulPaintChecker.cpp: Added. (WebCore::ContentfulPaintChecker::qualifiesForContentfulPaint): * rendering/ContentfulPaintChecker.h: Added. Run a "dummy" paint of the FrameView, to detect contentful elements. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderHTMLCanvas.cpp: (WebCore::RenderHTMLCanvas::paintReplaced): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayerContents): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::paintReplaced): * rendering/TextPainter.cpp: (WebCore::TextPainter::paintTextOrEmphasisMarks): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paintReplaced): Report contentfulness when we reach anything that qualifies as contentful, based on https://w3c.github.io/paint-timing/#contentful. Source/WebKit: Add an experimental runtime flag for paint-timing (paintTimingEnabled). * Shared/WebPreferences.yaml: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPaintTimingEnabled): (WKPreferencesGetPaintTimingEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): LayoutTests: Added tests for some first-contentful-paint (FCP) use-cases. Ensure that FCP works well with VNE (first paint delay until contents are visually non-empty). * platform/win/TestExpectations: * platform/mac-wk1/TestExpectations: Disable paint timing for WebKit1. * TestExpectations: Disable of the WPT tests. * http/tests/performance/paint-timing: Added. * http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars-expected.txt: Added. * http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars.html: Added. If VNE due to number of characters blocks painting, make sure FCP is reported only after painting is unblocked. * http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-style-expected.txt: Added. * http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-style.html: Added. If a pending stylesheet blocks painting, make sure FCP is reported only after stylesheet has loaded. * http/tests/performance/paint-timing/resources: Added. * http/tests/performance/paint-timing/resources/slowscript.php: Added. * http/tests/performance/paint-timing/resources/slowstyle.php: Added. * http/tests/performance/paint-timing/resources/style.css: Added. (body): * performance-api/paint-timing: Added. * performance-api/paint-timing/paint-timing-apis-expected.txt: Added. * performance-api/paint-timing/paint-timing-apis.html: Added. * performance-api/paint-timing/paint-timing-frames-expected.txt: Added. * performance-api/paint-timing/paint-timing-frames.html: Added. * performance-api/paint-timing/paint-timing-with-worker-expected.txt: Added. * performance-api/paint-timing/paint-timing-with-worker.html: Added. Test that FCP is not available for cross-origin frames and workers. * performance-api/paint-timing/performance-observer-first-contentful-paint-expected.txt: Added. * performance-api/paint-timing/performance-observer-first-contentful-paint.html: Added. Test that performance observers are called for FCP. * performance-api/paint-timing/resources: Added. * performance-api/paint-timing/resources/fcp-subframe.html: Added. * performance-api/paint-timing/resources/paint-api-utils.js: Added. (async waitForFCP): * performance-api/paint-timing/resources/paint-timing-api.js: Added. * performance-api/paint-timing/resources/worker.html: Added. Canonical link: https://commits.webkit.org/224044@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-28 22:34:52 +00:00
Basic Interface test for paint-timing APIs.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PerformancePaintTiming
PASS PerformancePaintTiming is defined.
PASS PerformancePaintTiming.prototype.toJSON is defined.
JSDOMConstructorNotConstructable should be a constructor https://bugs.webkit.org/show_bug.cgi?id=215554 <rdar://problem/65770688> Reviewed by Darin Adler. LayoutTests/imported/w3c: * web-platform-tests/FileAPI/file/send-file-form-expected.txt: * web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.tentative-expected.txt: * web-platform-tests/FileAPI/file/send-file-form-utf-8-expected.txt: * web-platform-tests/FileAPI/file/send-file-form-windows-1252.tentative-expected.txt: * web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative-expected.txt: * web-platform-tests/css/cssom/CSSStyleSheet-constructable-baseURL.tentative-expected.txt: * web-platform-tests/css/cssom/CSSStyleSheet-constructable-disabled-regular-sheet-insertion-expected.txt: * web-platform-tests/css/cssom/CSSStyleSheet-constructable-disallow-import.tentative-expected.txt: * web-platform-tests/css/cssom/CSSStyleSheet-constructable-duplicate-expected.txt: * web-platform-tests/css/cssom/CSSStyleSheet-constructable-expected.txt: * web-platform-tests/css/cssom/CSSStyleSheet-modify-after-removal-expected.txt: * web-platform-tests/custom-elements/Document-createElement-expected.txt: * web-platform-tests/custom-elements/Document-createElementNS-expected.txt: * web-platform-tests/custom-elements/HTMLElement-attachInternals-expected.txt: * web-platform-tests/custom-elements/HTMLElement-constructor-expected.txt: * web-platform-tests/custom-elements/builtin-coverage-expected.txt: * web-platform-tests/custom-elements/customized-built-in-constructor-exceptions-expected.txt: * web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt: * web-platform-tests/custom-elements/parser/serializing-html-fragments-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLAreaElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLBaseElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLButtonElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLCanvasElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLDataElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLDetailsElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLEmbedElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLFieldSetElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLImageElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLLIElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLLabelElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLMapElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLMediaElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLMetaElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLMeterElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLModElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLOListElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLOptGroupElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLParamElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLProgressElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLQuoteElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLSlotElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLStyleElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLTableCellElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLTableColElement-expected.txt: * web-platform-tests/custom-elements/reactions/HTMLTimeElement-expected.txt: * web-platform-tests/custom-elements/upgrading/Document-importNode-expected.txt: * web-platform-tests/custom-elements/upgrading/Node-cloneNode-expected.txt: * web-platform-tests/dom/nodes/Node-appendChild-cereactions-vs-script.window-expected.txt: * web-platform-tests/html/editing/dnd/datastore/datatransfer-constructor-001-expected.txt: * web-platform-tests/html/editing/dnd/datastore/datatransfer-types-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-0/submit-file.sub-expected.txt: * web-platform-tests/service-workers/service-worker/data-transfer-files.https-expected.txt: * web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element-expected.txt: * web-platform-tests/user-timing/mark-entry-constructor.any-expected.txt: * web-platform-tests/user-timing/mark-entry-constructor.any.worker-expected.txt: * web-platform-tests/user-timing/structured-serialize-detail.any-expected.txt: * web-platform-tests/user-timing/structured-serialize-detail.any.worker-expected.txt: * web-platform-tests/webrtc/RTCIceTransport-extension.https-expected.txt: Source/WebCore: Test: js/dom/window-is-constructor.html While JSDOMConstructorNotConstructable throws an error, still it should be a constructor, which means, `IsConstructor(JSDOMConstructorNotConstructable)` should be true. To fix it, we add getConstructData which configures a function throwing an error. * bindings/js/JSDOMConstructorNotConstructable.h: LayoutTests: * editing/async-clipboard/clipboard-interfaces-expected.txt: * editing/undo-manager/undo-manager-interfaces-expected.txt: * fast/dom/MutationObserver/mutation-record-constructor-expected.txt: * http/wpt/html/browsers/the-window-object/window-is-constructor-expected.txt: Added. * http/wpt/html/browsers/the-window-object/window-is-constructor.html: Added. * js/interface-objects-expected.txt: * performance-api/paint-timing/paint-timing-apis-expected.txt: * performance-api/performance-observer-api-expected.txt: * performance-api/performance-timeline-api-expected.txt: * performance-api/resource-timing-apis-expected.txt: * performance-api/user-timing-apis-expected.txt: * platform/ios-wk2/imported/w3c/web-platform-tests/custom-elements/builtin-coverage-expected.txt: * platform/ios-wk2/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLInputElement-expected.txt: * platform/mac-wk2/imported/w3c/web-platform-tests/custom-elements/builtin-coverage-expected.txt: Canonical link: https://commits.webkit.org/228320@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-17 07:37:12 +00:00
PASS new PerformancePaintTiming() threw exception TypeError: Illegal constructor.
Implement FCP (first contentful paint) https://bugs.webkit.org/show_bug.cgi?id=208499 Reviewed by Simon Fraser. LayoutTests/imported/w3c: Imported paint timing tests that don't require first-paint. * resources/import-expectations.json: * web-platform-tests/paint-timing: Added. * web-platform-tests/paint-timing/fcp-only: Added. * web-platform-tests/paint-timing/fcp-only/fcp-background-size-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-background-size.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-bg-image-set-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-bg-image-set.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-bg-image-two-steps-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-bg-image-two-steps.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-canvas-context-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-canvas-context.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-gradient-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-gradient.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-descendant-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-descendant.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-transition-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-transition.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-text-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-invisible-text.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-opacity-descendant-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-opacity-descendant.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-opacity-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-opacity.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-translate-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-translate.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-display-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-display.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-image-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-image.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-opacity-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-opacity.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-text-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-text.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-visibility-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-visibility.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-svg-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-svg.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-text-input-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-text-input.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-typographic-pseudo-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-typographic-pseudo.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-video-frame-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-video-frame.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-video-poster-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-video-poster.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-whitespace-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-whitespace.html: Added. * web-platform-tests/paint-timing/fcp-only/fcp-with-rtl-expected.txt: Added. * web-platform-tests/paint-timing/fcp-only/fcp-with-rtl.html: Added. * web-platform-tests/paint-timing/resources: Added. * web-platform-tests/paint-timing/resources/circle.svg: Added. * web-platform-tests/paint-timing/resources/circles.png: Added. * web-platform-tests/paint-timing/resources/subframe-painting.html: Added. * web-platform-tests/paint-timing/resources/subframe-sending-paint.html: Added. * web-platform-tests/paint-timing/resources/utils.js: Added. (waitForAnimationFrames): (async assertNoFirstContentfulPaint): (async assertFirstContentfulPaint.return.new.Promise): (async assertFirstContentfulPaint): (async test_fcp): Source/WebCore: Added the necessary interface, extensions to the performance interface and observer, new runtime flag. Detecting contentfulness after layout and before actual paint, by running a "dummy" paint, similar to invalidateControlTints() / invalidateImagesWithAsyncDecodes(). Save the result to the GraphicsContext and then to the document. This would run for every paint until we detect a contentful one. Note that it paints the entire frame contents, as FCP is not viewport-dependent. Also, paint timing is currently disabled for LFC (layout formatting context), and will be dealt with later. Tests: http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars.html http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-style.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-background-size.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-bg-image-set.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-bg-image-two-steps.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-canvas-context.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-gradient.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-descendant.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-transition.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-text.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-opacity-descendant.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-opacity.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-translate.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-display.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-image.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-opacity.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-text.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-visibility.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-svg.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-text-input.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-typographic-pseudo.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-video-frame.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-video-poster.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-whitespace.html imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-with-rtl.html performance-api/paint-timing/paint-timing-apis.html performance-api/paint-timing/paint-timing-frames.html performance-api/paint-timing/paint-timing-with-worker.html performance-api/paint-timing/performance-observer-first-contentful-paint.html * CMakeLists.txt: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSPerformanceEntryCustom.cpp: (WebCore::toJSNewlyCreated): * bindings/js/WebCoreBuiltinNames.h: Add PerformancePaintTiming interface. https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming * dom/Document.cpp: * dom/Document.h: (WebCore::Document::supportsPaintTiming const): We only report paint timing for document that can access the top level security origin, to avoid leakage of information to sandboxed iframes. (WebCore::Document::enqueuePaintTimingEntryIfNeeded): Enqueue a paint timing entry, according to https://w3c.github.io/paint-timing/#sec-reporting-paint-timing * page/FrameView.cpp: (WebCore::FrameView::paintContents): Disable FCP fake-paint in LFC mode. * page/Page.cpp: (WebCore::Page::doAfterUpdateRendering): * page/Performance.cpp: (WebCore::Performance::getEntries const): (WebCore::Performance::getEntriesByType const): (WebCore::Performance::getEntriesByName const): (WebCore::Performance::reportFirstContentfulPaint): * page/Performance.h: Support first-contentful-paint reporting. * page/PerformanceEntry.cpp: (WebCore::PerformanceEntry::parseEntryTypeString): * page/PerformanceEntry.h: (WebCore::PerformanceEntry::isPaint const): * page/PerformanceObserver.cpp: (WebCore::PerformanceObserver::supportedEntryTypes): * page/PerformanceObserver.h: * page/PerformanceObserver.idl: * page/PerformancePaintTiming.h: Added. (isType): * page/PerformancePaintTiming.idl: Added. Add paint performance entry type. * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setPaintTimingEnabled): (WebCore::RuntimeEnabledFeatures::paintTimingEnabled const): New runtime flag for paint timing. * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::detectingContentfulPaint const): (WebCore::GraphicsContext::setContentfulPaintDetected): (WebCore::GraphicsContext::contenfulPaintDetected const): Add a flag in GraphicsContext where different render operations can report if they're contentful. * rendering/ContentfulPaintChecker.cpp: Added. (WebCore::ContentfulPaintChecker::qualifiesForContentfulPaint): * rendering/ContentfulPaintChecker.h: Added. Run a "dummy" paint of the FrameView, to detect contentful elements. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderHTMLCanvas.cpp: (WebCore::RenderHTMLCanvas::paintReplaced): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayerContents): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::paintReplaced): * rendering/TextPainter.cpp: (WebCore::TextPainter::paintTextOrEmphasisMarks): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paintReplaced): Report contentfulness when we reach anything that qualifies as contentful, based on https://w3c.github.io/paint-timing/#contentful. Source/WebKit: Add an experimental runtime flag for paint-timing (paintTimingEnabled). * Shared/WebPreferences.yaml: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPaintTimingEnabled): (WKPreferencesGetPaintTimingEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updatePreferencesStore): LayoutTests: Added tests for some first-contentful-paint (FCP) use-cases. Ensure that FCP works well with VNE (first paint delay until contents are visually non-empty). * platform/win/TestExpectations: * platform/mac-wk1/TestExpectations: Disable paint timing for WebKit1. * TestExpectations: Disable of the WPT tests. * http/tests/performance/paint-timing: Added. * http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars-expected.txt: Added. * http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars.html: Added. If VNE due to number of characters blocks painting, make sure FCP is reported only after painting is unblocked. * http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-style-expected.txt: Added. * http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-style.html: Added. If a pending stylesheet blocks painting, make sure FCP is reported only after stylesheet has loaded. * http/tests/performance/paint-timing/resources: Added. * http/tests/performance/paint-timing/resources/slowscript.php: Added. * http/tests/performance/paint-timing/resources/slowstyle.php: Added. * http/tests/performance/paint-timing/resources/style.css: Added. (body): * performance-api/paint-timing: Added. * performance-api/paint-timing/paint-timing-apis-expected.txt: Added. * performance-api/paint-timing/paint-timing-apis.html: Added. * performance-api/paint-timing/paint-timing-frames-expected.txt: Added. * performance-api/paint-timing/paint-timing-frames.html: Added. * performance-api/paint-timing/paint-timing-with-worker-expected.txt: Added. * performance-api/paint-timing/paint-timing-with-worker.html: Added. Test that FCP is not available for cross-origin frames and workers. * performance-api/paint-timing/performance-observer-first-contentful-paint-expected.txt: Added. * performance-api/paint-timing/performance-observer-first-contentful-paint.html: Added. Test that performance observers are called for FCP. * performance-api/paint-timing/resources: Added. * performance-api/paint-timing/resources/fcp-subframe.html: Added. * performance-api/paint-timing/resources/paint-api-utils.js: Added. (async waitForFCP): * performance-api/paint-timing/resources/paint-timing-api.js: Added. * performance-api/paint-timing/resources/worker.html: Added. Canonical link: https://commits.webkit.org/224044@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-28 22:34:52 +00:00
PASS successfullyParsed is true
TEST COMPLETE