Skip to content

[Style] Remove more duplicated code by sharing conversion code for all Style::LengthWrapperBase subclasses #47097

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

Conversation

weinig
Copy link
Contributor

@weinig weinig commented Jun 24, 2025

e8c43a9

[Style] Remove more duplicated code by sharing conversion code for all Style::LengthWrapperBase subclasses
https://bugs.webkit.org/show_bug.cgi?id=294879

Reviewed by Darin Adler.

Replace type specific CSSValueConversion specialization for with Style::LengthWrapperBase
subclasses with a single generic implementation that checks for supported flag values.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/rendering/RenderTheme.cpp:
* Source/WebCore/style/StyleBuilderConverter.h:
* Source/WebCore/style/values/box/StyleMargin.cpp: Removed.
* Source/WebCore/style/values/box/StyleMargin.h:
* Source/WebCore/style/values/box/StylePadding.cpp: Removed.
* Source/WebCore/style/values/box/StylePadding.h:
* Source/WebCore/style/values/flexbox/StyleFlexBasis.cpp:
* Source/WebCore/style/values/flexbox/StyleFlexBasis.h:
* Source/WebCore/style/values/motion/StyleOffsetDistance.cpp: Removed.
* Source/WebCore/style/values/motion/StyleOffsetDistance.h:
* Source/WebCore/style/values/position/StyleInset.cpp: Removed.
* Source/WebCore/style/values/position/StyleInset.h:
* Source/WebCore/style/values/primitives/StyleLengthWrapper+CSSValueConversion.h: Added.
* Source/WebCore/style/values/scroll-snap/StyleScrollPadding.cpp:
* Source/WebCore/style/values/scroll-snap/StyleScrollPadding.h:
* Source/WebCore/style/values/sizing/StyleMaximumSize.cpp: Removed.
* Source/WebCore/style/values/sizing/StyleMaximumSize.h:
* Source/WebCore/style/values/sizing/StyleMinimumSize.cpp: Removed.
* Source/WebCore/style/values/sizing/StyleMinimumSize.h:
* Source/WebCore/style/values/sizing/StylePreferredSize.cpp:
* Source/WebCore/style/values/sizing/StylePreferredSize.h:
* Source/WebCore/style/values/svg/StyleSVGPaint.cpp:

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

9bf5e85

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
❌ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision 🧪 mac-AS-debug-wk2 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@weinig weinig self-assigned this Jun 24, 2025
@weinig weinig added the CSS Cascading Style Sheets implementation label Jun 24, 2025
@webkit-early-warning-system

This comment was marked as outdated.

@weinig weinig changed the title [Style] [Style] Remove more duplicated code by sharing conversion code for all Style::LengthWrapperBase subclasses Jun 24, 2025
@weinig weinig force-pushed the eng/share-length-conversion-for-length-wrappers branch from 06b502a to a89c17e Compare June 24, 2025 03:03
@webkit-early-warning-system

This comment was marked as outdated.

@weinig weinig requested review from anttijk and darinadler and removed request for anttijk June 24, 2025 03:05
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 24, 2025
@webkit-ews-buildbot

This comment was marked as outdated.

@weinig weinig removed the merging-blocked Applied to prevent a change from being merged label Jun 24, 2025
@weinig weinig force-pushed the eng/share-length-conversion-for-length-wrappers branch from a89c17e to 8121876 Compare June 24, 2025 13:25
@weinig weinig marked this pull request as ready for review June 24, 2025 13:46
@webkit-ews-buildbot

This comment was marked as outdated.

@weinig weinig force-pushed the eng/share-length-conversion-for-length-wrappers branch from 8121876 to 9bf5e85 Compare June 24, 2025 15:35
@weinig weinig added the merge-queue Applied to send a pull request to merge-queue label Jun 24, 2025
…l Style::LengthWrapperBase subclasses

https://bugs.webkit.org/show_bug.cgi?id=294879

Reviewed by Darin Adler.

Replace type specific CSSValueConversion specialization for with Style::LengthWrapperBase
subclasses with a single generic implementation that checks for supported flag values.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/rendering/RenderTheme.cpp:
* Source/WebCore/style/StyleBuilderConverter.h:
* Source/WebCore/style/values/box/StyleMargin.cpp: Removed.
* Source/WebCore/style/values/box/StyleMargin.h:
* Source/WebCore/style/values/box/StylePadding.cpp: Removed.
* Source/WebCore/style/values/box/StylePadding.h:
* Source/WebCore/style/values/flexbox/StyleFlexBasis.cpp:
* Source/WebCore/style/values/flexbox/StyleFlexBasis.h:
* Source/WebCore/style/values/motion/StyleOffsetDistance.cpp: Removed.
* Source/WebCore/style/values/motion/StyleOffsetDistance.h:
* Source/WebCore/style/values/position/StyleInset.cpp: Removed.
* Source/WebCore/style/values/position/StyleInset.h:
* Source/WebCore/style/values/primitives/StyleLengthWrapper+CSSValueConversion.h: Added.
* Source/WebCore/style/values/scroll-snap/StyleScrollPadding.cpp:
* Source/WebCore/style/values/scroll-snap/StyleScrollPadding.h:
* Source/WebCore/style/values/sizing/StyleMaximumSize.cpp: Removed.
* Source/WebCore/style/values/sizing/StyleMaximumSize.h:
* Source/WebCore/style/values/sizing/StyleMinimumSize.cpp: Removed.
* Source/WebCore/style/values/sizing/StyleMinimumSize.h:
* Source/WebCore/style/values/sizing/StylePreferredSize.cpp:
* Source/WebCore/style/values/sizing/StylePreferredSize.h:
* Source/WebCore/style/values/svg/StyleSVGPaint.cpp:

Canonical link: https://commits.webkit.org/296572@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/share-length-conversion-for-length-wrappers branch from 9bf5e85 to e8c43a9 Compare June 24, 2025 16:40
@webkit-commit-queue
Copy link
Collaborator

Committed 296572@main (e8c43a9): https://commits.webkit.org/296572@main

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

@webkit-commit-queue webkit-commit-queue merged commit e8c43a9 into WebKit:main Jun 24, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 24, 2025
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