-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
Viewport Protection site setting #2175
Conversation
+ | ||
+ if (settings->AllowViewportChange(false)) { | ||
+ if (page->PageWidthOverride() == 0) { | ||
+ page->SetPageWidthOverride(base::RandInt(-5, 15)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is where the random scale is decided.
the factor I have set for now is -5% to +15% compared to the current size.
we probably need to check if it is a correct range.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-5
was too annoying, I changed to -3 ... +15
with a factor of 10
I think i finished the patch, let me know if you find it interesting. |
Does this mitigation supersede any pre-existing one? If it is ready you can remove draft status. |
boring little thing that i noticed.
aaaaaa, it came to my mind now. |
fix incorrect site setting value at startup remove code from visual_viewport remove devicePixelRatio override
there was no need, the value was in blink |
sorry if i keep changing the patch status. |
some quick updates.
I checked this too. unfortunately not, at least not as I thought. |
Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
fix incorrect site setting value at startup remove code from visual_viewport remove devicePixelRatio override
…into viewport-protection
I close this one and do another one, I messed with the rebase ... |
Description
this is the patch I was talking about in #2128 but that I haven't tried on a real device yet.
this is a second version, much more simplified than a first draft which operated at a lower level, but which I deleted because it was too complex.
basically the idea is to change the size of the viewport on each page by exploiting the override of the
initial-scale
metatag with a site setting that allows you to select any exceptions.in parallel, the patch acts on the information of the screen and on the
device-width
of the css.All submissions
Format
Subject: Alternative cache (NIK-based)
->Alternative-cache-NIK-based.patch
)