Bug 142972

Summary: CSSParser is encountering seemingly malformed scroll-snap-destination input
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: Layout and RenderingAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED INVALID    
Severity: Major CC: bfulgham, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Description Brent Fulgham 2015-03-23 11:48:20 PDT
I placed the following assertion in CSSParser to catch instances where the scroll-snap-destination input processed by the CSSParser did not match expectations.

--- a/trunk/Source/WebCore/css/CSSParser.cpp
+++ b/trunk/Source/WebCore/css/CSSParser.cpp
@@ -3354,5 +3354,4 @@
 {
     RefPtr<CSSValueList> position = CSSValueList::createSpaceSeparated();
+    ASSERT(m_valueList->size() == 2);
     if (m_valueList->size() != 2)
         return false;

This is firing for the following test cases:

css3/scroll-snap/scroll-snap-position-values.html
css3/scroll-snap/scroll-snap-property-computed-style.html
Comment 1 Radar WebKit Bug Importer 2015-03-23 11:49:53 PDT
<rdar://problem/20261950>
Comment 2 Brent Fulgham 2015-03-23 15:43:49 PDT
It looks like we're hitting this for the invalid case 'none':

  -webkit-scroll-snap-destination: none;

The specification does not support 'none' as a valid input.
Comment 3 Brent Fulgham 2015-03-23 15:50:49 PDT
The other case was expected bad input from 'scroll-snap-property-computed-style.js', which was passing three arguments to confirm we would reject it.

The assertion should not be used because of these known tests.
Comment 4 Brent Fulgham 2015-03-23 17:16:18 PDT
These cases all work properly. The assertion I added was invalid. Closing as invalid.