Skip to content

fixup: Enable viewport <meta> tag support for mobile platforms only#39207

Merged
mukilan merged 5 commits intoservo:mainfrom
shubhamg13:viewport_support
Sep 11, 2025
Merged

fixup: Enable viewport <meta> tag support for mobile platforms only#39207
mukilan merged 5 commits intoservo:mainfrom
shubhamg13:viewport_support

Conversation

@shubhamg13
Copy link
Copy Markdown
Member

@shubhamg13 shubhamg13 commented Sep 8, 2025

  1. Adds a pref viewport_meta_enabled.
  2. Enable pref for mobile platforms.

Testing: Tested Manually
Fixes: #39157
Fixes: #39002

@shubhamg13 shubhamg13 force-pushed the viewport_support branch 2 times, most recently from f7fde81 to c6d4bb4 Compare September 8, 2025 14:05
@shubhamg13 shubhamg13 force-pushed the viewport_support branch 2 times, most recently from 604c277 to 29a7182 Compare September 8, 2025 14:23
@shubhamg13
Copy link
Copy Markdown
Member Author

cc: @xiaochengh

@shubhamg13 shubhamg13 marked this pull request as draft September 8, 2025 14:24
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 9, 2025
@shubhamg13 shubhamg13 marked this pull request as ready for review September 9, 2025 06:53
@shubhamg13 shubhamg13 force-pushed the viewport_support branch 3 times, most recently from 5d38716 to d0711c7 Compare September 9, 2025 14:38
// If the window is taller than it is wide, we need to enable the viewport meta tag.
// TODO: This is a hack to enable the viewport meta tag for mobile devices like PinePhone
// We should find a better way to do this.
if window.window_rect().size().height > window.window_rect().size().width {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree with the comment here. This port is for desktops, so I don't think we should do this. The ports/embedders can always set the preference either using the API or the CLI if needed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

@mukilan mukilan added this pull request to the merge queue Sep 11, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 11, 2025
@mukilan mukilan added this pull request to the merge queue Sep 11, 2025
Merged via the queue into servo:main with commit dfdcba8 Sep 11, 2025
22 checks passed
@shubhamg13 shubhamg13 deleted the viewport_support branch September 12, 2025 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

viewport support should not be tied to the build toolchain <meta name=viewport> is applied when it shouldn't

3 participants