Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[view-transitions] Create renderers for pseudo-elements #21205

Merged

Conversation

nt1m
Copy link
Member

@nt1m nt1m commented Dec 2, 2023

5d7c3bb

[view-transitions] Create renderers for pseudo-elements
https://bugs.webkit.org/show_bug.cgi?id=265168
rdar://118667022

Reviewed by Antti Koivisto.

Use the named elements map as input to build the pseudo element tree.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/dom/ViewTransition.h:
(WebCore::OrderedNamedElementsMap::isEmpty const):
* Source/WebCore/rendering/RenderView.cpp:
(WebCore::RenderView::viewTransitionRoot const):
(WebCore::RenderView::setViewTransitionRoot):
* Source/WebCore/rendering/RenderView.h:
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/RenderStyleInlines.h:
(WebCore::RenderStyle::functionalPseudoElementArgument const):
* Source/WebCore/rendering/style/RenderStyleSetters.h:
(WebCore::RenderStyle::setFunctionalPseudoElementArgument):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.h:
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::RenderTreeUpdater):
(WebCore::RenderTreeUpdater::updateAfterDescendants):
* Source/WebCore/rendering/updating/RenderTreeUpdater.h:
(WebCore::RenderTreeUpdater::viewTransition):
* Source/WebCore/rendering/updating/RenderTreeUpdaterViewTransition.cpp: Added.
(WebCore::RenderTreeUpdater::ViewTransition::ViewTransition):
(WebCore::RenderTreeUpdater::ViewTransition::updatePseudoElementTree):
(WebCore::RenderTreeUpdater::ViewTransition::buildPseudoElementGroup):
(WebCore::RenderTreeUpdater::ViewTransition::updatePseudoElementGroup):
* Source/WebCore/rendering/updating/RenderTreeUpdaterViewTransition.h: Added.
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::styleForPseudoElement):

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

3ba2672

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 βœ… πŸ§ͺ api-wpe
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ›  gtk
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2   πŸ§ͺ gtk-wk2
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ§ͺ api-gtk
  πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
  πŸ›  watch-sim

@nt1m nt1m self-assigned this Dec 2, 2023
@nt1m nt1m added the Layout and Rendering For bugs with layout and rendering of Web pages. label Dec 2, 2023
@nt1m nt1m changed the title [view-transitions] [view-transitions] Create renderers for pseudo-elements Dec 2, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Dec 2, 2023
@nt1m nt1m removed the merging-blocked Applied to prevent a change from being merged label Dec 2, 2023
@nt1m nt1m force-pushed the eng/view-transition-pseudo-elements branch from 029cd94 to d3bc15f Compare December 2, 2023 21:42
@nt1m nt1m force-pushed the eng/view-transition-pseudo-elements branch from d3bc15f to dcaa726 Compare December 2, 2023 21:44
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Dec 2, 2023
@nt1m nt1m removed the merging-blocked Applied to prevent a change from being merged label Dec 3, 2023
@nt1m nt1m force-pushed the eng/view-transition-pseudo-elements branch from dcaa726 to 855abc2 Compare December 3, 2023 10:55
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Dec 3, 2023
@nt1m nt1m removed the merging-blocked Applied to prevent a change from being merged label Dec 3, 2023
@nt1m nt1m force-pushed the eng/view-transition-pseudo-elements branch from 855abc2 to b1fe042 Compare December 3, 2023 20:50
@nt1m nt1m force-pushed the eng/view-transition-pseudo-elements branch from b1fe042 to 00b8069 Compare December 3, 2023 20:52
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Dec 3, 2023
@nt1m nt1m removed the merging-blocked Applied to prevent a change from being merged label Dec 3, 2023
@nt1m nt1m force-pushed the eng/view-transition-pseudo-elements branch from 00b8069 to b44c397 Compare December 3, 2023 23:12
@nt1m nt1m force-pushed the eng/view-transition-pseudo-elements branch from b44c397 to 59c12fb Compare December 4, 2023 02:10
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Dec 4, 2023
@nt1m nt1m force-pushed the eng/view-transition-pseudo-elements branch from af2f08f to 2aac209 Compare January 17, 2024 07:51
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jan 17, 2024
Source/WebCore/rendering/style/RenderStyleInlines.h Outdated Show resolved Hide resolved
Source/WebCore/rendering/style/RenderStyleSetters.h Outdated Show resolved Hide resolved

