mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
d243910c35
The relevant definition in the spec; https://drafts.csswg.org/css-device-adapt/#min-scale-max-scale Before this change, if both of initial-scale and maximum-scale are negative, both values are clamped to 0.25. Whereas with this change, negative scale values are treated as if it's not specified so that initial-scale value is automatically calculated based on the layout viewport size. negative-initial-and-maximum-scale.html is a test case for the case. Also with this change, initial-scale values are going to be clamped to the range [0.25, 10] during parsing it so that initial-scale-0.html and initial-scale-100.html need to be modified, now the former is scaled by 0.25x, the latter is scaled by 10x. (Before this change, initial-scale=0 and initial-scale=100 were treated as invalid scale values in nsViewportInfo::ConstrainViewportValues[1]) [1] https://searchfox.org/mozilla-central/rev/6c9f60f8cc064a1005cd8141ecd526578ae9da7a/dom/base/nsViewportInfo.cpp#15,19 Differential Revision: https://phabricator.services.mozilla.com/D32098 --HG-- extra : moz-landing-system : lando
25 lines
382 B
HTML
25 lines
382 B
HTML
<!DOCTYPE html>
|
|
<meta name="viewport" content="initial-scale=10,width=device-width">
|
|
<style>
|
|
html, body {
|
|
margin: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
scrollbar-width: none;
|
|
}
|
|
#container {
|
|
position: relative;
|
|
}
|
|
#inner {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 10px;
|
|
height: 10px;
|
|
background: green;
|
|
}
|
|
</style>
|
|
<div id="container">
|
|
<div id="inner"></div>
|
|
</div>
|