Skip to content

[MQ4] Implement update media feature#15074

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
nt1m:eng/MQ4-Implement-update-media-query
Jun 17, 2023
Merged

[MQ4] Implement update media feature#15074
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
nt1m:eng/MQ4-Implement-update-media-query

Conversation

@nt1m
Copy link
Copy Markdown
Member

@nt1m nt1m commented Jun 17, 2023

777e46f

[MQ4] Implement `update` media feature
https://bugs.webkit.org/show_bug.cgi?id=180245
rdar://35799713

Reviewed by Darin Adler.

From https://drafts.csswg.org/mediaqueries/#update :
The update media feature is used to query the ability of the output device to modify the appearance of content once it has been rendered. It accepts the following values:

- none
Once it has been rendered, the layout can no longer be updated. Example: documents printed on paper.
- slow
The layout may change dynamically according to the usual rules of CSS, but the output device is not able to render or display changes quickly enough for them to be perceived as a smooth animation. Example: E-ink screens or severely under-powered devices.
- fast
The layout may change dynamically according to the usual rules of CSS, and the output device is not unusually constrained in speed, so regularly-updating things like CSS Animations can be used. Example: computer screens.

This is part of Interop 2023.

Also update overflow-block: paged to match on print mediums.

* LayoutTests/fast/css/media-query-overflow-block-paged-print-expected.html: Added.
* LayoutTests/fast/css/media-query-overflow-block-paged-print.html: Added.
* LayoutTests/fast/css/media-query-update-none-expected.html: Added.
* LayoutTests/fast/css/media-query-update-none.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/mediaqueries/test_media_queries-expected.txt:
* Source/WebCore/css/query/MediaQueryFeatures.cpp:
(WebCore::MQ::Features::update):
(WebCore::MQ::Features::overflowBlock):
* Source/WebCore/css/query/MediaQueryFeatures.h:

Canonical link: https://commits.webkit.org/265277@main

8f6eb5c

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🛠 gtk
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🧪 gtk-wk2
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🧪 api-gtk
✅ 🛠 tv 🧪 mac-AS-debug-wk2
✅ 🛠 tv-sim ✅ 🧪 mac-wk2-stress
✅ 🛠 🧪 merge ✅ 🛠 watch
✅ 🛠 watch-sim

@nt1m nt1m self-assigned this Jun 17, 2023
@nt1m nt1m added the CSS Cascading Style Sheets implementation label Jun 17, 2023
@nt1m nt1m requested review from anttijk, darinadler and weinig June 17, 2023 19:03
@nt1m nt1m changed the title [MQ4] Implement update media query [MQ4] Implement update media feature Jun 17, 2023
@nt1m nt1m force-pushed the eng/MQ4-Implement-update-media-query branch from 010ee0f to 5ee46d4 Compare June 17, 2023 20:13
@nt1m nt1m requested a review from heycam June 17, 2023 21:00
@nt1m nt1m force-pushed the eng/MQ4-Implement-update-media-query branch from 5ee46d4 to 8f6eb5c Compare June 17, 2023 21:01
@nt1m nt1m added the merge-queue Applied to send a pull request to merge-queue label Jun 17, 2023
https://bugs.webkit.org/show_bug.cgi?id=180245
rdar://35799713

Reviewed by Darin Adler.

From https://drafts.csswg.org/mediaqueries/#update :
The update media feature is used to query the ability of the output device to modify the appearance of content once it has been rendered. It accepts the following values:

- none
Once it has been rendered, the layout can no longer be updated. Example: documents printed on paper.
- slow
The layout may change dynamically according to the usual rules of CSS, but the output device is not able to render or display changes quickly enough for them to be perceived as a smooth animation. Example: E-ink screens or severely under-powered devices.
- fast
The layout may change dynamically according to the usual rules of CSS, and the output device is not unusually constrained in speed, so regularly-updating things like CSS Animations can be used. Example: computer screens.

This is part of Interop 2023.

Also update overflow-block: paged to match on print mediums.

* LayoutTests/fast/css/media-query-overflow-block-paged-print-expected.html: Added.
* LayoutTests/fast/css/media-query-overflow-block-paged-print.html: Added.
* LayoutTests/fast/css/media-query-update-none-expected.html: Added.
* LayoutTests/fast/css/media-query-update-none.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/mediaqueries/test_media_queries-expected.txt:
* Source/WebCore/css/query/MediaQueryFeatures.cpp:
(WebCore::MQ::Features::update):
(WebCore::MQ::Features::overflowBlock):
* Source/WebCore/css/query/MediaQueryFeatures.h:

Canonical link: https://commits.webkit.org/265277@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/MQ4-Implement-update-media-query branch from 8f6eb5c to 777e46f Compare June 17, 2023 22:46
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 265277@main (777e46f): https://commits.webkit.org/265277@main

Reviewed commits have been landed. Closing PR #15074 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 777e46f into WebKit:main Jun 17, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 17, 2023
@nt1m nt1m deleted the eng/MQ4-Implement-update-media-query branch June 17, 2023 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CSS Cascading Style Sheets implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants