Bug 101222 - vw, vh, vmax etc within the @viewport rule should be relative to the initial viewport
Summary: vw, vh, vmax etc within the @viewport rule should be relative to the initial ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: WebExposed
Depends on: 101453
Blocks: 95959
  Show dependency treegraph
 
Reported: 2012-11-05 08:02 PST by Kenneth Rohde Christiansen
Modified: 2013-04-29 14:19 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Rohde Christiansen 2012-11-05 08:02:08 PST
initial viewport: This refers to the viewport before any UA or author styles have overridden the viewport given by the window or viewing area of the UA. Note that the initial viewport size will change with the size of the window or viewing area.

actual viewport: This is the viewport you get after the cascaded viewport descriptors, and the following constraining procedure have been applied.


It seems that ChromeClient::pageRect() currently represents the actual viewport (meaning 1 css unit is not necessarily equal to 1px).


It could make sense to clean up ChromeClient::windowRect and ::pageRect, so that we would have initialViewportRect(), actualViewportRect() and windowRect(). That makes their purpose more clear.
Comment 1 Kenneth Rohde Christiansen 2012-11-05 08:35:33 PST
From the spec: Relative length values are resolved against initial values. For instance ‘em’s are resolved against the initial value of the font-size property. Viewport lengths (vw, vh, vmin, vmax) are relative to the initial viewport.