// The contents and ordering of the named elements map should remain stable during the duration of the transition.
// We should only need to handle changes in the `display` CSS property by recreating / deleting renderers as needed.
void RenderTreeUpdater::ViewTransition::updatePseudoElementTree(RenderElement& documentElementRenderer)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a good test coverage for mutations? You should ensure these pseudo elements are added to the fuzzers soon.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WPTs cover mutations to some extent, but right now proper rendering test coverage can't be done until we hook this up to animation timing because pseudo-elements won't appear for long enough (this is what I'm planning to look into next).

@nt1m nt1m removed the merging-blocked Applied to prevent a change from being merged label Jan 22, 2024
@nt1m nt1m force-pushed the eng/view-transition-pseudo-elements branch from 2aac209 to 12c13b1 Compare January 22, 2024 20:26
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jan 22, 2024
@nt1m nt1m removed the merging-blocked Applied to prevent a change from being merged label Jan 22, 2024
@nt1m nt1m force-pushed the eng/view-transition-pseudo-elements branch from 12c13b1 to e3af7cd Compare January 22, 2024 20:58
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jan 22, 2024
@nt1m nt1m removed the merging-blocked Applied to prevent a change from being merged label Jan 22, 2024
@nt1m nt1m force-pushed the eng/view-transition-pseudo-elements branch from e3af7cd to 90c4be6 Compare January 22, 2024 22:17
@nt1m nt1m force-pushed the eng/view-transition-pseudo-elements branch from 90c4be6 to d8f1e9a Compare January 22, 2024 22:31
@nt1m nt1m force-pushed the eng/view-transition-pseudo-elements branch from d8f1e9a to 3ba2672 Compare January 22, 2024 22:44
@nt1m nt1m added safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks merge-queue Applied to send a pull request to merge-queue labels Jan 22, 2024
https://bugs.webkit.org/show_bug.cgi?id=265168
rdar://118667022

Reviewed by Antti Koivisto.

Use the named elements map as input to build the pseudo element tree.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/dom/ViewTransition.h:
(WebCore::OrderedNamedElementsMap::isEmpty const):
* Source/WebCore/rendering/RenderView.cpp:
(WebCore::RenderView::viewTransitionRoot const):
(WebCore::RenderView::setViewTransitionRoot):
* Source/WebCore/rendering/RenderView.h:
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/RenderStyleInlines.h:
(WebCore::RenderStyle::functionalPseudoElementArgument const):
* Source/WebCore/rendering/style/RenderStyleSetters.h:
(WebCore::RenderStyle::setFunctionalPseudoElementArgument):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.h:
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::RenderTreeUpdater):
(WebCore::RenderTreeUpdater::updateAfterDescendants):
* Source/WebCore/rendering/updating/RenderTreeUpdater.h:
(WebCore::RenderTreeUpdater::viewTransition):
* Source/WebCore/rendering/updating/RenderTreeUpdaterViewTransition.cpp: Added.
(WebCore::RenderTreeUpdater::ViewTransition::ViewTransition):
(WebCore::RenderTreeUpdater::ViewTransition::updatePseudoElementTree):
(WebCore::RenderTreeUpdater::ViewTransition::buildPseudoElementGroup):
(WebCore::RenderTreeUpdater::ViewTransition::updatePseudoElementGroup):
* Source/WebCore/rendering/updating/RenderTreeUpdaterViewTransition.h: Added.
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::styleForPseudoElement):

Canonical link: https://commits.webkit.org/273336@main
@webkit-commit-queue
Copy link
Collaborator

Committed 273336@main (5d7c3bb): https://commits.webkit.org/273336@main

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

@webkit-commit-queue webkit-commit-queue merged commit 5d7c3bb into WebKit:main Jan 23, 2024
@webkit-commit-queue webkit-commit-queue removed merge-queue Applied to send a pull request to merge-queue safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks labels Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layout and Rendering For bugs with layout and rendering of Web pages.
Projects
None yet
7 participants