Changeset 112629 in webkit
- Timestamp:
- Mar 29, 2012 6:17:38 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r112625 r112629 1 2012-03-29 Bear Travis <betravis@adobe.com> 2 3 Update shape-inside/shape-outside CSS Exclusion properties 4 https://bugs.webkit.org/show_bug.cgi?id=82365 5 6 Reviewed by Ryosuke Niwa. 7 8 Renaming prefixed wrap-shape-inside and wrap-shape-outside 9 to prefixed shape-inside and shape-outside. Updating the 10 tests to reflect the change. 11 12 * fast/exclusions/parsing-wrap-shape-inside-expected.txt: 13 * fast/exclusions/parsing-wrap-shape-outside-expected.txt: 14 * fast/exclusions/script-tests/parsing-wrap-shape-inside.js: 15 (testCSSText): 16 (testComputedStyle): 17 (testNotInherited): 18 * fast/exclusions/script-tests/parsing-wrap-shape-outside.js: 19 (testCSSText): 20 (testComputedStyle): 21 (testNotInherited): 22 1 23 2012-03-29 Dirk Pranke <dpranke@chromium.org> 2 24 -
trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-inside-expected.txt
r101048 r112629 1 Testing the parsing of the -webkit- wrap-shape-inside property.1 Testing the parsing of the -webkit-shape-inside property. 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". -
trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-outside-expected.txt
r101048 r112629 1 Testing the parsing of the -webkit- wrap-shape-outside property.1 Testing the parsing of the -webkit-shape-outside property. 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". -
trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js
r101048 r112629 1 description('Testing the parsing of the -webkit- wrap-shape-inside property.');1 description('Testing the parsing of the -webkit-shape-inside property.'); 2 2 3 3 function testCSSText(declaration, expected) 4 4 { 5 5 var element = document.createElement("div"); 6 element.style.cssText = "-webkit- wrap-shape-inside: " + declaration;7 return element.style.webkit WrapShapeInside;6 element.style.cssText = "-webkit-shape-inside: " + declaration; 7 return element.style.webkitShapeInside; 8 8 } 9 9 … … 11 11 var element = document.createElement("div"); 12 12 document.body.appendChild(element); 13 element.style.setProperty("-webkit- wrap-shape-inside", value);13 element.style.setProperty("-webkit-shape-inside", value); 14 14 15 15 var computedStyle = getComputedStyle(element); 16 var actualValue = computedStyle.getPropertyValue("-webkit- wrap-shape-inside");16 var actualValue = computedStyle.getPropertyValue("-webkit-shape-inside"); 17 17 document.body.removeChild(element); 18 18 … … 23 23 var parentElement = document.createElement("div"); 24 24 document.body.appendChild(parentElement); 25 parentElement.style.setProperty("-webkit- wrap-shape-inside", parentValue);25 parentElement.style.setProperty("-webkit-shape-inside", parentValue); 26 26 27 27 var childElement = document.createElement("div"); 28 28 parentElement.appendChild(childElement); 29 childElement.style.setProperty("-webkit- wrap-shape-inside", childValue);29 childElement.style.setProperty("-webkit-shape-inside", childValue); 30 30 31 31 var parentComputedStyle = getComputedStyle(parentElement); 32 var parentActual = parentComputedStyle.getPropertyValue('-webkit- wrap-shape-inside')32 var parentActual = parentComputedStyle.getPropertyValue('-webkit-shape-inside') 33 33 34 34 var childComputedStyle = getComputedStyle(childElement); 35 var childActual = childComputedStyle.getPropertyValue('-webkit- wrap-shape-inside')35 var childActual = childComputedStyle.getPropertyValue('-webkit-shape-inside') 36 36 37 37 parentElement.removeChild(childElement); -
trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-outside.js
r101048 r112629 1 description('Testing the parsing of the -webkit- wrap-shape-outside property.');1 description('Testing the parsing of the -webkit-shape-outside property.'); 2 2 3 3 function testCSSText(declaration, expected) 4 4 { 5 5 var element = document.createElement("div"); 6 element.style.cssText = "-webkit- wrap-shape-outside: " + declaration;7 return element.style.webkit WrapShapeOutside;6 element.style.cssText = "-webkit-shape-outside: " + declaration; 7 return element.style.webkitShapeOutside; 8 8 } 9 9 … … 11 11 var element = document.createElement("div"); 12 12 document.body.appendChild(element); 13 element.style.setProperty("-webkit- wrap-shape-outside", value);13 element.style.setProperty("-webkit-shape-outside", value); 14 14 15 15 var computedStyle = getComputedStyle(element); 16 var actualValue = computedStyle.getPropertyValue("-webkit- wrap-shape-outside");16 var actualValue = computedStyle.getPropertyValue("-webkit-shape-outside"); 17 17 document.body.removeChild(element); 18 18 … … 23 23 var parentElement = document.createElement("div"); 24 24 document.body.appendChild(parentElement); 25 parentElement.style.setProperty("-webkit- wrap-shape-outside", parentValue);25 parentElement.style.setProperty("-webkit-shape-outside", parentValue); 26 26 27 27 var childElement = document.createElement("div"); 28 28 parentElement.appendChild(childElement); 29 childElement.style.setProperty("-webkit- wrap-shape-outside", childValue);29 childElement.style.setProperty("-webkit-shape-outside", childValue); 30 30 31 31 var parentComputedStyle = getComputedStyle(parentElement); 32 var parentActual = parentComputedStyle.getPropertyValue('-webkit- wrap-shape-outside')32 var parentActual = parentComputedStyle.getPropertyValue('-webkit-shape-outside') 33 33 34 34 var childComputedStyle = getComputedStyle(childElement); 35 var childActual = childComputedStyle.getPropertyValue('-webkit- wrap-shape-outside')35 var childActual = childComputedStyle.getPropertyValue('-webkit-shape-outside') 36 36 37 37 parentElement.removeChild(childElement); -
trunk/Source/WebCore/ChangeLog
r112628 r112629 1 2012-03-29 Bear Travis <betravis@adobe.com> 2 3 Update shape-inside/shape-outside CSS Exclusion properties 4 https://bugs.webkit.org/show_bug.cgi?id=82365 5 6 Reviewed by Ryosuke Niwa. 7 8 Updating CSS property names for wrap-shape-inside and wrap-shape-outside 9 to shape-inside and shape-outside, per the current exclusions spec. 10 Renaming some parsing functions in CSSParser for clarity. 11 No new functionality. 12 13 * css/CSSComputedStyleDeclaration.cpp: 14 (WebCore): 15 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 16 * css/CSSParser.cpp: 17 (WebCore::CSSParser::parseValue): 18 (WebCore::CSSParser::parseClipShape): 19 (WebCore::CSSParser::parseExclusionShapeRect): 20 (WebCore::CSSParser::parseExclusionShapeCircle): 21 (WebCore::CSSParser::parseExclusionShapeEllipse): 22 (WebCore::CSSParser::parseExclusionShapePolygon): 23 (WebCore::CSSParser::parseExclusionShape): 24 * css/CSSParser.h: 25 * css/CSSProperty.cpp: 26 (WebCore::CSSProperty::isInheritedProperty): 27 * css/CSSPropertyNames.in: 28 * css/CSSStyleSelector.cpp: 29 (WebCore::CSSStyleSelector::collectMatchingRulesForList): 30 1 31 2012-03-29 Ryan Sleevi <rsleevi@chromium.org> 2 32 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r112555 r112629 2323 2323 case CSSPropertyWebkitWrapPadding: 2324 2324 return cssValuePool->createValue(style->wrapPadding()); 2325 case CSSPropertyWebkit WrapShapeInside:2325 case CSSPropertyWebkitShapeInside: 2326 2326 if (!style->wrapShapeInside()) 2327 2327 return cssValuePool->createIdentifierValue(CSSValueAuto); 2328 2328 return cssValuePool->createValue(style->wrapShapeInside()); 2329 case CSSPropertyWebkit WrapShapeOutside:2329 case CSSPropertyWebkitShapeOutside: 2330 2330 if (!style->wrapShapeOutside()) 2331 2331 return cssValuePool->createIdentifierValue(CSSValueAuto); -
trunk/Source/WebCore/css/CSSParser.cpp
r112587 r112629 1482 1482 validPrimitive = true; 1483 1483 else if (value->unit == CSSParserValue::Function) 1484 return parse Shape(propId, important);1484 return parseClipShape(propId, important); 1485 1485 break; 1486 1486 … … 2400 2400 break; 2401 2401 2402 case CSSPropertyWebkit WrapShapeInside:2403 case CSSPropertyWebkit WrapShapeOutside:2402 case CSSPropertyWebkitShapeInside: 2403 case CSSPropertyWebkitShapeOutside: 2404 2404 if (id == CSSValueAuto) 2405 2405 validPrimitive = true; 2406 2406 else if (value->unit == CSSParserValue::Function) 2407 return parse WrapShape((propId == CSSPropertyWebkitWrapShapeInside), important);2407 return parseExclusionShape((propId == CSSPropertyWebkitShapeInside), important); 2408 2408 break; 2409 2409 case CSSPropertyWebkitWrapMargin: … … 4038 4038 } 4039 4039 4040 bool CSSParser::parse Shape(int propId, bool important)4040 bool CSSParser::parseClipShape(int propId, bool important) 4041 4041 { 4042 4042 CSSParserValue* value = m_valueList->current(); … … 4087 4087 } 4088 4088 4089 PassRefPtr<CSSWrapShape> CSSParser::parse WrapShapeRect(CSSParserValueList* args)4089 PassRefPtr<CSSWrapShape> CSSParser::parseExclusionShapeRect(CSSParserValueList* args) 4090 4090 { 4091 4091 ASSERT(args); … … 4140 4140 } 4141 4141 4142 PassRefPtr<CSSWrapShape> CSSParser::parse WrapShapeCircle(CSSParserValueList* args)4142 PassRefPtr<CSSWrapShape> CSSParser::parseExclusionShapeCircle(CSSParserValueList* args) 4143 4143 { 4144 4144 ASSERT(args); … … 4184 4184 } 4185 4185 4186 PassRefPtr<CSSWrapShape> CSSParser::parse WrapShapeEllipse(CSSParserValueList* args)4186 PassRefPtr<CSSWrapShape> CSSParser::parseExclusionShapeEllipse(CSSParserValueList* args) 4187 4187 { 4188 4188 ASSERT(args); … … 4230 4230 } 4231 4231 4232 PassRefPtr<CSSWrapShape> CSSParser::parse WrapShapePolygon(CSSParserValueList* args)4232 PassRefPtr<CSSWrapShape> CSSParser::parseExclusionShapePolygon(CSSParserValueList* args) 4233 4233 { 4234 4234 ASSERT(args); … … 4280 4280 } 4281 4281 4282 bool CSSParser::parse WrapShape(bool shapeInside, bool important)4282 bool CSSParser::parseExclusionShape(bool shapeInside, bool important) 4283 4283 { 4284 4284 CSSParserValue* value = m_valueList->current(); … … 4291 4291 4292 4292 if (equalIgnoringCase(value->function->name, "rect(")) 4293 shape = parse WrapShapeRect(args);4293 shape = parseExclusionShapeRect(args); 4294 4294 else if (equalIgnoringCase(value->function->name, "circle(")) 4295 shape = parse WrapShapeCircle(args);4295 shape = parseExclusionShapeCircle(args); 4296 4296 else if (equalIgnoringCase(value->function->name, "ellipse(")) 4297 shape = parse WrapShapeEllipse(args);4297 shape = parseExclusionShapeEllipse(args); 4298 4298 else if (equalIgnoringCase(value->function->name, "polygon(")) 4299 shape = parse WrapShapePolygon(args);4299 shape = parseExclusionShapePolygon(args); 4300 4300 4301 4301 if (shape) { 4302 addProperty(shapeInside ? CSSPropertyWebkit WrapShapeInside : CSSPropertyWebkitWrapShapeOutside, cssValuePool()->createValue(shape.release()), important);4302 addProperty(shapeInside ? CSSPropertyWebkitShapeInside : CSSPropertyWebkitShapeOutside, cssValuePool()->createValue(shape.release()), important); 4303 4303 m_valueList->next(); 4304 4304 return true; -
trunk/Source/WebCore/css/CSSParser.h
r112537 r112629 139 139 bool parseDashboardRegions(int propId, bool important); 140 140 141 bool parse Shape(int propId, bool important);142 143 bool parse WrapShape(bool shapeInside, bool important);144 PassRefPtr<CSSWrapShape> parse WrapShapeRect(CSSParserValueList* args);145 PassRefPtr<CSSWrapShape> parse WrapShapeCircle(CSSParserValueList* args);146 PassRefPtr<CSSWrapShape> parse WrapShapeEllipse(CSSParserValueList* args);147 PassRefPtr<CSSWrapShape> parse WrapShapePolygon(CSSParserValueList* args);141 bool parseClipShape(int propId, bool important); 142 143 bool parseExclusionShape(bool shapeInside, bool important); 144 PassRefPtr<CSSWrapShape> parseExclusionShapeRect(CSSParserValueList* args); 145 PassRefPtr<CSSWrapShape> parseExclusionShapeCircle(CSSParserValueList* args); 146 PassRefPtr<CSSWrapShape> parseExclusionShapeEllipse(CSSParserValueList* args); 147 PassRefPtr<CSSWrapShape> parseExclusionShapePolygon(CSSParserValueList* args); 148 148 149 149 bool parseFont(bool important); -
trunk/Source/WebCore/css/CSSProperty.cpp
r112418 r112629 611 611 case CSSPropertyWebkitWrapMargin: 612 612 case CSSPropertyWebkitWrapPadding: 613 case CSSPropertyWebkit WrapShapeInside:614 case CSSPropertyWebkit WrapShapeOutside:613 case CSSPropertyWebkitShapeInside: 614 case CSSPropertyWebkitShapeOutside: 615 615 case CSSPropertyWebkitWrapThrough: 616 616 #if ENABLE(SVG) -
trunk/Source/WebCore/css/CSSPropertyNames.in
r111342 r112629 362 362 -webkit-flow-from 363 363 -webkit-region-overflow 364 -webkit- wrap-shape-inside365 -webkit- wrap-shape-outside364 -webkit-shape-inside 365 -webkit-shape-outside 366 366 -webkit-wrap-margin 367 367 -webkit-wrap-padding -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r112555 r112629 3740 3740 } 3741 3741 3742 case CSSPropertyWebkit WrapShapeInside:3742 case CSSPropertyWebkitShapeInside: 3743 3743 HANDLE_INHERIT_AND_INITIAL(wrapShapeInside, WrapShapeInside); 3744 3744 if (!primitiveValue) … … 3750 3750 return; 3751 3751 3752 case CSSPropertyWebkit WrapShapeOutside:3752 case CSSPropertyWebkitShapeOutside: 3753 3753 HANDLE_INHERIT_AND_INITIAL(wrapShapeOutside, WrapShapeOutside); 3754 3754 if (!primitiveValue)
Note: See TracChangeset
for help on using the changeset viewer.