Changeset 158839 in webkit
- Timestamp:
- Nov 7, 2013 2:53:17 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r158838 r158839 1 2013-11-06 Sergio Villar Senin <svillar@igalia.com> 2 3 [CSS Grid Layout] CSSParser should reject <track-list> without a <track-size> 4 https://bugs.webkit.org/show_bug.cgi?id=118025 5 6 Reviewed by Andreas Kling. 7 8 Added a new test that verifies that <track-list> exclusively made 9 of <track-name> are not supported. 10 11 * fast/css-grid-layout/named-grid-line-get-set-expected.txt: 12 * fast/css-grid-layout/named-grid-line-get-set.html: 13 1 14 2013-11-06 Sergio Villar Senin <svillar@igalia.com> 2 15 -
trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set-expected.txt
r153752 r158839 47 47 PASS getComputedStyle(gridElement, '').getPropertyValue('-webkit-grid-definition-columns') is "none" 48 48 PASS getComputedStyle(gridElement, '').getPropertyValue('-webkit-grid-definition-rows') is "none" 49 PASS getComputedStyle(gridElement, '').getPropertyValue('-webkit-grid-definition-columns') is "none" 50 PASS getComputedStyle(gridElement, '').getPropertyValue('-webkit-grid-definition-rows') is "none" 49 51 PASS successfullyParsed is true 50 52 -
trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set.html
r155263 r158839 148 148 element.style.webkitGridDefinitionRows = "'bar"; 149 149 testValue(element, "none", "none"); 150 151 element = document.createElement("div"); 152 document.body.appendChild(element); 153 element.style.webkitGridDefinitionColumns = "'foo' 'bar'"; 154 element.style.webkitGridDefinitionRows = "'bar' 'foo'"; 155 testValue(element, "none", "none"); 150 156 </script> 151 157 <script src="../../resources/js-test-post.js"></script> -
trunk/Source/WebCore/ChangeLog
r158838 r158839 1 2013-11-06 Sergio Villar Senin <svillar@igalia.com> 2 3 [CSS Grid Layout] CSSParser should reject <track-list> without a <track-size> 4 https://bugs.webkit.org/show_bug.cgi?id=118025 5 6 Reviewed by Andreas Kling. 7 8 From Blink r152914 by <jchaffraix@chromium.org> 9 10 Make sure that we parse at least 1 <track-size> inside each 11 <track-list>. The old parser code allowed track-lists exclusively 12 made of <track-name>. The way it was implemented eases the future 13 addition of parsing for the repeat() function. 14 15 * css/CSSParser.cpp: 16 (WebCore::CSSParser::parseGridTrackList): 17 * css/StyleResolver.cpp: 18 (WebCore::createGridTrackList): ASSERT if we don't find any 19 <track-size> now that we detect their absence in the parser. 20 1 21 2013-11-06 Sergio Villar Senin <svillar@igalia.com> 2 22 -
trunk/Source/WebCore/css/CSSParser.cpp
r158803 r158839 5024 5024 5025 5025 RefPtr<CSSValueList> values = CSSValueList::createSpaceSeparated(); 5026 // Handle leading track names 5027 while (m_valueList->current() && m_valueList->current()->unit == CSSPrimitiveValue::CSS_STRING) { 5028 RefPtr<CSSPrimitiveValue> name = createPrimitiveStringValue(m_valueList->current()); 5029 values->append(name.release()); 5030 m_valueList->next(); 5031 } 5032 5033 bool seenTrackSize = false; 5026 5034 while (m_valueList->current()) { 5035 RefPtr<CSSPrimitiveValue> primitiveValue = parseGridTrackSize(); 5036 if (!primitiveValue) 5037 return false; 5038 5039 seenTrackSize = true; 5040 values->append(primitiveValue.release()); 5041 5027 5042 while (m_valueList->current() && m_valueList->current()->unit == CSSPrimitiveValue::CSS_STRING) { 5028 5043 RefPtr<CSSPrimitiveValue> name = createPrimitiveStringValue(m_valueList->current()); 5029 values->append(name );5044 values->append(name.release()); 5030 5045 m_valueList->next(); 5031 5046 } 5032 5033 // This allows trailing <string>* per the specification. 5034 if (!m_valueList->current()) 5035 break; 5036 5037 RefPtr<CSSPrimitiveValue> primitiveValue = parseGridTrackSize(); 5038 if (!primitiveValue) 5039 return false; 5040 5041 values->append(primitiveValue.release()); 5042 } 5047 } 5048 5049 if (!seenTrackSize) 5050 return false; 5051 5043 5052 addProperty(propId, values.release(), important); 5044 5053 return true; -
trunk/Source/WebCore/css/StyleResolver.cpp
r158838 r158839 1993 1993 } 1994 1994 1995 if (trackSizes.isEmpty())1996 return false;1997 1995 // The parser should have rejected any <track-list> without any <track-size> as 1996 // this is not conformant to the syntax. 1997 ASSERT(!trackSizes.isEmpty()); 1998 1998 return true; 1999 1999 }
Note: See TracChangeset
for help on using the changeset viewer.