Bug 109229 - CSS Unit vw in border-width maps to 0px.
Summary: CSS Unit vw in border-width maps to 0px.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: gur.trio
URL: http://espadrine.github.com/aulx/
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-07 13:51 PST by Thaddee Tyl
Modified: 2013-09-12 09:43 PDT (History)
11 users (show)

See Also:


Attachments
Test case (256 bytes, text/html)
2013-04-20 00:21 PDT, Stuart P. Bentley
no flags Details
Patch (14.91 KB, patch)
2013-09-12 03:18 PDT, gur.trio
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thaddee Tyl 2013-02-07 13:51:43 PST
At the following URL: <http://espadrine.github.com/aulx/>,
you may notice the following CSS rule:

    hgroup { border: 0.4vw solid rgba(188,188,196,0.3); }

Any vw unit that I tried in the border (or in any border at all, see <http://jsbin.com/avirem/1>)
made the border width be 0px, which is invalid.
However, it does parse the rule fine.

- It should be valid as per the spec,
- It works on Firefox 19+,
- WebKit seems to accept the percentage type, which isn't allowed by the spec (but I assume works similarly).
Comment 1 Stuart P. Bentley 2013-04-20 00:19:33 PDT
Downstream bug: https://code.google.com/p/chromium/issues/detail?id=125709
Comment 2 Stuart P. Bentley 2013-04-20 00:21:56 PDT
Created attachment 198931 [details]
Test case

From Chromium bug: https://code.google.com/p/chromium/issues/detail?id=125709
Comment 3 Stuart P. Bentley 2013-04-20 00:29:02 PDT
Also, I don't see the percentage type working for borders (I set it to 30% and it didn't change).
Comment 4 Stuart P. Bentley 2013-04-20 00:34:51 PDT
In general, viewport-percentage lengths (vw, vh, vmin, and vmax) don't work for:

- border(-width)
- outline(-width)
- (-webkit-)box-shadow
Comment 5 Thierry Michel 2013-05-21 03:56:04 PDT
It's the same on Mac OS X (10.8.3) with :
- Chrome / Version 26.0.1410.65
- Chrome Canary / Version 28.0.1499.0 canary

I also noticed that viewport units map to -1px with box-shadow property...
Comment 6 gur.trio 2013-09-12 03:18:45 PDT
Created attachment 211414 [details]
Patch
Comment 7 gur.trio 2013-09-12 03:20:13 PDT
(In reply to comment #6)
> Created an attachment (id=211414) [details]
> Patch

Added patch for handling border/outline properties incase units are in vh/vw units.

It was crashing incase border is given in vh/vw units.

Darin and Simon please can you'll review this?
Comment 8 WebKit Commit Bot 2013-09-12 09:43:24 PDT
Comment on attachment 211414 [details]
Patch

Clearing flags on attachment: 211414

Committed r155624: <http://trac.webkit.org/changeset/155624>
Comment 9 WebKit Commit Bot 2013-09-12 09:43:27 PDT
All reviewed patches have been landed.  Closing bug.