Changeset 156638 in webkit
- Timestamp:
- Sep 30, 2013 1:14:41 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r156635 r156638 1 2013-09-18 Sergio Villar Senin <svillar@igalia.com> 2 3 [CSS Grid Layout] Implement the grid-area shorthand 4 https://bugs.webkit.org/show_bug.cgi?id=103334 5 6 Reviewed by Andreas Kling. 7 8 From Blink r151684 by <jchaffraix@chromium.org> 9 10 * fast/css-grid-layout/grid-item-area-get-set-expected.txt: Added. 11 * fast/css-grid-layout/grid-item-area-get-set.html: Added. 12 1 13 2013-09-30 Vani Hegde <vani.hegde@samsung.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r156636 r156638 1 2013-09-18 Sergio Villar Senin <svillar@igalia.com> 2 3 [CSS Grid Layout] Implement the grid-area shorthand 4 https://bugs.webkit.org/show_bug.cgi?id=103334 5 6 Reviewed by Andreas Kling. 7 8 Based on Blink r151684 by <jchaffraix@chromium.org> 9 10 Test: fast/css-grid-layout/grid-item-area-get-set.html 11 12 Added support to specify grid positions using the 13 '-webkit-grid-area' shorthand. Named grid areas are still not 14 allowed, to be done in a follow up patch as it likely requires 15 '-webkit-grid-template' support. 16 17 * css/CSSComputedStyleDeclaration.cpp: 18 (WebCore::ComputedStyleExtractor::propertyValue): 19 * css/CSSParser.cpp: 20 (WebCore::CSSParser::parseValue): 21 (WebCore::CSSParser::parseGridItemPositionShorthand): 22 * css/CSSPropertyNames.in: 23 * css/StylePropertySet.cpp: 24 (WebCore::StylePropertySet::getPropertyValue): 25 * css/StylePropertyShorthand.cpp: 26 (WebCore::webkitGridAreaShorthand): 27 (WebCore::shorthandForProperty): 28 * css/StylePropertyShorthand.h: 29 * css/StyleResolver.cpp: 30 (WebCore::StyleResolver::applyProperty): 31 1 32 2013-09-30 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 33 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r156622 r156638 2138 2138 case CSSPropertyWebkitGridRowEnd: 2139 2139 return valueForGridPosition(style->gridItemRowEnd()); 2140 case CSSPropertyWebkitGridArea: 2141 return getCSSPropertyValuesForGridShorthand(webkitGridAreaShorthand()); 2140 2142 case CSSPropertyWebkitGridColumn: 2141 2143 return getCSSPropertyValuesForGridShorthand(webkitGridColumnShorthand()); -
trunk/Source/WebCore/css/CSSParser.cpp
r156636 r156638 2703 2703 break; 2704 2704 2705 case CSSPropertyWebkitGridArea: 2705 2706 case CSSPropertyWebkitGridColumn: 2706 2707 case CSSPropertyWebkitGridRow: { … … 4893 4894 ShorthandScope scope(this, shorthandId); 4894 4895 const StylePropertyShorthand& shorthand = shorthandForProperty(shorthandId); 4895 ASSERT(shorthand.length() == 2);4896 4896 if (!parseValue(shorthand.properties()[0], important)) 4897 4897 return false; 4898 4898 4899 if (!m_valueList->current()) { 4900 // Only one value was specified, the opposite value should be set to 'auto'. 4901 // FIXME: If the first property was <ident>, the opposite value should be the same <ident>. 4902 addProperty(shorthand.properties()[1], cssValuePool().createIdentifierValue(CSSValueAuto), important); 4903 return true; 4904 } 4905 4906 if (!isForwardSlashOperator(m_valueList->current())) 4907 return false; 4908 4909 if (!m_valueList->next()) 4910 return false; 4911 4912 return parseValue(shorthand.properties()[1], important); 4899 size_t index = 1; 4900 for (; index < shorthand.length(); ++index) { 4901 if (!m_valueList->current()) 4902 break; 4903 4904 if (!isForwardSlashOperator(m_valueList->current())) 4905 return false; 4906 4907 if (!m_valueList->next()) 4908 return false; 4909 4910 if (!parseValue(shorthand.properties()[index], important)) 4911 return false; 4912 } 4913 4914 // Only some values out of the {2|4} positions were specified, the other values should be set to 'auto'. 4915 // FIXME: If the first property was <ident>, the opposite value should be the same <ident>. 4916 for (; index < shorthand.length(); ++index) 4917 addProperty(shorthand.properties()[index], cssValuePool().createIdentifierValue(CSSValueAuto), important); 4918 4919 return true; 4913 4920 } 4914 4921 -
trunk/Source/WebCore/css/CSSPropertyNames.in
r156347 r156638 304 304 -webkit-justify-content 305 305 -webkit-font-size-delta 306 -webkit-grid-area 306 307 -webkit-grid-auto-columns 307 308 -webkit-grid-auto-rows -
trunk/Source/WebCore/css/StylePropertySet.cpp
r156550 r156638 166 166 case CSSPropertyWebkitFlexFlow: 167 167 return getShorthandValue(webkitFlexFlowShorthand()); 168 case CSSPropertyWebkitGridArea: 169 return getShorthandValue(webkitGridAreaShorthand()); 168 170 case CSSPropertyWebkitGridColumn: 169 171 return getShorthandValue(webkitGridColumnShorthand()); -
trunk/Source/WebCore/css/StylePropertyShorthand.cpp
r155352 r156638 352 352 static const CSSPropertyID marginCollapseProperties[] = { CSSPropertyWebkitMarginBeforeCollapse, CSSPropertyWebkitMarginAfterCollapse }; 353 353 return StylePropertyShorthand(CSSPropertyWebkitMarginCollapse, marginCollapseProperties, WTF_ARRAY_LENGTH(marginCollapseProperties)); 354 } 355 356 StylePropertyShorthand webkitGridAreaShorthand() 357 { 358 static const CSSPropertyID webkitGridAreaProperties[] = { 359 CSSPropertyWebkitGridRowStart, 360 CSSPropertyWebkitGridColumnStart, 361 CSSPropertyWebkitGridRowEnd, 362 CSSPropertyWebkitGridColumnEnd 363 }; 364 return StylePropertyShorthand(CSSPropertyWebkitGridArea, webkitGridAreaProperties, WTF_ARRAY_LENGTH(webkitGridAreaProperties)); 354 365 } 355 366 … … 546 557 case CSSPropertyWebkitFlexFlow: 547 558 return webkitFlexFlowShorthand(); 559 case CSSPropertyWebkitGridArea: 560 return webkitGridAreaShorthand(); 548 561 case CSSPropertyWebkitGridColumn: 549 562 return webkitGridColumnShorthand(); -
trunk/Source/WebCore/css/StylePropertyShorthand.h
r155352 r156638 100 100 StylePropertyShorthand webkitFlexFlowShorthand(); 101 101 StylePropertyShorthand webkitFlexShorthand(); 102 StylePropertyShorthand webkitGridAreaShorthand(); 102 103 StylePropertyShorthand webkitGridColumnShorthand(); 103 104 StylePropertyShorthand webkitGridRowShorthand(); -
trunk/Source/WebCore/css/StyleResolver.cpp
r156636 r156638 2352 2352 case CSSPropertyWebkitFlex: 2353 2353 case CSSPropertyWebkitFlexFlow: 2354 case CSSPropertyWebkitGridArea: 2354 2355 case CSSPropertyWebkitGridColumn: 2355 2356 case CSSPropertyWebkitGridRow:
Note: See TracChangeset
for help on using the changeset viewer.