Bug 142972 - CSSParser is encountering seemingly malformed scroll-snap-destination input
Summary: CSSParser is encountering seemingly malformed scroll-snap-destination input
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Major
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-03-23 11:48 PDT by Brent Fulgham
Modified: 2015-03-23 17:16 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.