| Top |
WebKitViewportAttributesWebKitViewportAttributes — Represents the viewport properties of a web page |
| gint | available-height | Read / Write |
| gint | available-width | Read / Write |
| gint | desktop-width | Read / Write |
| gint | device-dpi | Read / Write |
| gint | device-height | Read / Write |
| gfloat | device-pixel-ratio | Read |
| gint | device-width | Read / Write |
| gint | height | Read |
| gfloat | initial-scale-factor | Read |
| gfloat | maximum-scale-factor | Read |
| gfloat | minimum-scale-factor | Read |
| gboolean | user-scalable | Read |
| gboolean | valid | Read |
| gint | width | Read |
WebKitViewportAttributes offers the viewport properties to user agents to control the viewport layout. It contains the viewport size, initial scale with limits, and information about whether a user is able to scale the contents in the viewport. This makes a web page fit the device screen.
The “viewport-attributes-changed” signal will be emitted with WebKitViewportAttributes when the viewport attributes are updated in the case of loading web pages contain the viewport properties and calling webkit_viewport_attributes_recompute.
If the device size, available size, desktop width, or device DPI needs to be changed due to a consequence of an explicit browser request (caused by screen rotation, resizing, or similar reasons), You should call webkit_viewport_attributes_recompute to recompute the viewport properties and override those values in the handler of