Skip to content

Store display: none RenderStyle objects - #22902

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
graouts:cache-display-none-render-style
Jan 22, 2024
Merged

webkit-commit-queue merged 1 commit into
WebKit:mainfrom
graouts:cache-display-none-render-style

Conversation

@graouts

@graouts graouts commented Jan 18, 2024 •

Copy link
Copy Markdown
Contributor

519c7ed

Store `display: none` RenderStyle objects
https://bugs.webkit.org/show_bug.cgi?id=267683

Reviewed by Antti Koivisto.

We currently store `display: contents` RenderStyle objects on Element. In order to implement support
for animating the `display` property, we need to also store styles in the `display: none` case so that
we may return such stored styles in `Element::existingComputedStyle()`.

* Source/WebCore/dom/Element.cpp:
(WebCore::Element::hasDisplayContents const):
(WebCore::Element::hasDisplayNone const):
(WebCore::Element::storeDisplayContentsOrNoneStyle):
(WebCore::Element::clearDisplayContentsOrNoneStyle):
(WebCore::Element::existingComputedStyle const):
(WebCore::Element::renderOrDisplayContentsStyle const):
(WebCore::Element::resetComputedStyle):
(WebCore::Element::storeDisplayContentsStyle): Deleted.
(WebCore::Element::clearDisplayContentsStyle): Deleted.
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/ElementRareData.h:
(WebCore::ElementRareData::displayContentsOrNoneStyle const):
(WebCore::ElementRareData::setDisplayContentsOrNoneStyle):
(WebCore::ElementRareData::useTypes const):
(WebCore::ElementRareData::displayContentsStyle const): Deleted.
(WebCore::ElementRareData::setDisplayContentsStyle): Deleted.
* Source/WebCore/dom/Node.cpp:
(WebCore::stringForRareDataUseType):
* Source/WebCore/dom/NodeRareData.h:
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):
* Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):

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

d548301

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
✅ 🛠 watch
✅ 🛠 🧪 unsafe-merge ✅ 🛠 watch-sim

@graouts
graouts requested review from cdumez and rniwa as code owners January 18, 2024 10:59
@graouts
graouts force-pushed the cache-display-none-render-style branch from ee45733 to d4f7f3e Compare January 18, 2024 10:59
@graouts graouts self-assigned this Jan 18, 2024
@graouts graouts added the CSS Cascading Style Sheets implementation label Jan 18, 2024
@graouts
graouts requested a review from anttijk January 18, 2024 11:02
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jan 18, 2024
Comment thread Source/WebCore/dom/ElementRareData.h Resolved
@graouts
graouts force-pushed the cache-display-none-render-style branch from d4f7f3e to 1fdcb0d Compare January 18, 2024 15:43
@graouts graouts removed the merging-blocked Applied to prevent a change from being merged label Jan 18, 2024
@graouts
graouts force-pushed the cache-display-none-render-style branch from 1fdcb0d to 47df261 Compare January 18, 2024 15:52
@graouts
graouts requested a review from anttijk January 18, 2024 16:51
Comment thread Source/WebCore/dom/Element.cpp Resolved
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jan 18, 2024
@graouts
graouts force-pushed the cache-display-none-render-style branch from 47df261 to 153067a Compare January 19, 2024 14:03
@graouts graouts removed the merging-blocked Applied to prevent a change from being merged label Jan 19, 2024
@graouts
graouts force-pushed the cache-display-none-render-style branch from 153067a to 4e8cf7f Compare January 19, 2024 14:10
@graouts
graouts force-pushed the cache-display-none-render-style branch from 4e8cf7f to 2b10bba Compare January 19, 2024 14:20
@graouts
graouts force-pushed the cache-display-none-render-style branch from 2b10bba to d548301 Compare January 19, 2024 15:32
@graouts graouts added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 22, 2024
https://bugs.webkit.org/show_bug.cgi?id=267683

Reviewed by Antti Koivisto.

We currently store `display: contents` RenderStyle objects on Element. In order to implement support
for animating the `display` property, we need to also store styles in the `display: none` case so that
we may return such stored styles in `Element::existingComputedStyle()`.

* Source/WebCore/dom/Element.cpp:
(WebCore::Element::hasDisplayContents const):
(WebCore::Element::hasDisplayNone const):
(WebCore::Element::storeDisplayContentsOrNoneStyle):
(WebCore::Element::clearDisplayContentsOrNoneStyle):
(WebCore::Element::existingComputedStyle const):
(WebCore::Element::renderOrDisplayContentsStyle const):
(WebCore::Element::resetComputedStyle):
(WebCore::Element::storeDisplayContentsStyle): Deleted.
(WebCore::Element::clearDisplayContentsStyle): Deleted.
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/ElementRareData.h:
(WebCore::ElementRareData::displayContentsOrNoneStyle const):
(WebCore::ElementRareData::setDisplayContentsOrNoneStyle):
(WebCore::ElementRareData::useTypes const):
(WebCore::ElementRareData::displayContentsStyle const): Deleted.
(WebCore::ElementRareData::setDisplayContentsStyle): Deleted.
* Source/WebCore/dom/Node.cpp:
(WebCore::stringForRareDataUseType):
* Source/WebCore/dom/NodeRareData.h:
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):
* Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):

Canonical link: https://commits.webkit.org/273288@main
@webkit-commit-queue
webkit-commit-queue force-pushed the cache-display-none-render-style branch from d548301 to 519c7ed Compare January 22, 2024 07:53
@webkit-commit-queue

Copy link
Copy Markdown
Collaborator

Committed 273288@main (519c7ed): https://commits.webkit.org/273288@main

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

@webkit-commit-queue
webkit-commit-queue merged commit 519c7ed into WebKit:main Jan 22, 2024
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 22, 2024
@graouts
graouts deleted the cache-display-none-render-style branch January 22, 2024 07:56
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.

5 participants