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

Web Inspector: Improve selectors to change title area height #28287

Merged

Conversation

aperezdc
Copy link
Contributor

@aperezdc aperezdc commented May 8, 2024

2cc44d1

Web Inspector: Improve selectors to change title area height
https://bugs.webkit.org/show_bug.cgi?id=255585

Reviewed by Devin Rousso.

Use only :is selectors to match MacOS and apply the non-zero title area
height. The conditions expressed this way in CSS are easier to reason
about when comparing them to the WI.undockedTitleAreaHeight() function.

Improvement suggested by Devin Rousso.

* Source/WebInspectorUI/UserInterface/Views/Variables.css:
(&:is(.mac-platform.monterey, .mac-platform.big-sur):not(.docked)):
(&:is(.mac-platform.catalina):not(.docked)):
(&:is(.mac-platform):not(.mac-platform.monterey, .mac-platform.big-sur):not(.docked)): Deleted.

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

c5a5d17

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

@aperezdc aperezdc self-assigned this May 8, 2024
@aperezdc aperezdc added the Web Inspector Bugs related to the WebKit Web Inspector. label May 8, 2024
@aperezdc
Copy link
Contributor Author

aperezdc commented May 8, 2024

FWIW, this is the follow-up of #28170

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 8, 2024
Copy link
Member

@dcrousso dcrousso left a comment

Choose a reason for hiding this comment

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

thanks for fixing! :)


&:is(.mac-platform.monterey, .mac-platform.big-sur):not(.docked) {
/* keep in sync with `WI.undockedTitleAreaHeight` */
--undocked-title-area-height: calc(27px / var(--zoom-factor));
}

&:is(.mac-platform.catalina, .mac-platform.mojave):not(.docked) {
Copy link
Member

Choose a reason for hiding this comment

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

support for macOS 10.14 Mojave was dropped in 242418@main

we can/should also remove the reference to it in WI.undockedTitleAreaHeight

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept the selector for Mojave because it's still taken into account in WI.undockedTitleAreaHeight() but indeed it is no longer generated from InspectorFrontendHost::platformVersionName()—I'll remove it.

Also: How about another follow-up to remove the Mojave case in WI.undockedTitleAreaHeight()? 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also: How about another follow-up to remove the Mojave case in WI.undockedTitleAreaHeight()? 😉

Follow-up here: #28331

@aperezdc aperezdc removed the merging-blocked Applied to prevent a change from being merged label May 9, 2024
@aperezdc aperezdc force-pushed the inspector-topbar-fix-followup branch from 4090d04 to c5a5d17 Compare May 9, 2024 09:02
@aperezdc aperezdc added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label May 9, 2024
https://bugs.webkit.org/show_bug.cgi?id=255585

Reviewed by Devin Rousso.

Use only :is selectors to match MacOS and apply the non-zero title area
height. The conditions expressed this way in CSS are easier to reason
about when comparing them to the WI.undockedTitleAreaHeight() function.

Improvement suggested by Devin Rousso.

* Source/WebInspectorUI/UserInterface/Views/Variables.css:
(&:is(.mac-platform.monterey, .mac-platform.big-sur):not(.docked)):
(&:is(.mac-platform.catalina):not(.docked)):
(&:is(.mac-platform):not(.mac-platform.monterey, .mac-platform.big-sur):not(.docked)): Deleted.

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

Committed 278552@main (2cc44d1): https://commits.webkit.org/278552@main

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

@webkit-commit-queue webkit-commit-queue merged commit 2cc44d1 into WebKit:main May 9, 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 May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Web Inspector Bugs related to the WebKit Web Inspector.
Projects
None yet
5 participants