Bug 47159 - CSS 2.1 failure: background-position-201, background-position-202
Summary: CSS 2.1 failure: background-position-201, background-position-202
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
: 41201 (view as bug list)
Depends on:
Blocks: 47141
  Show dependency treegraph
 
Reported: 2010-10-04 21:53 PDT by Simon Fraser (smfr)
Modified: 2011-03-11 12:19 PST (History)
6 users (show)

See Also:


Attachments
background-position-202.htm (8.32 KB, text/html)
2010-10-04 21:53 PDT, Simon Fraser (smfr)
no flags Details
Patch (1.46 MB, patch)
2011-03-11 11:41 PST, Dave Hyatt
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2010-10-04 21:53:02 PDT
Created attachment 69754 [details]
background-position-202.htm

These tests fail:

html4/background-position-201	fail
html4/background-position-202	fail
Comment 1 Simon Fraser (smfr) 2011-01-08 13:48:27 PST
The bug seems to be that we parse background-position: bottom 100%; as valid, when the spec says:
"If at least one value is not a keyword, then the first value represents the horizontal position and the second represents the vertical position".
http://www.w3.org/TR/CSS21/colors.html#propdef-background-position
Comment 2 Dave Hyatt 2011-03-11 11:41:01 PST
Created attachment 85503 [details]
Patch
Comment 3 WebKit Review Bot 2011-03-11 11:44:18 PST
Attachment 85503 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1

Source/WebCore/css/CSSParser.cpp:2579:  An else should appear on the same line as the preceding }  [whitespace/newline] [4]
Source/WebCore/css/CSSParser.cpp:2627:  One line control clauses should not use braces.  [whitespace/braces] [4]
Total errors found: 2 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Simon Fraser (smfr) 2011-03-11 11:45:51 PST
Comment on attachment 85503 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=85503&action=review

> Source/WebCore/css/CSSParser.h:93
> +        enum FillPositionFlag { InvalidFillPosition = 0, AmbiguousFillPosition = 1, XFillPosition = 2, YFillPosition = 4 };

If this is a bitmask I'd prefer to see 0, 1 << 0, 1 << 1, 1 << 2
Comment 5 Dave Hyatt 2011-03-11 11:56:59 PST
Fixed in r80868.
Comment 6 Build Bot 2011-03-11 12:07:41 PST
Attachment 85503 [details] did not build on win:
Build output: http://queues.webkit.org/results/8135376
Comment 7 Andreas Kling 2011-03-11 12:17:53 PST
*** Bug 41201 has been marked as a duplicate of this bug. ***
Comment 8 WebKit Review Bot 2011-03-11 12:19:09 PST
http://trac.webkit.org/changeset/80868 might have broken Windows Release (Build) and Windows Debug (Build)