Bug 101222

Summary: vw, vh, vmax etc within the @viewport rule should be relative to the initial viewport
Product: WebKit Reporter: Kenneth Rohde Christiansen <kenneth>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: jkjiang, peter, syoichi, tmpsantos
Priority: P2 Keywords: WebExposed
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 101453    
Bug Blocks: 95959    

Kenneth Rohde Christiansen
Reported 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.
Attachments
Kenneth Rohde Christiansen
Comment 1 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.
Note You need to log in before you can comment on or make changes to this bug.