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

[CSS Fonts] font-size-adjust adopts ValueType and isNone(). #18833

Merged

Conversation

shivamidow
Copy link
Member

@shivamidow shivamidow commented Oct 9, 2023

cfb2009

[CSS Fonts] font-size-adjust adopts ValueType and isNone().
https://bugs.webkit.org/show_bug.cgi?id=262882

Reviewed by Tim Nguyen.

To improve code readability, this change replaces a boolean with an enum class,
which represents the from-font value type of FontSizeAdjust. In addition, this
patch changes the boolean operator of FontSizeAdjust to an explicit method name
called isNone() as a follow-up of 269041@main [1].

[1] https://commits.webkit.org/269041@main

* Source/WebCore/animation/CSSPropertyAnimation.cpp:
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::fontSizeAdjustFromStyle):
(WebCore::fontShorthandValue):
* Source/WebCore/platform/graphics/FontCascadeCache.h:
(WebCore::FontDescriptionKey::FontDescriptionKey):
* Source/WebCore/platform/graphics/FontCascadeFonts.h:
(WebCore::FontCascadeFonts::primaryFont):
* Source/WebCore/platform/graphics/FontSizeAdjust.h:
(WebCore::FontSizeAdjust::isNone const):
(WebCore::FontSizeAdjust::isFromFont const):
(WebCore::add):
(WebCore::operator<<):
(WebCore::FontSizeAdjust::operator bool const): Deleted.
* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertFontSizeAdjust):

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

b268180

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

@shivamidow shivamidow self-assigned this Oct 9, 2023
@shivamidow shivamidow added the CSS Cascading Style Sheets implementation label Oct 9, 2023
@shivamidow shivamidow requested a review from nt1m October 9, 2023 12:57
@shivamidow shivamidow force-pushed the eng/font-size-adjust-value-type branch from a2cbbc7 to d7d675d Compare October 9, 2023 18:41
@shivamidow
Copy link
Member Author

shivamidow commented Oct 9, 2023

A merge-conflict fixed since 269084@main

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Oct 9, 2023
@shivamidow shivamidow removed the merging-blocked Applied to prevent a change from being merged label Oct 9, 2023
@shivamidow shivamidow force-pushed the eng/font-size-adjust-value-type branch from d7d675d to b268180 Compare October 9, 2023 19:09
@nt1m nt1m added the safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks label Oct 9, 2023
@webkit-ews-buildbot webkit-ews-buildbot added merge-queue Applied to send a pull request to merge-queue and removed safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks labels Oct 10, 2023
https://bugs.webkit.org/show_bug.cgi?id=262882

Reviewed by Tim Nguyen.

To improve code readability, this change replaces a boolean with an enum class,
which represents the from-font value type of FontSizeAdjust. In addition, this
patch changes the boolean operator of FontSizeAdjust to an explicit method name
called isNone() as a follow-up of 269041@main [1].

[1] https://commits.webkit.org/269041@main

* Source/WebCore/animation/CSSPropertyAnimation.cpp:
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::fontSizeAdjustFromStyle):
(WebCore::fontShorthandValue):
* Source/WebCore/platform/graphics/FontCascadeCache.h:
(WebCore::FontDescriptionKey::FontDescriptionKey):
* Source/WebCore/platform/graphics/FontCascadeFonts.h:
(WebCore::FontCascadeFonts::primaryFont):
* Source/WebCore/platform/graphics/FontSizeAdjust.h:
(WebCore::FontSizeAdjust::isNone const):
(WebCore::FontSizeAdjust::isFromFont const):
(WebCore::add):
(WebCore::operator<<):
(WebCore::FontSizeAdjust::operator bool const): Deleted.
* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertFontSizeAdjust):

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

Committed 269124@main (cfb2009): https://commits.webkit.org/269124@main

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

@webkit-commit-queue webkit-commit-queue merged commit cfb2009 into WebKit:main Oct 10, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Oct 10, 2023
@shivamidow shivamidow deleted the eng/font-size-adjust-value-type branch October 10, 2023 14:04
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
5 participants