diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2010-04-02 23:42:55 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2010-04-02 23:42:55 +0200 |
commit | 6afddbd7a6a41c9a2c27a88749a3ed6dc082bbfd (patch) | |
tree | 3ea3728964fd92330751a8fcd4feee930ee0fd96 /src/url.c | |
parent | e69c87143a4bd364a197d6a86c97680a4e356537 (diff) |
add CSS_TYPE_LENGTH_PERCENTAGE_NUMBER
* Add an additional CssValueType CSS_TYPE_LENGTH_PERCENTAGE_NUMBER
which can be a length, a percentage, or a number without unit.
* Numbers without units are represented as CssLength of type
CSS_LENGTH_TYPE_NONE.
* Properly detect numbers without unit in cases where they are not
allowed (see testcase below). For lengths only '0' can be
specified without unit.
Testcase:
<html>
<head>
<style tyoe="text/css">
div {border: solid black 2px}
</style>
</head>
<body>
<!-- correct - border-width should be set to 0 -> no border -->
<div style="border-width: 0">foo bar</div>
<!-- false - border-width should be left untouched -> 2px border -->
<div style="border-width: 40">foo bar</div>
<!-- false - border-width should be left untouched -> 2px border -->
<div style="border-width: 40 px">foo bar</div>
</body>
</html>
Diffstat (limited to 'src/url.c')
0 files changed, 0 insertions, 0 deletions