KDE Bug Tracking System
Home
Report New Wish or Bug
Query Existing Reports
First
Last
Prev
Next
No search results available
Search page
Bug
91572
:
css background-position value text and length/p...
P
roduct
:
konqueror
Co
m
ponent
:
khtml renderer
Status
:
RESOLVED
Resolution
:
FIXED
Target
:
---
Version
:
unspecified
Pr
i
ority
:
NOR
Severity
:
normal
V
otes
:
0
Description
:
Opened:
2004-10-18 07:24
Last Changed:
2004-10-22 21:30:55
Version: (using KDE Devel) Installed from: Compiled sources KHTML/CSS doesn't handle case when there is a keyword (left, center, right) with a percentage or length in second or the opposite a percentage or length with a keyword (top, center, bottom). Exemple: background-position: left 10px; background-position: center 2em; background-position: right 80%; and background-position: 10px top; background-position: 2em center; background-position: 80% bottom; @see khtml/css/parser.php:585 Simple test case with background-position: center 10px:
http://yansanmo.no-ip.org:8080/test/css/backgroundImage.htm
Comment
#1
Stephan Kulow 2004-10-18 09:18:11
From
http://www.w3.org/TR/REC-CSS2/colors.html#background-properties
: "Keywords cannot be combined with percentage values or length values" So it should ignore the background-position tag and render as if you didn't specify it at all. Problem is: no browser does. Mozilla and IE agree on ignoring the statement in the the spec and konqueror ignores the 10px.
Comment
#2
Stephan Kulow 2004-10-18 09:26:48
I'm really undecided how to fix your bug report. I guess I would fix the strictness part, but if you found this problem on a web site we should rather add a "IE compliance" check.
Comment
#3
Stephan Kulow 2004-10-18 09:37:39
https://bugzilla.mozilla.org/show_bug.cgi?id=237065
- that's interesting. They closed a very similiar bug report as INVALID. Still the supplied test case works in my firefox :)
Comment
#4
Yan Morin 2004-10-18 13:40:50
http://www.w3.org/TR/CSS21/colors.html#background-properties
Combinations of keyword, length and percentage values are allowed, (e.g., '50% 2cm' or 'center 2cm' or 'center 10%'). Value: [ [ <percentage> | <length> | left | center | right ] [ <percentage> | <length> | top | center | bottom ]? ] | [ [ left | center | right ] || [ top | center | bottom ] ] | inherit And with MSIE:
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/backgroundposition.asp
Comment
#5
bert w3 org 2004-10-18 14:32:44
Stephan Kulow writes:
> ------- You are receiving this mail because: ------- > You are on the CC list for the bug, or are watching someone who is. > >
http://bugs.kde.org/show_bug.cgi?id=91572
> > > > > ------- Additional Comments From coolo kde org 2004-10-18 09:37 ------- >
https://bugzilla.mozilla.org/show_bug.cgi?id=237065
- that's interesting. They closed a very similiar bug report as INVALID. Still the supplied test case works in my firefox :)
It's a change between CSS2 and CSS 2.1. Several implementers reported that it was as easy to support it as to reject it (and in fact most browsers supported it) and so there was no good reason to forbid 'center 10px' anymore. Thus the CSS working group relaxed the syntax in the revised edition of CSS2. '10px 50%' --> allowed (10 px from the left, 50% from the top) 'left 10%' --> allowed (0% from the left, 10% from the top) 'center 5%' --> allowed (50% from the left, 5% from the top) '5% center' --> allowed (5% from the left, 50% from the top) '2px bottom' --> allowed (2px from the left, 100% from the top) 'center top' --> allowed (50% from the left, 0% from the top) 'top center' --> allowed! (in this case vertical comes before horizontal) 'right top' --> allowd (100% from the left, 0% from the top) 'top right' --> allowed! (in this case vertical comes before horizontal) '10px left' --> NOT allowed (10px from the left and 50% from the left?) 'top 20%' --> NOT allowed (0% from the top and 20% from the top?) Bert
Comment
#6
Yan Morin 2004-10-18 19:29:02
Some tests cases (with the Bert's test cases).
http://yansanmo.no-ip.org:8080/test/css/backgroundPosition.php
With a 800x600 screen, the green square should be over the background or as the text says.
Comment
#7
Stephan Kulow 2004-10-22 21:30:55
CVS commit by coolo: implementing CSS 2.1 compliant parsing of background-position. There are several cases to catch, which makes the code a bit longer than the usual property. BUG: 91572 M +5 -0 ChangeLog 1.308 M +196 -80 css/cssparser.cpp 1.296 M +6 -1 css/cssparser.h 1.77
P
latform
:
Compiled Sources
O
S
:
Linux
K
eywords
:
People
Reporter
:
Yan Morin
Assigned To
:
Konqueror Developers
CC
:
bert w3 org
Related actions
View Bug Activity
Format For Printing
XML
Clone This Bug
Note
You need to
log in
before you can comment on or make changes to this bug.
Attachments
Add an attachment
(proposed patch, testcase, etc.)
Depends on
:
B
locks
:
Show dependency tree
-
Show dependency graph
First
Last
Prev
Next
No search results available
Search page
Actions
Reports
Requests
Reports
Bugs reported today
Bugs reported in the last 3 days
Bug reports with patches
Weekly Bug statistics
The most hated bugs
The most severe bugs
The most frequently reported bugs
The most wanted features
Junior Jobs
Report ownership counts and charts
My Account
New Account
Log In