Skip to content

Enable viewport <meta> tag support for mobile platforms only#39133

Merged
jdm merged 1 commit intoservo:mainfrom
shubhamg13:viewport_meta_flag
Sep 4, 2025
Merged

Enable viewport <meta> tag support for mobile platforms only#39133
jdm merged 1 commit intoservo:mainfrom
shubhamg13:viewport_meta_flag

Conversation

@shubhamg13
Copy link
Copy Markdown
Member

@shubhamg13 shubhamg13 commented Sep 4, 2025

Enable viewport <meta> tag support for mobile platforms only.

Reference: web_preferences.h
Todo: Disable for when requested desktop site: web_contents_impl.cc

Testing: Tested Manually
Fixes: #39002

@shubhamg13 shubhamg13 requested a review from gterzian as a code owner September 4, 2025 09:49
@mrobinson
Copy link
Copy Markdown
Member

Instead of a preference, I think this should be automatically enabled for OHOS and Android the same way this works in Chromium. I think we need to avoid having a proliferation of configuration options that must be set carefully by embedders. Instead Servo should work correctly out of the box.

An exception exists for this would be if this needs to be disabled for OHOS.

@shubhamg13 shubhamg13 changed the title prefs: Add prefs for viewport meta tag, enable it for mobile platforms. Enable viewport <meta> tag parsing for mobile platforms only. Sep 4, 2025
@shubhamg13 shubhamg13 changed the title Enable viewport <meta> tag parsing for mobile platforms only. Enable viewport <meta> tag support for mobile platforms only. Sep 4, 2025
@shubhamg13
Copy link
Copy Markdown
Member Author

cc: @xiaochengh

@shubhamg13
Copy link
Copy Markdown
Member Author

Instead of a preference, I think this should be automatically enabled for OHOS and Android the same way this works in Chromium. I think we need to avoid having a proliferation of configuration options that must be set carefully by embedders. Instead Servo should work correctly out of the box.

An exception exists for this would be if this needs to be disabled for OHOS.

Please take a look now.

@mrobinson mrobinson changed the title Enable viewport <meta> tag support for mobile platforms only. Enable viewport <meta> tag support for mobile platforms only Sep 4, 2025
Copy link
Copy Markdown
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

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

Thank you!

@mrobinson mrobinson added this pull request to the merge queue Sep 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 4, 2025
@jdm jdm added this pull request to the merge queue Sep 4, 2025
Merged via the queue into servo:main with commit 40ced5b Sep 4, 2025
24 checks passed
@shubhamg13 shubhamg13 deleted the viewport_meta_flag branch September 5, 2025 01:50
shubhamg13 added a commit to shubhamg13/servo that referenced this pull request Sep 8, 2025
shubhamg13 added a commit to shubhamg13/servo that referenced this pull request Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<meta name=viewport> is applied when it shouldn't

3 participants